Skip to content

Commit

Permalink
feat: Regenerate using node2nix 1.11.1, fix vulnerabilities in packages
Browse files Browse the repository at this point in the history
  • Loading branch information
RaitoBezarius committed Jun 10, 2022
1 parent 6d1a1bb commit 2732e70
Show file tree
Hide file tree
Showing 6 changed files with 1,773 additions and 2,621 deletions.
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file has been generated by node2nix 1.9.0. Do not edit!
# This file has been generated by node2nix 1.11.1. Do not edit!

{pkgs ? import <nixpkgs> {
inherit system;
Expand Down
32 changes: 21 additions & 11 deletions node-env.nix
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ let
''
+ (lib.concatMapStrings (dependency:
''
if [ ! -e "${dependency.name}" ]; then
if [ ! -e "${dependency.packageName}" ]; then
${composePackage dependency}
fi
''
Expand Down Expand Up @@ -257,8 +257,8 @@ let
var packageLock = JSON.parse(fs.readFileSync("./package-lock.json"));
if(![1, 2].includes(packageLock.lockfileVersion)) {
process.stderr.write("Sorry, I only understand lock file versions 1 and 2!\n");
process.exit(1);
process.stderr.write("Sorry, I only understand lock file versions 1 and 2!\n");
process.exit(1);
}
if(packageLock.dependencies !== undefined) {
Expand Down Expand Up @@ -390,7 +390,7 @@ let
buildNodePackage =
{ name
, packageName
, version
, version ? null
, dependencies ? []
, buildInputs ? []
, production ? true
Expand All @@ -409,7 +409,7 @@ let
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "preRebuild" "unpackPhase" "buildPhase" "meta" ];
in
stdenv.mkDerivation ({
name = "${name}-${version}";
name = "${name}${if version == null then "" else "-${version}"}";
buildInputs = [ tarWrapper python nodejs ]
++ lib.optional (stdenv.isLinux) utillinux
++ lib.optional (stdenv.isDarwin) libtool
Expand Down Expand Up @@ -441,6 +441,14 @@ let
if [ -d "$out/lib/node_modules/.bin" ]
then
ln -s $out/lib/node_modules/.bin $out/bin
# Patch the shebang lines of all the executables
ls $out/bin/* | while read i
do
file="$(readlink -f "$i")"
chmod u+rwx "$file"
patchShebangs "$file"
done
fi
# Create symlinks to the deployed manual page folders, if applicable
Expand Down Expand Up @@ -471,7 +479,7 @@ let
buildNodeDependencies =
{ name
, packageName
, version
, version ? null
, src
, dependencies ? []
, buildInputs ? []
Expand All @@ -489,7 +497,7 @@ let
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" ];
in
stdenv.mkDerivation ({
name = "node-dependencies-${name}-${version}";
name = "node-dependencies-${name}${if version == null then "" else "-${version}"}";

buildInputs = [ tarWrapper python nodejs ]
++ lib.optional (stdenv.isLinux) utillinux
Expand Down Expand Up @@ -519,6 +527,7 @@ let
if [ -f ${src}/package-lock.json ]
then
cp ${src}/package-lock.json .
chmod 644 package-lock.json
fi
''}
Expand All @@ -541,7 +550,7 @@ let
buildNodeShell =
{ name
, packageName
, version
, version ? null
, src
, dependencies ? []
, buildInputs ? []
Expand All @@ -557,9 +566,10 @@ let

let
nodeDependencies = buildNodeDependencies args;
extraArgs = removeAttrs args [ "name" "dependencies" "buildInputs" "dontStrip" "dontNpmInstall" "unpackPhase" "buildPhase" ];
in
stdenv.mkDerivation {
name = "node-shell-${name}-${version}";
stdenv.mkDerivation ({
name = "node-shell-${name}${if version == null then "" else "-${version}"}";

buildInputs = [ python nodejs ] ++ lib.optional (stdenv.isLinux) utillinux ++ buildInputs;
buildCommand = ''
Expand All @@ -578,7 +588,7 @@ let
export NODE_PATH=${nodeDependencies}/lib/node_modules
export PATH="${nodeDependencies}/bin:$PATH"
'';
};
} // extraArgs);
in
{
buildNodeSourceDist = lib.makeOverridable buildNodeSourceDist;
Expand Down
70 changes: 35 additions & 35 deletions node-packages.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This file has been generated by node2nix 1.9.0. Do not edit!
# This file has been generated by node2nix 1.11.1. Do not edit!

{nodeEnv, fetchurl, fetchgit, nix-gitignore, stdenv, lib, globalBuildInputs ? []}:

Expand All @@ -10,7 +10,7 @@ let
version = "1.0.4";
src = fetchurl {
url = "https://registry.npmjs.org/argparse/-/argparse-1.0.4.tgz";
sha1 = "2b12247b933001971addcbfe4e67d20fd395bbf4";
sha512 = "nChgTocTucFvebsRskyrPUK/9GVYovJHGuQDVEKQw5wNhrhDlrKBQ7tjHsMmHr5qf45hUsxLkhDiGuX6g4/+LQ==";
};
};
"balanced-match-1.0.2" = {
Expand All @@ -37,7 +37,7 @@ let
version = "0.2.1";
src = fetchurl {
url = "https://registry.npmjs.org/bower-endpoint-parser/-/bower-endpoint-parser-0.2.1.tgz";
sha1 = "8c4010a2900cdab07ea5d38f0bd03e9bbccef90f";
sha512 = "Hn0mrtju2JFNMLDrseDbcc17kSJyj/KrkrrjIb1gPinqx2Nr3g/J5j43clUdQLOvT3QeuhpP1C29qTACSJKI5Q==";
};
};
"bower-json-0.8.4" = {
Expand All @@ -55,7 +55,7 @@ let
version = "0.2.1";
src = fetchurl {
url = "https://registry.npmjs.org/bower-logger/-/bower-logger-0.2.1.tgz";
sha1 = "0c1817c48063a88d96cc3d516c55e57fff5d9ecb";
sha512 = "z1kTna8TAJnvqhnkXTDBe7d+CX6dNpdQbAcHbm6rIurWCkMDT1JiQZOwJ+EhY52DxEIv+67ENujUZak5eFu3oQ==";
};
};
"brace-expansion-1.1.11" = {
Expand All @@ -73,7 +73,7 @@ let
version = "0.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz";
sha1 = "d8a96bd77fd68df7793a73036a3ba0d5405d477b";
sha512 = "/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==";
};
};
"debug-2.6.9" = {
Expand All @@ -100,7 +100,7 @@ let
version = "0.2.0";
src = fetchurl {
url = "https://registry.npmjs.org/ends-with/-/ends-with-0.2.0.tgz";
sha1 = "2f9da98d57a50cfda4571ce4339000500f4e6b8a";
sha512 = "lRppY4dK3VkqBdR242sKcAJeYc8Gf/DhoX9AWvWI2RzccmLnqBQfwm2k4oSDv5MPDjUqawCauXhZkyWxkVhRsg==";
};
};
"ext-list-2.2.2" = {
Expand All @@ -118,7 +118,7 @@ let
version = "0.26.7";
src = fetchurl {
url = "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz";
sha1 = "9ae1fdd94897798edab76d0918cf42d0c3184fa9";
sha512 = "waKu+1KumRhYv8D8gMRCKJGAMI9pRnPuEb1mvgYD0f7wBscg+h6bW4FDTmEZhB9VKxvoTtxW+Y7bnIlB7zja6Q==";
};
};
"fs.realpath-1.0.0" = {
Expand All @@ -127,7 +127,7 @@ let
version = "1.0.0";
src = fetchurl {
url = "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz";
sha1 = "1504ad2523158caa40db4a2787cb01411994ea4f";
sha512 = "OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==";
};
};
"glob-6.0.4" = {
Expand All @@ -136,16 +136,16 @@ let
version = "6.0.4";
src = fetchurl {
url = "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz";
sha1 = "0f08860f6a155127b2fadd4f9ce24b1aab6e4d22";
sha512 = "MKZeRNyYZAVVVG1oZeLaWie1uweH40m9AZwIwxyPbTSX4hHrVYSzLg0Ro5Z5R7XKkIX+Cc6oD1rqeDJnwsB8/A==";
};
};
"glob-7.2.0" = {
"glob-7.2.3" = {
name = "glob";
packageName = "glob";
version = "7.2.0";
version = "7.2.3";
src = fetchurl {
url = "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz";
sha512 = "lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==";
url = "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz";
sha512 = "nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==";
};
};
"graceful-fs-4.2.10" = {
Expand All @@ -163,7 +163,7 @@ let
version = "1.0.6";
src = fetchurl {
url = "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz";
sha1 = "49bd6331d7d02d0c09bc910a1075ba8165b56df9";
sha512 = "k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==";
};
};
"inherits-2.0.4" = {
Expand All @@ -181,7 +181,7 @@ let
version = "1.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/intersect/-/intersect-1.0.1.tgz";
sha1 = "332650e10854d8c0ac58c192bdc27a8bf7e7a30c";
sha512 = "qsc720yevCO+4NydrJWgEWKccAQwTOvj2m73O/VBA6iUL2HGZJ9XqBiyraNrBXX/W1IAjdpXdRZk24sq8TzBRg==";
};
};
"is-plain-obj-1.1.0" = {
Expand All @@ -190,7 +190,7 @@ let
version = "1.1.0";
src = fetchurl {
url = "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz";
sha1 = "71a50c8429dfca773c92a390a4a03b39fcd51d3e";
sha512 = "yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==";
};
};
"jsonfile-2.4.0" = {
Expand All @@ -199,7 +199,7 @@ let
version = "2.4.0";
src = fetchurl {
url = "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz";
sha1 = "3736a2b428b87bbda0cc83b53fa3d633a35c2ae8";
sha512 = "PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==";
};
};
"klaw-1.3.1" = {
Expand All @@ -208,16 +208,16 @@ let
version = "1.3.1";
src = fetchurl {
url = "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz";
sha1 = "4088433b46b3b1ba259d78785d8e96f73ba02439";
sha512 = "TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==";
};
};
"lodash-4.2.1" = {
"lodash-4.17.21" = {
name = "lodash";
packageName = "lodash";
version = "4.2.1";
version = "4.17.21";
src = fetchurl {
url = "https://registry.npmjs.org/lodash/-/lodash-4.2.1.tgz";
sha1 = "171fdcfbbc30d689c544cd18c0529f56de6c1aa9";
url = "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz";
sha512 = "v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==";
};
};
"mime-db-1.52.0" = {
Expand Down Expand Up @@ -262,7 +262,7 @@ let
version = "2.0.0";
src = fetchurl {
url = "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz";
sha1 = "5608aeadfc00be6c2901df5f9861788de0d597c8";
sha512 = "Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==";
};
};
"once-1.4.0" = {
Expand All @@ -271,7 +271,7 @@ let
version = "1.4.0";
src = fetchurl {
url = "https://registry.npmjs.org/once/-/once-1.4.0.tgz";
sha1 = "583b1aa775961d4b113ac17d9c50baef9dd76bd1";
sha512 = "lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==";
};
};
"os-tmpdir-1.0.2" = {
Expand All @@ -280,7 +280,7 @@ let
version = "1.0.2";
src = fetchurl {
url = "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz";
sha1 = "bbe67406c79aa85c5cfec766fe5734555dfa1274";
sha512 = "D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==";
};
};
"path-is-absolute-1.0.1" = {
Expand All @@ -289,7 +289,7 @@ let
version = "1.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz";
sha1 = "174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f";
sha512 = "AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==";
};
};
"promised-temp-0.1.0" = {
Expand All @@ -298,7 +298,7 @@ let
version = "0.1.0";
src = fetchurl {
url = "https://registry.npmjs.org/promised-temp/-/promised-temp-0.1.0.tgz";
sha1 = "5f8a704ccdf5f2ac23996fcafe2b301bc2a8d0eb";
sha512 = "hftln6irUZlMiaQIvet59HEDUKFJ8pGHMyyMk9DuA5DTezIa8z9pDLBhjt78AKs/JMdZEJ7JATzT/G8mizbORQ==";
};
};
"q-1.5.1" = {
Expand All @@ -307,7 +307,7 @@ let
version = "1.5.1";
src = fetchurl {
url = "https://registry.npmjs.org/q/-/q-1.5.1.tgz";
sha1 = "7e32f75b41381291d04611f1bf14109ac00651d7";
sha512 = "kV/CThkXo6xyFEZUugw/+pIOywXcDbFYgSct5cT3gqlbkBE1SJdwy6UQoZvodiWF/ckQLZyDE/Bu1M6gVu5lVw==";
};
};
"rimraf-2.2.8" = {
Expand All @@ -316,7 +316,7 @@ let
version = "2.2.8";
src = fetchurl {
url = "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz";
sha1 = "e439be2aaee327321952730f99a8929e4fc50582";
sha512 = "R5KMKHnPAQaZMqLOsyuyUmcIjSeDm+73eoqQpaXA7AZ22BL+6C+1mcUscgOsNd8WVlJuvlgAPsegcx7pjlV0Dg==";
};
};
"rimraf-2.7.1" = {
Expand All @@ -343,7 +343,7 @@ let
version = "1.1.2";
src = fetchurl {
url = "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz";
sha1 = "441b6d4d346798f1b4e49e8920adfba0e543f9ad";
sha512 = "vzn8aSqKgytVik0iwdBEi+zevbTYZogewTUM6dtpmGwEcdzbub/TX4bCzRhebDCRC3QzXgJsLRKB2V/Oof7HXg==";
};
};
"sort-keys-length-1.0.1" = {
Expand All @@ -352,7 +352,7 @@ let
version = "1.0.1";
src = fetchurl {
url = "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz";
sha1 = "9cb6f4f4e9e48155a6aa0671edd336ff1479a188";
sha512 = "GRbEOUqCxemTAk/b32F2xa8wDTs+Z1QHOkbhJDQTvv/6G3ZkbJ+frYWsTcc7cBB3Fu4wy4XlLCuNtJuMn7Gsvw==";
};
};
"sprintf-js-1.0.3" = {
Expand All @@ -361,7 +361,7 @@ let
version = "1.0.3";
src = fetchurl {
url = "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz";
sha1 = "04e6926f662895354f3dd015203633b857297e2c";
sha512 = "D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==";
};
};
"temp-0.8.3" = {
Expand All @@ -370,7 +370,7 @@ let
version = "0.8.3";
src = fetchurl {
url = "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz";
sha1 = "e0c6bc4d26b903124410e4fed81103014dfc1f59";
sha512 = "jtnWJs6B1cZlHs9wPG7BrowKxZw/rf6+UpGAkr8AaYmiTyTO7zQlLoST8zx/8TcUPnZmeBoB+H8ARuHZaSijVw==";
};
};
"wrappy-1.0.2" = {
Expand Down Expand Up @@ -411,7 +411,7 @@ let
sources."is-plain-obj-1.1.0"
sources."jsonfile-2.4.0"
sources."klaw-1.3.1"
sources."lodash-4.2.1"
sources."lodash-4.17.21"
sources."mime-db-1.52.0"
sources."minimatch-3.1.2"
sources."minimist-1.2.6"
Expand All @@ -424,7 +424,7 @@ let
sources."q-1.5.1"
(sources."rimraf-2.7.1" // {
dependencies = [
sources."glob-7.2.0"
sources."glob-7.2.3"
];
})
sources."semver-5.7.1"
Expand Down
Loading

0 comments on commit 2732e70

Please sign in to comment.