diff options
58 files changed, 272 insertions, 286 deletions
diff --git a/pkgs/applications/audio/baudline/default.nix b/pkgs/applications/audio/baudline/default.nix index 2d6b0434d6a1c..e3cef30ccdaa8 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 56f7ac50227ef..20ba1c14745a1 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 612a3dab99fe9..3953eb2b7e05e 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 7b22e88bb840b..8561c2a4ccf62 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 873240e81fca7..da136a7f9e1e6 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 9b74b0c93a975..a933befec5f44 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 57ff213ae80ec..d9046c55e12ad 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 85749f978d1c9..952d9b7f21ae9 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 5bd6995d20461..ef681c9ba7dd7 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 c735ef4506a41..9a19b358c90ce 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 60e0a79470581..5e1feacd83d40 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 f57f3de7f8291..9941b4791b58f 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 8b607adaaae8d..fb1459831f661 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 97fb0b82c7449..decfaf63aef99 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 2e576cf6dc8b6..dbfb49f1bedde 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 10766d9fa788e..d448aa558eb2b 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 f3165b33ccafc..b2854b399f683 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 863f60444025a..77cd666b8c6dd 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 045b9142ef3bb..81bdebdcbd475 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 c03cfbaaaddac..77e5229a2a0ae 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 cf21a61b1b39c..c9f281980d95a 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 191db2f6f6ddb..b45ec24ca6bdb 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 621d6dc405fe2..af94601954016 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 02bd1f966e6e6..951a939cbfbf0 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 5f3b71131e0ca..511129de1e8d6 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 fcdab133e2f8e..ffc58d9ad4b94 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 7af18c034f249..c6d56c9e07472 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 <<EOF var fs = require('fs'); var url = require('url'); - + /* * Replaces an impure version specification by * */ function replaceImpureVersionSpec(versionSpec) { var parsedUrl = url.parse(versionSpec); - + if(versionSpec == "latest" || versionSpec == "unstable" || versionSpec.substr(0, 2) == ".." || dependency.substr(0, 2) == "./" || dependency.substr(0, 2) == "~/" || dependency.substr(0, 1) == '/') return '*'; @@ -225,9 +225,9 @@ let else return versionSpec; } - + var packageObj = JSON.parse(fs.readFileSync('./package.json')); - + /* Replace dependencies */ if(packageObj.dependencies !== undefined) { for(var dependency in packageObj.dependencies) { @@ -235,7 +235,7 @@ let packageObj.dependencies[dependency] = replaceImpureVersionSpec(versionSpec); } } - + /* Replace development dependencies */ if(packageObj.devDependencies !== undefined) { for(var dependency in packageObj.devDependencies) { @@ -243,7 +243,7 @@ let packageObj.devDependencies[dependency] = replaceImpureVersionSpec(versionSpec); } } - + /* Replace optional dependencies */ if(packageObj.optionalDependencies !== undefined) { for(var dependency in packageObj.optionalDependencies) { @@ -251,19 +251,19 @@ let packageObj.optionalDependencies[dependency] = replaceImpureVersionSpec(versionSpec); } } - + /* Write the fixed JSON file */ fs.writeFileSync("package.json", JSON.stringify(packageObj)); EOF ) | node - + # Deploy the Node.js package by running npm install. Since the dependencies have been symlinked, it should not attempt to install them again, # which is good, because we want to make it Nix's responsibility. If it needs to install any dependencies anyway (e.g. because the dependency # parameters are incomplete/incorrect), it fails. - + export HOME=$TMPDIR npm --registry http://www.example.com --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} install - + # After deployment of the NPM package, we must remove the shims again ${stdenv.lib.concatMapStrings (shimmedDependencyName: '' @@ -271,19 +271,19 @@ let rmdir node_modules/${shimmedDependencyName} '' ) (builtins.attrNames shimmedDependencies)} - + # It makes no sense to keep an empty node_modules folder around, so delete it if this is the case if [ -d node_modules ] then rmdir --ignore-fail-on-non-empty node_modules fi - + # Create symlink to the deployed executable folder, if applicable if [ -d "$out/lib/node_modules/.bin" ] then ln -s $out/lib/node_modules/.bin $out/bin fi - + # Create symlinks to the deployed manual page folders, if applicable if [ -d "$out/lib/node_modules/${name}/man" ] then @@ -298,7 +298,7 @@ let done fi ''; - + shellHook = stdenv.lib.optionalString (requiredDependencies != {}) '' export NODE_PATH=${nodeDependencies}/lib/node_modules ''; diff --git a/pkgs/development/python-modules/stringtemplate/default.nix b/pkgs/development/python-modules/stringtemplate/default.nix index f70888f102fcb..5e372535b8ecb 100644 --- a/pkgs/development/python-modules/stringtemplate/default.nix +++ b/pkgs/development/python-modules/stringtemplate/default.nix @@ -3,15 +3,22 @@ stdenv.mkDerivation rec { name = "PyStringTemplate-${version}"; version = "3.2b1"; - meta = { - homepage = "http://www.stringtemplate.org/"; - description = "Text Templating Library"; - }; + src = fetchurl { url = "http://www.stringtemplate.org/download/${name}.tar.gz"; sha256 = "0lbib0l8c1q7i1j610rwcdagymr1idahrql4dkgnm5rzyg2vk3ml"; }; + propagatedBuildInputs = [python antlr]; - buildPhase = "true"; - installPhase = "python setup.py install --prefix=$out --install-lib=$(toPythonPath $out) -O1"; + + dontBuild = true; + + installPhase = '' + python setup.py install --prefix=$out --install-lib=$(toPythonPath $out) -O1 + ''; + + meta = { + homepage = "http://www.stringtemplate.org/"; + description = "Text Templating Library"; + }; } diff --git a/pkgs/development/tools/analysis/clang-analyzer/default.nix b/pkgs/development/tools/analysis/clang-analyzer/default.nix index 50583f65f6027..2e01e4d8f28e9 100644 --- a/pkgs/development/tools/analysis/clang-analyzer/default.nix +++ b/pkgs/development/tools/analysis/clang-analyzer/default.nix @@ -11,7 +11,8 @@ stdenv.mkDerivation rec { patches = [ ./0001-Fix-scan-build-to-use-NIX_CFLAGS_COMPILE.patch ]; buildInputs = [ clang llvmPackages.clang perl makeWrapper ]; - buildPhase = "true"; + + dontBuild = true; installPhase = '' mkdir -p $out/bin $out/libexec diff --git a/pkgs/development/tools/build-managers/gradle/default.nix b/pkgs/development/tools/build-managers/gradle/default.nix index 730d42073759a..7fae5604e2a93 100644 --- a/pkgs/development/tools/build-managers/gradle/default.nix +++ b/pkgs/development/tools/build-managers/gradle/default.nix @@ -4,7 +4,7 @@ rec { gradleGen = {name, src} : stdenv.mkDerivation rec { inherit name src; - buildPhase = ":"; + dontBuild = true; installPhase = '' mkdir -pv $out/lib/gradle/ diff --git a/pkgs/development/tools/misc/sqitch/default.nix b/pkgs/development/tools/misc/sqitch/default.nix index 0a1032cecf81a..bcdba402b2e0a 100644 --- a/pkgs/development/tools/misc/sqitch/default.nix +++ b/pkgs/development/tools/misc/sqitch/default.nix @@ -1,9 +1,13 @@ { name, stdenv, perl, makeWrapper, sqitchModule, databaseModule }: + stdenv.mkDerivation { name = "${name}-${sqitchModule.version}"; + buildInputs = [ perl makeWrapper sqitchModule databaseModule ]; - unpackPhase = ":"; - buildPhase = ":"; + + src = sqitchModule; + dontBuild = true; + installPhase = '' mkdir -p $out/bin for d in bin/sqitch etc lib share ; do diff --git a/pkgs/development/web/grails/default.nix b/pkgs/development/web/grails/default.nix index 5b9e27b4829f0..ef8ac133b2c31 100644 --- a/pkgs/development/web/grails/default.nix +++ b/pkgs/development/web/grails/default.nix @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { buildInputs = [ unzip ]; - buildPhase = "true"; + dontBuild = true; installPhase = '' mkdir -p "$out" diff --git a/pkgs/misc/cups/drivers/brgenml1cupswrapper/default.nix b/pkgs/misc/cups/drivers/brgenml1cupswrapper/default.nix index 3623f78eb200e..db60ece128f53 100644 --- a/pkgs/misc/cups/drivers/brgenml1cupswrapper/default.nix +++ b/pkgs/misc/cups/drivers/brgenml1cupswrapper/default.nix @@ -9,7 +9,7 @@ Logging ------- - + `/tmp/br_cupswrapper_ml1.log` when `DEBUG > 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 6dc2408ec88ab..bd069b0d65a90 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 6a7e6caaa2620..581eb31cc71c1 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 875479b4f29dc..235eadfd25564 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 4bdb6e132fbb0..5eccee62468da 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 4b16652ba0530..294a1548582b2 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 6d2d20687bc6f..e8c1585071511 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 19cbdecca0cca..2298cbd13c570 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 9436f4bf300fd..fd8a009b16703 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 77b7c6d4f2694..4bb111e18936c 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 443dafef55ca7..0e27211a0606b 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 db0c446617af6..16a4aeb1ce58a 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 c74814ae1974c..56da02cc8d087 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 4af6475668e7a..d60b47ca01168 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: # \<echo\>\|\/bin\/\|^\s*\<cat\>\|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 3e8f3ca3dc592..f8a8b6393d214 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 e8670770c5f4a..8dfc9e6333eb5 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 332576a9873cb..3a20fdc0fac3f 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 <<EOF - #! ${stdenv.shell} - PERL5LIB=$PERL5LIB exec ${perlPackages.Starman}/bin/starman $out/libexec/nix-serve/nix-serve.psgi "\$@" - EOF - chmod +x $out/bin/nix-serve - ''; + 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 <<EOF + #! ${stdenv.shell} + PERL5LIB=$PERL5LIB exec ${perlPackages.Starman}/bin/starman $out/libexec/nix-serve/nix-serve.psgi "\$@" + EOF + chmod +x $out/bin/nix-serve + ''; meta = { homepage = https://github.com/edolstra/nix-serve; diff --git a/pkgs/tools/security/pius/default.nix b/pkgs/tools/security/pius/default.nix index ae9b3be9ee2fa..c81a01ef8962d 100644 --- a/pkgs/tools/security/pius/default.nix +++ b/pkgs/tools/security/pius/default.nix @@ -12,19 +12,19 @@ stdenv.mkDerivation { buildInputs = [ python ]; - patchPhase = - '' sed -i "pius" -e's|/usr/bin/gpg|${gnupg}/bin/gpg2|g' - ''; + patchPhase = '' + sed -i "pius" -e's|/usr/bin/gpg|${gnupg}/bin/gpg2|g' + ''; - buildPhase = "true"; + dontBuild = true; - installPhase = - '' mkdir -p "$out/bin" - cp -v pius "$out/bin" + installPhase = '' + mkdir -p "$out/bin" + cp -v pius "$out/bin" - mkdir -p "$out/doc/pius-${version}" - cp -v README "$out/doc/pius-${version}" - ''; + mkdir -p "$out/doc/pius-${version}" + cp -v README "$out/doc/pius-${version}" + ''; meta = { homepage = http://www.phildev.net/pius/; diff --git a/pkgs/tools/text/xidel/default.nix b/pkgs/tools/text/xidel/default.nix index 000584a50e109..c76e0f49734ee 100644 --- a/pkgs/tools/text/xidel/default.nix +++ b/pkgs/tools/text/xidel/default.nix @@ -29,7 +29,7 @@ stdenv.mkDerivation rec { dpkg-deb -x ${src} ./ ''; - buildPhase = "true"; + dontBuild = true; installPhase = '' mkdir -p "$out/bin" diff --git a/pkgs/tools/text/xml/basex/default.nix b/pkgs/tools/text/xml/basex/default.nix index e2b59bdb115ab..b7ff365fad52a 100644 --- a/pkgs/tools/text/xml/basex/default.nix +++ b/pkgs/tools/text/xml/basex/default.nix @@ -21,9 +21,8 @@ stdenv.mkDerivation rec { mimeType = "text/xml"; }; - # We're using a pre-built package - configurePhase = "true"; - buildPhase = "true"; + dontBuild = true; + installPhase = '' mkdir -p "$out" cp -r * "$out" diff --git a/pkgs/tools/typesetting/pygmentex/default.nix b/pkgs/tools/typesetting/pygmentex/default.nix index da029639c3d23..c19447cc0c4ac 100644 --- a/pkgs/tools/typesetting/pygmentex/default.nix +++ b/pkgs/tools/typesetting/pygmentex/default.nix @@ -11,12 +11,11 @@ python2Packages.buildPythonApplication rec { pythonPath = [ python2Packages.pygments python2Packages.chardet ]; - buildPhase = ":"; - + dontBuild = true; + doCheck = false; - + installPhase = '' - mkdir -p $out/bin cp -a pygmentex.py $out/bin ''; diff --git a/pkgs/tools/typesetting/tex/dblatex/default.nix b/pkgs/tools/typesetting/tex/dblatex/default.nix index 18f9c99ee2406..0aab900f15031 100644 --- a/pkgs/tools/typesetting/tex/dblatex/default.nix +++ b/pkgs/tools/typesetting/tex/dblatex/default.nix @@ -55,7 +55,7 @@ stdenv.mkDerivation rec { done ''; - buildPhase = "true"; + dontBuild = true; installPhase = '' python ./setup.py install --prefix="$out" --use-python-path --verbose diff --git a/pkgs/tools/typesetting/tex/pgf/1.x.nix b/pkgs/tools/typesetting/tex/pgf/1.x.nix index a26513d9f26da..5e84a92caddbd 100644 --- a/pkgs/tools/typesetting/tex/pgf/1.x.nix +++ b/pkgs/tools/typesetting/tex/pgf/1.x.nix @@ -8,11 +8,13 @@ stdenv.mkDerivation { sha256 = "0s6b8rx9yfxcjjg18vx1mphnwbd28fl5lnq0dasjz40pp3ypwdjv"; }; - buildPhase = "true"; + dontBuild = true; + installPhase = " mkdir -p $out/share/texmf-nix cp -prd * $out/share/texmf-nix "; + meta = { branch = "1"; }; diff --git a/pkgs/tools/typesetting/tex/pgf/2.x.nix b/pkgs/tools/typesetting/tex/pgf/2.x.nix index 821357e72739c..05e28454be1f8 100644 --- a/pkgs/tools/typesetting/tex/pgf/2.x.nix +++ b/pkgs/tools/typesetting/tex/pgf/2.x.nix @@ -8,12 +8,13 @@ stdenv.mkDerivation { sha256 = "0j57niag4jb2k0iyrvjsannxljc3vkx0iag7zd35ilhiy4dh6264"; }; - buildPhase = "true"; + dontBuild = true; installPhase = " mkdir -p $out/share/texmf-nix cp -prd * $out/share/texmf-nix "; + meta = { branch = "2"; }; diff --git a/pkgs/tools/typesetting/tex/pgf/3.x.nix b/pkgs/tools/typesetting/tex/pgf/3.x.nix index 32c73c4a43cca..b8df977cfb01a 100644 --- a/pkgs/tools/typesetting/tex/pgf/3.x.nix +++ b/pkgs/tools/typesetting/tex/pgf/3.x.nix @@ -17,12 +17,13 @@ stdenv.mkDerivation { unzip $src ''; - buildPhase = "true"; + dontBuild = true; installPhase = " mkdir -p $out/share/texmf-nix cp -prd * $out/share/texmf-nix "; + meta = { branch = "3"; }; diff --git a/pkgs/tools/typesetting/tex/pgfplots/default.nix b/pkgs/tools/typesetting/tex/pgfplots/default.nix index 67739350c6f6a..d7c03967b0b46 100644 --- a/pkgs/tools/typesetting/tex/pgfplots/default.nix +++ b/pkgs/tools/typesetting/tex/pgfplots/default.nix @@ -2,17 +2,18 @@ stdenv.mkDerivation { name = "pgfplots-1.5.1"; + src = fetchurl { url = mirror://sourceforge/pgfplots/pgfplots_1.5.1.tds.zip; sha256 = "1xajrmq35i0qlsfwydy5zzg6f1jg88hqqh5b3xsmglzrarnllbdi"; }; - + buildInputs = [ unzip ]; - + unpackPhase = "unzip $src"; - - buildPhase = "true"; - + + dontBuild = true; + installPhase = " mkdir -p $out/share/texmf-nix cp -prd * $out/share/texmf-nix |