mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-16 18:53:17 +00:00
libfreeaptx: fix build on darwin
This commit is contained in:
parent
d635ee99e3
commit
152765ca8b
@ -11,6 +11,12 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "sha256-eEUhOrKqb2hHWanY+knpY9FBEnjkkFTB+x6BZgMBpbo=";
|
sha256 = "sha256-eEUhOrKqb2hHWanY+knpY9FBEnjkkFTB+x6BZgMBpbo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||||
|
substituteInPlace Makefile \
|
||||||
|
--replace '-soname' '-install_name' \
|
||||||
|
--replace 'lib$(NAME).so' 'lib$(NAME).dylib'
|
||||||
|
'';
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [
|
||||||
"PREFIX=${placeholder "out"}"
|
"PREFIX=${placeholder "out"}"
|
||||||
# disable static builds
|
# disable static builds
|
||||||
@ -21,11 +27,18 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
postInstall = lib.optionalString stdenv.isDarwin ''
|
||||||
|
install_name_tool -change libfreeaptx.dylib.0 $out/lib/libfreeaptx.dylib.0 $out/bin/freeaptxdec
|
||||||
|
install_name_tool -change libfreeaptx.dylib.0 $out/lib/libfreeaptx.dylib.0 $out/bin/freeaptxenc
|
||||||
|
install_name_tool -id $out/lib/libfreeaptx.dylib $out/lib/libfreeaptx.dylib
|
||||||
|
install_name_tool -id $out/lib/libfreeaptx.dylib.0 $out/lib/libfreeaptx.dylib.0
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Free Implementation of Audio Processing Technology codec (aptX)";
|
description = "Free Implementation of Audio Processing Technology codec (aptX)";
|
||||||
license = licenses.lgpl21Plus;
|
license = licenses.lgpl21Plus;
|
||||||
homepage = "https://github.com/iamthehorker/libfreeaptx";
|
homepage = "https://github.com/iamthehorker/libfreeaptx";
|
||||||
platforms = platforms.linux;
|
platforms = platforms.unix;
|
||||||
maintainers = with maintainers; [ kranzes ];
|
maintainers = with maintainers; [ kranzes ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user