From fed17b3467707d28e0694e85091b5b676b761ac3 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 2 Apr 2015 14:50:49 +0200 Subject: [PATCH 01/43] stalonetray: reimplement using mkDerivation --- .../window-managers/stalonetray/default.nix | 50 +++++-------------- 1 file changed, 13 insertions(+), 37 deletions(-) diff --git a/pkgs/applications/window-managers/stalonetray/default.nix b/pkgs/applications/window-managers/stalonetray/default.nix index fdb81a88b15..0c362dce60b 100644 --- a/pkgs/applications/window-managers/stalonetray/default.nix +++ b/pkgs/applications/window-managers/stalonetray/default.nix @@ -1,47 +1,23 @@ -x@{builderDefsPackage - , libX11, xproto - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl, libX11, xproto }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="stalonetray"; - version="0.8.1"; - name="${baseName}-${version}"; - url="mirror://sourceforge/${baseName}/${name}.tar.bz2"; - hash="1wp8pnlv34w7xizj1vivnc3fkwqq4qgb9dbrsg15598iw85gi8ll"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + name = "stalonetray-${version}"; + version = "0.8.1"; + src = fetchurl { + url = "mirror://sourceforge/stalonetray/${name}.tar.bz2"; + sha256 = "1wp8pnlv34w7xizj1vivnc3fkwqq4qgb9dbrsg15598iw85gi8ll"; }; + buildInputs = [ libX11 xproto ]; - inherit (sourceInfo) name version; - inherit buildInputs; - - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "doMakeInstall"]; - - meta = { + meta = with stdenv.lib; { description = "Stand alone tray"; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; - linux; + maintainers = with maintainers; [ raskin ]; + platforms = with platforms; linux; }; + passthru = { updateInfo = { downloadPage = "http://sourceforge.net/projects/stalonetray/files/"; }; }; -}) x - +} From 342cf232eaaa5b476713edecc1197c20e01bfb50 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 2 Apr 2015 14:59:34 +0200 Subject: [PATCH 02/43] fbpanel: reimplement using mkDerivation --- .../window-managers/fbpanel/default.nix | 59 ++++++------------- 1 file changed, 18 insertions(+), 41 deletions(-) diff --git a/pkgs/applications/window-managers/fbpanel/default.nix b/pkgs/applications/window-managers/fbpanel/default.nix index b0c5b34bf3c..ba021a58421 100644 --- a/pkgs/applications/window-managers/fbpanel/default.nix +++ b/pkgs/applications/window-managers/fbpanel/default.nix @@ -1,53 +1,30 @@ -x@{builderDefsPackage - , libX11, gtk, pkgconfig, libXmu - , libXpm, libpng, libjpeg, libtiff, librsvg - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl, pkgconfig +, libX11, libXmu, libXpm, gtk, libpng, libjpeg, libtiff, librsvg +}: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="fbpanel"; - version="6.1"; - name="${baseName}-${version}"; - url="mirror://sourceforge/${baseName}/${name}.tbz2"; - hash="e14542cc81ea06e64dd4708546f5fd3f5e01884c3e4617885c7ef22af8cf3965"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + name = "fbpanel-${version}"; + version = "6.1"; + src = fetchurl { + url = "mirror://sourceforge/fbpanel/${name}.tbz2"; + sha256 = "e14542cc81ea06e64dd4708546f5fd3f5e01884c3e4617885c7ef22af8cf3965"; }; + buildInputs = + [ pkgconfig libX11 libXmu libXpm gtk libpng libjpeg libtiff librsvg ]; - inherit (sourceInfo) name version; - inherit buildInputs; + preConfigure = "patchShebangs ."; - /* doConfigure should be removed if not needed */ - phaseNames = ["setVars" "doUnpack" "fixPaths" "doConfigure" "doMakeInstall"]; + NIX_LDFLAGS="-lX11"; - fixPaths=(a.doPatchShebangs "."); - setVars = a.fullDepEntry '' - export NIX_LDFLAGS="$NIX_LDFLAGS -lX11" - '' []; - - meta = { + meta = with stdenv.lib; { description = "A stand-alone panel"; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; - linux; + maintainers = with maintainers; [ raskin ]; + platforms = with platforms; linux; }; + passthru = { updateInfo = { downloadPage = "fbpanel.sourceforge.net"; }; }; -}) x - +} From 79a827c7fbca6d818314b5b455d96eddec1fce2e Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 2 Apr 2015 15:36:19 +0200 Subject: [PATCH 03/43] eql: reimplement using mkDerivation --- pkgs/development/compilers/eql/default.nix | 90 ++++++++-------------- 1 file changed, 30 insertions(+), 60 deletions(-) diff --git a/pkgs/development/compilers/eql/default.nix b/pkgs/development/compilers/eql/default.nix index 5bb0a2e5f64..8f1987c5559 100644 --- a/pkgs/development/compilers/eql/default.nix +++ b/pkgs/development/compilers/eql/default.nix @@ -1,54 +1,37 @@ -x@{builderDefsPackage - , fetchgit, qt4, ecl, xorgserver - , xkbcomp, xkeyboard_config - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - ["fetchgit"]; +{ stdenv, fetchgit, qt4, ecl, xorgserver, xkbcomp, xkeyboard_config }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - method = "fetchgit"; +stdenv.mkDerivation rec { + version = src.rev; + name = "eql-git-${version}"; + src = fetchgit { rev = "9097bf98446ee33c07bb155d800395775ce0d9b2"; - url = "git://gitorious.org/eql/eql"; - hash = "1fp88xmmk1sa0iqxahfiv818bp2sbf66vqrd4xq9jb731ybdvsb8"; - version = rev; - name = "eql-git-${version}"; + url = "https://gitlab.com/eql/eql.git"; + sha256 = "1fp88xmmk1sa0iqxahfiv818bp2sbf66vqrd4xq9jb731ybdvsb8"; }; -in -rec { - srcDrv = a.fetchgit { - url = sourceInfo.url; - sha256 = sourceInfo.hash; - rev = sourceInfo.rev; - }; - src = srcDrv + "/"; - inherit (sourceInfo) name version; - inherit buildInputs; + buildInputs = [ ecl qt4 xorgserver xkbcomp xkeyboard_config ]; - phaseNames = ["setVars" "fixPaths" "doQMake" "doMake" "doDeploy"]; + NIX_CFLAGS_COMPILE = "-fPIC"; - setVars = a.fullDepEntry ('' - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fPIC" - '') []; - - fixPaths = a.fullDepEntry ('' + postPatch = '' sed -re 's@[(]in-home "gui/.command-history"[)]@(concatenate '"'"'string (ext:getenv "HOME") "/.eql-gui-command-history")@' -i gui/gui.lisp - '') ["minInit" "doUnpack"]; + ''; + + buildPhase = '' + cd src + ecl -shell make-eql-lib.lisp + qmake eql_lib.pro + make + cd .. - doQMake = a.fullDepEntry ('' cd src qmake eql_exe.pro make cd .. cd src - '') ["addInputs" "doUnpack" "buildEQLLib"]; + ''; - doDeploy = a.fullDepEntry ('' + installPhase = '' cd .. mkdir -p $out/bin $out/lib/eql/ $out/include $out/include/gen $out/lib cp -r . $out/lib/eql/build-dir @@ -56,35 +39,22 @@ rec { ln -s $out/lib/eql/build-dir/src/*.h $out/include ln -s $out/lib/eql/build-dir/src/gen/*.h $out/include/gen ln -s $out/lib/eql/build-dir/libeql*.so* $out/lib - '') ["minInit"]; + ''; - buildEQLLib = a.fullDepEntry ('' - cd src - ecl -shell make-eql-lib.lisp - qmake eql_lib.pro - make - cd .. - '') ["doUnpack" "addInputs"]; - - - meta = { + meta = with stdenv.lib; { description = "Embedded Qt Lisp (ECL+Qt)"; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; - linux; + maintainers = with maintainers; [ raskin ]; + platforms = with platforms; linux; + license = licenses.mit; }; + passthru = { updateInfo = { downloadPage = "http://password-taxi.at/EQL"; method = "fetchgit"; - rev = "370b7968fd73d5babc81e35913a37111a788487f"; - url = "git://gitorious.org/eql/eql"; - hash = "2370e111d86330d178f3ec95e8fed13607e51fed8859c6e95840df2a35381636"; + rev = src.rev; + url = src.url; + hash = src.sha256; }; - inherit srcDrv; }; -}) x - +} From 9d7c387d2686c544536e928b1255872c5169720c Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 2 Apr 2015 16:15:17 +0200 Subject: [PATCH 04/43] untie: reimplement using mkDerivation --- pkgs/os-specific/linux/untie/default.nix | 48 +++++++----------------- 1 file changed, 13 insertions(+), 35 deletions(-) diff --git a/pkgs/os-specific/linux/untie/default.nix b/pkgs/os-specific/linux/untie/default.nix index 441f041e6be..d6b88bfc467 100644 --- a/pkgs/os-specific/linux/untie/default.nix +++ b/pkgs/os-specific/linux/untie/default.nix @@ -1,46 +1,24 @@ -x@{builderDefsPackage - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="untie"; - version="0.3"; - name="${baseName}-${version}"; - url="http://guichaz.free.fr/${baseName}/files/${name}.tar.bz2"; - hash="154c3550af3d3513022a15381bbc2693f5dd7789bf0a4320635991b8f6b3648c"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + name = "untie-${version}"; + version = "0.3"; + src = fetchurl { + url = "http://guichaz.free.fr/untie/files/${name}.tar.bz2"; + sha256 = "1334ngvbi4arcch462mzi5vxvxck4sy1nf0m58116d9xmx83ak0m"; }; - inherit (sourceInfo) name version; - inherit buildInputs; + makeFlags = "PREFIX=$(out)"; - phaseNames = ["doMakeInstall"]; - makeFlags=["PREFIX=$out"]; - - meta = { + meta = with stdenv.lib; { description = "A tool to run processes untied from some of the namespaces"; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; - linux; + maintainers = with maintainers; [ raskin ]; + platforms = with platforms; linux; }; + passthru = { updateInfo = { downloadPage = "http://guichaz.free.fr/untie"; }; }; -}) x - +} From 931eaa341c6b56f64ae8206278da8403cda20de6 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 2 Apr 2015 18:03:01 +0200 Subject: [PATCH 05/43] philter: reimplement using mkDerivation --- pkgs/tools/networking/philter/default.nix | 65 +++++++---------------- 1 file changed, 19 insertions(+), 46 deletions(-) diff --git a/pkgs/tools/networking/philter/default.nix b/pkgs/tools/networking/philter/default.nix index af5b9aacffc..3d5ed7b34ca 100644 --- a/pkgs/tools/networking/philter/default.nix +++ b/pkgs/tools/networking/philter/default.nix @@ -1,57 +1,30 @@ -x@{builderDefsPackage - , python, makeWrapper - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl, python }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="philter"; - version="1.1"; - name="${baseName}-${version}"; - url="mirror://sourceforge/${baseName}/${name}.tar.gz"; - hash="177pqfflhdn2mw9lc1wv9ik32ji69rjqr6dw83hfndwlsva5151l"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + name = "philter-${version}"; + version = "1.1"; + src = fetchurl { + url = "mirror://sourceforge/philter/${name}.tar.gz"; + sha256 = "177pqfflhdn2mw9lc1wv9ik32ji69rjqr6dw83hfndwlsva5151l"; }; - inherit (sourceInfo) name version; - inherit buildInputs; + installPhase = '' + mkdir -p "$out"/{bin,share/philter} + cp .philterrc "$out"/share/philter/philterrc + sed -i 's@/usr/local/bin@${python}/bin@' src/philter.py + cp src/philter.py "$out"/bin/philter + chmod +x "$out"/bin/philter + ''; - /* doConfigure should be removed if not needed */ - phaseNames = ["installProgram" "patchShebangs" "wrapBinContentsPython"]; - patchShebangs = (a.doPatchShebangs "$out/bin"); - - installProgram = a.fullDepEntry('' - mv "$out/share/philter/".*rc "$out/share/philter/philterrc" - mkdir -p "$out/bin" - cp "$out/share/philter/src/philter.py" "$out/bin/philter" - chmod a+x "$out/bin/philter" - '') ["addInputs" "copyToShare" "minInit"]; - - copyToShare = (a.simplyShare "philter"); - - meta = { + meta = with stdenv.lib; { description = "Mail sorter for Maildirs"; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; - linux; + maintainers = with maintainers; [ raskin ]; + platforms = with platforms; linux; }; + passthru = { updateInfo = { downloadPage = "http://philter.sourceforge.net/"; }; }; -}) x - +} From 2889b153c52acdf4e03760827c68acd71f60be89 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 2 Apr 2015 18:21:53 +0200 Subject: [PATCH 06/43] barcode: reimplement using mkDerivation --- pkgs/tools/graphics/barcode/default.nix | 45 +++++++------------------ 1 file changed, 12 insertions(+), 33 deletions(-) diff --git a/pkgs/tools/graphics/barcode/default.nix b/pkgs/tools/graphics/barcode/default.nix index 23a2e6dd78f..b35b929da40 100644 --- a/pkgs/tools/graphics/barcode/default.nix +++ b/pkgs/tools/graphics/barcode/default.nix @@ -1,42 +1,21 @@ -x@{builderDefsPackage - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - version = "0.99"; - baseName="barcode"; - name="${baseName}-${version}"; - url="mirror://gnu/${baseName}/${name}.tar.xz"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + version = "0.99"; + pname = "barcode"; + src = fetchurl { + url = "mirror://gnu/${pname}/${name}.tar.xz"; sha256 = "1indapql5fjz0bysyc88cmc54y8phqrbi7c76p71fgjp45jcyzp8"; }; - inherit (sourceInfo) name version; - inherit buildInputs; - - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "doMakeInstall"]; - - meta = { + meta = with stdenv.lib; { description = "GNU barcode generator"; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; allBut darwin; + maintainers = with maintainers; [ raskin ]; + platforms = with platforms; allBut darwin; downloadPage = "http://ftp.gnu.org/gnu/barcode/"; updateWalker = true; inherit version; + homepage = http://ftp.gnu.org/gnu/barcode/; }; -}) x - +} From b0e5edae357ff999daf90509334197f82d824f23 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Fri, 3 Apr 2015 11:35:10 +0200 Subject: [PATCH 07/43] zbar: reimplement using mkDerivation --- pkgs/tools/graphics/zbar/default.nix | 61 ++++++++++------------------ 1 file changed, 21 insertions(+), 40 deletions(-) diff --git a/pkgs/tools/graphics/zbar/default.nix b/pkgs/tools/graphics/zbar/default.nix index 51dcc2a9c80..2f4e3f63374 100644 --- a/pkgs/tools/graphics/zbar/default.nix +++ b/pkgs/tools/graphics/zbar/default.nix @@ -1,39 +1,23 @@ -x@{builderDefsPackage - , imagemagickBig, pkgconfig, python, pygtk, perl, libX11, libv4l - , qt4, lzma, gtk2 - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl, imagemagickBig, pkgconfig, python, pygtk, perl +, libX11, libv4l, qt4, lzma, gtk2 +}: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="zbar"; - version="0.10"; - name="${baseName}-${version}"; - pName="${baseName}"; - url="mirror://sourceforge/project/${pName}/${baseName}/${version}/${name}.tar.bz2"; - hash="1imdvf5k34g1x2zr6975basczkz3zdxg6xnci50yyp5yvcwznki3"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + pname = "zbar"; + version = "0.10"; + src = fetchurl { + url = "mirror://sourceforge/project/${pname}/${pname}/${version}/${name}.tar.bz2"; + sha256 = "1imdvf5k34g1x2zr6975basczkz3zdxg6xnci50yyp5yvcwznki3"; }; - inherit (sourceInfo) name version; - inherit buildInputs; - - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "doMakeInstall"]; + buildInputs = + [ imagemagickBig pkgconfig python pygtk perl libX11 + libv4l qt4 lzma gtk2 ]; configureFlags = ["--disable-video"]; - - meta = { + + meta = with stdenv.lib; { description = "Bar code reader"; longDescription = '' ZBar is an open source software suite for reading bar codes from various @@ -42,18 +26,15 @@ rec { EAN-13/UPC-A, UPC-E, EAN-8, Code 128, Code 39, Interleaved 2 of 5 and QR Code. ''; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; - linux; - license = a.lib.licenses.lgpl21; + maintainers = with maintainers; [ raskin ]; + platforms = with platforms; linux; + license = licenses.lgpl21; + homepage = http://zbar.sourceforge.net/; }; + passthru = { updateInfo = { downloadPage = "http://zbar.sourceforge.net/"; }; }; -}) x - +} From e532271089de48893738f07e21583c35da07c2f2 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Fri, 3 Apr 2015 12:02:10 +0200 Subject: [PATCH 08/43] ripmime: reimplement using mkDerivation --- pkgs/tools/networking/ripmime/default.nix | 56 +++++++---------------- 1 file changed, 17 insertions(+), 39 deletions(-) diff --git a/pkgs/tools/networking/ripmime/default.nix b/pkgs/tools/networking/ripmime/default.nix index fd5964cb55f..a0a0efa85ba 100644 --- a/pkgs/tools/networking/ripmime/default.nix +++ b/pkgs/tools/networking/ripmime/default.nix @@ -1,51 +1,29 @@ -x@{builderDefsPackage - - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="ripmime"; - version="1.4.0.10"; - name="${baseName}-${version}"; - url="http://www.pldaniels.com/${baseName}/${name}.tar.gz"; - hash="0sj06ibmlzy34n8v0mnlq2gwidy7n2aqcwgjh0xssz3vi941aqc9"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + name = "${pname}-${version}"; + pname = "ripmime"; + version = "1.4.0.10"; + src = fetchurl { + url = "http://www.pldaniels.com/${pname}/${name}.tar.gz"; + sha256 = "0sj06ibmlzy34n8v0mnlq2gwidy7n2aqcwgjh0xssz3vi941aqc9"; }; - inherit (sourceInfo) name version; - inherit buildInputs; - - /* doConfigure should be removed if not needed */ - phaseNames = ["fixTarget" "doMakeInstall"]; - fixTarget = a.fullDepEntry ('' + preInstall = '' sed -i Makefile -e "s@LOCATION=.*@LOCATION=$out@" -e "s@man/man1@share/&@" mkdir -p "$out/bin" "$out/share/man/man1" - '') ["doUnpack" "minInit" "defEnsureDir"]; - - meta = { + ''; + + meta = with stdenv.lib; { description = "Attachment extractor for MIME messages"; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; - linux; + maintainers = with maintainers; [ raskin ]; + homepage = http://www.pldaniels.com/ripmime/; + platforms = with platforms; linux; }; + passthru = { updateInfo = { downloadPage = "http://www.pldaniels.com/ripmime/"; }; }; -}) x - +} From 5ddd4812a906aba4294c14c03672a2f7b7268c94 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Fri, 3 Apr 2015 16:36:56 +0200 Subject: [PATCH 09/43] udftools: reimplement using mkDerivation --- pkgs/tools/filesystems/udftools/default.nix | 57 ++++++--------------- 1 file changed, 15 insertions(+), 42 deletions(-) diff --git a/pkgs/tools/filesystems/udftools/default.nix b/pkgs/tools/filesystems/udftools/default.nix index fae14102e51..88153f7cb39 100644 --- a/pkgs/tools/filesystems/udftools/default.nix +++ b/pkgs/tools/filesystems/udftools/default.nix @@ -1,51 +1,24 @@ -x@{builderDefsPackage - , ncurses, readline - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl, ncurses, readline }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="udftools"; - version="1.0.0b3"; - name="${baseName}-${version}"; - project="linux-udf"; - url="mirror://sourceforge/${project}/${baseName}/${version}/${name}.tar.gz"; - hash="180414z7jblby64556i8p24rcaas937zwnyp1zg073jdin3rw1y5"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + name = "udftools-${version}"; + version = "1.0.0b3"; + src = fetchurl { + url = "mirror://sourceforge/linux-udf/udftools/${version}/${name}.tar.gz"; + sha256 = "180414z7jblby64556i8p24rcaas937zwnyp1zg073jdin3rw1y5"; }; - inherit (sourceInfo) name version; - inherit buildInputs; + buildInputs = [ ncurses readline ]; - /* doConfigure should be removed if not needed */ - phaseNames = ["fixIncludes" "doConfigure" "doMakeInstall"]; - - fixIncludes = a.fullDepEntry '' + preConfigure = '' sed -e '1i#include ' -i cdrwtool/cdrwtool.c -i pktsetup/pktsetup.c sed -e 's@[(]char[*][)]spm [+]=@spm = ((char*) spm) + @' -i wrudf/wrudf.c - '' ["doUnpack" "minInit"]; + ''; - meta = { + meta = with stdenv.lib; { description = "UDF tools"; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; - linux; - license = a.lib.licenses.gpl2Plus; + maintainers = with maintainers; [ raskin ]; + platforms = with platforms; linux; + license = licenses.gpl2Plus; }; - passthru = { - }; -}) x - +} From 6812c1eedc1146cf32ad2ef2cd2c4248b8548df3 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Mon, 20 Apr 2015 12:05:04 +0200 Subject: [PATCH 10/43] tftp-hpa: reimplement using mkDerivation Also rename top-level name to tftp-hpa. --- pkgs/tools/networking/tftp-hpa/default.nix | 52 ++++++---------------- pkgs/top-level/all-packages.nix | 7 ++- 2 files changed, 19 insertions(+), 40 deletions(-) diff --git a/pkgs/tools/networking/tftp-hpa/default.nix b/pkgs/tools/networking/tftp-hpa/default.nix index c88b0b2dbe3..57dd43cbb44 100644 --- a/pkgs/tools/networking/tftp-hpa/default.nix +++ b/pkgs/tools/networking/tftp-hpa/default.nix @@ -1,48 +1,24 @@ -x@{builderDefsPackage - , tcp_wrappers - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl, tcp_wrappers }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="tftp-hpa"; - version="5.2"; - name="${baseName}-${version}"; - url="mirror://kernel/software/network/tftp/tftp-hpa/${name}.tar.xz"; - hash="afee361df96a2f88344e191f6a25480fd714e1d28d176c3f10cc43fa206b718b"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + name = "tftp-hpa-${version}"; + version="5.2"; + src = fetchurl { + url = "mirror://kernel/software/network/tftp/tftp-hpa/${name}.tar.xz"; + sha256 = "12vidchglhyc20znq5wdsbhi9mqg90jnl7qr9qs8hbvaz4fkdvmg"; }; - inherit (sourceInfo) name version; - inherit buildInputs; - - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "doMakeInstall"]; - - meta = { + meta = with stdenv.lib; { description = "TFTP tools - a lot of fixes on top of BSD TFTP"; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; - linux; - license = a.lib.licenses.bsd3; + maintainers = with maintainers; [ raskin ]; + platforms = with platforms; linux; + license = licenses.bsd3; + homepage = http://www.kernel.org/pub/software/network/tftp/; }; + passthru = { updateInfo = { downloadPage = "http://www.kernel.org/pub/software/network/tftp/"; }; }; -}) x - +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 04e1542af8c..06e423b7cd5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3393,7 +3393,7 @@ let rcm = callPackage ../tools/misc/rcm {}; - tftp_hpa = callPackage ../tools/networking/tftp-hpa {}; + tftp-hpa = callPackage ../tools/networking/tftp-hpa {}; tidy-html5 = callPackage ../tools/text/tidy-html5 { }; @@ -6354,7 +6354,9 @@ let freeglut = callPackage ../development/libraries/freeglut { }; - freenect = callPackage ../development/libraries/freenect { }; + freenect = callPackage ../development/libraries/freenect { + inherit (xlibs) libXi libXmu; + }; freetype = callPackage ../development/libraries/freetype { }; @@ -15604,6 +15606,7 @@ aliases = with self; rec { youtube-dl = pythonPackages.youtube-dl; # added 2015-06-07 youtubeDL = youtube-dl; # added 2014-10-26 pidginlatexSF = pidginlatex; # added 2014-11-02 + tftp_hpa = tftp-hpa; # added 2015-04-03 }; tweakAlias = _n: alias: with lib; From 4fb29f8d3bfef5b261fe7d2d5f595c30419819d4 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Fri, 24 Apr 2015 19:16:10 +0200 Subject: [PATCH 11/43] smbnetfs: reimplement using mkDerivation --- pkgs/tools/filesystems/smbnetfs/default.nix | 50 ++++++--------------- 1 file changed, 13 insertions(+), 37 deletions(-) diff --git a/pkgs/tools/filesystems/smbnetfs/default.nix b/pkgs/tools/filesystems/smbnetfs/default.nix index 5b5ca199613..9936ac0b39a 100644 --- a/pkgs/tools/filesystems/smbnetfs/default.nix +++ b/pkgs/tools/filesystems/smbnetfs/default.nix @@ -1,47 +1,23 @@ -x@{builderDefsPackage - , fuse, samba, pkgconfig, glib - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl, fuse, samba, pkgconfig, glib }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="smbnetfs"; - dirBaseName="SMBNetFS"; - version = "0.6.0"; - name="${baseName}-${version}"; - project="${baseName}"; - url="mirror://sourceforge/project/${project}/${baseName}/${dirBaseName}-${version}/${name}.tar.bz2"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; +stdenv.mkDerivation rec { + name = "smbnetfs-${version}"; + version = "0.6.0"; + src = fetchurl { + url = "mirror://sourceforge/project/smbnetfs/smbnetfs/SMBNetFS-${version}/${name}.tar.bz2"; sha256 = "16sikr81ipn8v1a1zrqgnsy2as3zcaxbzkr0bm5vxy012bq0plkd"; }; - inherit (sourceInfo) name version; - inherit buildInputs; + buildInputs = [ fuse samba pkgconfig glib ]; - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "doMakeInstall"]; - - meta = { + meta = with stdenv.lib; { description = "A FUSE FS for mounting Samba shares"; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; - linux; - license = a.lib.licenses.gpl2; + maintainers = with maintainers; [ raskin ]; + platforms = with platforms; linux; + license = licenses.gpl2; downloadPage = "http://sourceforge.net/projects/smbnetfs/files/smbnetfs"; updateWalker = true; inherit version; + homepage = http://sourceforge.net/projects/smbnetfs/; }; -}) x - +} From a799e1dff2e5134eb2d0f84fae1d095abf4fc8aa Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sat, 25 Apr 2015 16:55:47 +0200 Subject: [PATCH 12/43] libx86: reimplement using mkDerivation --- pkgs/development/libraries/libx86/default.nix | 45 ++++++++----------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 19 insertions(+), 28 deletions(-) diff --git a/pkgs/development/libraries/libx86/default.nix b/pkgs/development/libraries/libx86/default.nix index 011e936548a..162d284f402 100644 --- a/pkgs/development/libraries/libx86/default.nix +++ b/pkgs/development/libraries/libx86/default.nix @@ -1,38 +1,29 @@ -a : -let - s = import ./src-for-default.nix; - buildInputs = with a; [ - - ]; -in -rec { - src = a.fetchUrlFromSrcInfo s; +{ stdenv, fetchurl }: - inherit (s) name; - inherit buildInputs; - - phaseNames = ["doPatch" "fixX86Def" "killUsr" "doMakeInstall"]; - patches = [./constants.patch ./non-x86.patch]; +stdenv.mkDerivation rec { + name = "libx86-${version}"; + version = "1.1"; + src = fetchurl { + url = "http://www.codon.org.uk/~mjg59/libx86/downloads/${name}.tar.gz"; + sha256 = "0j6h6bc02c6qi0q7c1ncraz4d1hkm5936r35rfsp4x1jrc233wav"; + }; + patches = [./constants.patch ./non-x86.patch ]; # using BACKEND=x86emu on 64bit systems fixes: # http://www.mail-archive.com/suspend-devel@lists.sourceforge.net/msg02355.html makeFlags = [ - "DESTDIR=$out" - ] ++ a.stdenv.lib.optionals ( a.stdenv.isx86_64 || a.stdenv.isArm ) [ "BACKEND=x86emu" ]; + "DESTDIR=$(out)" + ] ++ stdenv.lib.optional (stdenv.isx86_64 || stdenv.isArm) "BACKEND=x86emu"; - fixX86Def = a.fullDepEntry ('' + preBuild = '' sed -i lrmi.c -e 's@defined(__i386__)@(defined(__i386__) || defined(__x86_64__))@' - '') ["doUnpack" "minInit"]; - killUsr = a.fullDepEntry ('' sed -e s@/usr@@ -i Makefile - '') ["doUnpack" "minInit"]; - - meta = { + ''; + + meta = with stdenv.lib; { description = "Real-mode x86 code emulator"; - maintainers = [ - a.lib.maintainers.raskin - ]; - platforms = with a.lib.platforms; - linux ++ freebsd ++ netbsd; + maintainers = with maintainers; [ raskin ]; + platforms = with platforms; linux ++ freebsd ++ netbsd; + license = licenses.mit; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 06e423b7cd5..a7b72ca5b0e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7631,7 +7631,7 @@ let libwpg = callPackage ../development/libraries/libwpg { }; - libx86 = builderDefsPackage ../development/libraries/libx86 {}; + libx86 = callPackage ../development/libraries/libx86 {}; libxdg_basedir = callPackage ../development/libraries/libxdg-basedir { }; From 8b3c02c14ce0fd3d298cf8e6cbee259247f9f1e4 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Sun, 26 Apr 2015 17:04:05 +0200 Subject: [PATCH 13/43] bmrsa: reimplement using mkDerivation Also set homepage & license (GPL according to the README, no license is actually included in the source repo). --- pkgs/tools/security/bmrsa/11.nix | 36 ++++++++++++-------------------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/pkgs/tools/security/bmrsa/11.nix b/pkgs/tools/security/bmrsa/11.nix index 745f2a04cd3..343d48f91d7 100644 --- a/pkgs/tools/security/bmrsa/11.nix +++ b/pkgs/tools/security/bmrsa/11.nix @@ -1,38 +1,28 @@ -args @ {unzip, ... } : -let - lib = args.lib; - fetchurl = args.fetchurl; - fullDepEntry = args.fullDepEntry; +{ stdenv, fetchurl, unzip }: + +stdenv.mkDerivation rec { + name = "bmrsa-${version}"; + version = "11"; - version = "11"; - buildInputs = with args; [ - unzip - ]; -in -rec { src = fetchurl { url = "mirror://sourceforge/bmrsa/bmrsa${version}.zip"; sha256 = "0ksd9xkvm9lkvj4yl5sl0zmydp1wn3xhc55b28gj70gi4k75kcl4"; }; - inherit buildInputs; - configureFlags = []; + buildInputs = [ unzip ]; - /* doConfigure should be specified separately */ - phaseNames = ["doMakeInstall"]; - - doUnpack = fullDepEntry ('' + unpackPhase = '' mkdir bmrsa - cd bmrsa + cd bmrsa unzip ${src} sed -e 's/gcc/g++/' -i Makefile mkdir -p $out/bin echo -e 'install:\n\tcp bmrsa '$out'/bin' >> Makefile - '') ["minInit" "addInputs" "defEnsureDir"]; - - name = "bmrsa-"+version; - meta = { + ''; + + meta = with stdenv.lib; { description = "RSA utility"; + homepage = http://bmrsa.sourceforge.net/; + license = licenses.gpl1; }; } - diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a7b72ca5b0e..0cbf0e104a3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -974,7 +974,7 @@ let inherit (pythonPackages) notify; }; - bmrsa = builderDefsPackage (callPackage ../tools/security/bmrsa/11.nix) { }; + bmrsa = callPackage ../tools/security/bmrsa/11.nix { }; bogofilter = callPackage ../tools/misc/bogofilter { }; From 048f00a9dceb2e1098d8309c9378e1aae55bf7d4 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Wed, 29 Apr 2015 23:56:49 +0200 Subject: [PATCH 14/43] geoclue: reimplement using mkDerivation --- .../development/libraries/geoclue/default.nix | 59 ++++++------------- 1 file changed, 17 insertions(+), 42 deletions(-) diff --git a/pkgs/development/libraries/geoclue/default.nix b/pkgs/development/libraries/geoclue/default.nix index 4c5d17eca99..1b703e2fdba 100644 --- a/pkgs/development/libraries/geoclue/default.nix +++ b/pkgs/development/libraries/geoclue/default.nix @@ -1,55 +1,30 @@ -x@{builderDefsPackage - , dbus, dbus_glib, glib, pkgconfig, libxml2, gnome, libxslt - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - ["gnome"]; +{ stdenv, fetchurl, dbus, dbus_glib, glib, pkgconfig, libxml2, gnome, libxslt }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)) - ++ [gnome.GConf]; - sourceInfo = rec { - baseName="geoclue"; - version="0.12.0"; - name="${baseName}-${version}"; - url="https://launchpad.net/geoclue/trunk/0.12/+download/${name}.tar.gz"; - hash="15j619kvmdgj2hpma92mkxbzjvgn8147a7500zl3bap9g8bkylqg"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + name = "geoclue-0.12.0"; + src = fetchurl { + url = "https://launchpad.net/geoclue/trunk/0.12/+download/${name}.tar.gz"; + sha256 = "15j619kvmdgj2hpma92mkxbzjvgn8147a7500zl3bap9g8bkylqg"; }; - inherit (sourceInfo) name version; - inherit buildInputs; + buildInputs = [ pkgconfig libxml2 gnome.GConf libxslt ]; - propagatedBuildInputs = [a.dbus a.glib a.dbus_glib]; + propagatedBuildInputs = [dbus glib dbus_glib]; - /* doConfigure should be removed if not needed */ - phaseNames = ["fixConfigure" "doConfigure" "doMakeInstall"]; - - fixConfigure = a.fullDepEntry '' - sed -e 's@-Werror@@' -i configure - '' ["minInit" "doUnpack"]; + preConfigure = '' + sed -e '/-Werror/d' -i configure + ''; - meta = { + meta = with stdenv.lib; { description = "Geolocation framework and some data providers"; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; - linux; - license = a.lib.licenses.lgpl2; + maintainers = with maintainers; [ raskin ]; + platforms = platforms.linux; + license = licenses.lgpl2; }; + passthru = { updateInfo = { downloadPage = "http://folks.o-hand.com/jku/geoclue-releases/"; }; }; -}) x - +} From 241515a6b75b1618e8c1eba0a7ff48f27f7757a1 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Fri, 1 May 2015 16:56:53 +0200 Subject: [PATCH 15/43] xsokoban: reimplement using mkDerivation --- pkgs/games/xsokoban/default.nix | 65 +++++++++++++++------------------ pkgs/top-level/all-packages.nix | 4 +- 2 files changed, 33 insertions(+), 36 deletions(-) diff --git a/pkgs/games/xsokoban/default.nix b/pkgs/games/xsokoban/default.nix index 9d442329a24..e6686a658a9 100644 --- a/pkgs/games/xsokoban/default.nix +++ b/pkgs/games/xsokoban/default.nix @@ -1,51 +1,46 @@ -a @ {libX11, xproto, libXpm, libXt, ...} : -let - fetchurl = a.fetchurl; +{ stdenv, fetchurl, libX11, xproto, libXpm, libXt }: + +stdenv.mkDerivation rec { + name = "xsokoban-${version}"; + version = "3.3c"; - version = a.lib.attrByPath ["version"] "3.3c" a; - buildInputs = with a; [ - a.libX11 a.xproto a.libXpm a.libXt - ]; -in -rec { src = fetchurl { - url = "http://www.cs.cornell.edu/andru/release/xsokoban-${version}.tar.gz"; + url = "http://www.cs.cornell.edu/andru/release/${name}.tar.gz"; sha256 = "006lp8y22b9pi81x1a9ldfgkl1fbmkdzfw0lqw5y9svmisbafbr9"; }; - inherit buildInputs; - configureFlags = []; + buildInputs = [ libX11 xproto libXpm libXt ]; - /* doConfigure should be removed if not needed */ - phaseNames = ["preConfigure" "doConfigure" "preBuild" "doMakeInstall"]; - - preConfigure = a.fullDepEntry ('' + preConfigure = '' sed -e 's/getline/my_getline/' -i score.c - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${a.libXpm}/include/X11" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${libXpm}/include/X11" for i in $NIX_CFLAGS_COMPILE; do echo $i; ls ''${i#-I}; done chmod a+rw config.h - echo '#define HERE "@nixos-packaged"' >> config.h - echo '#define WWW 0' >> config.h - echo '#define OWNER "'$(whoami)'"' >> config.h - echo '#define ROOTDIR "'$out/lib/xsokoban'"' >> config.h - echo '#define ANYLEVEL 1' >> config.h - echo '#define SCOREFILE ".xsokoban-score"' >> config.h - echo '#define LOCKFILE ".xsokoban-score-lock"' >> config.h + cat >>config.h < Date: Mon, 15 Jun 2015 13:42:31 +0200 Subject: [PATCH 16/43] gphoto2fs: reimplement using mkDerivation --- pkgs/applications/misc/gphoto2/gphotofs.nix | 33 +++++++------------ .../misc/gphoto2/src-info-for-gphotofs.nix | 6 ---- pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 12 insertions(+), 29 deletions(-) delete mode 100644 pkgs/applications/misc/gphoto2/src-info-for-gphotofs.nix diff --git a/pkgs/applications/misc/gphoto2/gphotofs.nix b/pkgs/applications/misc/gphoto2/gphotofs.nix index 1e6d924b63a..230e0ff7414 100644 --- a/pkgs/applications/misc/gphoto2/gphotofs.nix +++ b/pkgs/applications/misc/gphoto2/gphotofs.nix @@ -1,33 +1,22 @@ -a @ { libgphoto2, fuse, pkgconfig, glib, libtool, ... } : -let - fetchurl = a.fetchurl; - s = import ./src-info-for-gphotofs.nix; +{ stdenv, fetchurl, libtool, pkgconfig, libgphoto2, fuse, glib }: - version = a.lib.attrByPath ["version"] s.version a; - buildInputs = with a; [ - libgphoto2 fuse pkgconfig glib libtool - ]; -in -rec { +stdenv.mkDerivation rec { + name = "gphoto2fs-${version}"; + version = "0.5.0"; src = fetchurl { - url = s.url; - sha256 = s.hash; + url="mirror://sourceforge/gphoto/gphotofs/${version}/gphotofs-0.5.tar.bz2"; + sha256 = "1k23ncbsbh64r7kz050bg31jqamchyswgg9izhzij758d7gc8vk7"; }; - inherit buildInputs; - configureFlags = []; + buildInputs = [ + libgphoto2 fuse pkgconfig glib libtool + ]; - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "doMakeInstall"]; - - name = "gphoto2fs-" + version; meta = { description = "Fuse FS to mount a digital camera"; maintainers = [ - a.lib.maintainers.raskin - ]; - platforms = [ - "i686-linux" "x86_64-linux" + stdenv.lib.maintainers.raskin ]; + platforms = stdenv.lib.platforms.linux; }; } diff --git a/pkgs/applications/misc/gphoto2/src-info-for-gphotofs.nix b/pkgs/applications/misc/gphoto2/src-info-for-gphotofs.nix deleted file mode 100644 index 1a4cceb6279..00000000000 --- a/pkgs/applications/misc/gphoto2/src-info-for-gphotofs.nix +++ /dev/null @@ -1,6 +0,0 @@ -rec { - advertisedUrl="mirror://sourceforge/gphoto/gphotofs/0.5.0/gphotofs-0.5.tar.bz2"; - version = "0.5.0"; - url="mirror://sourceforge/gphoto/gphotofs/0.5.0/gphotofs-0.5.tar.bz2"; - hash = "1k23ncbsbh64r7kz050bg31jqamchyswgg9izhzij758d7gc8vk7"; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8198fd675bc..90ef487f557 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11882,7 +11882,7 @@ let gphoto2 = callPackage ../applications/misc/gphoto2 { }; - gphoto2fs = builderDefsPackage (callPackage ../applications/misc/gphoto2/gphotofs.nix) {}; + gphoto2fs = callPackage ../applications/misc/gphoto2/gphotofs.nix { }; gramps = callPackage ../applications/misc/gramps { }; From 34fda4cbe2936caa619e51454464bf32f5f76996 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Mon, 15 Jun 2015 14:10:24 +0200 Subject: [PATCH 17/43] cfdg: reimplement using mkDerivation --- pkgs/tools/graphics/cfdg/default.nix | 48 ++++++++++++---------------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 22 insertions(+), 28 deletions(-) diff --git a/pkgs/tools/graphics/cfdg/default.nix b/pkgs/tools/graphics/cfdg/default.nix index 9376ad6a709..2b88ada21aa 100644 --- a/pkgs/tools/graphics/cfdg/default.nix +++ b/pkgs/tools/graphics/cfdg/default.nix @@ -1,38 +1,32 @@ -a @ {libpng, bison, flex, ffmpeg, fullDepEntry, ...} : -let - s = import ./src-for-default.nix; - buildInputs = with a; [ - libpng bison flex ffmpeg - ]; -in -rec { - src = a.fetchUrlFromSrcInfo s; +{ stdenv, fetchurl, libpng, bison, flex, ffmpeg }: - inherit (s) name; - inherit buildInputs; - configureFlags = []; +stdenv.mkDerivation rec { + name = "cfdg-${version}"; + version = "3.0.2"; + src = fetchurl { + sha256 = "1pd1hjippbhad8l4s4lsglykh22i24qfrgmnxrsx71bvcqbr356p"; + url = "http://www.contextfreeart.org/download/ContextFreeSource${version}.tgz"; + }; - /* doConfigure should be removed if not needed */ - phaseNames = ["doFixInc" "doMake" "copyFiles"]; - - doFixInc = a.fullDepEntry '' + buildInputs = [ libpng bison flex ffmpeg ]; + + postPatch = '' sed -e "/YY_NO_UNISTD/a#include " -i src-common/cfdg.l - '' ["doUnpack" "minInit"]; - - copyFiles = a.fullDepEntry '' + ''; + + installPhase = '' mkdir -p $out/bin cp cfdg $out/bin/ mkdir -p $out/share/doc/${name} cp *.txt $out/share/doc/${name} - '' ["defEnsureDir" "doMake"]; - - meta = { + ''; + + meta = with stdenv.lib; { description = "Context-free design grammar - a tool for graphics generation"; - maintainers = [ - a.lib.maintainers.raskin - ]; - platforms = with a.lib.platforms; - linux; + maintainers = with maintainers; [ raskin ]; + platforms = platforms.linux; + homepage = http://contextfreeart.org/; + downloadPage = "http://contextfreeart.org/mediawiki/index.php/Download_page"; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 90ef487f557..63ce5e0f22e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1034,7 +1034,7 @@ let ceph-dev = ceph; #ceph-dev = lowPrio (callPackage ../tools/filesystems/ceph/dev.nix { }); - cfdg = builderDefsPackage (callPackage ../tools/graphics/cfdg) {}; + cfdg = callPackage ../tools/graphics/cfdg { }; checkinstall = callPackage ../tools/package-management/checkinstall { }; From 685717091611d52b7ca7dd1a8d305db1fa601231 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Mon, 15 Jun 2015 14:10:46 +0200 Subject: [PATCH 18/43] gvpe: reimpleemnt using mkDerivation --- pkgs/tools/networking/gvpe/default.nix | 41 ++++++++++++-------------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/pkgs/tools/networking/gvpe/default.nix b/pkgs/tools/networking/gvpe/default.nix index 1c83e08fc3e..fe558103925 100644 --- a/pkgs/tools/networking/gvpe/default.nix +++ b/pkgs/tools/networking/gvpe/default.nix @@ -1,33 +1,30 @@ -a @ { openssl, gmp, nettools, iproute, zlib, ... } : -let - s = import ./src-for-default.nix; - buildInputs = with a; [ - openssl gmp zlib - ]; -in -rec { - src = a.fetchUrlFromSrcInfo s; +{ stdenv, fetchurl, openssl, gmp, zlib, iproute, nettools }: + +stdenv.mkDerivation rec { + name = "gvpe-${version}"; + version = "2.25"; + + src = fetchurl { + url = "http://ftp.gnu.org/gnu/gvpe/gvpe-${version}.tar.gz"; + sha256 = "1gsipcysvsk80gvyn9jnk9g0xg4ng9yd5zp066jnmpgs52d2vhvk"; + }; + + buildInputs = [ openssl gmp zlib ]; - inherit (s) name; - inherit buildInputs; configureFlags = [ "--enable-tcp" "--enable-http-proxy" "--enable-dns" ]; - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "preBuild" "doMakeInstall"]; - preBuild = a.fullDepEntry ('' - sed -e 's@"/sbin/ifconfig.*"@"${a.iproute}/sbin/ip link set $IFNAME address $MAC mtu $MTU"@' -i src/device-linux.C - sed -e 's@/sbin/ifconfig@${a.nettools}/sbin/ifconfig@g' -i src/device-*.C - '') ["minInit" "doUnpack"]; + preBuild = '' + sed -e 's@"/sbin/ifconfig.*"@"${iproute}/sbin/ip link set $IFNAME address $MAC mtu $MTU"@' -i src/device-linux.C + sed -e 's@/sbin/ifconfig@${nettools}/sbin/ifconfig@g' -i src/device-*.C + ''; meta = { - description = "A proteted multinode virtual network"; - maintainers = [ - a.lib.maintainers.raskin - ]; - platforms = with a.lib.platforms; linux ++ freebsd; + description = "A protected multinode virtual network"; + maintainers = [ stdenv.lib.maintainers.raskin ]; + platforms = with stdenv.lib.platforms; linux ++ freebsd; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 63ce5e0f22e..71cb845c53d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1780,7 +1780,7 @@ let gupnptools = callPackage ../tools/networking/gupnp-tools {}; - gvpe = builderDefsPackage (callPackage ../tools/networking/gvpe) {}; + gvpe = callPackage ../tools/networking/gvpe { }; gvolicon = callPackage ../tools/audio/gvolicon {}; From c844b6d041707515405265e9eb4e5dec6e39e9dc Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Mon, 15 Jun 2015 14:11:05 +0200 Subject: [PATCH 19/43] metasploit: reimplement using mkDerivation Also fixes download location. Bumps version to 3.3.1, which is the closest to the original version for which a source archive is still available. --- pkgs/tools/security/metasploit/3.1.nix | 31 -------------------- pkgs/tools/security/metasploit/default.nix | 33 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 +- 3 files changed, 34 insertions(+), 32 deletions(-) delete mode 100644 pkgs/tools/security/metasploit/3.1.nix create mode 100644 pkgs/tools/security/metasploit/default.nix diff --git a/pkgs/tools/security/metasploit/3.1.nix b/pkgs/tools/security/metasploit/3.1.nix deleted file mode 100644 index c3aab9b709e..00000000000 --- a/pkgs/tools/security/metasploit/3.1.nix +++ /dev/null @@ -1,31 +0,0 @@ -args @ { makeWrapper, ... }: with args; -rec { - src = fetchurl { - url = http://www.packetstormsecurity.nl/UNIX/utilities/framework-3.1.tar.gz; - sha256 = "114znq9dfcyh9gcj57p3zsc0d0amlzhwidmg8qjcgxpjh28h1afx"; - }; - - buildInputs = [makeWrapper]; - configureFlags = []; - - doInstall = fullDepEntry('' - mkdir -p $out/share/msf - mkdir -p $out/bin - - cp -r * $out/share/msf - - for i in $out/share/msf/msf*; do - makeWrapper $i $out/bin/$(basename $i) --prefix RUBYLIB : $out/share/msf/lib - done - '') ["minInit" "defEnsureDir" "doUnpack" "addInputs"]; - - /* doConfigure should be specified separately */ - phaseNames = ["doInstall" (doPatchShebangs "$out/share/msf")]; - - name = "metasploit-framework-3.1"; - meta = { - description = "Metasploit Framework - a collection of exploits"; - homepage = "http://framework.metasploit.org/"; - }; -} - diff --git a/pkgs/tools/security/metasploit/default.nix b/pkgs/tools/security/metasploit/default.nix new file mode 100644 index 00000000000..7a9dcdb8d89 --- /dev/null +++ b/pkgs/tools/security/metasploit/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchurl, makeWrapper, ruby }: + +stdenv.mkDerivation rec { + name = "metasploit-framework-${version}"; + version = "3.3.1"; + + src = fetchurl { + url = "http://downloads.metasploit.com/data/releases/archive/framework-${version}.tar.bz2"; + sha256 = "07clzw1zfnqjhyydsc4mza238isai58p7aygh653qxsqb9a0j7qw"; + }; + + buildInputs = [makeWrapper]; + + installPhase = '' + mkdir -p $out/share/msf + mkdir -p $out/bin + + cp -r * $out/share/msf + + for i in $out/share/msf/msf*; do + makeWrapper $i $out/bin/$(basename $i) --prefix RUBYLIB : $out/share/msf/lib + done + ''; + + postInstall = '' + patchShebangs $out/share/msf + ''; + + meta = { + description = "Metasploit Framework - a collection of exploits"; + homepage = https://github.com/rapid7/metasploit-framework/wiki; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 71cb845c53d..d84ac49021b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2294,7 +2294,7 @@ let mscgen = callPackage ../tools/graphics/mscgen { }; - msf = builderDefsPackage (callPackage ../tools/security/metasploit/3.1.nix) { }; + msf = callPackage ../tools/security/metasploit { }; mssys = callPackage ../tools/misc/mssys { }; From 2a752ac760be873b114c714580aa9f65608d03c0 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Mon, 15 Jun 2015 14:27:01 +0200 Subject: [PATCH 20/43] setserial: reimplement using mkDerivation --- pkgs/tools/system/setserial/default.nix | 31 +++++++++---------------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/pkgs/tools/system/setserial/default.nix b/pkgs/tools/system/setserial/default.nix index a35c0d24918..2efd0baed89 100644 --- a/pkgs/tools/system/setserial/default.nix +++ b/pkgs/tools/system/setserial/default.nix @@ -1,33 +1,24 @@ -a @ { groff, ... } : -let - fetchurl = a.fetchurl; +{ stdenv, fetchurl, groff }: + +stdenv.mkDerivation rec { + name = "setserial-${version}"; + version = "2.17"; - version = a.lib.attrByPath ["version"] "2.17" a; - buildInputs = with a; [ - groff - ]; -in -rec { src = fetchurl { - url = "mirror://sourceforge/setserial/setserial-${version}.tar.gz"; + url = "mirror://sourceforge/setserial/${name}.tar.gz"; sha256 = "0jkrnn3i8gbsl48k3civjmvxyv9rbm1qjha2cf2macdc439qfi3y"; }; - inherit buildInputs; - configureFlags = []; + buildInputs = [ groff ]; - installFlags = "DESTDIR=$out"; + installFlags = ''DESTDIR=$(out)''; - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "patchPath" "doMakeInstall"]; - - patchPath = a.fullDepEntry ('' + postConfigure = '' sed -e s@/usr/man/@/share/man/@ -i Makefile - '') ["minInit" "doUnpack" "doConfigure"]; + ''; - neededDirs = ["$out/bin" "$out/share/man/man8"]; + preInstall = ''mkdir -p "$out/bin" "$out/share/man/man8"''; - name = "setserial-" + version; meta = { description = "Serial port configuration utility"; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d84ac49021b..587836edd1c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2972,7 +2972,7 @@ let seccure = callPackage ../tools/security/seccure { }; - setserial = builderDefsPackage (callPackage ../tools/system/setserial) { }; + setserial = callPackage ../tools/system/setserial { }; seqdiag = pythonPackages.seqdiag; From f40e36d213a813420735701e10b723ae1e3e4ab7 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Mon, 15 Jun 2015 14:29:42 +0200 Subject: [PATCH 21/43] vncrec: reimplement using mkDerivation --- pkgs/tools/video/vncrec/default.nix | 42 ++++++++++------------------- pkgs/top-level/all-packages.nix | 6 ++++- 2 files changed, 19 insertions(+), 29 deletions(-) diff --git a/pkgs/tools/video/vncrec/default.nix b/pkgs/tools/video/vncrec/default.nix index e37d1c6f11f..4654d5902cb 100644 --- a/pkgs/tools/video/vncrec/default.nix +++ b/pkgs/tools/video/vncrec/default.nix @@ -1,42 +1,28 @@ -a @ {imake, libX11, xproto, gccmakedep, libXt -, libXmu, libXaw, libXext, xextproto, libSM, libICE, libXpm -, libXp, ...} : -let - fetchurl = a.fetchurl; +{ stdenv, fetchurl, libX11, xproto, imake, gccmakedep, libXt, libXmu +, libXaw, libXext, xextproto, libSM, libICE, libXpm, libXp +}: + +stdenv.mkDerivation rec { + name = "vncrec-0.2"; # version taken from Arch AUR - buildInputs = with a; [ - libX11 xproto imake gccmakedep libXt libXmu libXaw - libXext xextproto libSM libICE libXpm libXp - ]; -in -rec { src = fetchurl { url = "http://ronja.twibright.com/utils/vncrec-twibright.tgz"; sha256 = "1yp6r55fqpdhc8cgrgh9i0mzxmkls16pgf8vfcpng1axr7cigyhc"; }; - inherit buildInputs; - makeFlags = [ - "World" - ]; - installFlags=[ - "BINDIR=/bin/" - "MANDIR=/share/man/man1" - "DESTDIR=$out" - "install.man" - ]; + buildInputs = [ + libX11 xproto imake gccmakedep libXt libXmu libXaw + libXext xextproto libSM libICE libXpm libXp + ]; - phaseNames = ["doXMKMF" "doMakeInstall"]; + buildPhase = ''xmkmf && make World''; - doXMKMF = a.fullDepEntry ('' - xmkmf - '') ["doUnpack" "minInit" "addInputs"]; + installPhase = '' + make DESTDIR=$out BINDIR=/bin MANDIR=/share/man/man1 install install.man + ''; - name = "vncrec-0.2"; # version taken from Arch AUR meta = { description = "VNC recorder"; homepage = http://ronja.twibright.com/utils/vncrec/; - maintainers = [ - ]; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 587836edd1c..337959e3141 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3342,7 +3342,11 @@ let vnc2flv = callPackage ../tools/video/vnc2flv {}; - vncrec = builderDefsPackage (callPackage ../tools/video/vncrec) {}; + vncrec = callPackage ../tools/video/vncrec { + inherit (xlibs) imake libX11 xproto gccmakedep libXt + libXmu libXaw libXext xextproto libSM libICE libXpm + libXp; + }; vobcopy = callPackage ../tools/cd-dvd/vobcopy { }; From b3144ea2873cc1487a3d5e0d633df38474adcb2c Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Mon, 15 Jun 2015 14:57:44 +0200 Subject: [PATCH 22/43] directvnc: reimplement using mkDerivation --- pkgs/os-specific/linux/directvnc/default.nix | 37 +++++++++----------- pkgs/top-level/all-packages.nix | 4 ++- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/pkgs/os-specific/linux/directvnc/default.nix b/pkgs/os-specific/linux/directvnc/default.nix index b6f221b8ea4..4c47104c5b6 100644 --- a/pkgs/os-specific/linux/directvnc/default.nix +++ b/pkgs/os-specific/linux/directvnc/default.nix @@ -1,26 +1,21 @@ -a @ { libjpeg, pkgconfig, zlib, directfb, xproto, ... } : -let - s = import ./src-for-default.nix; - buildInputs = with a; [ - directfb zlib libjpeg pkgconfig xproto +{ stdenv, fetchurl, pkgconfig, directfb, zlib, libjpeg, xproto }: + +stdenv.mkDerivation rec { + name="directvnc-${version}"; + version="0.7.5-test-051207"; + + src = fetchurl { + url = "http://directvnc-rev.googlecode.com/files/directvnc-${version}.tar.gz"; + sha256 = "1is9hca8an1b1n8436wkv7s08ml5lb95f7h9vznx9br597f106w9"; + }; + + buildInputs = [ + pkgconfig directfb zlib libjpeg xproto ]; -in -rec { - src = a.fetchUrlFromSrcInfo s; - - inherit (s) name; - inherit buildInputs; - configureFlags = []; - - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "doMakeInstall"]; - + meta = { description = "DirectFB VNC client"; - maintainers = [ - a.lib.maintainers.raskin - ]; - platforms = with a.lib.platforms; - linux; + maintainers = [ stdenv.lib.maintainers.raskin ]; + platforms = with stdenv.lib.platforms; linux; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 337959e3141..9dedd8c3bd5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9742,7 +9742,9 @@ let dietlibc = callPackage ../os-specific/linux/dietlibc { }; - directvnc = builderDefsPackage (callPackage ../os-specific/linux/directvnc) {}; + directvnc = callPackage ../os-specific/linux/directvnc { + inherit (xlibs) xproto; + }; dmraid = callPackage ../os-specific/linux/dmraid { devicemapper = devicemapper.override {enable_dmeventd = true;}; From 809b3803b94c81a73a694fe2e703dccfb8de8559 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Tue, 16 Jun 2015 19:38:03 +0200 Subject: [PATCH 23/43] pythonIRClib: reimplement using buildPythonPackage --- .../python-modules/irclib/default.nix | 23 ++++++------------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/pkgs/development/python-modules/irclib/default.nix b/pkgs/development/python-modules/irclib/default.nix index 4fdf93e126b..38ae5949229 100644 --- a/pkgs/development/python-modules/irclib/default.nix +++ b/pkgs/development/python-modules/irclib/default.nix @@ -1,31 +1,22 @@ -a @ {python, ...} : -let - fetchurl = a.fetchurl; +{ buildPythonPackage, fetchurl }: + +buildPythonPackage rec { + name = "irclib-${version}"; + version = "0.4.8"; - version = a.lib.attrByPath ["version"] "0.4.8" a; - buildInputs = with a; [ - python - ]; -in -rec { src = fetchurl { url = "mirror://sourceforge/python-irclib/python-irclib-${version}.tar.gz"; sha256 = "1x5456y4rbxmnw4yblhb4as5791glcw394bm36px3x6l05j3mvl1"; }; + patches = [(fetchurl { url = "http://trac.uwc.ac.za/trac/python_tools/browser/xmpp/resources/irc-transport/irclib.py.diff?rev=387&format=raw"; name = "irclib.py.diff"; sha256 = "5fb8d95d6c95c93eaa400b38447c63e7a176b9502bc49b2f9b788c9905f4ec5e"; })]; + patchFlags = "irclib.py"; - inherit buildInputs; - configureFlags = []; - - /* doConfigure should be removed if not needed */ - phaseNames = ["doPatch" "installPythonPackage"]; - - name = "python-irclib-" + version; meta = { description = "Python IRC library"; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9dedd8c3bd5..14342fb762e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2780,7 +2780,7 @@ let pythonDBus = dbus_python; - pythonIRClib = builderDefsPackage (callPackage ../development/python-modules/irclib) { }; + pythonIRClib = callPackage ../development/python-modules/irclib { }; pythonSexy = builderDefsPackage (callPackage ../development/python-modules/libsexy) { }; From 502d21a835a3c3b4e970c47afbd243f0c0713f20 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Tue, 16 Jun 2015 20:17:51 +0200 Subject: [PATCH 24/43] xmpppy: reimplement using buildPythonPackage --- .../python-modules/xmpppy/default.nix | 24 +++++++------------ pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/pkgs/development/python-modules/xmpppy/default.nix b/pkgs/development/python-modules/xmpppy/default.nix index 46e81c58845..b1500b01972 100644 --- a/pkgs/development/python-modules/xmpppy/default.nix +++ b/pkgs/development/python-modules/xmpppy/default.nix @@ -1,29 +1,21 @@ -a @ {python, setuptools, ... } : -let - fetchurl = a.fetchurl; +{ buildPythonPackage, fetchurl, setuptools }: + +buildPythonPackage rec { + name = "xmpp.py-${version}"; + version = "0.5.0rc1"; - version = a.lib.attrByPath ["version"] "0.5.0rc1" a; - buildInputs = with a; [ - python setuptools - ]; -in -rec { src = fetchurl { url = "mirror://sourceforge/xmpppy/xmpppy-${version}.tar.gz"; sha256 = "16hbh8kwc5n4qw2rz1mrs8q17rh1zq9cdl05b1nc404n7idh56si"; }; - inherit buildInputs; - configureFlags = []; + buildInputs = [ setuptools ]; - /* doConfigure should be removed if not needed */ - phaseNames = ["mkDirs" "installPythonPackage"]; - mkDirs = a.fullDepEntry('' + preInstall = '' mkdir -p $out/bin $out/lib $out/share $(toPythonPath $out) export PYTHONPATH=$PYTHONPATH:$(toPythonPath $out) - '') ["defEnsureDir" "addInputs"]; + ''; - name = "xmpp.py-" + version; meta = { description = "XMPP python library"; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 14342fb762e..565b91f93de 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3611,7 +3611,7 @@ let xmltv = callPackage ../tools/misc/xmltv { }; - xmpppy = builderDefsPackage (callPackage ../development/python-modules/xmpppy) {}; + xmpppy = callPackage ../development/python-modules/xmpppy { }; xorriso = callPackage ../tools/cd-dvd/xorriso { }; From a1e397c4fbc7a5c47077d1f386f7bb8bed3ac205 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Tue, 16 Jun 2015 20:51:57 +0200 Subject: [PATCH 25/43] ode: reimplement using mkDerivation --- pkgs/development/libraries/ode/default.nix | 22 +++++----------------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/pkgs/development/libraries/ode/default.nix b/pkgs/development/libraries/ode/default.nix index 7c9c9304f77..e7d2f2984fb 100644 --- a/pkgs/development/libraries/ode/default.nix +++ b/pkgs/development/libraries/ode/default.nix @@ -1,26 +1,14 @@ -args : -let - lib = args.lib; - fetchurl = args.fetchurl; +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + name = "ode-${version}"; + version = "0.12"; - version = lib.attrByPath ["version"] "0.12" args; - buildInputs = with args; [ - - ]; -in -rec { src = fetchurl { url = "mirror://sourceforge/opende/ode-${version}.tar.bz2"; sha256 = "0l63ymlkgfp5cb0ggqwm386lxmc3al21nb7a07dd49f789d33ib5"; }; - inherit buildInputs; - configureFlags = []; - - /* doConfigure should be specified separately */ - phaseNames = ["doConfigure" "doMakeInstall"]; - - name = "ode-" + version; meta = { description = "Open Dynamics Engine"; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 565b91f93de..cf920f7e64d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7881,7 +7881,7 @@ let nvidia-texture-tools = callPackage ../development/libraries/nvidia-texture-tools { }; - ode = builderDefsPackage (callPackage ../development/libraries/ode) { }; + ode = callPackage ../development/libraries/ode { }; ogre = callPackage ../development/libraries/ogre {}; From 8aa63b34dafb4de1ee60ab345a809814344f7fb0 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Wed, 17 Jun 2015 00:24:12 +0200 Subject: [PATCH 26/43] qrdecode: reimplement using mkDerivation Also mark as broken; I have verified that the build fails with the original build recipe. --- pkgs/tools/graphics/qrdecode/default.nix | 41 ++++++++---------------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 14 insertions(+), 29 deletions(-) diff --git a/pkgs/tools/graphics/qrdecode/default.nix b/pkgs/tools/graphics/qrdecode/default.nix index f84780ab3c3..308183d7ae1 100644 --- a/pkgs/tools/graphics/qrdecode/default.nix +++ b/pkgs/tools/graphics/qrdecode/default.nix @@ -1,44 +1,29 @@ -args : -let - lib = args.lib; - fetchurl = args.fetchurl; - fullDepEntry = args.fullDepEntry; +{ stdenv, fetchurl, libpng, opencv }: + +stdenv.mkDerivation rec { + name = "libdecodeqr-${version}"; + version = "0.9.3"; - version = lib.attrByPath ["version"] "0.9.3" args; - buildInputs = with args; [ - libpng opencv - ]; -in -rec { src = fetchurl { url = "mirror://debian/pool/main/libd/libdecodeqr/libdecodeqr_${version}.orig.tar.gz"; sha256 = "1kmljwx69h7zq6zlp2j19bbpz11px45z1abw03acrxjyzz5f1f13"; }; - inherit buildInputs; - configureFlags = []; + buildInputs = [ libpng opencv ]; - /* doConfigure should be specified separately */ - phaseNames = ["preConfigure" "doConfigure" "doMake" - "createDirs" "doMakeInstall" "postInstall"]; - - preConfigure = fullDepEntry '' + preConfigure = '' cd src sed -e /LDCONFIG/d -i libdecodeqr/Makefile.in sed -e '/#include /a#include ' -i libdecodeqr/imagereader.h - export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${args.opencv}/include/opencv" + export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -I${opencv}/include/opencv" export NIX_LDFLAGS="$NIX_LDFLAGS -lcxcore" - '' ["doUnpack"]; - postInstall = fullDepEntry '' - cp sample/simple/simpletest $out/bin/qrdecode - cd .. - '' ["doMake"]; - createDirs = fullDepEntry '' - mkdir -p $out/bin $out/lib $out/include $out/share - '' ["defEnsureDir"]; + ''; + + preInstall = "mkdir -p $out/bin $out/lib $out/include $out/share"; + postInstall = "cp sample/simple/simpletest $out/bin/qrdecode"; - name = "libdecodeqr-" + version; meta = { description = "QR code decoder library"; + broken = true; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cf920f7e64d..13995942797 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11908,7 +11908,7 @@ let java = if stdenv.isLinux then jre else jdk; }; - qrdecode = builderDefsPackage (callPackage ../tools/graphics/qrdecode) { + qrdecode = callPackage ../tools/graphics/qrdecode { libpng = libpng12; opencv = opencv_2_1; }; From ddb9c3b7013d25293c684e989422e6f343ea6d04 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Wed, 17 Jun 2015 00:50:55 +0200 Subject: [PATCH 27/43] xaos: reimplement using mkDerivation --- pkgs/applications/graphics/xaos/default.nix | 34 +++++++++------------ pkgs/top-level/all-packages.nix | 3 +- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/pkgs/applications/graphics/xaos/default.nix b/pkgs/applications/graphics/xaos/default.nix index 7e01d3847d5..44c8313d9c3 100644 --- a/pkgs/applications/graphics/xaos/default.nix +++ b/pkgs/applications/graphics/xaos/default.nix @@ -1,34 +1,28 @@ -a @ { libXt, libX11, libXext, xextproto, xproto, gsl, aalib, zlib, intltool, gettext, perl, ... }: -let - fetchurl = a.fetchurl; +{ stdenv, fetchurl, aalib, gsl, libpng, libX11, xproto, libXext +, xextproto, libXt, zlib, gettext, intltool, perl }: + +stdenv.mkDerivation rec { + name = "xaos-${version}"; + version = "3.6"; - version = a.lib.attrByPath ["version"] "3.6" a; - buildInputs = with a; [ - aalib gsl libpng libX11 xproto libXext xextproto - libXt zlib gettext intltool perl - ]; -in -rec { src = fetchurl { - url = "mirror://sourceforge/xaos/xaos-${version}.tar.gz"; + url = "mirror://sourceforge/xaos/${name}.tar.gz"; sha256 = "15cd1cx1dyygw6g2nhjqq3bsfdj8sj8m4va9n75i0f3ryww3x7wq"; }; - inherit buildInputs; - configureFlags = []; + buildInputs = [ + aalib gsl libpng libX11 xproto libXext xextproto + libXt zlib gettext intltool perl + ]; - /* doConfigure should be removed if not needed */ - phaseNames = ["preConfigure" "doConfigure" "doMakeInstall"]; - - preConfigure = a.fullDepEntry ('' + preConfigure = '' sed -e s@/usr/@"$out/"@g -i configure $(find . -name 'Makefile*') mkdir -p $out/share/locale - '') ["doUnpack" "minInit" "defEnsureDir"]; + ''; - name = "xaos-" + version; meta = { homepage = http://xaos.sourceforge.net/; description = "Fractal viewer"; - license = a.stdenv.lib.licenses.gpl2Plus; + license = stdenv.lib.licenses.gpl2Plus; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 13995942797..20afb6d585d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13564,7 +13564,8 @@ let x42-plugins = callPackage ../applications/audio/x42-plugins { }; - xaos = builderDefsPackage (callPackage ../applications/graphics/xaos) { + xaos = callPackage ../applications/graphics/xaos { + inherit (xlibs) libXt libX11 libXext xextproto xproto; libpng = libpng12; }; From 42fc03411f4710984eae7dcbd6ec7108d0b8ee72 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Fri, 19 Jun 2015 14:20:05 +0200 Subject: [PATCH 28/43] drgeo: reimplement using mkDerivation --- .../science/geometry/drgeo/default.nix | 23 +++++++++---------- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/science/geometry/drgeo/default.nix b/pkgs/applications/science/geometry/drgeo/default.nix index 63b757945d2..f0be5258ce4 100644 --- a/pkgs/applications/science/geometry/drgeo/default.nix +++ b/pkgs/applications/science/geometry/drgeo/default.nix @@ -1,24 +1,23 @@ -args @ { libxml2, perl, intltool, libtool, pkgconfig, gtk, ... } : with args; -let version = lib.attrByPath ["version"] "1.1.0" args; in -rec { +{ stdenv, fetchurl, libglade, gtk, guile, libxml2, perl +, intltool, libtool, pkgconfig }: + +stdenv.mkDerivation rec { + name = "drgeo-${version}"; + version = "1.1.0"; + src = fetchurl { - url = mirror://sourceforge/ofset/drgeo-1.1.0.tar.gz; + url = "mirror://sourceforge/ofset/${name}.tar.gz"; sha256 = "05i2czgzhpzi80xxghinvkyqx4ym0gm9f38fz53idjhigiivp4wc"; }; + patches = [ ./struct.patch ]; buildInputs = [libglade gtk guile libxml2 perl intltool libtool pkgconfig]; - configureFlags = []; - /* doConfigure should be specified separately */ - phaseNames = ["doPatch" "doConfigure" "doPreBuild" "doMakeInstall"]; - patches = [ ./struct.patch ]; - - doPreBuild = fullDepEntry ('' + prebuild = '' cp drgeo.desktop.in drgeo.desktop - '') ["minInit" "doUnpack"]; + ''; - name = "drgeo-" + version; meta = { description = "Interactive geometry program"; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 20afb6d585d..679b155ccd5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14610,7 +14610,7 @@ let ### SCIENCE/GEOMETRY - drgeo = builderDefsPackage (callPackage ../applications/science/geometry/drgeo) { + drgeo = callPackage ../applications/science/geometry/drgeo { inherit (gnome) libglade; guile = guile_1_8; }; From 022bbe1c0ce6abafda8b4f193284ddb4505fb37c Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 25 Jun 2015 22:46:54 +0200 Subject: [PATCH 29/43] singular: reimplement using mkDerivation --- .../science/math/singular/default.nix | 65 +++++++------------ 1 file changed, 22 insertions(+), 43 deletions(-) diff --git a/pkgs/applications/science/math/singular/default.nix b/pkgs/applications/science/math/singular/default.nix index 1afb510e994..8bae1d6206d 100644 --- a/pkgs/applications/science/math/singular/default.nix +++ b/pkgs/applications/science/math/singular/default.nix @@ -1,55 +1,34 @@ -x@{builderDefsPackage - , gmp, bison, perl, autoconf, ncurses, readline - , coreutils - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl, gmp, bison, perl, autoconf, ncurses, readline, coreutils }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="Singular"; - version="3-1-2"; - revision="-1"; - name="${baseName}-${version}${revision}"; - url="http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/${version}/${name}.tar.gz"; - hash="04f9i1xar0r7qrrbfki1h9rrmx5y2xg4w7rrvlbx05v2dy6s8djv"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + name = "singular-${version}"; + version="3-1-2"; + + src = fetchurl { + url = "http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/${version}/${name}.tar.gz"; + sha256 = "04f9i1xar0r7qrrbfki1h9rrmx5y2xg4w7rrvlbx05v2dy6s8djv"; }; - inherit (sourceInfo) name version; - inherit buildInputs; + buildInputs = [ gmp bison perl autoconf ncurses readline coreutils ]; - /* doConfigure should be removed if not needed */ - phaseNames = ["doFixPaths" "doConfigure" "doMakeInstall" "fixInstall"]; - doFixPaths = a.fullDepEntry ('' - find . -exec sed -e 's@/bin/rm@${a.coreutils}&@g' -i '{}' ';' - find . -exec sed -e 's@/bin/uname@${a.coreutils}&@g' -i '{}' ';' - '') ["minInit" "doUnpack"]; - fixInstall = a.fullDepEntry ('' + preConfigure = '' + find . -exec sed -e 's@/bin/rm@${coreutils}&@g' -i '{}' ';' + find . -exec sed -e 's@/bin/uname@${coreutils}&@g' -i '{}' ';' + ''; + + postInstall = '' rm -rf "$out/LIB" cp -r Singular/LIB "$out" mkdir -p "$out/bin" ln -s "$out/"*/Singular "$out/bin" - '') ["minInit" "defEnsureDir"]; + ''; - meta = { + meta = with stdenv.lib; { description = "A CAS for polynomial computations"; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; - linux; - license = a.stdenv.lib.licenses.gpl3; # Or GPLv2 at your option - but not GPLv4 + maintainers = with maintainers; + [ raskin ]; + platforms = platforms.linux; + license = licenses.gpl3; # Or GPLv2 at your option - but not GPLv4 homepage = "http://www.singular.uni-kl.de/index.php"; }; passthru = { @@ -57,4 +36,4 @@ rec { downloadPage = "http://www.mathematik.uni-kl.de/ftp/pub/Math/Singular/SOURCES/"; }; }; -}) x +} From a2ccc807744c7450f145a7d72ae060e4b48ba144 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 25 Jun 2015 22:57:31 +0200 Subject: [PATCH 30/43] speech_tools: reimplement using mkDerivation --- .../libraries/speech-tools/default.nix | 57 ++++++------------- 1 file changed, 18 insertions(+), 39 deletions(-) diff --git a/pkgs/development/libraries/speech-tools/default.nix b/pkgs/development/libraries/speech-tools/default.nix index 79a633c6541..fba35421355 100644 --- a/pkgs/development/libraries/speech-tools/default.nix +++ b/pkgs/development/libraries/speech-tools/default.nix @@ -1,40 +1,22 @@ -x@{builderDefsPackage - , gawk, alsaLib, ncurses - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl, gawk, alsaLib, ncurses }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="speech_tools"; - version="2.1"; - name="${baseName}-${version}"; - url="http://www.festvox.org/packed/festival/${version}/${name}-release.tar.gz"; - hash="1s9bkfgdgyas8v2cr7x3dg0ck1xf9mn1q6a73gwy524sjb6nfqgz"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + name = "speech_tools-${version}"; + version = "2.1"; + + src = fetchurl { + url = "http://www.festvox.org/packed/festival/${version}/${name}-release.tar.gz"; + sha256 = "1s9bkfgdgyas8v2cr7x3dg0ck1xf9mn1q6a73gwy524sjb6nfqgz"; }; - inherit (sourceInfo) name version; - inherit buildInputs; + buildInputs = [ alsaLib ncurses ]; - /* doConfigure should be removed if not needed */ - phaseNames = ["doUnpack" "killUsrBin" "doConfigure" "doMakeInstall" "doDeploy" "fixPaths"]; - - killUsrBin = a.fullDepEntry '' + preConfigure = '' sed -e s@/usr/bin/@@g -i $( grep -rl '/usr/bin/' . ) sed -re 's@/bin/(rm|printf|uname)@\1@g' -i $( grep -rl '/bin/' . ) - '' ["minInit" "doUnpack"]; + ''; - doDeploy = a.fullDepEntry '' + installPhase = '' mkdir -p "$out"/{bin,lib} for d in bin lib; do for i in ./$d/*; do @@ -42,24 +24,21 @@ rec { cp -r "$(readlink -f $i)" "$out/$d" done done - '' ["doMakeInstall" "defEnsureDir"]; + ''; - fixPaths = a.doPatchShebangs "$out/bin"; - - meta = { + meta = with stdenv.lib; { broken = true; description = "Text-to-speech engine"; - maintainers = with a.lib.maintainers; + maintainers = with maintainers; [ raskin ]; - platforms = with a.lib.platforms; - linux; - license = a.lib.licenses.free; + platforms = platforms.linux; + license = licenses.free; }; passthru = { updateInfo = { downloadPage = "http://www.festvox.org/packed/festival/"; }; }; -}) x +} From f4c9d2f64e8d8fbd42a131d0adeec8af1f5fdbe1 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 25 Jun 2015 23:11:03 +0200 Subject: [PATCH 31/43] libfixposix: reimplement using mkDerivation --- .../libraries/libfixposix/default.nix | 57 +++++-------------- 1 file changed, 14 insertions(+), 43 deletions(-) diff --git a/pkgs/development/libraries/libfixposix/default.nix b/pkgs/development/libraries/libfixposix/default.nix index 078a2ab0733..fbb7a709201 100644 --- a/pkgs/development/libraries/libfixposix/default.nix +++ b/pkgs/development/libraries/libfixposix/default.nix @@ -1,57 +1,28 @@ -x@{builderDefsPackage - , fetchgit - , autoconf, automake, libtool - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - ["fetchgit"]; +{ stdenv, fetchurl, fetchgit, autoreconfHook, libtool }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - method="fetchgit"; - baseName="libfixposix"; - url="https://github.com/sionescu/libfixposix"; - rev="30b75609d858588ea00b427015940351896867e9"; - version="git-${rev}"; - name="${baseName}-${version}"; - hash="44553c90d67f839cdd57d14d37d9faa25b1b766f607408896137f3013c1c9424"; - }; -in -rec { - srcDrv = a.fetchgit { - url = sourceInfo.url; - rev = sourceInfo.rev; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + name="libfixposix-${version}"; + version="git-${src.rev}"; + + src = fetchgit { + url = "https://github.com/sionescu/libfixposix"; + rev = "30b75609d858588ea00b427015940351896867e9"; + sha256 = "44553c90d67f839cdd57d14d37d9faa25b1b766f607408896137f3013c1c9424"; }; - src = srcDrv +"/"; + buildInputs = [ autoreconfHook libtool ]; - inherit (sourceInfo) name version; - inherit buildInputs; - - /* doConfigure should be removed if not needed */ - phaseNames = ["doAutoreconf" "doConfigure" "doMakeInstall"]; - - doAutoreconf = a.fullDepEntry ('' - autoreconf -i - '') ["doUnpack" "addInputs"]; - - meta = { + meta = with stdenv.lib; { description = "A set of workarounds for places in POSIX that get implemented differently"; - maintainers = with a.lib.maintainers; + maintainers = with maintainers; [ raskin ]; - platforms = with a.lib.platforms; - linux; + platforms = platforms.linux; }; passthru = { updateInfo = { downloadPage = "http://gitorious.org/libfixposix/libfixposix"; }; }; -}) x - +} From a228252b69b5edb088de87e0a03e98880c59d01d Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Tue, 7 Jul 2015 20:03:30 +0200 Subject: [PATCH 32/43] cvc3: reimplement using mkDerivation --- .../science/logic/cvc3/default.nix | 57 ++++++------------- pkgs/top-level/all-packages.nix | 4 +- 2 files changed, 21 insertions(+), 40 deletions(-) diff --git a/pkgs/applications/science/logic/cvc3/default.nix b/pkgs/applications/science/logic/cvc3/default.nix index ce6e039c5b1..505d09ef390 100644 --- a/pkgs/applications/science/logic/cvc3/default.nix +++ b/pkgs/applications/science/logic/cvc3/default.nix @@ -1,48 +1,27 @@ -x@{builderDefsPackage - , flex, bison, gmp, perl - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - ["gmp"]; +{ stdenv, fetchurl, flex, bison, gmp, perl }: - buildInputs = (map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames))) - ++ [(a.lib.overrideDerivation x.gmp (y: {dontDisableStatic=true;}))]; - sourceInfo = rec { - baseName="cvc3"; - version="2.4.1"; - name="${baseName}-${version}"; - url="http://www.cs.nyu.edu/acsys/cvc3/releases/${version}/${name}.tar.gz"; - hash="1xxcwhz3y6djrycw8sm6xz83wb4hb12rd1n0skvc7fng0rh1snym"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; - }; +stdenv.mkDerivation rec { + name = "cvc3-${version}"; + version = "2.4.1"; - inherit (sourceInfo) name version; - inherit buildInputs; + src = fetchurl { + url = "http://www.cs.nyu.edu/acsys/cvc3/releases/${version}/${name}.tar.gz"; + sha256 = "1xxcwhz3y6djrycw8sm6xz83wb4hb12rd1n0skvc7fng0rh1snym"; + }; - /* doConfigure should be removed if not needed */ - phaseNames = ["fixPaths" "doConfigure" "doMakeInstall"]; - fixPaths = a.fullDepEntry ('' + buildInputs = [ gmp flex bison perl ]; + + preConfigure = '' sed -e "s@ /bin/bash@bash@g" -i Makefile.std find . -exec sed -e "s@/usr/bin/perl@${perl}/bin/perl@g" -i '{}' ';' - '') ["minInit" "doUnpack"]; + ''; - meta = { + meta = with stdenv.lib; { description = "A prover for satisfiability modulo theory (SMT)"; - maintainers = with a.lib.maintainers; - [ - raskin - ]; - platforms = with a.lib.platforms; - linux; - license = a.lib.licenses.free; + maintainers = with maintainers; + [ raskin ]; + platforms = platforms.linux; + license = licenses.free; homepage = "http://www.cs.nyu.edu/acsys/cvc3/index.html"; }; passthru = { @@ -50,4 +29,4 @@ rec { downloadPage = "http://www.cs.nyu.edu/acsys/cvc3/download.html"; }; }; -}) x +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 679b155ccd5..0cac671bdf6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14809,7 +14809,9 @@ let coqPackages = recurseIntoAttrs (mkCoqPackages_8_4 coqPackages); coqPackages_8_5 = recurseIntoAttrs (mkCoqPackages_8_5 coqPackages_8_5); - cvc3 = callPackage ../applications/science/logic/cvc3 {}; + cvc3 = callPackage ../applications/science/logic/cvc3 { + gmp = lib.overrideDerivation gmp (a: { dontDisableStatic = true; }); + }; cvc4 = callPackage ../applications/science/logic/cvc4 {}; ekrhyper = callPackage ../applications/science/logic/ekrhyper {}; From 3e21aaeb8e5597dec94591735d51e24e2cec6a48 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Tue, 14 Jul 2015 11:01:01 +0200 Subject: [PATCH 33/43] warmux: reimplement using mkDerivation --- pkgs/games/warmux/default.nix | 67 +++++++++++++---------------------- 1 file changed, 24 insertions(+), 43 deletions(-) diff --git a/pkgs/games/warmux/default.nix b/pkgs/games/warmux/default.nix index ad633d15a8c..7bf277a7f9e 100644 --- a/pkgs/games/warmux/default.nix +++ b/pkgs/games/warmux/default.nix @@ -1,55 +1,36 @@ -x@{builderDefsPackage - , zlib - , curl, gnutls, fribidi, libpng, SDL, SDL_gfx, SDL_image, SDL_mixer - , SDL_net, SDL_ttf, libunwind, libX11, xproto, libxml2, pkgconfig - , gettext, intltool, libtool, perl - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl +, zlib, curl, gnutls, fribidi, libpng, SDL, SDL_gfx, SDL_image, SDL_mixer +, SDL_net, SDL_ttf, libunwind, libX11, xproto, libxml2, pkgconfig +, gettext, intltool, libtool, perl +}: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="warmux"; - version="11.04.1"; - name="${baseName}-${version}"; - url="http://download.gna.org/${baseName}/${name}.tar.bz2"; - hash="1vp44wdpnb1g6cddmn3nphc543pxsdhjis52mfif0p2c7qslz73q"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + name = "warmux-${version}"; + version = "11.04.1"; + + src = fetchurl { + url = "http://download.gna.org/warmux/${name}.tar.bz2"; + sha256 = "1vp44wdpnb1g6cddmn3nphc543pxsdhjis52mfif0p2c7qslz73q"; }; - inherit (sourceInfo) name version; - inherit buildInputs; + buildInputs = + [ zlib curl gnutls fribidi libpng SDL SDL_gfx SDL_image SDL_mixer + SDL_net SDL_ttf libunwind libX11 xproto libxml2 pkgconfig + gettext intltool libtool perl + ]; - /* doConfigure should be removed if not needed */ - phaseNames = ["doPatch" "doConfigure" "doMakeInstall"]; - - configureFlags = "CFLAGS=\"-include ${zlib}/include/zlib.h\""; + configureFlagsArray = ("CFLAGS=-include ${zlib}/include/zlib.h"); patches = [ ./gcc-fix.patch ]; - meta = { + meta = with stdenv.lib; { description = "Ballistics turn-based battle game between teams"; - maintainers = with a.lib.maintainers; + maintainers = with maintainers; [ raskin ]; - platforms = with a.lib.platforms; - linux; - license = a.lib.licenses.gpl2; + platforms = platforms.linux; + license = licenses.gpl2; + downloadPage = "http://download.gna.org/warmux/"; }; - passthru = { - updateInfo = { - downloadPage = "http://download.gna.org/warmux/"; - }; - }; -}) x - +} From f3e821c6e590ebae8a3b6063685ef49186f12b1e Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Tue, 14 Jul 2015 11:19:56 +0200 Subject: [PATCH 34/43] soi: reimplement using mkDerivation --- pkgs/games/soi/default.nix | 66 +++++++++++++------------------------- 1 file changed, 22 insertions(+), 44 deletions(-) diff --git a/pkgs/games/soi/default.nix b/pkgs/games/soi/default.nix index 7fd13ccab3b..b21dfabb6e8 100644 --- a/pkgs/games/soi/default.nix +++ b/pkgs/games/soi/default.nix @@ -1,56 +1,34 @@ -x@{builderDefsPackage - , mesa, SDL, cmake, eigen - , ...}: -builderDefsPackage -(a : +{ stdenv, fetchurl, mesa, SDL, cmake, eigen }: + let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; - - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="soi"; - fileName="Spheres%20of%20Influence"; - majorVersion="0.1"; - minorVersion="1"; - version="${majorVersion}.${minorVersion}"; - name="${baseName}-${version}"; - project="${baseName}"; - url="mirror://sourceforge/project/${project}/${baseName}-${majorVersion}/${fileName}-${version}-Source.tar.gz"; - hash="dfc59319d2962033709bb751c71728417888addc6c32cbec3da9679087732a81"; - }; + baseName = "soi"; + fileName = "Spheres%20of%20Influence"; + majorVersion = "0.1"; + minorVersion = "1"; + version = "${majorVersion}.${minorVersion}"; + name = "${baseName}-${version}"; + project = "${baseName}"; in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; - name = "${sourceInfo.name}.tar.gz"; + +stdenv.mkDerivation rec { + src = fetchurl { + url = "mirror://sourceforge/project/${project}/${baseName}-${majorVersion}/${fileName}-${version}-Source.tar.gz"; + sha256 = "dfc59319d2962033709bb751c71728417888addc6c32cbec3da9679087732a81"; }; - inherit (sourceInfo) name version; - inherit buildInputs; + buildInputs = [ mesa SDL cmake eigen ]; - phaseNames = ["setVars" "doCmake" "doMakeInstall"]; + preConfigure = ''export EIGENDIR=${eigen}/include/eigen2''; - setVars = a.noDepEntry '' - export EIGENDIR=${a.eigen}/include/eigen2 - ''; - - meta = { + meta = with stdenv.lib; { description = "A physics-based puzzle game"; - maintainers = with a.lib.maintainers; + maintainers = with maintainers; [ raskin ]; - platforms = with a.lib.platforms; - linux; - license = a.lib.licenses.free; + platforms = platforms.linux; + license = licenses.free; broken = true; + downloadPage = "http://sourceforge.net/projects/soi/files/"; }; - passthru = { - updateInfo = { - downloadPage = "http://sourceforge.net/projects/soi/files/"; - }; - }; -}) x +} From 33d825aaea825f7fb818a7ac097e3a9c5168ba61 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Tue, 14 Jul 2015 11:25:46 +0200 Subject: [PATCH 35/43] glestae: reimplement using mkDerivation --- pkgs/games/glestae/default.nix | 63 ++++++++++++---------------------- 1 file changed, 21 insertions(+), 42 deletions(-) diff --git a/pkgs/games/glestae/default.nix b/pkgs/games/glestae/default.nix index 2fa9cd35f76..2a2809cc805 100644 --- a/pkgs/games/glestae/default.nix +++ b/pkgs/games/glestae/default.nix @@ -1,55 +1,34 @@ -x@{builderDefsPackage - , mesa, cmake, lua5, SDL, openal, libvorbis, libogg, zlib, physfs - , freetype, libpng, libjpeg, glew, wxGTK28, libxml2, libpthreadstubs - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl +, mesa, cmake, lua5, SDL, openal, libvorbis, libogg, zlib, physfs +, freetype, libpng, libjpeg, glew, wxGTK28, libxml2, libpthreadstubs +}: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="glestae"; - project="${baseName}"; - version="0.3.2"; - name="${baseName}-${version}"; - nameSuffix="-src"; - extension="tar.bz2"; - url="mirror://sourceforge/project/${project}/${version}/${baseName}${nameSuffix}-${version}.${extension}"; - hash="1k02vf88mms0zbprvy1b1qdwjzmdag5rd1p43f0gpk1sms6isn94"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + name = "glestae-${version}"; + version = "0.3.2"; + + src = fetchurl { + url = "mirror://sourceforge/project/glestae/${version}/glestae-src-${version}.tar.bz2"; + sha256 = "1k02vf88mms0zbprvy1b1qdwjzmdag5rd1p43f0gpk1sms6isn94"; }; - inherit (sourceInfo) name version; - inherit buildInputs; - - /* doConfigure should be removed if not needed */ - phaseNames = ["doCmake" "doMakeInstall"]; + buildInputs = + [ mesa cmake lua5 SDL openal libvorbis libogg zlib physfs + freetype libpng libjpeg glew wxGTK28 libxml2 libpthreadstubs + ]; cmakeFlags = [ "-DLUA_LIBRARIES=-llua" "-DGAE_DATA_DIR=$out/share/glestae" ]; - + meta = { description = "A 3D RTS - fork of inactive Glest project"; - maintainers = [ a.lib.maintainers.raskin ]; - platforms = a.lib.platforms.linux; + maintainers = [ stdenv.lib.maintainers.raskin ]; + platforms = stdenv.lib.platforms.linux; # Note that some data seems to be under separate redistributable licenses - license = a.lib.licenses.gpl2Plus; + license = stdenv.lib.licenses.gpl2Plus; broken = true; + downloadPage = "http://sourceforge.net/projects/glestae/files/0.3.2/"; }; - passthru = { - updateInfo = { - downloadPage = "http://sourceforge.net/projects/glestae/files/0.3.2/"; - }; - }; -}) x - +} From bfbb866d41a9c81eb624b3c1ac572a920e4abb60 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Tue, 14 Jul 2015 11:29:02 +0200 Subject: [PATCH 36/43] gl117: reimplement using mkDerivation --- pkgs/games/gl-117/default.nix | 45 +++++++++++------------------------ 1 file changed, 14 insertions(+), 31 deletions(-) diff --git a/pkgs/games/gl-117/default.nix b/pkgs/games/gl-117/default.nix index e37f474b597..49f61a2f2bc 100644 --- a/pkgs/games/gl-117/default.nix +++ b/pkgs/games/gl-117/default.nix @@ -1,41 +1,24 @@ -x@{builderDefsPackage - , mesa, SDL, freeglut, SDL_mixer, autoconf, automake, libtool - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl +, mesa, SDL, freeglut, SDL_mixer, autoconf, automake, libtool +}: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - version = "1.3.2"; - name = "gl-117-1.3.2"; - url = "mirror://sourceforge/project/gl-117/gl-117/GL-117%20Source/gl-117-1.3.2-src.tar.bz2"; - hash = "1yvg1rp1yijv0b45cz085b29x5x0g5fkm654xdv5qwh2l6803gb4"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + name = "gl-117-${version}"; + version = "1.3.2"; + + src = fetchurl { + url = "mirror://sourceforge/project/gl-117/gl-117/GL-117%20Source/${name}.tar.bz2"; + sha256 = "1yvg1rp1yijv0b45cz085b29x5x0g5fkm654xdv5qwh2l6803gb4"; }; - inherit (sourceInfo) name version; - inherit buildInputs; + buildInputs = [ mesa SDL freeglut SDL_mixer autoconf automake libtool ]; - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "doMakeInstall"]; - meta = { description = "An air combat simulator"; - maintainers = with a.lib.maintainers; + maintainers = with stdenv.lib.maintainers; [ raskin ]; - platforms = with a.lib.platforms; - linux; + platforms = stdenv.lib.platforms.linux; }; -}) x - +} From c6d645803ab0a0854e30b93783446a4449298dfe Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 16 Jul 2015 03:23:36 +0200 Subject: [PATCH 37/43] iprover: reimplement using mkDerivation --- .../science/logic/iprover/default.nix | 60 ++++++------------- 1 file changed, 19 insertions(+), 41 deletions(-) diff --git a/pkgs/applications/science/logic/iprover/default.nix b/pkgs/applications/science/logic/iprover/default.nix index e03b33fa43c..fe906fbe357 100644 --- a/pkgs/applications/science/logic/iprover/default.nix +++ b/pkgs/applications/science/logic/iprover/default.nix @@ -1,35 +1,19 @@ -x@{builderDefsPackage - , ocaml, eprover - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl, ocaml, eprover }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="iprover"; - version="0.8.1"; - name="${baseName}_v${version}"; - url="http://${baseName}.googlecode.com/files/${name}.tar.gz"; - hash="15qn523w4l296np5rnkwi50a5x2xqz0kaza7bsh9bkazph7jma7w"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + name = "iprover-${version}"; + version = "0.8.1"; + + src = fetchurl { + url = "http://iprover.googlecode.com/files/iprover_v${version}.tar.gz"; + sha256 = "15qn523w4l296np5rnkwi50a5x2xqz0kaza7bsh9bkazph7jma7w"; }; - name = "${sourceInfo.baseName}-${sourceInfo.version}"; - inherit buildInputs; + buildInputs = [ ocaml eprover ]; - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "doMake" "doDeploy"]; - configureCommand = "sh configure"; - doDeploy = a.fullDepEntry ('' + preConfigure = ''patchShebangs .''; + + installPhase = '' mkdir -p "$out/bin" cp iproveropt "$out/bin" @@ -37,22 +21,16 @@ rec { cp *.p "$out/share/${name}" echo -e "#! /bin/sh\\n$out/bin/iproveropt --clausifier \"${eprover}/bin/eprover\" --clausifier_options \" --tstp-format --silent --cnf \" \"\$@\"" > "$out"/bin/iprover chmod a+x "$out"/bin/iprover - '') ["defEnsureDir" "minInit" "doMake"]; + ''; - meta = { + meta = with stdenv.lib; { description = "An automated first-order logic theorem prover"; - maintainers = with a.lib.maintainers; + maintainers = with maintainers; [ raskin ]; - platforms = with a.lib.platforms; - linux; - license = with a.lib.licenses; - gpl3; + platforms = platforms.linux; + license = licenses.gpl3; + downloadPage = "http://code.google.com/p/iprover/downloads/list"; }; - passthru = { - updateInfo = { - downloadPage = "http://code.google.com/p/iprover/downloads/list"; - }; - }; -}) x +} From 0a4e12c0e2e53c7f784b8468c09d35cc22a10a8b Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 16 Jul 2015 03:33:19 +0200 Subject: [PATCH 38/43] opensmt: reimplement using mkDerivation --- .../science/logic/opensmt/default.nix | 56 ++++++------------- 1 file changed, 17 insertions(+), 39 deletions(-) diff --git a/pkgs/applications/science/logic/opensmt/default.nix b/pkgs/applications/science/logic/opensmt/default.nix index 62e11651175..6129eaadc89 100644 --- a/pkgs/applications/science/logic/opensmt/default.nix +++ b/pkgs/applications/science/logic/opensmt/default.nix @@ -1,47 +1,25 @@ -x@{builderDefsPackage - , automake, libtool, autoconf, intltool, perl - , gmpxx, flex, bison - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl, automake, libtool, autoconf, intltool, perl +, gmpxx, flex, bison +}: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="opensmt"; - version="20101017"; - name="${baseName}-${version}"; - filename="${baseName}_src_${version}"; - url="http://${baseName}.googlecode.com/files/${filename}.tgz"; - hash="0xrky7ixjaby5x026v7hn72xh7d401w9jhccxjn0khhn1x87p2w1"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + name = "opensmt-${version}"; + version = "20101017"; + + src = fetchurl { + url = "http://opensmt.googlecode.com/files/opensmt_src_${version}.tgz"; + sha256 = "0xrky7ixjaby5x026v7hn72xh7d401w9jhccxjn0khhn1x87p2w1"; }; - inherit (sourceInfo) name version; - inherit buildInputs; + buildInputs = [ automake libtool autoconf intltool perl gmpxx flex bison ]; - /* doConfigure should be removed if not needed */ - phaseNames = ["doAutotools" "doConfigure" "doMakeInstall"]; - - meta = { + meta = with stdenv.lib; { description = "A satisfiability modulo theory (SMT) solver"; - maintainers = [ a.lib.maintainers.raskin ]; - platforms = a.lib.platforms.linux; - license = a.stdenv.lib.licenses.gpl3; + maintainers = [ maintainers.raskin ]; + platforms = platforms.linux; + license = licenses.gpl3; homepage = "http://code.google.com/p/opensmt/"; broken = true; + downloadPage = "http://code.google.com/p/opensmt/downloads/list"; }; - passthru = { - updateInfo = { - downloadPage = "http://code.google.com/p/opensmt/downloads/list"; - }; - }; -}) x +} From 4229525eac9ef51d758e95ea9bcd125979c0affa Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 16 Jul 2015 03:36:15 +0200 Subject: [PATCH 39/43] spass: reimplement using mkDerivation --- .../science/logic/spass/default.nix | 58 ++++++------------- 1 file changed, 18 insertions(+), 40 deletions(-) diff --git a/pkgs/applications/science/logic/spass/default.nix b/pkgs/applications/science/logic/spass/default.nix index 5327ed6a42a..24da52b9d07 100644 --- a/pkgs/applications/science/logic/spass/default.nix +++ b/pkgs/applications/science/logic/spass/default.nix @@ -1,49 +1,27 @@ -x@{builderDefsPackage - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="spass"; - baseVersion="3"; - minorVersion="7"; - version="${baseVersion}.${minorVersion}"; - name="${baseName}-${version}"; - url="http://www.spass-prover.org/download/sources/${baseName}${baseVersion}${minorVersion}.tgz"; - hash="1k5a98kr3vzga54zs7slwwaaf6v6agk1yfcayd8bl55q15g7xihk"; - }; +let + baseVersion="3"; + minorVersion="7"; in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; + +stdenv.mkDerivation rec { + name = "spass-${version}"; + version = "${baseVersion}.${minorVersion}"; + + src = fetchurl { + url = "http://www.spass-prover.org/download/sources/spass${baseVersion}${minorVersion}.tgz"; + sha256 = "1k5a98kr3vzga54zs7slwwaaf6v6agk1yfcayd8bl55q15g7xihk"; }; - inherit (sourceInfo) name version; - inherit buildInputs; - - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "doMakeInstall"]; - - meta = { + meta = with stdenv.lib; { description = "An automated theorem preover for FOL"; - maintainers = with a.lib.maintainers; + maintainers = with maintainers; [ raskin ]; - platforms = with a.lib.platforms; - linux; - license = a.lib.licenses.bsd2; + platforms = platforms.linux; + license = licenses.bsd2; + downloadPage = "http://www.spass-prover.org/download/index.html"; }; - passthru = { - updateInfo = { - downloadPage = "http://www.spass-prover.org/download/index.html"; - }; - }; -}) x - +} From e9fd07c706723b89b8b454ada6fda2c1b8a621ab Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 16 Jul 2015 03:45:18 +0200 Subject: [PATCH 40/43] dssi: reimplement using mkDerivation --- pkgs/development/libraries/dssi/default.nix | 61 +++++++-------------- 1 file changed, 20 insertions(+), 41 deletions(-) diff --git a/pkgs/development/libraries/dssi/default.nix b/pkgs/development/libraries/dssi/default.nix index a544baf7d6d..49d570c8896 100644 --- a/pkgs/development/libraries/dssi/default.nix +++ b/pkgs/development/libraries/dssi/default.nix @@ -1,50 +1,29 @@ -x@{builderDefsPackage - , ladspaH, libjack2, liblo, alsaLib, qt4, libX11, libsndfile, libSM - , libsamplerate, libtool, autoconf, automake, xproto, libICE, pkgconfig - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl, ladspaH, libjack2, liblo, alsaLib, qt4, libX11, libsndfile, libSM +, libsamplerate, libtool, autoconf, automake, xproto, libICE, pkgconfig +}: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="dssi"; - version="1.1.1"; - project="${baseName}"; - name="${baseName}-${version}"; - url="mirror://sourceforge/project/${project}/${baseName}/${version}/${name}.tar.gz"; - hash="0kl1hzhb7cykzkrqcqgq1dk4xcgrcxv0jja251aq4z4l783jpj7j"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + name = "dssi-${version}"; + version = "1.1.1"; + + src = fetchurl { + url = "mirror://sourceforge/project/dssi/dssi/${version}/${name}.tar.gz"; + sha256 = "0kl1hzhb7cykzkrqcqgq1dk4xcgrcxv0jja251aq4z4l783jpj7j"; }; - inherit (sourceInfo) name version; - inherit buildInputs; + buildInputs = + [ ladspaH libjack2 liblo alsaLib qt4 libX11 libsndfile libSM + libsamplerate libtool autoconf automake xproto libICE pkgconfig + ]; - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "doMakeInstall"]; - - meta = { + meta = with stdenv.lib; { description = "A plugin SDK for virtual instruments"; - maintainers = with a.lib.maintainers; + maintainers = with maintainers; [ raskin ]; - platforms = with a.lib.platforms; - linux; - license = a.lib.licenses.lgpl21; + platforms = platforms.linux; + license = licenses.lgpl21; + downloadPage = "http://sourceforge.net/projects/dssi/files/dssi/"; }; - passthru = { - updateInfo = { - downloadPage = "http://sourceforge.net/projects/dssi/files/dssi/"; - }; - }; -}) x - +} From ad4167e87e647c784a27b07104d32cb41c23ac88 Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Thu, 16 Jul 2015 03:48:41 +0200 Subject: [PATCH 41/43] ggz_base_libs: reimplement using mkDerivation --- .../libraries/ggz_base_libs/default.nix | 59 ++++++------------- 1 file changed, 18 insertions(+), 41 deletions(-) diff --git a/pkgs/development/libraries/ggz_base_libs/default.nix b/pkgs/development/libraries/ggz_base_libs/default.nix index b74aa3447a3..5e3adb0ace2 100644 --- a/pkgs/development/libraries/ggz_base_libs/default.nix +++ b/pkgs/development/libraries/ggz_base_libs/default.nix @@ -1,53 +1,30 @@ -x@{builderDefsPackage - , intltool, openssl, expat, libgcrypt - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl, intltool, openssl, expat, libgcrypt }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="ggz-base-libs"; - version="0.99.5"; - name="${baseName}-snapshot-${version}"; - url="http://mirrors.ibiblio.org/pub/mirrors/ggzgamingzone/ggz/snapshots/${name}.tar.gz"; - hash="1cw1vg0fbj36zyggnzidx9cbjwfc1yr4zqmsipxnvns7xa2awbdk"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + version = "0.99.5"; + baseName = "ggz-base-libs"; + name = "${baseName}-snapshot-${version}"; + + src = fetchurl { + url = "http://mirrors.ibiblio.org/pub/mirrors/ggzgamingzone/ggz/snapshots/${name}.tar.gz"; + sha256 = "1cw1vg0fbj36zyggnzidx9cbjwfc1yr4zqmsipxnvns7xa2awbdk"; }; - inherit (sourceInfo) name version; - inherit buildInputs; - - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "doMakeInstall"]; + buildInputs = [ intltool openssl expat libgcrypt ]; configureFlags = [ - "--with-ssl-dir=${a.openssl}/" + "--with-ssl-dir=${openssl}/" "--with-tls" ]; - - meta = { + + meta = with stdenv.lib; { description = "GGZ Gaming zone libraries"; - maintainers = with a.lib.maintainers; + maintainers = with maintainers; [ raskin ]; - platforms = with a.lib.platforms; - linux; - license = a.lib.licenses.gpl2; + platforms = platforms.linux; + license = licenses.gpl2; + downloadPage = "http://www.ggzgamingzone.org/releases/"; }; - passthru = { - updateInfo = { - downloadPage = "http://www.ggzgamingzone.org/releases/"; - }; - }; -}) x - +} From 6ccf87defe2599c7f6d8dc729c4cc7aa0c97352e Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Mon, 20 Jul 2015 06:36:28 +0200 Subject: [PATCH 42/43] bam: reimplement using mkDerivation --- .../tools/build-managers/bam/default.nix | 65 ++++++------------- 1 file changed, 19 insertions(+), 46 deletions(-) diff --git a/pkgs/development/tools/build-managers/bam/default.nix b/pkgs/development/tools/build-managers/bam/default.nix index b01d22b524b..c20431c5e7e 100644 --- a/pkgs/development/tools/build-managers/bam/default.nix +++ b/pkgs/development/tools/build-managers/bam/default.nix @@ -1,62 +1,35 @@ -x@{builderDefsPackage - , lua5, python - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl, lua5, python }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="bam"; - version="0.4.0"; - name="${baseName}-${version}"; - url="http://github.com/downloads/matricks/bam/${name}.tar.bz2"; - hash="0z90wvyd4nfl7mybdrv9dsd4caaikc6fxw801b72gqi1m9q0c0sn"; - }; -in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; +stdenv.mkDerivation rec { + name = "bam-${version}"; + version = "0.4.0"; + + src = fetchurl { + url = "http://github.com/downloads/matricks/bam/${name}.tar.bz2"; + sha256 = "0z90wvyd4nfl7mybdrv9dsd4caaikc6fxw801b72gqi1m9q0c0sn"; }; - inherit (sourceInfo) name version; - inherit buildInputs; + buildInputs = [ lua5 python ]; - /* doConfigure should be removed if not needed */ - phaseNames = ["check" "doDeploy"]; + buildPhase = ''${stdenv.shell} make_unix.sh''; - build = a.fullDepEntry '' - sh make_unix.sh - '' ["minInit" "doUnpack" "addInputs"]; + checkPhase = ''${python.interpreter} scripts/test.py''; - check = a.fullDepEntry '' - python scripts/test.py - '' ["build" "addInputs"]; - - doDeploy = a.fullDepEntry '' + installPhase = '' mkdir -p "$out/share/bam" cp -r docs examples tests "$out/share/bam" mkdir -p "$out/bin" cp bam "$out/bin" - '' ["minInit" "defEnsureDir" "build"]; + ''; - meta = { + meta = with stdenv.lib; { description = "Yet another build manager"; - maintainers = with a.lib.maintainers; + maintainers = with maintainers; [ raskin ]; - platforms = with a.lib.platforms; - linux; - license = a.lib.licenses.free; + platforms = platforms.linux; + license = licenses.free; + downloadPage = "http://matricks.github.com/bam/"; }; - passthru = { - updateInfo = { - downloadPage = "http://matricks.github.com/bam/"; - }; - }; -}) x +} From 6d4ff9020793c43fe5994afef31d21a92895e0ab Mon Sep 17 00:00:00 2001 From: Joachim Fasting Date: Tue, 21 Jul 2015 13:19:38 +0200 Subject: [PATCH 43/43] gap: reimplement using mkDerivation --- .../applications/science/math/gap/default.nix | 70 +++++++------------ 1 file changed, 26 insertions(+), 44 deletions(-) diff --git a/pkgs/applications/science/math/gap/default.nix b/pkgs/applications/science/math/gap/default.nix index e810879eba6..dcd0734d85d 100644 --- a/pkgs/applications/science/math/gap/default.nix +++ b/pkgs/applications/science/math/gap/default.nix @@ -1,68 +1,50 @@ -x@{builderDefsPackage - , pari ? null - , ...}: -builderDefsPackage -(a : -let - helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ - []; +{ stdenv, fetchurl, pari ? null }: - buildInputs = map (n: builtins.getAttr n x) - (builtins.attrNames (builtins.removeAttrs x helperArgNames)); - sourceInfo = rec { - baseName="gap"; - version="4r4p12"; - name="${baseName}-${version}"; - url="ftp://ftp.gap-system.org/pub/gap/gap4/tar.gz/${baseName}${version}.tar.gz"; - hash="0flap5lbkvpms3zznq1zwxyxyj0ax3fk7m24f3bvhvr37vyxnf40"; - pkgVer="2012_01_12-10_47_UTC"; - pkgURL="ftp://ftp.gap-system.org/pub/gap/gap4/tar.bz2/packages-${pkgVer}.tar.bz2"; - pkgHash="0z9ncy1m5gvv4llkclxd1vpcgpb0b81a2pfmnhzvw8x708frhmnb"; +let + baseName = "gap"; + version = "4r4p12"; + + pkgVer = "2012_01_12-10_47_UTC"; + pkgSrc = fetchurl { + url = "ftp://ftp.gap-system.org/pub/gap/gap4/tar.bz2/packages-${pkgVer}.tar.bz2"; + sha256 = "0z9ncy1m5gvv4llkclxd1vpcgpb0b81a2pfmnhzvw8x708frhmnb"; }; in -rec { - src = a.fetchurl { - url = sourceInfo.url; - sha256 = sourceInfo.hash; + +stdenv.mkDerivation rec { + name = "${baseName}-${version}"; + + src = fetchurl { + url = "ftp://ftp.gap-system.org/pub/gap/gap4/tar.gz/${baseName}${version}.tar.gz"; + sha256 = "0flap5lbkvpms3zznq1zwxyxyj0ax3fk7m24f3bvhvr37vyxnf40"; }; - pkgSrc = a.fetchurl { - url=sourceInfo.pkgURL; - sha256=sourceInfo.pkgHash; - }; + buildInputs = [ pari ]; - inherit (sourceInfo) name version; - inherit buildInputs; - - /* doConfigure should be removed if not needed */ - phaseNames = ["doConfigure" "doMake" "doDeploy"]; - - doDeploy = a.fullDepEntry '' + installPhase = '' mkdir -p "$out/bin" "$out/share/gap/" cp -r . "$out/share/gap/build-dir" tar xf "${pkgSrc}" -C "$out/share/gap/build-dir/pkg" - ${if a.pari != null then + ${if pari != null then ''sed -e '2iexport PATH=$PATH:${pari}/bin' -i "$out/share/gap/build-dir/bin/gap.sh" '' else ""} sed -e "/GAP_DIR=/aGAP_DIR='$out/share/gap/build-dir/'" -i "$out/share/gap/build-dir/bin/gap.sh" ln -s "$out/share/gap/build-dir/bin/gap.sh" "$out/bin" - '' ["doMake" "minInit" "defEnsureDir"]; + ''; - meta = { + meta = with stdenv.lib; { description = "Computational discrete algebra system"; - maintainers = with a.lib.maintainers; + maintainers = with maintainers; [ raskin ]; - platforms = with a.lib.platforms; - linux; - license = with a.lib.licenses; - gpl2; - homepage = "http://gap-system.org/"; + platforms = platforms.linux; + license = licenses.gpl2; + homepage = http://gap-system.org/; broken = true; }; -}) x +}