···4455# Perform a lightweight checkout so that we don't end up importing
66# all the repository's history.
77-bzr -Ossl.cert_reqs=none export -r "$rev" --format=dir "$out" "$url"
77+BZR_LOG=/dev/null bzr -Ossl.cert_reqs=none export -r "$rev" --format=dir "$out" "$url"
8899stopNest
···11Node.js packages
22================
33-To add a package from [NPM](https://www.npmjs.com/) to nixpkgs:
33+The `pkgs/development/node-packages` folder contains a generated collection of
44+[NPM packages](https://npmjs.com/) that can be installed with the Nix package
55+manager.
66+77+As a rule of thumb, the package set should only provide *end user* software
88+packages, such as command-line utilities. Libraries should only be added to the
99+package set if there is a non-NPM package that requires it.
1010+1111+When it is desired to use NPM libraries in a development project, use the
1212+`node2nix` generator directly on the `package.json` configuration file of the
1313+project.
1414+1515+The package set also provides support for multiple Node.js versions. The policy
1616+is that a new package should be added to the collection for the latest stable LTS
1717+release (which is currently 6.x), unless there is an explicit reason to support
1818+a different release.
1919+2020+To add a package from NPM to nixpkgs:
421522 1. Modify `pkgs/development/node-packages/node-packages-v6.json` to add, update
623 or remove package entries. (Or `pkgs/development/node-packages/node-packages-v4.json`
77- for packagages depending on Node.js 4.x)
2424+ for packages depending on Node.js 4.x)
825 2. Run the script: `(cd pkgs/development/node-packages && ./generate.sh)`.
926 3. Build your new package to test your changes:
1027 `cd /path/to/nixpkgs && nix-build -A nodePackages.<new-or-updated-package>`.
1128 To build against a specific Node.js version (e.g. 4.x):
1229 `nix-build -A nodePackages_4_x.<new-or-updated-package>`
1330 4. Add and commit all modified and generated files.
3131+3232+For more information about the generation process, consult the
3333+[README.md](https://github.com/svanderburg/node2nix) file of the `node2nix`
3434+tool.
···11+diff -urNZ bchunk-1.2.0.orig/bchunk.c bchunk-1.2.0/bchunk.c
22+--- a/bchunk.c 2017-10-30 18:03:58.658741629 +0000
33++++ b/bchunk.c 2017-10-30 19:17:36.732855884 +0000
44+@@ -426,11 +426,11 @@
55+ printf("\nTrack ");
66+ if (!(p = strchr(p, ' '))) {
77+ fprintf(stderr, "... ouch, no space after TRACK.\n");
88+- continue;
99++ exit(3);
1010+ }
1111+ p++;
1212+ if (!(t = strchr(p, ' '))) {
1313+ fprintf(stderr, "... ouch, no space after track number.\n");
1414+- continue;
1515++ exit(3);
1616+ }
1717+ *t = '\0';
1818+1919+@@ -460,12 +460,12 @@
2020+ } else if ((p = strstr(s, "INDEX"))) {
2121+ if (!(p = strchr(p, ' '))) {
2222+ printf("... ouch, no space after INDEX.\n");
2323+- continue;
2424++ exit(3);
2525+ }
2626+ p++;
2727+ if (!(t = strchr(p, ' '))) {
2828+ printf("... ouch, no space after index number.\n");
2929+- continue;
3030++ exit(3);
3131+ }
3232+ *t = '\0';
3333+ t++;
+8-12
pkgs/tools/cd-dvd/bchunk/default.nix
···88 sha256 = "0pcbyx3689cbl23dcij497hb3q5f1wmki7cxic5nzldx71g9vp5g";
99 };
10101111- preConfigure =
1212- ''
1313- substituteInPlace Makefile \
1414- --replace "-o root -g root" "" \
1515- --replace "-o bin -g bin" ""
1616- '';
1111+ patches = [ ./CVE-2017-15953.patch ./CVE-2017-15955.patch ];
17121818- makeFlags = "PREFIX=$(out) MAN_DIR=$(out)/share/man";
1919-2020- preInstall = "mkdir -p $out/bin $out/share/man/man1";
1313+ installPhase = ''
1414+ install -Dt $out/bin bchunk
1515+ install -Dt $out/share/man/man1 bchunk.1
1616+ '';
21172222- meta = {
1818+ meta = with stdenv.lib; {
2319 homepage = http://he.fi/bchunk/;
2424- description = "A program that converts CD-ROM images in BIN/CUE format into a set of ISO and CDR tracks";
2525- platforms = stdenv.lib.platforms.linux;
2020+ description = "A program that converts CD images in BIN/CUE format into a set of ISO and CDR tracks";
2121+ platforms = platforms.unix;
2622 };
2723}