@@ -1,59 +1,28 @@
1−x@{builderDefsPackage
2− , ...}:
3−builderDefsPackage
4−(a :
5−let
6− helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
7− [];
1+{ stdenv, fetchurl }:
82
9− buildInputs = map (n: builtins.getAttr n x)
10− (builtins.attrNames (builtins.removeAttrs x helperArgNames));
11− sourceInfo = rec {
12− baseName="gsm";
13− version="1.0.13";
14− name="${baseName}-${version}";
15− url="http://www.quut.com/gsm/${name}.tar.gz";
16− hash="1bcjl2h60gvr1dc5a963h3vnz9zl6n8qrfa3qmb2x3229lj1iiaj";
17− };
18−in
19−rec {
20− src = a.fetchurl {
21− url = sourceInfo.url;
22− sha256 = sourceInfo.hash;
23− };
24−
25− inherit (sourceInfo) name version;
26− inherit buildInputs;
3+with stdenv.lib;
4+stdenv.mkDerivation rec {
5+ name = "gsm-${version}";
6+ version = "1.0.13";
277
28− /* doConfigure should be removed if not needed */
29− phaseNames = ["createDirs" "setVars" "doMakeInstall"];
30−
31− createDirs = a.fullDepEntry ''
32− mkdir -p "$out/"{bin,lib,share/man,share/info,include/gsm}
33− '' ["minInit" "defEnsureDir"];
8+ src = fetchurl {
9+ url = "http://www.quut.com/gsm/${name}.tar.gz";
10+ sha256 = "1bcjl2h60gvr1dc5a963h3vnz9zl6n8qrfa3qmb2x3229lj1iiaj";
11+ };
3412
35− setVars = a.noDepEntry ''
36− export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fPIC"
13+ preConfigure = ''
14+ sed -e 's,$(GSM_INSTALL_ROOT)/inc,$(GSM_INSTALL_ROOT)/includes,' -i Makefile
15+ mkdir -p "$out/"{bin,lib,man/man1,man/man3,include}
16+ makeFlags="$makeFlags INSTALL_ROOT=$out"
3717 '';
3818
39− makeFlags = [
40− ''INSTALL_ROOT="$out"''
41− ''GSM_INSTALL_INC="$out/include/gsm"''
42− ];
19+ parallelBuild = false;
4320
4421 meta = {
45− description = "A GSM codec library";
46− maintainers = with a.lib.maintainers;
47− [
48− raskin
49− ];
50− platforms = with a.lib.platforms;
51− linux;
52− license = a.lib.licenses.free;
53− };
54− passthru = {
55− updateInfo = {
56− downloadPage = "http://www.quut.com/gsm/";
57− };
22+ description = "Lossy speech compression codec";
23+ homepage = http://www.quut.com/gsm/;
24+ license = licenses.bsd2;
25+ maintainers = with maintainers; [ codyopel raskin ];
26+ platforms = platforms.all;
5827 };
59−}) x
28+}