···12121313 buildInputs = [mercurial.python mercurial makeWrapper subversion];
14141515- buildPhase="true"; # skip svn for now
1515+ dontBuild = true; # skip svn for now
16161717 # TODO also support svn stuff
1818 # moving .py files into lib directory so that you can't pick the wrong file from PATH.
···56565757 # No building is necessary, but calling make without flags ironically
5858 # calls install-strip ...
5959- buildPhase = "true";
5959+ dontBuild = true;
60606161 # The binaries for Darwin use frameworks, so fake those frameworks,
6262 # and create some wrapper scripts that set DYLD_FRAMEWORK_PATH so
+1-1
pkgs/development/compilers/ghc/7.0.4-binary.nix
···9999100100 # No building is necessary, but calling make without flags ironically
101101 # calls install-strip ...
102102- buildPhase = "true";
102102+ dontBuild = true;
103103104104 postInstall =
105105 ''
+1-1
pkgs/development/compilers/ghc/7.4.2-binary.nix
···101101102102 # No building is necessary, but calling make without flags ironically
103103 # calls install-strip ...
104104- buildPhase = "true";
104104+ dontBuild = true;
105105106106 preInstall = stdenv.lib.optionalString stdenv.isDarwin ''
107107 mkdir -p $out/lib/ghc-7.4.2
···44 # Function that generates a TGZ file from a NPM project
55 buildNodeSourceDist =
66 { name, version, src }:
77-77+88 stdenv.mkDerivation {
99 name = "node-tarball-${name}-${version}";
1010 inherit src;
···3030 sha1 = "77466de589cd5d3c95f138aa78bc569a3cb5d27a";
3131 };
3232 } {};
3333-3333+3434 # Function that produces a deployed NPM package in the Nix store
3535 buildNodePackage =
3636 { name, version, src, dependencies ? {}, buildInputs ? [], production ? true, npmFlags ? "", meta ? {}, linkDependencies ? false }:
···4242 #
4343 # It uses the semver utility to check whether a version range matches any
4444 # of the provided dependencies.
4545-4646- analysedDependencies =
4545+4646+ analysedDependencies =
4747 if dependencies == {} then {}
4848 else
4949 import (stdenv.mkDerivation {
···6363 let
6464 providedDependency = builtins.getAttr dependencyName providedDependencies;
6565 versions = builtins.attrNames providedDependency;
6666-6666+6767 # If there is a version range match, add the dependency to
6868 # the set of shimmed dependencies.
6969 # Otherwise, it is a required dependency.
7070 in
7171 ''
7272 $(latestVersion=$(semver -r '${versionSpec}' ${stdenv.lib.concatMapStrings (version: " '${version}'") versions} | tail -1 | tr -d '\n')
7373-7373+7474 if semver -r '${versionSpec}' ${stdenv.lib.concatMapStrings (version: " '${version}'") versions} >/dev/null
7575 then
7676 echo "shimmedDependencies.\"${dependencyName}\".\"$latestVersion\" = true;"
···8686 EOF
8787 '';
8888 });
8989-8989+9090 requiredDependencies = analysedDependencies.requiredDependencies or {};
9191 shimmedDependencies = analysedDependencies.shimmedDependencies or {};
9292···9595 tar --no-same-owner --no-same-permissions -xf ${nodejs.src}
9696 mv node-* $out
9797 '';
9898-9898+9999 # Compose dependency information that this package must propagate to its
100100 # dependencies, so that provided dependencies are not included a second time.
101101 # This prevents cycles and wildcard version mismatches.
102102-102102+103103 propagatedProvidedDependencies =
104104 (stdenv.lib.mapAttrs (dependencyName: dependency:
105105 builtins.listToAttrs (map (versionSpec:
···110110 ) dependencies) //
111111 providedDependencies //
112112 { "${name}"."${version}" = true; };
113113-113113+114114 # Create a node_modules folder containing all required dependencies of the
115115 # package
116116-116116+117117 nodeDependencies = stdenv.mkDerivation {
118118 name = "node-dependencies-${name}-${version}";
119119 inherit src;
120120 buildCommand = ''
121121 mkdir -p $out/lib/node_modules
122122 cd $out/lib/node_modules
123123-123123+124124 # Create copies of (or symlinks to) the dependencies that must be deployed in this package's private node_modules folder.
125125 # This package's private dependencies are NPM packages that have not been provided by any of the includers.
126126-126126+127127 ${stdenv.lib.concatMapStrings (requiredDependencyName:
128128 stdenv.lib.concatMapStrings (versionSpec:
129129 let
···133133 in
134134 ''
135135 depPath=$(echo ${dependency}/lib/node_modules/*)
136136-136136+137137 ${if linkDependencies then ''
138138 ln -s $depPath .
139139 '' else ''
···144144 ) (builtins.attrNames requiredDependencies)}
145145 '';
146146 };
147147-147147+148148 # Deploy the Node package with some tricks
149149 self = stdenv.lib.makeOverridable stdenv.mkDerivation {
150150 inherit src meta;
151151 dontStrip = true;
152152-152152+153153 name = "node-${name}-${version}";
154154 buildInputs = [ nodejs python ] ++ stdenv.lib.optional (stdenv.isLinux) utillinux ++ buildInputs;
155155- buildPhase = "true";
156156-155155+ dontBuild = true;
156156+157157 installPhase = ''
158158 # Move the contents of the tarball into the output folder
159159 mkdir -p "$out/lib/node_modules/${name}"
160160 mv * "$out/lib/node_modules/${name}"
161161-161161+162162 # Enter the target directory
163163 cd "$out/lib/node_modules/${name}"
164164-164164+165165 # Patch the shebangs of the bundled modules. For "regular" dependencies
166166 # this is step is not required, because it has already been done by the generic builder.
167167-167167+168168 if [ -d node_modules ]
169169 then
170170 patchShebangs node_modules
171171 fi
172172-172172+173173 # Copy the required dependencies
174174 mkdir -p node_modules
175175-175175+176176 ${stdenv.lib.optionalString (requiredDependencies != {}) ''
177177 for i in ${nodeDependencies}/lib/node_modules/*
178178 do
···182182 fi
183183 done
184184 ''}
185185-185185+186186 # Create shims for the packages that have been provided by earlier includers to allow the NPM install operation to still succeed
187187-187187+188188 ${stdenv.lib.concatMapStrings (shimmedDependencyName:
189189 stdenv.lib.concatMapStrings (versionSpec:
190190 ''
···198198 ''
199199 ) (builtins.attrNames (shimmedDependencies."${shimmedDependencyName}"))
200200 ) (builtins.attrNames shimmedDependencies)}
201201-201201+202202 # Ignore npm-shrinkwrap.json for now. Ideally, it should be supported as well
203203 rm -f npm-shrinkwrap.json
204204-204204+205205 # Some version specifiers (latest, unstable, URLs, file paths) force NPM to make remote connections or consult paths outside the Nix store.
206206 # The following JavaScript replaces these by * to prevent that:
207207-207207+208208 (
209209 cat <<EOF
210210 var fs = require('fs');
211211 var url = require('url');
212212-212212+213213 /*
214214 * Replaces an impure version specification by *
215215 */
216216 function replaceImpureVersionSpec(versionSpec) {
217217 var parsedUrl = url.parse(versionSpec);
218218-218218+219219 if(versionSpec == "latest" || versionSpec == "unstable" ||
220220 versionSpec.substr(0, 2) == ".." || dependency.substr(0, 2) == "./" || dependency.substr(0, 2) == "~/" || dependency.substr(0, 1) == '/')
221221 return '*';
···225225 else
226226 return versionSpec;
227227 }
228228-228228+229229 var packageObj = JSON.parse(fs.readFileSync('./package.json'));
230230-230230+231231 /* Replace dependencies */
232232 if(packageObj.dependencies !== undefined) {
233233 for(var dependency in packageObj.dependencies) {
···235235 packageObj.dependencies[dependency] = replaceImpureVersionSpec(versionSpec);
236236 }
237237 }
238238-238238+239239 /* Replace development dependencies */
240240 if(packageObj.devDependencies !== undefined) {
241241 for(var dependency in packageObj.devDependencies) {
···243243 packageObj.devDependencies[dependency] = replaceImpureVersionSpec(versionSpec);
244244 }
245245 }
246246-246246+247247 /* Replace optional dependencies */
248248 if(packageObj.optionalDependencies !== undefined) {
249249 for(var dependency in packageObj.optionalDependencies) {
···251251 packageObj.optionalDependencies[dependency] = replaceImpureVersionSpec(versionSpec);
252252 }
253253 }
254254-254254+255255 /* Write the fixed JSON file */
256256 fs.writeFileSync("package.json", JSON.stringify(packageObj));
257257 EOF
258258 ) | node
259259-259259+260260 # Deploy the Node.js package by running npm install. Since the dependencies have been symlinked, it should not attempt to install them again,
261261 # 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
262262 # parameters are incomplete/incorrect), it fails.
263263-263263+264264 export HOME=$TMPDIR
265265 npm --registry http://www.example.com --nodedir=${nodeSources} ${npmFlags} ${stdenv.lib.optionalString production "--production"} install
266266-266266+267267 # After deployment of the NPM package, we must remove the shims again
268268 ${stdenv.lib.concatMapStrings (shimmedDependencyName:
269269 ''
···271271 rmdir node_modules/${shimmedDependencyName}
272272 ''
273273 ) (builtins.attrNames shimmedDependencies)}
274274-274274+275275 # It makes no sense to keep an empty node_modules folder around, so delete it if this is the case
276276 if [ -d node_modules ]
277277 then
278278 rmdir --ignore-fail-on-non-empty node_modules
279279 fi
280280-280280+281281 # Create symlink to the deployed executable folder, if applicable
282282 if [ -d "$out/lib/node_modules/.bin" ]
283283 then
284284 ln -s $out/lib/node_modules/.bin $out/bin
285285 fi
286286-286286+287287 # Create symlinks to the deployed manual page folders, if applicable
288288 if [ -d "$out/lib/node_modules/${name}/man" ]
289289 then
···298298 done
299299 fi
300300 '';
301301-301301+302302 shellHook = stdenv.lib.optionalString (requiredDependencies != {}) ''
303303 export NODE_PATH=${nodeDependencies}/lib/node_modules
304304 '';
···2525 javaSupport = true;
2626 };
27272828- configurePhase = ":";
2929- buildPhase = ":";
3030-2828+ dontBuild = true;
2929+3130 installPhase = ''
3231 mkdir $TMP/build
3332 sh monetdb-install.sh --build=$TMP/build --prefix=$out --enable-sql --enable-xquery
3433 '';
35343636- meta = {
3535+ meta = {
3736 description = "A open-source database system for high-performance applications in data mining, OLAP, GIS, XML Query, text and multimedia retrieval";
3837 homepage = http://monetdb.cwi.nl/;
3938 license = "MonetDB Public License"; # very similar to Mozilla public license (MPL) Version see 1.1 http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html
···11{ stdenv, fetchurl, dpkg, gettext, gawk, perl, wget, coreutils, fakeroot }:
2233let
44-54# USAGE like this: debootstrap sid /tmp/target-chroot-directory
66-75# There is also cdebootstrap now. Is that easier to maintain?
88-96 makedev = stdenv.mkDerivation {
107 name = "makedev-for-debootstrap";
118 src = fetchurl {
···2724 chmod +x $t
2825 '';
2926 };
3030-3131-in
3232-3333-stdenv.mkDerivation rec {
3434-2727+in stdenv.mkDerivation rec {
3528 name = "debootstrap-${version}";
3629 version = "1.0.80";
3730···44374538 buildInputs = [ dpkg gettext gawk perl ];
46394747- buildPhase = ":";
4040+ dontBuild = true;
48414942 # If you have to update the patch for functions a vim regex like this
5043 # can help you identify which lines are used to write scripts on TARGET and
5144 # which should /bin/ paths should be replaced:
5245 # \<echo\>\|\/bin\/\|^\s*\<cat\>\|EOF\|END
5346 installPhase = ''
5454-5547 sed -i \
5648 -e 's@/usr/bin/id@id@' \
5749 -e 's@/usr/bin/dpkg@${dpkg}/bin/dpkg@' \
5850 -e 's@/usr/bin/sha@${coreutils}/bin/sha@' \
5951 -e 's@/bin/sha@${coreutils}/bin/sha@' \
6052 debootstrap
6161-62536354 for file in functions debootstrap; do
6455 substituteInPlace "$file" \
···10394 inherit makedev;
10495 };
10596106106- meta = {
9797+ meta = {
10798 description = "Tool to create a Debian system in a chroot";
10899 homepage = http://packages.debian.org/de/lenny/debootstrap; # http://code.erisian.com.au/Wiki/debootstrap
109100 license = stdenv.lib.licenses.gpl2; # gentoo says so.. ?