git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #7529 from joachifm/trivial-builderDefs

Some trivial builderDefs->mkDerivation translations

commit8e86ec5bf01ec1f363d79199a73879cdfb99a32f authorPascal Wittmann <PascalWittmann@gmx.net> dateSat 25 Apr 2015, 11:32 (12 years ago) parent1cdbde9d8e0dfd
5 files changed+64−135
pkgs/applications/misc/vue/default.nix+16−39 pkgs/applications/networking/p2p/ldcpp/default.nix+22−31 pkgs/development/libraries/libffcall/default.nix+11−21 pkgs/tools/system/ioping/default.nix+14−41 pkgs/top-level/all-packages.nix+1−3
pkgs/applications/misc/vue/default.nix+16−39
@@ -1,50 +1,27 @@
1−x@{builderDefsPackage
2− , jre, unzip
3− , ...}:
4−builderDefsPackage
5−(a :
6−let
7− helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
8− [];
1+{ stdenv, fetchurl, jre }:
92
10− buildInputs = map (n: builtins.getAttr n x)
11− (builtins.attrNames (builtins.removeAttrs x helperArgNames));
12− sourceInfo = rec {
13− baseName="vue";
14− version="3.2.2";
15− name="${baseName}-${version}";
16− url="releases.atech.tufts.edu/jenkins/job/VUE/64/deployedArtifacts/download/artifact.2";
17− hash="0sb1kgan8fvph2cqfxk3906cwx5wy83zni2vlz4zzi6yg4zvfxld";
3+stdenv.mkDerivation rec {
4+ name = "vue-${version}";
5+ version = "3.2.2";
6+ src = fetchurl {
7+ url = "releases.atech.tufts.edu/jenkins/job/VUE/64/deployedArtifacts/download/artifact.2";
8+ sha256 = "0sb1kgan8fvph2cqfxk3906cwx5wy83zni2vlz4zzi6yg4zvfxld";
189 };
19−in
20−rec {
21− src = a.fetchurl {
22− url = sourceInfo.url;
23− sha256 = sourceInfo.hash;
24− };
25−
26− inherit (sourceInfo) name version;
27− inherit buildInputs;
2810
29− /* doConfigure should be removed if not needed */
30− phaseNames = ["doDeploy"];
11+ phases = "installPhase";
3112
32− doDeploy = a.fullDepEntry ''
13+ installPhase = ''
3314 mkdir -p "$out"/{share/vue,bin}
3415 cp ${src} "$out/share/vue/vue.jar"
35− echo '#!${a.stdenv.shell}' >> "$out/bin/vue"
36− echo '${a.jre}/bin/java -jar "'"$out/share/vue/vue.jar"'" "$@"' >> "$out/bin/vue"
16+ echo '#!${stdenv.shell}' >> "$out/bin/vue"
17+ echo '${jre}/bin/java -jar "'"$out/share/vue/vue.jar"'" "$@"' >> "$out/bin/vue"
3718 chmod a+x "$out/bin/vue"
38− '' ["addInputs" "defEnsureDir"];
19+ '';
3920
4021 meta = {
4122 description = "Visual Understanding Environment - mind mapping software";
42− maintainers = with a.lib.maintainers;
43− [
44− raskin
45− ];
46− platforms = with a.lib.platforms;
47− linux;
48− license = a.lib.licenses.free; # Apache License fork, actually
23+ maintainers = with stdenv.lib.maintainers; [ raskin ];
24+ platforms = with stdenv.lib.platforms; linux;
25+ license = stdenv.lib.licenses.free; # Apache License fork, actually
4926 };
50−}) x
27+}
pkgs/applications/networking/p2p/ldcpp/default.nix+22−31
@@ -1,37 +1,28 @@
1−{ builderDefs, scons, pkgconfig, gtk, bzip2, libglade, openssl, libX11, boost, zlib }:
1+{ stdenv, fetchurl, scons, pkgconfig, gtk, bzip2, libglade, openssl
2+, libX11, boost, zlib, libnotify }:
23
3−with builderDefs;
4− let localDefs = builderDefs.passthru.function ((rec {
5− src = /* put a fetchurl here */
6− fetchurl {
7− url = http://launchpad.net/linuxdcpp/1.1/1.1.0/+download/linuxdcpp-1.1.0.tar.bz2;
8− sha256 = "66012740e9347a2e994c8af5609c40ebf3f86f767258e071a03ef39a2314298a";
9− };
10−
11− buildInputs = [scons pkgconfig gtk bzip2 libglade
12− openssl libX11 boost];
13− configureFlags = [];
14− doScons = fullDepEntry (''
15− mkdir -p $out
16− export NIX_LDFLAGS="$NIX_LDFLAGS -lX11";
17−
18− for i in gettext xgettext msgfmt msgcat; do
19− echo > $i
20− chmod a+x $i
21− done
22− export PATH=$PATH:$PWD
23−
24− scons PREFIX=$out
25− scons PREFIX=$out install
26− '') ["minInit" "doUnpack" "addInputs" "defEnsureDir"];
27− }));
28− in with localDefs;
294stdenv.mkDerivation rec {
305 name = "ldcpp-1.1.0";
31− builder = writeScript (name + "-builder")
32− (textClosure localDefs
33− [doScons doForceShare doPropagate]);
6+ src = fetchurl {
7+ url = http://launchpad.net/linuxdcpp/1.1/1.1.0/+download/linuxdcpp-1.1.0.tar.bz2;
8+ sha256 = "12i92hirmwryl1qy0n3jfrpziwzb82f61xca9jcjwyilx502f0b6";
9+ };
10+ buildInputs = [ scons pkgconfig gtk bzip2 libglade openssl libX11 boost libnotify ];
11+
12+ installPhase = ''
13+ export NIX_LDFLAGS="$NIX_LDFLAGS -lX11";
14+
15+ touch gettext xgettext msgfmt msgcat
16+ chmod +x gettext xgettext msgfmt msgcat
17+ export PATH=$PATH:$PWD
18+
19+ mkdir -p $out
20+ scons PREFIX=$out
21+ scons PREFIX=$out install
22+ '';
23+
3424 meta = {
35− description = "Linux DC++ - Direct Connect client";
25+ description = "Direct Connect client";
26+ license = stdenv.lib.licenses.gpl2;
3627 };
3728}
pkgs/development/libraries/libffcall/default.nix+11−21
@@ -1,38 +1,28 @@
1−a :
2−let
3− fetchurl = a.fetchurl;
1+{ stdenv, fetchcvs }:
42
5− version = a.lib.attrByPath ["version"] "2009-05-27" a;
6− buildInputs = with a; [
7−
8− ];
9−in
10−rec {
11− src = a.fetchcvs {
3+stdenv.mkDerivation rec {
4+ name = "libffcall-${version}";
5+ version = "2009-05-27";
6+ src = fetchcvs {
127 cvsRoot = ":pserver:anonymous@cvs.savannah.gnu.org:/sources/libffcall";
138 module = "ffcall";
149 date = version;
15− sha256 = "91bcb5a20c85a9ccab45886aae8fdbbcf1f20f995ef898e8bdd2964448daf724";
10+ sha256 = "097pv94495njppl9iy2yk47z5wdwvf7swsl88nmwrac51jibbg4i";
1611 };
1712
18− inherit buildInputs;
19− configureFlags = [];
20−
21− /* doConfigure should be removed if not needed */
22− phaseNames = ["doConfigure" "doMakeInstall"];
23−
24− doConfigure = a.fullDepEntry (''
13+ configurePhase = ''
2514 for i in ./configure */configure; do
2615 cwd="$PWD"
27− cd "$(dirname "$i")";
16+ cd "$(dirname "$i")";
2817 ( test -f Makefile && make distclean ) || true
2918 ./configure --prefix=$out
3019 cd "$cwd"
3120 done
32− '') a.doConfigure.deps;
21+ '';
3322
34− name = "libffcall-" + version;
3523 meta = {
3624 description = "Foreign function call library";
25+ license = stdenv.lib.licenses.gpl2;
26+ platforms = stdenv.lib.platforms.unix;
3727 };
3828}
pkgs/tools/system/ioping/default.nix+14−41
@@ -1,47 +1,20 @@
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="ioping";
13− version = "0.9";
14− name="${baseName}-${version}";
15− url="https://docs.google.com/uc?id=0B_PlDc2qaehFWWtLZ3Z3N1ltdm8&export=download";
16− };
17−in
18−rec {
19− src = a.fetchurl {
20− url = sourceInfo.url;
21− name = "${sourceInfo.name}.tar.gz";
3+stdenv.mkDerivation rec {
4+ name = "ioping-${version}";
5+ version = "0.9";
6+ src = fetchurl {
7+ url = "https://github.com/koct9i/ioping/releases/download/v${version}/${name}.tar.gz";
228 sha256 = "0pbp7b3304y9yyv2w41l3898h5q8w77hnnnq1vz8qz4qfl4467lm";
239 };
2410
25− inherit (sourceInfo) name version;
26− inherit buildInputs;
11+ makeFlags = "PREFIX=$(out)";
2712
28− /* doConfigure should be removed if not needed */
29− phaseNames = ["doMakeInstall"];
30− makeFlags = [
31− ''PREFIX="$out"''
32− ];
33−
34− meta = {
35− description = "Filesystem IO delay time measurer";
36− maintainers = with a.lib.maintainers;
37− [
38− raskin
39− ];
40− platforms = with a.lib.platforms;
41− linux;
42− license = a.lib.licenses.gpl3Plus;
43− homepage = "http://code.google.com/p/ioping/";
44− inherit version;
13+ meta = with stdenv.lib; {
14+ description = "Disk I/O latency measuring tool";
15+ maintainers = with maintainers; [ raskin ];
16+ platforms = with platforms; unix;
17+ license = licenses.gpl3Plus;
18+ homepage = https://github.com/koct9i/ioping;
4519 };
46−}) x
47−
20+}
pkgs/top-level/all-packages.nix+1−3
@@ -6475,9 +6475,7 @@ let
64756475
64766476 libfixposix = callPackage ../development/libraries/libfixposix {};
64776477
6478− libffcall = builderDefsPackage (import ../development/libraries/libffcall) {
6479− inherit fetchcvs;
6480− };
6478+ libffcall = callPackage ../development/libraries/libffcall { };
64816479
64826480 libffi = callPackage ../development/libraries/libffi { };
64836481