commit
c165f24208
|
@ -1,59 +1,28 @@
|
||||||
x@{builderDefsPackage
|
{ stdenv, fetchurl }:
|
||||||
, ...}:
|
|
||||||
builderDefsPackage
|
|
||||||
(a :
|
|
||||||
let
|
|
||||||
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
|
||||||
[];
|
|
||||||
|
|
||||||
buildInputs = map (n: builtins.getAttr n x)
|
with stdenv.lib;
|
||||||
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
stdenv.mkDerivation rec {
|
||||||
sourceInfo = rec {
|
name = "gsm-${version}";
|
||||||
baseName="gsm";
|
version = "1.0.13";
|
||||||
version="1.0.13";
|
|
||||||
name="${baseName}-${version}";
|
src = fetchurl {
|
||||||
url="http://www.quut.com/gsm/${name}.tar.gz";
|
url = "http://www.quut.com/gsm/${name}.tar.gz";
|
||||||
hash="1bcjl2h60gvr1dc5a963h3vnz9zl6n8qrfa3qmb2x3229lj1iiaj";
|
sha256 = "1bcjl2h60gvr1dc5a963h3vnz9zl6n8qrfa3qmb2x3229lj1iiaj";
|
||||||
};
|
|
||||||
in
|
|
||||||
rec {
|
|
||||||
src = a.fetchurl {
|
|
||||||
url = sourceInfo.url;
|
|
||||||
sha256 = sourceInfo.hash;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inherit (sourceInfo) name version;
|
preConfigure = ''
|
||||||
inherit buildInputs;
|
sed -e 's,$(GSM_INSTALL_ROOT)/inc,$(GSM_INSTALL_ROOT)/includes,' -i Makefile
|
||||||
|
mkdir -p "$out/"{bin,lib,man/man1,man/man3,include}
|
||||||
/* doConfigure should be removed if not needed */
|
makeFlags="$makeFlags INSTALL_ROOT=$out"
|
||||||
phaseNames = ["createDirs" "setVars" "doMakeInstall"];
|
|
||||||
|
|
||||||
createDirs = a.fullDepEntry ''
|
|
||||||
mkdir -p "$out/"{bin,lib,share/man,share/info,include/gsm}
|
|
||||||
'' ["minInit" "defEnsureDir"];
|
|
||||||
|
|
||||||
setVars = a.noDepEntry ''
|
|
||||||
export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fPIC"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
makeFlags = [
|
parallelBuild = false;
|
||||||
''INSTALL_ROOT="$out"''
|
|
||||||
''GSM_INSTALL_INC="$out/include/gsm"''
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "A GSM codec library";
|
description = "Lossy speech compression codec";
|
||||||
maintainers = with a.lib.maintainers;
|
homepage = http://www.quut.com/gsm/;
|
||||||
[
|
license = licenses.bsd2;
|
||||||
raskin
|
maintainers = with maintainers; [ codyopel raskin ];
|
||||||
];
|
platforms = platforms.all;
|
||||||
platforms = with a.lib.platforms;
|
|
||||||
linux;
|
|
||||||
license = a.lib.licenses.free;
|
|
||||||
};
|
};
|
||||||
passthru = {
|
}
|
||||||
updateInfo = {
|
|
||||||
downloadPage = "http://www.quut.com/gsm/";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}) x
|
|
||||||
|
|
Loading…
Reference in New Issue