mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-16 02:33:25 +00:00
39f9c2dcfe
Commit 152765ca8b
caused thousands of rebuilds;
let's save doing that work on nixpkgs master.
45 lines
1.3 KiB
Nix
45 lines
1.3 KiB
Nix
{ lib, stdenv, fetchFromGitHub }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libfreeaptx";
|
|
version = "0.1.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "iamthehorker";
|
|
repo = pname;
|
|
rev = version;
|
|
sha256 = "sha256-eEUhOrKqb2hHWanY+knpY9FBEnjkkFTB+x6BZgMBpbo=";
|
|
};
|
|
|
|
postPatch = if stdenv.isDarwin then ''
|
|
substituteInPlace Makefile \
|
|
--replace '-soname' '-install_name' \
|
|
--replace 'lib$(NAME).so' 'lib$(NAME).dylib'
|
|
'' else null;
|
|
|
|
makeFlags = [
|
|
"PREFIX=${placeholder "out"}"
|
|
# disable static builds
|
|
"ANAME="
|
|
"AOBJECTS="
|
|
"STATIC_UTILITIES="
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
postInstall = if stdenv.isDarwin then ''
|
|
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
|
|
'' else null;
|
|
|
|
meta = with lib; {
|
|
description = "Free Implementation of Audio Processing Technology codec (aptX)";
|
|
license = licenses.lgpl21Plus;
|
|
homepage = "https://github.com/iamthehorker/libfreeaptx";
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ kranzes ];
|
|
};
|
|
}
|