nixpkgs-suyu/pkgs/applications/networking/mumble/overlay.nix
ldesgoui 83edcc15ea mumble-overlay: fix outdated install phase
As it stands, the mumble-overlay install phase attemps to link
`{mumble}/lib/libmumble.so.1.2.*` to its output's `lib/libmumble.so.1`,
this has stopped matching any file ever since mumble has passed
version 1.3.
Instead, we simply link from `{mumble}/lib/libmumble.so.1`
2020-10-02 00:10:30 +02:00

30 lines
747 B
Nix

{ stdenv, lib, which, file, mumble, mumble_i686
}:
let
binPath = lib.makeBinPath [ which file ];
in stdenv.mkDerivation {
name = "mumble-overlay-${mumble.version}";
inherit (mumble) src;
phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
installPhase = ''
mkdir -p $out/lib
ln -s ${mumble}/lib/libmumble.so.1 $out/lib/
${lib.optionalString (mumble_i686 != null) ''
mkdir -p $out/lib32
ln -s ${mumble_i686}/lib/libmumble.so.1 $out/lib32/
''}
install -Dm755 scripts/mumble-overlay $out/bin/mumble-overlay
sed -i "s,/usr/lib,$out/lib,g" $out/bin/mumble-overlay
sed -i '2iPATH="${binPath}:$PATH"' $out/bin/mumble-overlay
'';
meta = {
platforms = stdenv.lib.platforms.linux;
};
}