From 9820cb1bf24254199db05856bbb4919378ac75cb Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Wed, 4 May 2016 10:08:35 +0000 Subject: use dontBuild instead of hacks changes: * buildPhase = "true" * buildPhase = ":" --- pkgs/applications/audio/baudline/default.nix | 2 +- pkgs/applications/audio/faust/faust1.nix | 5 +- pkgs/applications/audio/faust/faust2.nix | 4 +- .../graphics/sane/backends/brscan4/default.nix | 15 +--- .../sane/backends/brscan4/udev_rules_type1.nix | 9 +-- pkgs/applications/misc/jbidwatcher/default.nix | 4 +- .../misc/terminal-notifier/default.nix | 2 +- .../version-management/cvs2svn/default.nix | 2 +- .../git-and-tools/fast-export/default.nix | 2 +- .../git-and-tools/svn2git/default.nix | 31 ++++---- .../version-management/gitolite/default.nix | 3 +- pkgs/data/fonts/aurulent-sans/default.nix | 2 +- pkgs/data/fonts/bakoma-ttf/default.nix | 12 ++-- pkgs/data/fonts/dosemu-fonts/default.nix | 3 +- pkgs/data/fonts/powerline-fonts/default.nix | 27 ++++--- pkgs/data/fonts/ttf-bitstream-vera/default.nix | 6 +- pkgs/data/fonts/vista-fonts/default.nix | 12 ++-- .../stylesheets/xslt/docbook-xsl/default.nix | 25 ++++--- pkgs/development/compilers/ghc/6.10.2-binary.nix | 2 +- pkgs/development/compilers/ghc/7.0.4-binary.nix | 2 +- pkgs/development/compilers/ghc/7.4.2-binary.nix | 2 +- pkgs/development/libraries/fmod/4.24.16.nix | 3 +- pkgs/development/libraries/fmod/default.nix | 3 +- pkgs/development/libraries/libspotify/default.nix | 15 ++-- pkgs/development/libraries/uthash/default.nix | 2 +- .../libraries/xlibs-wrapper/default.nix | 5 +- .../mobile/titaniumenv/cli/node-env.nix | 84 +++++++++++----------- .../python-modules/stringtemplate/default.nix | 19 +++-- .../tools/analysis/clang-analyzer/default.nix | 3 +- .../tools/build-managers/gradle/default.nix | 2 +- pkgs/development/tools/misc/sqitch/default.nix | 8 ++- pkgs/development/web/grails/default.nix | 2 +- .../cups/drivers/brgenml1cupswrapper/default.nix | 9 ++- pkgs/misc/cups/drivers/brgenml1lpr/default.nix | 8 +-- .../darwin/install_name_tool/default.nix | 4 +- pkgs/os-specific/darwin/osx-sdk/default.nix | 5 +- pkgs/os-specific/gnu/hurd/default.nix | 2 +- pkgs/os-specific/gnu/libpthread/default.nix | 2 +- pkgs/os-specific/gnu/mach/default.nix | 2 +- pkgs/os-specific/linux/firmware/zd1211/default.nix | 7 +- pkgs/servers/monitoring/longview/default.nix | 18 ++--- pkgs/servers/rt/default.nix | 3 +- pkgs/servers/sql/monetdb/default.nix | 7 +- pkgs/servers/x11/xquartz/default.nix | 7 +- pkgs/tools/admin/sec/default.nix | 7 +- pkgs/tools/misc/debootstrap/default.nix | 15 +--- pkgs/tools/networking/swec/default.nix | 43 +++++------ pkgs/tools/package-management/nix-repl/default.nix | 19 +++-- .../tools/package-management/nix-serve/default.nix | 25 ++++--- pkgs/tools/security/pius/default.nix | 20 +++--- pkgs/tools/text/xidel/default.nix | 2 +- pkgs/tools/text/xml/basex/default.nix | 5 +- pkgs/tools/typesetting/pygmentex/default.nix | 7 +- pkgs/tools/typesetting/tex/dblatex/default.nix | 2 +- pkgs/tools/typesetting/tex/pgf/1.x.nix | 4 +- pkgs/tools/typesetting/tex/pgf/2.x.nix | 3 +- pkgs/tools/typesetting/tex/pgf/3.x.nix | 3 +- pkgs/tools/typesetting/tex/pgfplots/default.nix | 11 +-- 58 files changed, 272 insertions(+), 286 deletions(-) (limited to 'pkgs') diff --git a/pkgs/applications/audio/baudline/default.nix b/pkgs/applications/audio/baudline/default.nix index 2d6b0434d6a..e3cef30ccda 100644 --- a/pkgs/applications/audio/baudline/default.nix +++ b/pkgs/applications/audio/baudline/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { # Prebuilt binary distribution. # "patchelf --set-rpath" seems to break the application (cannot start), using # LD_LIBRARY_PATH wrapper script instead. - buildPhase = "true"; + dontBuild = true; installPhase = '' mkdir -p "$out/bin" mkdir -p "$out/libexec/baudline" diff --git a/pkgs/applications/audio/faust/faust1.nix b/pkgs/applications/audio/faust/faust1.nix index 56f7ac50227..20ba1c14745 100644 --- a/pkgs/applications/audio/faust/faust1.nix +++ b/pkgs/applications/audio/faust/faust1.nix @@ -25,7 +25,6 @@ let }; faust = stdenv.mkDerivation { - name = "faust-${version}"; inherit src; @@ -107,9 +106,7 @@ let inherit src; - configurePhase = ":"; - - buildPhase = ":"; + dontBuild = true; installPhase = '' runHook preInstall diff --git a/pkgs/applications/audio/faust/faust2.nix b/pkgs/applications/audio/faust/faust2.nix index 612a3dab99f..3953eb2b7e0 100644 --- a/pkgs/applications/audio/faust/faust2.nix +++ b/pkgs/applications/audio/faust/faust2.nix @@ -132,9 +132,7 @@ let inherit src; - configurePhase = ":"; - - buildPhase = ":"; + dontBuild = true; installPhase = '' runHook preInstall diff --git a/pkgs/applications/graphics/sane/backends/brscan4/default.nix b/pkgs/applications/graphics/sane/backends/brscan4/default.nix index 7b22e88bb84..8561c2a4ccf 100644 --- a/pkgs/applications/graphics/sane/backends/brscan4/default.nix +++ b/pkgs/applications/graphics/sane/backends/brscan4/default.nix @@ -1,12 +1,6 @@ { stdenv, fetchurl, callPackage, patchelf, makeWrapper, coreutils, libusb }: -/* - - -*/ - let - myPatchElf = file: with stdenv.lib; '' patchelf --set-interpreter \ ${stdenv.glibc}/lib/ld-linux${optionalString stdenv.is64bit "-x86-64"}.so.2 \ @@ -15,10 +9,7 @@ let udevRules = callPackage ./udev_rules_type1.nix {}; -in - -stdenv.mkDerivation rec { - +in stdenv.mkDerivation rec { name = "brscan4-0.4.3-3"; src = fetchurl { url = "http://download.brother.com/welcome/dlf006645/${name}.amd64.deb"; @@ -32,8 +23,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper patchelf coreutils udevRules ]; buildInputs = [ libusb ]; - buildPhase = ":"; - + dontBuild = true; patchPhase = '' ${myPatchElf "opt/brother/scanner/brscan4/brsaneconfig4"} @@ -47,7 +37,6 @@ stdenv.mkDerivation rec { ''; installPhase = '' - PATH_TO_BRSCAN4="opt/brother/scanner/brscan4" mkdir -p $out/$PATH_TO_BRSCAN4 cp -rp $PATH_TO_BRSCAN4/* $out/$PATH_TO_BRSCAN4 diff --git a/pkgs/applications/graphics/sane/backends/brscan4/udev_rules_type1.nix b/pkgs/applications/graphics/sane/backends/brscan4/udev_rules_type1.nix index 873240e81fc..da136a7f9e1 100644 --- a/pkgs/applications/graphics/sane/backends/brscan4/udev_rules_type1.nix +++ b/pkgs/applications/graphics/sane/backends/brscan4/udev_rules_type1.nix @@ -1,8 +1,6 @@ { stdenv, fetchurl, libsaneUDevRuleNumber ? "49"}: - stdenv.mkDerivation rec { - name = "brother-udev-rule-type1-1.0.0-1"; src = fetchurl { @@ -10,7 +8,7 @@ stdenv.mkDerivation rec { sha256 = "0i0x5jw135pli4jl9mgnr5n2rrdvml57nw84yq2999r4frza53xi"; }; - buildInputs = [ ]; + dontBuild = true; unpackPhase = '' ar x $src @@ -37,9 +35,6 @@ stdenv.mkDerivation rec { sed -i -e s/SYSFS/ATTR/g opt/brother/scanner/udev-rules/type1/*.rules ''; - - buildPhase = ":"; - installPhase = '' mkdir -p $out/etc/udev/rules.d cp opt/brother/scanner/udev-rules/type1/NN-brother-mfp-type1.rules \ @@ -57,4 +52,4 @@ stdenv.mkDerivation rec { license = stdenv.lib.licenses.unfree; maintainers = with stdenv.lib.maintainers; [ jraygauthier ]; }; -} \ No newline at end of file +} diff --git a/pkgs/applications/misc/jbidwatcher/default.nix b/pkgs/applications/misc/jbidwatcher/default.nix index 9b74b0c93a9..a933befec5f 100644 --- a/pkgs/applications/misc/jbidwatcher/default.nix +++ b/pkgs/applications/misc/jbidwatcher/default.nix @@ -15,9 +15,9 @@ stdenv.mkDerivation rec { jarfile = "$out/share/java/${pname}/JBidwatcher.jar"; - unpackPhase = "true"; +# unpackPhase = "true"; - buildPhase = "true"; + dontBuild = true; installPhase = '' mkdir -p "$out/bin" diff --git a/pkgs/applications/misc/terminal-notifier/default.nix b/pkgs/applications/misc/terminal-notifier/default.nix index 57ff213ae80..d9046c55e12 100644 --- a/pkgs/applications/misc/terminal-notifier/default.nix +++ b/pkgs/applications/misc/terminal-notifier/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { sha256 = "09x7vl0kddivqq3pyrk6sg1f0sv5l7nj0bmblq222zk3b09bgg8p"; }; - buildPhase = "true"; + dontBuild = true; installPhase = '' mkdir -p $out/Applications diff --git a/pkgs/applications/version-management/cvs2svn/default.nix b/pkgs/applications/version-management/cvs2svn/default.nix index 85749f978d1..952d9b7f21a 100644 --- a/pkgs/applications/version-management/cvs2svn/default.nix +++ b/pkgs/applications/version-management/cvs2svn/default.nix @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { buildInputs = [python makeWrapper]; - buildPhase = "true"; + dontBuild = true; installPhase = '' python ./setup.py install --prefix=$out for i in bzr svn git; do diff --git a/pkgs/applications/version-management/git-and-tools/fast-export/default.nix b/pkgs/applications/version-management/git-and-tools/fast-export/default.nix index 5bd6995d204..ef681c9ba7d 100644 --- a/pkgs/applications/version-management/git-and-tools/fast-export/default.nix +++ b/pkgs/applications/version-management/git-and-tools/fast-export/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation { buildInputs = [mercurial.python mercurial makeWrapper subversion]; - buildPhase="true"; # skip svn for now + dontBuild = true; # skip svn for now # TODO also support svn stuff # moving .py files into lib directory so that you can't pick the wrong file from PATH. diff --git a/pkgs/applications/version-management/git-and-tools/svn2git/default.nix b/pkgs/applications/version-management/git-and-tools/svn2git/default.nix index c735ef4506a..9a19b358c90 100644 --- a/pkgs/applications/version-management/git-and-tools/svn2git/default.nix +++ b/pkgs/applications/version-management/git-and-tools/svn2git/default.nix @@ -13,22 +13,21 @@ stdenv.mkDerivation { buildInputs = [ ruby makeWrapper ]; - buildPhase = "true"; - - installPhase = - '' - mkdir -p $out - cp -r lib $out/ - - mkdir -p $out/bin - substituteInPlace bin/svn2git --replace '/usr/bin/env ruby' ${ruby}/bin/ruby - cp bin/svn2git $out/bin/ - chmod +x $out/bin/svn2git - - wrapProgram $out/bin/svn2git \ - --set RUBYLIB $out/lib \ - --prefix PATH : ${git}/bin - ''; + dontBuild = true; + + installPhase = '' + mkdir -p $out + cp -r lib $out/ + + mkdir -p $out/bin + substituteInPlace bin/svn2git --replace '/usr/bin/env ruby' ${ruby}/bin/ruby + cp bin/svn2git $out/bin/ + chmod +x $out/bin/svn2git + + wrapProgram $out/bin/svn2git \ + --set RUBYLIB $out/lib \ + --prefix PATH : ${git}/bin + ''; meta = { homepage = https://github.com/nirvdrum/svn2git; diff --git a/pkgs/applications/version-management/gitolite/default.nix b/pkgs/applications/version-management/gitolite/default.nix index 60e0a794705..5e1feacd83d 100644 --- a/pkgs/applications/version-management/gitolite/default.nix +++ b/pkgs/applications/version-management/gitolite/default.nix @@ -10,7 +10,8 @@ stdenv.mkDerivation rec { }; buildInputs = [ git nettools perl ]; - buildPhase = "true"; + + dontBuild = true; patchPhase = '' substituteInPlace ./install --replace " 2>/dev/null" "" diff --git a/pkgs/data/fonts/aurulent-sans/default.nix b/pkgs/data/fonts/aurulent-sans/default.nix index f57f3de7f82..9941b4791b5 100644 --- a/pkgs/data/fonts/aurulent-sans/default.nix +++ b/pkgs/data/fonts/aurulent-sans/default.nix @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "01hvpvbrks40g9k1xr2f1gxnd5wd0sxidgfbwrm94pdi1a36xxrk"; }; - buildPhase = "true"; + dontBuild = true; installPhase = '' fontDir=$out/share/fonts/opentype diff --git a/pkgs/data/fonts/bakoma-ttf/default.nix b/pkgs/data/fonts/bakoma-ttf/default.nix index 8b607adaaae..fb1459831f6 100644 --- a/pkgs/data/fonts/bakoma-ttf/default.nix +++ b/pkgs/data/fonts/bakoma-ttf/default.nix @@ -2,14 +2,18 @@ stdenv.mkDerivation { name = "bakoma-ttf"; - + src = fetchurl { url = http://tarballs.nixos.org/bakoma-ttf.tar.bz2; sha256 = "1j1y3cq6ys30m734axc0brdm2q9n2as4h32jws15r7w5fwr991km"; }; - - buildPhase = "true"; - installPhase = "mkdir -p $out/share/fonts/truetype; cp ttf/*.ttf $out/share/fonts/truetype"; + + dontBuild = true; + + installPhase = '' + mkdir -p $out/share/fonts/truetype + cp ttf/*.ttf $out/share/fonts/truetype + ''; meta = { description = "TrueType versions of the Computer Modern and AMS TeX Fonts"; diff --git a/pkgs/data/fonts/dosemu-fonts/default.nix b/pkgs/data/fonts/dosemu-fonts/default.nix index 97fb0b82c74..decfaf63aef 100644 --- a/pkgs/data/fonts/dosemu-fonts/default.nix +++ b/pkgs/data/fonts/dosemu-fonts/default.nix @@ -9,8 +9,7 @@ stdenv.mkDerivation rec { sha256 = "0l1zwmw42mpakjrzmbygshcg2qzq9mv8lx42738rz3j9hrqzg4pw"; }; - configurePhase = "true"; - buildPhase = "true"; + dontBuild = true; buildInputs = [bdftopcf mkfontdir mkfontscale]; diff --git a/pkgs/data/fonts/powerline-fonts/default.nix b/pkgs/data/fonts/powerline-fonts/default.nix index 2e576cf6dc8..dbfb49f1bed 100644 --- a/pkgs/data/fonts/powerline-fonts/default.nix +++ b/pkgs/data/fonts/powerline-fonts/default.nix @@ -10,25 +10,24 @@ stdenv.mkDerivation { sha256 = "1pwz83yh28yd8aj6fbyfz8z3q3v67psszpd9mp4vv0ms9w8b5ajn"; }; - buildPhase = "true"; + dontBuild = true; - installPhase = - '' - mkdir -p $out/share/fonts/opentype - cp -v */*.otf $out/share/fonts/opentype + installPhase = '' + mkdir -p $out/share/fonts/opentype + cp -v */*.otf $out/share/fonts/opentype - mkdir -p $out/share/fonts/truetype - cp -v */*.ttf $out/share/fonts/truetype + mkdir -p $out/share/fonts/truetype + cp -v */*.ttf $out/share/fonts/truetype - mkdir -p $out/share/fonts/bdf - cp -v */BDF/*.bdf $out/share/fonts/bdf + mkdir -p $out/share/fonts/bdf + cp -v */BDF/*.bdf $out/share/fonts/bdf - mkdir -p $out/share/fonts/pcf - cp -v */PCF/*.pcf.gz $out/share/fonts/pcf + mkdir -p $out/share/fonts/pcf + cp -v */PCF/*.pcf.gz $out/share/fonts/pcf - mkdir -p $out/share/fonts/psf - cp -v */PSF/*.psf.gz $out/share/fonts/psf - ''; + mkdir -p $out/share/fonts/psf + cp -v */PSF/*.psf.gz $out/share/fonts/psf + ''; meta = with stdenv.lib; { homepage = https://github.com/powerline/fonts; diff --git a/pkgs/data/fonts/ttf-bitstream-vera/default.nix b/pkgs/data/fonts/ttf-bitstream-vera/default.nix index 10766d9fa78..d448aa558eb 100644 --- a/pkgs/data/fonts/ttf-bitstream-vera/default.nix +++ b/pkgs/data/fonts/ttf-bitstream-vera/default.nix @@ -8,11 +8,11 @@ stdenv.mkDerivation { sha256 = "1p3qs51x5327gnk71yq8cvmxc6wgx79sqxfvxcv80cdvgggjfnyv"; }; - buildPhase = "true"; + dontBuild = true; - installPhase = " + installPhase = '' fontDir=$out/share/fonts/truetype mkdir -p $fontDir cp *.ttf $fontDir - "; + ''; } diff --git a/pkgs/data/fonts/vista-fonts/default.nix b/pkgs/data/fonts/vista-fonts/default.nix index f3165b33cca..b2854b399f6 100644 --- a/pkgs/data/fonts/vista-fonts/default.nix +++ b/pkgs/data/fonts/vista-fonts/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation { name = "vista-fonts-1"; - + src = fetchurl { url = http://download.microsoft.com/download/f/5/a/f5a3df76-d856-4a61-a6bd-722f52a5be26/PowerPointViewer.exe; sha256 = "07vhjdw8iip7gxk6wvp4myhvbn9619g10j9qvpbzz4ihima57ry4"; @@ -10,14 +10,14 @@ stdenv.mkDerivation { buildInputs = [cabextract]; - unpackPhase = " + unpackPhase = '' cabextract --lowercase --filter ppviewer.cab $src cabextract --lowercase --filter '*.TTF' ppviewer.cab sourceRoot=. - "; - - buildPhase = "true"; - + ''; + + dontBuild = true; + installPhase = '' mkdir -p $out/share/fonts/truetype cp *.ttf $out/share/fonts/truetype diff --git a/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix b/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix index 863f6044402..77cd666b8c6 100644 --- a/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix +++ b/pkgs/data/sgml+xml/stylesheets/xslt/docbook-xsl/default.nix @@ -10,19 +10,18 @@ let inherit sha256; }; - buildPhase = "true"; - - installPhase = - '' - dst=$out/share/xml/${pname} - mkdir -p $dst - rm -rf RELEASE* README* INSTALL TODO NEWS* BUGS install.sh svn* tools log Makefile tests extensions webhelp - mv * $dst/ - - # Backwards compatibility. Will remove eventually. - mkdir -p $out/xml/xsl - ln -s $dst $out/xml/xsl/docbook - ''; + dontBuild = true; + + installPhase = '' + dst=$out/share/xml/${pname} + mkdir -p $dst + rm -rf RELEASE* README* INSTALL TODO NEWS* BUGS install.sh svn* tools log Makefile tests extensions webhelp + mv * $dst/ + + # Backwards compatibility. Will remove eventually. + mkdir -p $out/xml/xsl + ln -s $dst $out/xml/xsl/docbook + ''; meta = { homepage = http://wiki.docbook.org/topic/DocBookXslStylesheets; diff --git a/pkgs/development/compilers/ghc/6.10.2-binary.nix b/pkgs/development/compilers/ghc/6.10.2-binary.nix index 045b9142ef3..81bdebdcbd4 100644 --- a/pkgs/development/compilers/ghc/6.10.2-binary.nix +++ b/pkgs/development/compilers/ghc/6.10.2-binary.nix @@ -56,7 +56,7 @@ stdenv.mkDerivation rec { # No building is necessary, but calling make without flags ironically # calls install-strip ... - buildPhase = "true"; + dontBuild = true; # The binaries for Darwin use frameworks, so fake those frameworks, # and create some wrapper scripts that set DYLD_FRAMEWORK_PATH so diff --git a/pkgs/development/compilers/ghc/7.0.4-binary.nix b/pkgs/development/compilers/ghc/7.0.4-binary.nix index c03cfbaaadd..77e5229a2a0 100644 --- a/pkgs/development/compilers/ghc/7.0.4-binary.nix +++ b/pkgs/development/compilers/ghc/7.0.4-binary.nix @@ -99,7 +99,7 @@ stdenv.mkDerivation rec { # No building is necessary, but calling make without flags ironically # calls install-strip ... - buildPhase = "true"; + dontBuild = true; postInstall = '' diff --git a/pkgs/development/compilers/ghc/7.4.2-binary.nix b/pkgs/development/compilers/ghc/7.4.2-binary.nix index cf21a61b1b3..c9f281980d9 100644 --- a/pkgs/development/compilers/ghc/7.4.2-binary.nix +++ b/pkgs/development/compilers/ghc/7.4.2-binary.nix @@ -101,7 +101,7 @@ stdenv.mkDerivation rec { # No building is necessary, but calling make without flags ironically # calls install-strip ... - buildPhase = "true"; + dontBuild = true; preInstall = stdenv.lib.optionalString stdenv.isDarwin '' mkdir -p $out/lib/ghc-7.4.2 diff --git a/pkgs/development/libraries/fmod/4.24.16.nix b/pkgs/development/libraries/fmod/4.24.16.nix index 191db2f6f6d..b45ec24ca6b 100644 --- a/pkgs/development/libraries/fmod/4.24.16.nix +++ b/pkgs/development/libraries/fmod/4.24.16.nix @@ -29,11 +29,10 @@ stdenv.mkDerivation rec { dontStrip = true; dontPatchELF = true; + dontBuild = true; makeFlags = [ "DESTLIBDIR=$(out)/lib" "DESTHDRDIR=$(out)/include" ]; - buildPhase = "true"; - preInstall = '' mkdir -p $out/lib ''; diff --git a/pkgs/development/libraries/fmod/default.nix b/pkgs/development/libraries/fmod/default.nix index 621d6dc405f..af946019540 100644 --- a/pkgs/development/libraries/fmod/default.nix +++ b/pkgs/development/libraries/fmod/default.nix @@ -18,7 +18,8 @@ stdenv.mkDerivation rec { }; dontStrip = true; - buildPhase = "true"; + dontBuild = true; + installPhase = '' mkdir -p $out/lib $out/include/fmodex diff --git a/pkgs/development/libraries/libspotify/default.nix b/pkgs/development/libraries/libspotify/default.nix index 02bd1f966e6..951a939cbfb 100644 --- a/pkgs/development/libraries/libspotify/default.nix +++ b/pkgs/development/libraries/libspotify/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, libspotify, alsaLib, readline, pkgconfig, apiKey, unzip, gnused }: -let - version = "12.1.51"; +let + version = "12.1.51"; isLinux = (stdenv.system == "x86_64-linux" || stdenv.system == "i686-linux"); in @@ -29,13 +29,8 @@ else stdenv.mkDerivation { else null; - # common - buildPhase = "true"; - # no patch or build phase for darwin - phases = - [ "unpackPhase" ] ++ - (stdenv.lib.optionals (isLinux) [ "patchPhase" "buildPhase" ]) ++ - [ "installPhase" ]; + dontBuild = true; + installPhase = if (isLinux) then "installPhase" else '' @@ -48,7 +43,7 @@ else stdenv.mkDerivation { mkdir -p "$out"/share/man mv -v man3 "$out"/share/man ''; - + # darwin-specific buildInputs = stdenv.lib.optional (stdenv.system == "x86_64-darwin") unzip; diff --git a/pkgs/development/libraries/uthash/default.nix b/pkgs/development/libraries/uthash/default.nix index 5f3b71131e0..511129de1e8 100644 --- a/pkgs/development/libraries/uthash/default.nix +++ b/pkgs/development/libraries/uthash/default.nix @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "035z3cs5ignywgh4wqxx358a2nhn3lj0x1ifij6vj0yyyhah3wgj"; }; - buildPhase = ":"; + dontBuild = false; buildInputs = stdenv.lib.optional doCheck perl; diff --git a/pkgs/development/libraries/xlibs-wrapper/default.nix b/pkgs/development/libraries/xlibs-wrapper/default.nix index fcdab133e2f..ffc58d9ad4b 100644 --- a/pkgs/development/libraries/xlibs-wrapper/default.nix +++ b/pkgs/development/libraries/xlibs-wrapper/default.nix @@ -2,9 +2,12 @@ stdenv.mkDerivation { name = "xlibs-wrapper"; - buildPhase = "true"; + + dontBuild = true; + installPhase = "mkdir -p $out"; unpackPhase = "sourceRoot=."; + propagatedBuildInputs = packages; preferLocalBuild = true; diff --git a/pkgs/development/mobile/titaniumenv/cli/node-env.nix b/pkgs/development/mobile/titaniumenv/cli/node-env.nix index 7af18c034f2..c6d56c9e074 100644 --- a/pkgs/development/mobile/titaniumenv/cli/node-env.nix +++ b/pkgs/development/mobile/titaniumenv/cli/node-env.nix @@ -4,7 +4,7 @@ let # Function that generates a TGZ file from a NPM project buildNodeSourceDist = { name, version, src }: - + stdenv.mkDerivation { name = "node-tarball-${name}-${version}"; inherit src; @@ -30,7 +30,7 @@ let sha1 = "77466de589cd5d3c95f138aa78bc569a3cb5d27a"; }; } {}; - + # Function that produces a deployed NPM package in the Nix store buildNodePackage = { name, version, src, dependencies ? {}, buildInputs ? [], production ? true, npmFlags ? "", meta ? {}, linkDependencies ? false }: @@ -42,8 +42,8 @@ let # # It uses the semver utility to check whether a version range matches any # of the provided dependencies. - - analysedDependencies = + + analysedDependencies = if dependencies == {} then {} else import (stdenv.mkDerivation { @@ -63,14 +63,14 @@ let let providedDependency = builtins.getAttr dependencyName providedDependencies; versions = builtins.attrNames providedDependency; - + # If there is a version range match, add the dependency to # the set of shimmed dependencies. # Otherwise, it is a required dependency. in '' $(latestVersion=$(semver -r '${versionSpec}' ${stdenv.lib.concatMapStrings (version: " '${version}'") versions} | tail -1 | tr -d '\n') - + if semver -r '${versionSpec}' ${stdenv.lib.concatMapStrings (version: " '${version}'") versions} >/dev/null then echo "shimmedDependencies.\"${dependencyName}\".\"$latestVersion\" = true;" @@ -86,7 +86,7 @@ let EOF ''; }); - + requiredDependencies = analysedDependencies.requiredDependencies or {}; shimmedDependencies = analysedDependencies.shimmedDependencies or {}; @@ -95,11 +95,11 @@ let tar --no-same-owner --no-same-permissions -xf ${nodejs.src} mv node-* $out ''; - + # Compose dependency information that this package must propagate to its # dependencies, so that provided dependencies are not included a second time. # This prevents cycles and wildcard version mismatches. - + propagatedProvidedDependencies = (stdenv.lib.mapAttrs (dependencyName: dependency: builtins.listToAttrs (map (versionSpec: @@ -110,20 +110,20 @@ let ) dependencies) // providedDependencies // { "${name}"."${version}" = true; }; - + # Create a node_modules folder containing all required dependencies of the # package - + nodeDependencies = stdenv.mkDerivation { name = "node-dependencies-${name}-${version}"; inherit src; buildCommand = '' mkdir -p $out/lib/node_modules cd $out/lib/node_modules - + # Create copies of (or symlinks to) the dependencies that must be deployed in this package's private node_modules folder. # This package's private dependencies are NPM packages that have not been provided by any of the includers. - + ${stdenv.lib.concatMapStrings (requiredDependencyName: stdenv.lib.concatMapStrings (versionSpec: let @@ -133,7 +133,7 @@ let in '' depPath=$(echo ${dependency}/lib/node_modules/*) - + ${if linkDependencies then '' ln -s $depPath . '' else '' @@ -144,35 +144,35 @@ let ) (builtins.attrNames requiredDependencies)} ''; }; - + # Deploy the Node package with some tricks self = stdenv.lib.makeOverridable stdenv.mkDerivation { inherit src meta; dontStrip = true; - + name = "node-${name}-${version}"; buildInputs = [ nodejs python ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ buildInputs; - buildPhase = "true"; - + dontBuild = true; + installPhase = '' # Move the contents of the tarball into the output folder mkdir -p "$out/lib/node_modules/${name}" mv * "$out/lib/node_modules/${name}" - + # Enter the target directory cd "$out/lib/node_modules/${name}" - + # Patch the shebangs of the bundled modules. For "regular" dependencies # this is step is not required, because it has already been done by the generic builder. - + if [ -d node_modules ] then patchShebangs node_modules fi - + # Copy the required dependencies mkdir -p node_modules - + ${stdenv.lib.optionalString (requiredDependencies != {}) '' for i in ${nodeDependencies}/lib/node_modules/* do @@ -182,9 +182,9 @@ let fi done ''} - + # Create shims for the packages that have been provided by earlier includers to allow the NPM install operation to still succeed - + ${stdenv.lib.concatMapStrings (shimmedDependencyName: stdenv.lib.concatMapStrings (versionSpec: '' @@ -198,24 +198,24 @@ let '' ) (builtins.attrNames (shimmedDependencies."${shimmedDependencyName}")) ) (builtins.attrNames shimmedDependencies)} - + # Ignore npm-shrinkwrap.json for now. Ideally, it should be supported as well rm -f npm-shrinkwrap.json - + # Some version specifiers (latest, unstable, URLs, file paths) force NPM to make remote connections or consult paths outside the Nix store. # The following JavaScript replaces these by * to prevent that: - + ( cat < 0` in `brother_lpdwrapper_BrGenML1`. Note that when `DEBUG > 1` the wrapper stops performing its function. Better keep `DEBUG == 1` unless this is desirable. @@ -29,7 +29,7 @@ Fixed. 3. > perl: warning: Falling back to the standard locale ("C"). - + are supported and installed on your system. LANG = "en_US.UTF-8" LC_ALL = (unset), @@ -67,12 +67,11 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper ]; buildInputs = [ cups perl coreutils gnused gnugrep brgenml1lpr ]; - configurePhase = ":"; - buildPhase = ":"; + dontBuild = true; patchPhase = '' WRAPPER=opt/brother/Printers/BrGenML1/cupswrapper/brother_lpdwrapper_BrGenML1 - PAPER_CFG=opt/brother/Printers/BrGenML1/cupswrapper/paperconfigml1 + PAPER_CFG=opt/brother/Printers/BrGenML1/cupswrapper/paperconfigml1 substituteInPlace $WRAPPER \ --replace "basedir =~" "basedir = \"${brgenml1lpr}/opt/brother/Printers/BrGenML1\"; #" \ diff --git a/pkgs/misc/cups/drivers/brgenml1lpr/default.nix b/pkgs/misc/cups/drivers/brgenml1lpr/default.nix index 6dc2408ec88..bd069b0d65a 100644 --- a/pkgs/misc/cups/drivers/brgenml1lpr/default.nix +++ b/pkgs/misc/cups/drivers/brgenml1lpr/default.nix @@ -8,7 +8,7 @@ Logging ------- - + `/tmp/br_lpdfilter_ml1.log` when `$ENV{LPD_DEBUG} > 0` in `filter_BrGenML1` which is activated automatically when `DEBUG > 0` in `brother_lpdwrapper_BrGenML1` from the cups wrapper. @@ -17,7 +17,7 @@ ------ - filter_BrGenML1 ln 196 `my $GHOST_SCRIPT=`which gs`;` - + `GHOST_SCRIPT` is empty resulting in an empty `/tmp/br_lpdfilter_ml1_gsout.dat` file. See `/tmp/br_lpdfilter_ml1.log` for the executed command. @@ -49,8 +49,8 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper ]; buildInputs = [ cups perl glibc ghostscript which ]; - - buildPhase = ":"; + + dontBuild = true; patchPhase = '' INFDIR=opt/brother/Printers/BrGenML1/inf diff --git a/pkgs/os-specific/darwin/install_name_tool/default.nix b/pkgs/os-specific/darwin/install_name_tool/default.nix index 6a7e6caaa26..581eb31cc71 100644 --- a/pkgs/os-specific/darwin/install_name_tool/default.nix +++ b/pkgs/os-specific/darwin/install_name_tool/default.nix @@ -5,9 +5,9 @@ assert stdenv.isDarwin; stdenv.mkDerivation { name = "install_name_tool"; src = "/usr/bin/install_name_tool"; + unpackPhase = "true"; - configurePhase = "true"; - buildPhase = "true"; + dontBuild = true; installPhase = '' mkdir -p "$out"/bin diff --git a/pkgs/os-specific/darwin/osx-sdk/default.nix b/pkgs/os-specific/darwin/osx-sdk/default.nix index 875479b4f29..235eadfd255 100644 --- a/pkgs/os-specific/darwin/osx-sdk/default.nix +++ b/pkgs/os-specific/darwin/osx-sdk/default.nix @@ -7,9 +7,8 @@ in stdenv.mkDerivation rec { src = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"; - unpackPhase = "true"; - configurePhase = "true"; - buildPhase = "true"; + unpackPhase = "true"; + dontBuild = true; installPhase = '' mkdir -p $out/Developer/SDKs/ diff --git a/pkgs/os-specific/gnu/hurd/default.nix b/pkgs/os-specific/gnu/hurd/default.nix index 4bdb6e132fb..5eccee62468 100644 --- a/pkgs/os-specific/gnu/hurd/default.nix +++ b/pkgs/os-specific/gnu/hurd/default.nix @@ -87,7 +87,7 @@ stdenv.mkDerivation ({ // (if headersOnly - then { buildPhase = ":"; installPhase = "make install-headers"; } + then { dontBuild = true; installPhase = "make install-headers"; } else (if (cross != null) then { crossConfig = cross.config; diff --git a/pkgs/os-specific/gnu/libpthread/default.nix b/pkgs/os-specific/gnu/libpthread/default.nix index 4b16652ba05..294a1548582 100644 --- a/pkgs/os-specific/gnu/libpthread/default.nix +++ b/pkgs/os-specific/gnu/libpthread/default.nix @@ -46,7 +46,7 @@ stdenv.mkDerivation ({ "ac_cv_lib_ihash_hurd_ihash_create=yes" ]; - buildPhase = ":"; + dontBuild = true; installPhase = "make install-data-local-headers"; } else { }) diff --git a/pkgs/os-specific/gnu/mach/default.nix b/pkgs/os-specific/gnu/mach/default.nix index 6d2d20687bc..e8c15850715 100644 --- a/pkgs/os-specific/gnu/mach/default.nix +++ b/pkgs/os-specific/gnu/mach/default.nix @@ -53,5 +53,5 @@ stdenv.mkDerivation ({ // (if headersOnly - then { buildPhase = ":"; installPhase = "make install-data"; } + then { dontBuild = true; installPhase = "make install-data"; } else {})) diff --git a/pkgs/os-specific/linux/firmware/zd1211/default.nix b/pkgs/os-specific/linux/firmware/zd1211/default.nix index 19cbdecca0c..2298cbd13c5 100644 --- a/pkgs/os-specific/linux/firmware/zd1211/default.nix +++ b/pkgs/os-specific/linux/firmware/zd1211/default.nix @@ -11,9 +11,12 @@ stdenv.mkDerivation rec { sha256 = "04ibs0qw8bh6h6zmm5iz6lddgknwhsjq8ib3gyck6a7psw83h7gi"; }; - buildPhase = "true"; + dontBuild = true; - installPhase = "mkdir -p $out/lib/firmware/zd1211; cp * $out/lib/firmware/zd1211"; + installPhase = '' + mkdir -p $out/lib/firmware/zd1211 + cp * $out/lib/firmware/zd1211 + ''; meta = { description = "Firmware for the ZyDAS ZD1211(b) 802.11a/b/g USB WLAN chip"; diff --git a/pkgs/servers/monitoring/longview/default.nix b/pkgs/servers/monitoring/longview/default.nix index 9436f4bf300..fd8a009b167 100644 --- a/pkgs/servers/monitoring/longview/default.nix +++ b/pkgs/servers/monitoring/longview/default.nix @@ -11,15 +11,14 @@ stdenv.mkDerivation rec { sha256 = "1i6va44bx2zfgbld7znf1slph0iqidlahq2xh3kd8q4lhvbrjn02"; }; - patches = - [ # log to systemd journal - ./log-stdout.patch - ]; + patches = [ + # log to systemd journal + ./log-stdout.patch + ]; - postPatch = - '' - substituteInPlace Linode/Longview/Util.pm --replace /var/run/longview.pid /run/longview.pid - ''; + postPatch = '' + substituteInPlace Linode/Longview/Util.pm --replace /var/run/longview.pid /run/longview.pid + ''; buildInputs = [ perl makeWrapper glibc ] ++ (with perlPackages; [ @@ -37,7 +36,8 @@ stdenv.mkDerivation rec { DBDmysql ]); - buildPhase = "true"; + dontBuild = true; + installPhase = '' mkdir -p $out/bin $out/usr mv Linode $out diff --git a/pkgs/servers/rt/default.nix b/pkgs/servers/rt/default.nix index 77b7c6d4f26..4bb111e1893 100644 --- a/pkgs/servers/rt/default.nix +++ b/pkgs/servers/rt/default.nix @@ -7,7 +7,6 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://download.bestpractical.com/pub/rt/release/${name}.tar.gz"; - sha256 = "1hgz50fxv9zdcngww083aqh8vzyk148lm7mcivxflpnsqfw3696x"; }; @@ -15,7 +14,7 @@ stdenv.mkDerivation rec { buildInputs = [ perl ]; - buildPhase = "true"; + dontBuild = true; installPhase = '' mkdir $out diff --git a/pkgs/servers/sql/monetdb/default.nix b/pkgs/servers/sql/monetdb/default.nix index 443dafef55c..0e27211a060 100644 --- a/pkgs/servers/sql/monetdb/default.nix +++ b/pkgs/servers/sql/monetdb/default.nix @@ -25,15 +25,14 @@ composableDerivation.composableDerivation {} { javaSupport = true; }; - configurePhase = ":"; - buildPhase = ":"; - + dontBuild = true; + installPhase = '' mkdir $TMP/build sh monetdb-install.sh --build=$TMP/build --prefix=$out --enable-sql --enable-xquery ''; - meta = { + meta = { description = "A open-source database system for high-performance applications in data mining, OLAP, GIS, XML Query, text and multimedia retrieval"; homepage = http://monetdb.cwi.nl/; license = "MonetDB Public License"; # very similar to Mozilla public license (MPL) Version see 1.1 http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html diff --git a/pkgs/servers/x11/xquartz/default.nix b/pkgs/servers/x11/xquartz/default.nix index db0c446617a..16a4aeb1ce5 100644 --- a/pkgs/servers/x11/xquartz/default.nix +++ b/pkgs/servers/x11/xquartz/default.nix @@ -98,9 +98,13 @@ let }; in stdenv.mkDerivation { name = "xquartz"; + buildInputs = [ ruby makeWrapper ]; + unpackPhase = "sourceRoot=."; - buildPhase = ":"; + + dontBuild = true; + installPhase = '' cp -rT ${xorg.xinit} $out chmod -R u+w $out @@ -179,6 +183,7 @@ in stdenv.mkDerivation { --replace "@DEFAULT_CLIENT@" "${xterm}/bin/xterm" \ --replace "@FONTCONFIG_FILE@" "$fontsConfPath" ''; + meta = with lib; { platforms = platforms.darwin; maintainers = with maintainers; [ cstrahan ]; diff --git a/pkgs/tools/admin/sec/default.nix b/pkgs/tools/admin/sec/default.nix index c74814ae197..56da02cc8d0 100644 --- a/pkgs/tools/admin/sec/default.nix +++ b/pkgs/tools/admin/sec/default.nix @@ -10,14 +10,14 @@ stdenv.mkDerivation rec { buildInputs = [ perl ]; - configurePhase = ":"; - buildPhase = ":"; + dontBuild = false; + doCheck = false; + installPhase = '' mkdir -p $out/bin $out/share/man/man1 cp sec $out/bin cp sec.man $out/share/man/man1/sec.1 ''; - doCheck = false; meta = { homepage = "http://simple-evcorr.sourceforge.net/"; @@ -26,5 +26,4 @@ stdenv.mkDerivation rec { maintainers = [ stdenv.lib.maintainers.tv ]; platforms = stdenv.lib.platforms.all; }; - } diff --git a/pkgs/tools/misc/debootstrap/default.nix b/pkgs/tools/misc/debootstrap/default.nix index 4af6475668e..d60b47ca011 100644 --- a/pkgs/tools/misc/debootstrap/default.nix +++ b/pkgs/tools/misc/debootstrap/default.nix @@ -1,11 +1,8 @@ { stdenv, fetchurl, dpkg, gettext, gawk, perl, wget, coreutils, fakeroot }: let - # USAGE like this: debootstrap sid /tmp/target-chroot-directory - # There is also cdebootstrap now. Is that easier to maintain? - makedev = stdenv.mkDerivation { name = "makedev-for-debootstrap"; src = fetchurl { @@ -27,11 +24,7 @@ let chmod +x $t ''; }; - -in - -stdenv.mkDerivation rec { - +in stdenv.mkDerivation rec { name = "debootstrap-${version}"; version = "1.0.80"; @@ -44,14 +37,13 @@ stdenv.mkDerivation rec { buildInputs = [ dpkg gettext gawk perl ]; - buildPhase = ":"; + dontBuild = true; # If you have to update the patch for functions a vim regex like this # can help you identify which lines are used to write scripts on TARGET and # which should /bin/ paths should be replaced: # \\|\/bin\/\|^\s*\\|EOF\|END installPhase = '' - sed -i \ -e 's@/usr/bin/id@id@' \ -e 's@/usr/bin/dpkg@${dpkg}/bin/dpkg@' \ @@ -59,7 +51,6 @@ stdenv.mkDerivation rec { -e 's@/bin/sha@${coreutils}/bin/sha@' \ debootstrap - for file in functions debootstrap; do substituteInPlace "$file" \ --subst-var-by gunzip "$(type -p gunzip)" \ @@ -103,7 +94,7 @@ stdenv.mkDerivation rec { inherit makedev; }; - meta = { + meta = { description = "Tool to create a Debian system in a chroot"; homepage = http://packages.debian.org/de/lenny/debootstrap; # http://code.erisian.com.au/Wiki/debootstrap license = stdenv.lib.licenses.gpl2; # gentoo says so.. ? diff --git a/pkgs/tools/networking/swec/default.nix b/pkgs/tools/networking/swec/default.nix index 3e8f3ca3dc5..f8a8b6393d2 100644 --- a/pkgs/tools/networking/swec/default.nix +++ b/pkgs/tools/networking/swec/default.nix @@ -5,33 +5,34 @@ stdenv.mkDerivation rec { name = "swec-0.4"; src = fetchurl { - url = "http://random.zerodogg.org/files/${name}.tar.bz2"; + url = "http://files.zerodogg.org/swec/${name}.tar.bz2"; sha256 = "1m3971z4z1wr0paggprfz0n8ng8vsnkc9m6s3bdplgyz7qjk6jwx"; }; buildInputs = [ makeWrapper perl LWP URI HTMLParser ] ++ stdenv.lib.optional doCheck [ HTTPServerSimple Parent ]; - configurePhase = - '' for i in swec tests/{runTests,testServer} - do - sed -i "$i" -e's|/usr/bin/perl|${perl}/bin/perl|g' - done - ''; - - buildPhase = "true"; - installPhase = - '' make install prefix="$out" - - mkdir -p "$out/share/${name}" - cp -v default.sdf "$out/share/${name}" - sed -i "$out/bin/swec" -e"s|realpath(\$0)|'$out/share/${name}/swec'|g" - - wrapProgram "$out/bin/swec" \ - --prefix PERL5LIB : \ - ${stdenv.lib.concatStringsSep ":" - (map (x: "${x}/lib/perl5/site_perl") [ LWP URI HTMLParser ])} - ''; + configurePhase = '' + for i in swec tests/{runTests,testServer} + do + sed -i "$i" -e's|/usr/bin/perl|${perl}/bin/perl|g' + done + ''; + + dontBuild = true; + + installPhase = '' + make install prefix="$out" + + mkdir -p "$out/share/${name}" + cp -v default.sdf "$out/share/${name}" + sed -i "$out/bin/swec" -e"s|realpath(\$0)|'$out/share/${name}/swec'|g" + + wrapProgram "$out/bin/swec" \ + --prefix PERL5LIB : \ + ${stdenv.lib.concatStringsSep ":" + (map (x: "${x}/lib/perl5/site_perl") [ LWP URI HTMLParser ])} + ''; doCheck = true; checkPhase = "make test"; diff --git a/pkgs/tools/package-management/nix-repl/default.nix b/pkgs/tools/package-management/nix-repl/default.nix index e8670770c5f..8dfc9e6333e 100644 --- a/pkgs/tools/package-management/nix-repl/default.nix +++ b/pkgs/tools/package-management/nix-repl/default.nix @@ -14,18 +14,17 @@ stdenv.mkDerivation { buildInputs = [ nix readline ]; - buildPhase = "true"; + dontBuild = true; # FIXME: unfortunate cut&paste. - installPhase = - '' - mkdir -p $out/bin - $CXX -O3 -Wall -std=c++0x \ - -o $out/bin/nix-repl nix-repl.cc \ - -I${nix}/include/nix \ - -lnixformat -lnixutil -lnixstore -lnixexpr -lnixmain -lreadline -lgc \ - -DNIX_VERSION=\"${(builtins.parseDrvName nix.name).version}\" - ''; + installPhase = '' + mkdir -p $out/bin + $CXX -O3 -Wall -std=c++0x \ + -o $out/bin/nix-repl nix-repl.cc \ + -I${nix}/include/nix \ + -lnixformat -lnixutil -lnixstore -lnixexpr -lnixmain -lreadline -lgc \ + -DNIX_VERSION=\"${(builtins.parseDrvName nix.name).version}\" + ''; meta = { homepage = https://github.com/edolstra/nix-repl; diff --git a/pkgs/tools/package-management/nix-serve/default.nix b/pkgs/tools/package-management/nix-serve/default.nix index 332576a9873..3a20fdc0fac 100644 --- a/pkgs/tools/package-management/nix-serve/default.nix +++ b/pkgs/tools/package-management/nix-serve/default.nix @@ -15,21 +15,20 @@ stdenv.mkDerivation rec { buildInputs = [ perl nix ] ++ (with perlPackages; [ DBI DBDSQLite Plack Starman ]); - buildPhase = "true"; + dontBuild = false; # FIXME: unfortunate cut&paste. - installPhase = - '' - mkdir -p $out/libexec/nix-serve - cp nix-serve.psgi $out/libexec/nix-serve/nix-serve.psgi - - mkdir -p $out/bin - cat > $out/bin/nix-serve < $out/bin/nix-serve <