codimd: build with nodejs-8_x

This diff regenerates the package sets for `codimd` and `codemirror`
using NodeJS 8 to get rid of the deprecated[1] `nodejs-6_x`.

Additionally the following issues had to be fixed during the update:

* The package `js-sequence-diagram` has been removed from the NPM
  registry and was replaced by a security holding package[2]. The
  package was published by a third-party (upstream only supports bower
  builds), so it's unclear whether the package will re-appear[3].

  As the tarballs still exist (and the hash didn't change), the package
  will be loaded manually into the build env.

* For the babel-related packages, `dontNpmInstall` will be set for
  `node2nix` installs as some of those packages bundle a
  `package-lock.json` that triggers `ENOTCACHED` errors for optional
  dependencies[4].

For now it should be sufficient to use NodeJS 8 (`codimd` v1.2.x doesn't
support NodeJS 10), in the long term we probably want to use `yarn2nix`
here with NodeJS 10. This is much rather a fix to get rid of another
NodeJS 6 dependency.

[1] `nodejs-6_x` is about to be deprecated, see #58976
[2] https://www.npmjs.com/package/js-sequence-diagrams,
    https://github.com/npm/security-holder
[3] https://github.com/bramp/js-sequence-diagrams/issues/212
[4] https://github.com/svanderburg/node2nix/issues/134
This commit is contained in:
Maximilian Bosch 2019-04-07 16:44:26 +02:00
parent 7bff7389c4
commit 5feec424de
No known key found for this signature in database
GPG key ID: 091DBF4D1FC46B8E
10 changed files with 3062 additions and 2296 deletions

View file

@ -1,4 +1,4 @@
{ stdenv, pkgs, buildEnv, fetchFromGitHub, nodejs-6_x, phantomjs2, which }:
{ stdenv, pkgs, buildEnv, fetchFromGitHub, nodejs-8_x, phantomjs2, which }:
let
nodePackages = import ./node.nix {
@ -22,7 +22,7 @@ stdenv.mkDerivation {
};
nativeBuildInputs = [ which ];
buildInputs = [ nodejs-6_x phantomjs-prebuilt ] ++ (stdenv.lib.attrVals [
buildInputs = [ nodejs-8_x phantomjs-prebuilt ] ++ (stdenv.lib.attrVals [
"blint-^1"
"node-static-0.6.0"
"rollup-^0.41.0"

View file

@ -1,7 +1,7 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p nodePackages.node2nix
node2nix -6 -i deps.json \
node2nix -8 -i deps.json \
-e ../../../../development/node-packages/node-env.nix \
--no-copy-node-env \
-c node.nix

View file

@ -13,13 +13,13 @@ let
sha1 = "45e37fb39e8da3f25baee3ff5369e2bb5f22017a";
};
};
"acorn-5.7.1" = {
"acorn-5.7.3" = {
name = "acorn";
packageName = "acorn";
version = "5.7.1";
version = "5.7.3";
src = fetchurl {
url = "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz";
sha512 = "d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==";
url = "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz";
sha512 = "T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==";
};
};
"acorn-jsx-3.0.1" = {
@ -40,13 +40,13 @@ let
sha1 = "48ead0f4a8eb16995a17a0db9ffc6acaada4ba68";
};
};
"ajv-5.5.2" = {
"ajv-6.10.0" = {
name = "ajv";
packageName = "ajv";
version = "5.5.2";
version = "6.10.0";
src = fetchurl {
url = "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz";
sha1 = "73b5eeca3fab653e3d3f9422b341ad42205dc965";
url = "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz";
sha512 = "nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==";
};
};
"align-text-0.1.4" = {
@ -148,13 +148,13 @@ let
sha1 = "a4301d389b6a43f9b67ff3ca11a3f6637e360e9e";
};
};
"big.js-3.2.0" = {
"big.js-5.2.2" = {
name = "big.js";
packageName = "big.js";
version = "3.2.0";
version = "5.2.2";
src = fetchurl {
url = "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz";
sha512 = "+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==";
url = "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz";
sha512 = "vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==";
};
};
"brace-expansion-1.1.11" = {
@ -238,22 +238,13 @@ let
sha1 = "4b475760ff80264c762c3a1719032e91c7fea0d1";
};
};
"co-4.6.0" = {
name = "co";
packageName = "co";
version = "4.6.0";
src = fetchurl {
url = "https://registry.npmjs.org/co/-/co-4.6.0.tgz";
sha1 = "6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184";
};
};
"combined-stream-1.0.6" = {
"combined-stream-1.0.7" = {
name = "combined-stream";
packageName = "combined-stream";
version = "1.0.6";
version = "1.0.7";
src = fetchurl {
url = "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz";
sha1 = "723e7df6e801ac5613113a7e445a9b69cb632818";
url = "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz";
sha512 = "brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==";
};
};
"concat-map-0.0.1" = {
@ -337,13 +328,13 @@ let
sha1 = "4daa4d9db00f9819880c79fa457ae5b09a1fd389";
};
};
"es6-promise-4.2.4" = {
"es6-promise-4.2.6" = {
name = "es6-promise";
packageName = "es6-promise";
version = "4.2.4";
version = "4.2.6";
src = fetchurl {
url = "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz";
sha512 = "/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==";
url = "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.6.tgz";
sha512 = "aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q==";
};
};
"escape-string-regexp-1.0.5" = {
@ -391,13 +382,13 @@ let
sha1 = "96918440e3041a7a414f8c52e3c574eb3c3e1e05";
};
};
"fast-deep-equal-1.1.0" = {
"fast-deep-equal-2.0.1" = {
name = "fast-deep-equal";
packageName = "fast-deep-equal";
version = "1.1.0";
version = "2.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz";
sha1 = "c053477817c86b51daa853c81e059b733d023614";
url = "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz";
sha1 = "7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49";
};
};
"fast-json-stable-stringify-2.0.0" = {
@ -427,13 +418,13 @@ let
sha1 = "fbc71f0c41adeb37f96c577ad1ed42d8fdacca91";
};
};
"form-data-2.3.2" = {
"form-data-2.3.3" = {
name = "form-data";
packageName = "form-data";
version = "2.3.2";
version = "2.3.3";
src = fetchurl {
url = "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz";
sha1 = "4970498be604c20c005d4f5c23aecd21d6b49099";
url = "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz";
sha512 = "1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==";
};
};
"fs-extra-1.0.0" = {
@ -454,13 +445,13 @@ let
sha1 = "5eff8e3e684d569ae4cb2b1282604e8ba62149fa";
};
};
"graceful-fs-4.1.11" = {
"graceful-fs-4.1.15" = {
name = "graceful-fs";
packageName = "graceful-fs";
version = "4.1.11";
version = "4.1.15";
src = fetchurl {
url = "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz";
sha1 = "0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658";
url = "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz";
sha512 = "6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==";
};
};
"har-schema-2.0.0" = {
@ -472,13 +463,13 @@ let
sha1 = "a94c2224ebcac04782a0d9035521f24735b7ec92";
};
};
"har-validator-5.1.0" = {
"har-validator-5.1.3" = {
name = "har-validator";
packageName = "har-validator";
version = "5.1.0";
version = "5.1.3";
src = fetchurl {
url = "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz";
sha512 = "+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==";
url = "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz";
sha512 = "sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==";
};
};
"has-ansi-2.0.0" = {
@ -598,13 +589,13 @@ let
sha1 = "b480c892e59a2f05954ce727bd3f2a4e882f9e13";
};
};
"json-schema-traverse-0.3.1" = {
"json-schema-traverse-0.4.1" = {
name = "json-schema-traverse";
packageName = "json-schema-traverse";
version = "0.3.1";
version = "0.4.1";
src = fetchurl {
url = "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz";
sha1 = "349a6d44c53a51de89b40805c5d5e59b417d3340";
url = "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz";
sha512 = "xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==";
};
};
"json-stringify-safe-5.0.1" = {
@ -616,13 +607,13 @@ let
sha1 = "1296a2d58fd45f19a0f6ce01d65701e2c735b6eb";
};
};
"json5-0.5.1" = {
"json5-1.0.1" = {
name = "json5";
packageName = "json5";
version = "0.5.1";
version = "1.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz";
sha1 = "1eade7acc012034ad84e2396767ead9fa5495821";
url = "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz";
sha512 = "aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==";
};
};
"jsonfile-2.4.0" = {
@ -679,13 +670,13 @@ let
sha1 = "a1d78fc3a50474cb80845d3b3b6e1da49a446e8e";
};
};
"loader-utils-1.1.0" = {
"loader-utils-1.2.3" = {
name = "loader-utils";
packageName = "loader-utils";
version = "1.1.0";
version = "1.2.3";
src = fetchurl {
url = "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz";
sha1 = "c98aef488bcceda2ffb5e2de646d6a754429f5cd";
url = "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz";
sha512 = "fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==";
};
};
"longest-1.0.1" = {
@ -715,22 +706,22 @@ let
sha1 = "591d84d3653a6b0b4a3b9df8de5aa8108e72e5e0";
};
};
"mime-db-1.35.0" = {
"mime-db-1.38.0" = {
name = "mime-db";
packageName = "mime-db";
version = "1.35.0";
version = "1.38.0";
src = fetchurl {
url = "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz";
sha512 = "JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==";
url = "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz";
sha512 = "bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==";
};
};
"mime-types-2.1.19" = {
"mime-types-2.1.22" = {
name = "mime-types";
packageName = "mime-types";
version = "2.1.19";
version = "2.1.22";
src = fetchurl {
url = "https://registry.npmjs.org/mime-types/-/mime-types-2.1.19.tgz";
sha512 = "P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==";
url = "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz";
sha512 = "aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==";
};
};
"minimatch-3.0.4" = {
@ -859,13 +850,13 @@ let
sha1 = "e260c78f6161cdd9b0e56cc3e0a85de17c7a57be";
};
};
"psl-1.1.29" = {
"psl-1.1.31" = {
name = "psl";
packageName = "psl";
version = "1.1.29";
version = "1.1.31";
src = fetchurl {
url = "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz";
sha512 = "AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==";
url = "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz";
sha512 = "/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==";
};
};
"punycode-1.4.1" = {
@ -877,6 +868,15 @@ let
sha1 = "c0d5a63b2718800ad8e1eb0fa5269c84dd41845e";
};
};
"punycode-2.1.1" = {
name = "punycode";
packageName = "punycode";
version = "2.1.1";
src = fetchurl {
url = "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz";
sha512 = "XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==";
};
};
"qs-6.5.2" = {
name = "qs";
packageName = "qs";
@ -985,13 +985,13 @@ let
sha512 = "try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA==";
};
};
"sshpk-1.14.2" = {
"sshpk-1.16.1" = {
name = "sshpk";
packageName = "sshpk";
version = "1.14.2";
version = "1.16.1";
src = fetchurl {
url = "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz";
sha1 = "c6fc61648a3d9c4e764fd3fcdf4ea105e492ba98";
url = "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz";
sha512 = "HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==";
};
};
"string_decoder-1.1.1" = {
@ -1093,6 +1093,15 @@ let
sha1 = "8b38b10cacdef63337b8b24e4ff86d45aea529a8";
};
};
"uri-js-4.2.2" = {
name = "uri-js";
packageName = "uri-js";
version = "4.2.2";
src = fetchurl {
url = "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz";
sha512 = "KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==";
};
};
"util-deprecate-1.0.2" = {
name = "util-deprecate";
packageName = "util-deprecate";
@ -1186,7 +1195,7 @@ in
sha512 = "6RwH3oJYMujQNd38WWU+jUSRqWfECrmpfL8o3fn3Q3fE9nn5iAktLZJHGEHqeecownbZZwZneTLbaNbIWwU9/A==";
};
dependencies = [
sources."acorn-5.7.1"
sources."acorn-5.7.3"
sources."ansi-styles-1.0.0"
sources."chalk-0.4.0"
sources."has-color-0.1.7"
@ -1200,7 +1209,7 @@ in
homepage = http://github.com/marijnh/blint;
};
production = true;
bypassCache = false;
bypassCache = true;
};
"node-static-0.6.0" = nodeEnv.buildNodePackage {
name = "node-static";
@ -1216,7 +1225,7 @@ in
license = "MIT";
};
production = true;
bypassCache = false;
bypassCache = true;
};
"phantomjs-prebuilt-^2.1.12" = nodeEnv.buildNodePackage {
name = "phantomjs-prebuilt";
@ -1227,7 +1236,7 @@ in
sha1 = "efd212a4a3966d3647684ea8ba788549be2aefef";
};
dependencies = [
sources."ajv-5.5.2"
sources."ajv-6.10.0"
sources."asn1-0.2.4"
sources."assert-plus-1.0.0"
sources."asynckit-0.4.0"
@ -1236,28 +1245,27 @@ in
sources."bcrypt-pbkdf-1.0.2"
sources."buffer-from-1.1.1"
sources."caseless-0.12.0"
sources."co-4.6.0"
sources."combined-stream-1.0.6"
sources."combined-stream-1.0.7"
sources."concat-stream-1.6.2"
sources."core-util-is-1.0.2"
sources."dashdash-1.14.1"
sources."debug-2.6.9"
sources."delayed-stream-1.0.0"
sources."ecc-jsbn-0.1.2"
sources."es6-promise-4.2.4"
sources."es6-promise-4.2.6"
sources."extend-3.0.2"
sources."extract-zip-1.6.7"
sources."extsprintf-1.3.0"
sources."fast-deep-equal-1.1.0"
sources."fast-deep-equal-2.0.1"
sources."fast-json-stable-stringify-2.0.0"
sources."fd-slicer-1.0.1"
sources."forever-agent-0.6.1"
sources."form-data-2.3.2"
sources."form-data-2.3.3"
sources."fs-extra-1.0.0"
sources."getpass-0.1.7"
sources."graceful-fs-4.1.11"
sources."graceful-fs-4.1.15"
sources."har-schema-2.0.0"
sources."har-validator-5.1.0"
sources."har-validator-5.1.3"
sources."hasha-2.2.0"
sources."http-signature-1.2.0"
sources."inherits-2.0.3"
@ -1268,14 +1276,14 @@ in
sources."isstream-0.1.2"
sources."jsbn-0.1.1"
sources."json-schema-0.2.3"
sources."json-schema-traverse-0.3.1"
sources."json-schema-traverse-0.4.1"
sources."json-stringify-safe-5.0.1"
sources."jsonfile-2.4.0"
sources."jsprim-1.4.1"
sources."kew-0.7.0"
sources."klaw-1.3.1"
sources."mime-db-1.35.0"
sources."mime-types-2.1.19"
sources."mime-db-1.38.0"
sources."mime-types-2.1.22"
sources."minimist-0.0.8"
sources."mkdirp-0.5.1"
sources."ms-2.0.0"
@ -1286,21 +1294,26 @@ in
sources."pinkie-promise-2.0.1"
sources."process-nextick-args-2.0.0"
sources."progress-1.1.8"
sources."psl-1.1.29"
sources."punycode-1.4.1"
sources."psl-1.1.31"
sources."punycode-2.1.1"
sources."qs-6.5.2"
sources."readable-stream-2.3.6"
sources."request-2.88.0"
sources."request-progress-2.0.1"
sources."safe-buffer-5.1.2"
sources."safer-buffer-2.1.2"
sources."sshpk-1.14.2"
sources."sshpk-1.16.1"
sources."string_decoder-1.1.1"
sources."throttleit-1.0.0"
sources."tough-cookie-2.4.3"
(sources."tough-cookie-2.4.3" // {
dependencies = [
sources."punycode-1.4.1"
];
})
sources."tunnel-agent-0.6.0"
sources."tweetnacl-0.14.5"
sources."typedarray-0.0.6"
sources."uri-js-4.2.2"
sources."util-deprecate-1.0.2"
sources."uuid-3.3.2"
sources."verror-1.10.0"
@ -1314,7 +1327,7 @@ in
license = "Apache-2.0";
};
production = true;
bypassCache = false;
bypassCache = true;
};
"rollup-^0.41.0" = nodeEnv.buildNodePackage {
name = "rollup";
@ -1335,7 +1348,7 @@ in
license = "MIT";
};
production = true;
bypassCache = false;
bypassCache = true;
};
"rollup-plugin-buble-^0.15.0" = nodeEnv.buildNodePackage {
name = "rollup-plugin-buble";
@ -1375,7 +1388,7 @@ in
license = "MIT";
};
production = true;
bypassCache = false;
bypassCache = true;
};
"rollup-watch-^3.2.0" = nodeEnv.buildNodePackage {
name = "rollup-watch";
@ -1395,7 +1408,7 @@ in
license = "MIT";
};
production = true;
bypassCache = false;
bypassCache = true;
};
"uglify-js-^2.8.15" = nodeEnv.buildNodePackage {
name = "uglify-js";
@ -1430,7 +1443,7 @@ in
license = "BSD-2-Clause";
};
production = true;
bypassCache = false;
bypassCache = true;
};
"url-loader-^0.5.7" = nodeEnv.buildNodePackage {
name = "url-loader";
@ -1441,11 +1454,12 @@ in
sha512 = "B7QYFyvv+fOBqBVeefsxv6koWWtjmHaMFT6KZWti4KRw8YUD/hOU+3AECvXuzyVawIBx3z7zQRejXCDSO5kk1Q==";
};
dependencies = [
sources."big.js-3.2.0"
sources."big.js-5.2.2"
sources."emojis-list-2.1.0"
sources."json5-0.5.1"
sources."loader-utils-1.1.0"
sources."json5-1.0.1"
sources."loader-utils-1.2.3"
sources."mime-1.3.6"
sources."minimist-1.2.0"
];
buildInputs = globalBuildInputs;
meta = {
@ -1454,6 +1468,6 @@ in
license = "MIT";
};
production = true;
bypassCache = false;
bypassCache = true;
};
}

View file

@ -2,7 +2,7 @@
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-6_x"}:
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-8_x"}:
let
nodeEnv = import ../../../../development/node-packages/node-env.nix {

View file

@ -1,9 +1,26 @@
{ stdenv, pkgs, buildEnv, fetchFromGitHub, makeWrapper
, fetchpatch, nodejs-6_x, phantomjs2, runtimeShell }:
, fetchpatch, nodejs-8_x, phantomjs2, runtimeShell }:
let
nodePackages = import ./node.nix {
inherit pkgs;
system = stdenv.system;
nodePackages = let
# Some packages fail to install with ENOTCACHED due to a mistakenly added
# package-lock.json that bundles optional dependencies not resolved with `node2nix.
# See also https://github.com/svanderburg/node2nix/issues/134
dontInstall = n: v:
if builtins.match ".*babel.*" n == null
then v
else v.override { dontNpmInstall = true; };
packages = stdenv.lib.mapAttrs (dontInstall) (
import ./node.nix {
inherit pkgs;
system = stdenv.system;
}
);
in packages // {
"js-url-^2.3.0" = packages."js-url-^2.3.0".overrideAttrs (_: {
# Don't download chromium (this isn't needed anyway for our case).
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = "1";
});
};
addPhantomjs = (pkgs:
@ -14,12 +31,17 @@ let
drvName = drv: (builtins.parseDrvName drv).name;
linkNodeDeps = ({ pkg, deps, name ? "" }:
nodePackages.${pkg}.override (oldAttrs: {
postInstall = stdenv.lib.concatStringsSep "\n" (map (dep: ''
ln -s ${nodePackages.${dep}}/lib/node_modules/${drvName dep} \
$out/lib/node_modules/${if name != "" then name else drvName pkg}/node_modules
'') deps
);
let
targetModule = if name != "" then name else drvName pkg;
in nodePackages.${pkg}.override (oldAttrs: {
postInstall = ''
mkdir -p $out/lib/node_modules/${targetModule}/node_modules
${stdenv.lib.concatStringsSep "\n" (map (dep: ''
ln -s ${nodePackages.${dep}}/lib/node_modules/${drvName dep} \
$out/lib/node_modules/${targetModule}/node_modules/${drvName dep}
'') deps
)}
'';
})
);
@ -43,8 +65,6 @@ let
linkNodeDeps args ) [
{ pkg = "select2-^3.5.2-browserify";
deps = [ "url-loader-^0.5.7" ]; }
{ pkg = "js-sequence-diagrams-^1000000.0.6";
deps = [ "lodash-^4.17.4" ]; }
{ pkg = "ionicons-~2.0.1";
deps = [ "url-loader-^0.5.7" "file-loader-^0.9.0" ]; }
{ pkg = "font-awesome-^4.7.0";
@ -66,18 +86,34 @@ let
name = "codimd-env";
paths = pkgsWithPhantomjs ++ pkgsWithExtraDeps ++ [
codemirror
# `js-sequence-diagrams` has been removed from the registry
# and replaced by a security holding package (the tarballs weren't published by
# upstream as upstream only supports bower,
# see https://github.com/bramp/js-sequence-diagrams/issues/212).
#
# As the tarballs are still there, we build this manually for now until codimd's upstream
# has resolved the issue.
(import ./js-sequence-diagrams {
inherit pkgs;
nodejs = nodejs-8_x;
extraNodePackages = {
lodash = nodePackages."lodash-^4.17.4";
eve = nodePackages."eve-^0.5.4";
};
})
] ++ filterNodePackagesToList [
"bootstrap"
"codemirror-git+https://github.com/hackmdio/CodeMirror.git"
"font-awesome"
"ionicons"
"js-sequence-diagrams"
"js-url"
"markdown-it"
"markdown-pdf"
"node-uuid"
"node-uuid"
"raphael-git+https://github.com/dmitrybaranovskiy/raphael"
"select2-browserify"
"url-loader"
] nodePackages;
};
@ -107,7 +143,7 @@ stdenv.mkDerivation rec {
inherit name version src;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ nodejs-6_x ];
buildInputs = [ nodejs-8_x ];
NODE_PATH = "${nodeEnv}/lib/node_modules";
@ -118,6 +154,12 @@ stdenv.mkDerivation rec {
})
];
postPatch = ''
# due to the `dontNpmInstall` workaround, `node_modules/.bin` isn't created anymore.
substituteInPlace package.json \
--replace "webpack --config" "${nodejs-8_x}/bin/node ./node_modules/webpack/bin/webpack.js --config"
'';
buildPhase = ''
ln -s ${nodeEnv}/lib/node_modules node_modules
npm run build
@ -127,7 +169,7 @@ stdenv.mkDerivation rec {
mkdir -p $out/bin
cat > $out/bin/codimd <<EOF
#!${runtimeShell}
${nodejs-6_x}/bin/node $out/app.js
${nodejs-8_x}/bin/node $out/app.js
EOF
cp -R {app.js,bin,lib,locales,package.json,public} $out/
'';
@ -150,7 +192,7 @@ stdenv.mkDerivation rec {
description = "Realtime collaborative markdown notes on all platforms";
license = licenses.agpl3;
homepage = https://github.com/hackmdio/codimd;
maintainers = with maintainers; [ willibutz ];
maintainers = with maintainers; [ willibutz ma27 ];
platforms = platforms.linux;
};
}

View file

@ -71,7 +71,6 @@
, { "jquery-mousewheel": "^3.1.13" }
, { "jquery-ui": "^1.12.1" }
, { "js-cookie": "^2.1.3" }
, { "js-sequence-diagrams": "^1000000.0.6" }
, { "js-url": "^2.3.0" }
, { "js-yaml": "^3.7.0" }
, { "jsdom-nogyp": "^0.8.3" }

View file

@ -1,7 +1,7 @@
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p nodePackages.node2nix
node2nix -6 -i deps.json \
node2nix -8 -i deps.json \
-e ../../../development/node-packages/node-env.nix \
--no-copy-node-env \
-c node.nix

View file

@ -0,0 +1,31 @@
{ pkgs, nodejs, extraNodePackages }:
let
nodeEnv = import ../../../../development/node-packages/node-env.nix {
inherit (pkgs) stdenv python2 utillinux runCommand writeTextFile;
inherit nodejs;
libtool = if pkgs.stdenv.isDarwin then pkgs.darwin.cctools else null;
};
in
nodeEnv.buildNodePackage {
name = "js-sequence-diagrams";
packageName = "js-sequence-diagrams";
version = "1000000.0.6";
src = pkgs.fetchurl {
url = "https://registry.npmjs.org/js-sequence-diagrams/-/js-sequence-diagrams-1000000.0.6.tgz";
sha1 = "e95db01420479c5ccbc12046af1da42fde649e5c";
};
dependencies = [ ];
dontNpmInstall = true;
meta = {
description = "Fucks NPM and draws simple SVG sequence diagrams from textual representation of the diagram";
homepage = "https://github.com/Moeditor/js-sequence-diagrams#readme";
license = "BSD-2-Clause";
};
production = true;
bypassCache = true;
postInstall = builtins.concatStringsSep "\n" (pkgs.lib.mapAttrsToList (
name: pkg: "ln -s ${pkg}/lib/node_modules/${name} $out/lib/node_modules/${name}"
) extraNodePackages);
}

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
{pkgs ? import <nixpkgs> {
inherit system;
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-6_x"}:
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-8_x"}:
let
nodeEnv = import ../../../development/node-packages/node-env.nix {