Skip to content

Commit

Permalink
Merge pull request #191785 from usertam/patch/discord
Browse files Browse the repository at this point in the history
discord: wrap executables to $out/bin for darwin
  • Loading branch information
Artturin authored Sep 20, 2022
2 parents 9cca3b5 + c90ec7c commit 749458e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{ pname, version, src, openasar, meta, stdenv, binaryName, desktopName, lib, undmg, withOpenASAR ? false }:
{ pname, version, src, openasar, meta, stdenv, binaryName, desktopName, lib, undmg, makeWrapper, withOpenASAR ? false }:

stdenv.mkDerivation {
inherit pname version src meta;

nativeBuildInputs = [ undmg ];
nativeBuildInputs = [ undmg makeWrapper ];

sourceRoot = ".";

Expand All @@ -13,6 +13,10 @@ stdenv.mkDerivation {
mkdir -p $out/Applications
cp -r "${desktopName}.app" $out/Applications
# wrap executable to $out/bin
mkdir -p $out/bin
makeWrapper "$out/Applications/${desktopName}.app/Contents/MacOS/${binaryName}" "$out/bin/${binaryName}"
runHook postInstall
'';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ let
};
ptb = rec {
pname = "discord-ptb";
binaryName = "DiscordPTB";
binaryName = if stdenv.isLinux then "DiscordPTB" else desktopName;
desktopName = "Discord PTB";
};
canary = rec {
pname = "discord-canary";
binaryName = "DiscordCanary";
binaryName = if stdenv.isLinux then "DiscordCanary" else desktopName;
desktopName = "Discord Canary";
};
}
Expand Down

0 comments on commit 749458e

Please sign in to comment.