mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 23:36:17 +01:00
discord: clean up /opt, put discord in its own dir
This commit is contained in:
parent
f0fc3101d5
commit
bff106ea60
1 changed files with 8 additions and 8 deletions
|
@ -25,21 +25,21 @@ stdenv.mkDerivation rec {
|
|||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,opt,share/pixmaps}
|
||||
mv * $out/opt
|
||||
mkdir -p $out/{bin,opt/discord,share/pixmaps}
|
||||
mv * $out/opt/discord
|
||||
|
||||
# Copying how adobe-reader does it,
|
||||
# see pkgs/applications/misc/adobe-reader/builder.sh
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||
--set-rpath "$out/opt:$libPath" \
|
||||
$out/opt/Discord
|
||||
--set-rpath "$out/opt/discord:$libPath" \
|
||||
$out/opt/discord/Discord
|
||||
|
||||
paxmark m $out/opt/Discord
|
||||
paxmark m $out/opt/discord/Discord
|
||||
|
||||
wrapProgram $out/opt/Discord --prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH:${libcxx}/lib:${systemd.lib}/lib:${libpulseaudio}/lib"
|
||||
wrapProgram $out/opt/discord/Discord --prefix LD_LIBRARY_PATH : "$LD_LIBRARY_PATH:${libcxx}/lib:${systemd.lib}/lib:${libpulseaudio}/lib"
|
||||
|
||||
ln -s $out/opt/Discord $out/bin/
|
||||
ln -s $out/opt/discord.png $out/share/pixmaps
|
||||
ln -s $out/opt/discord/Discord $out/bin/
|
||||
ln -s $out/opt/discord/discord.png $out/share/pixmaps
|
||||
|
||||
ln -s "${desktopItem}/share/applications" $out/share/
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue