Skip to content

Commit 3cd3145

Browse files
authoredJan 25, 2021
Revert "nodePackages: regenerate with node2nix 1.9.0"
1 parent ce7b327 commit 3cd3145

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+12124
-12585
lines changed
 

‎pkgs/applications/networking/cluster/spacegun/default.nix

+5-10
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
1-
{ pkgs, fetchFromGitHub, nodejs, stdenv, lib, ... }:
1+
{ pkgs, nodejs, stdenv, lib, ... }:
22

33
let
4-
src = fetchFromGitHub {
5-
owner = "dvallin";
6-
repo = "spacegun";
7-
rev = "v0.3.3";
8-
sha256 = "0cd9yzms44dj9ix8lrhbkby5zsyb8wambs24j6c3ibr67sggr6sq";
9-
};
4+
5+
packageName = with lib; concatStrings (map (entry: (concatStrings (mapAttrsToList (key: value: "${key}-${value}") entry))) (importJSON ./package.json));
106

117
nodePackages = import ./node-composition.nix {
128
inherit pkgs nodejs;
139
inherit (stdenv.hostPlatform) system;
1410
};
1511
in
16-
nodePackages.package.override {
17-
inherit src;
18-
nativeBuildInputs = [ pkgs.makeWrapper pkgs.nodePackages.node-gyp-build ];
12+
nodePackages."${packageName}".override {
13+
nativeBuildInputs = [ pkgs.makeWrapper ];
1914

2015
postInstall = ''
2116
# Patch shebangs in node_modules, otherwise the webpack build fails with interpreter problems
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
11
#!/usr/bin/env nix-shell
22
#! nix-shell -i bash -p nodePackages.node2nix
33

4-
# Download package.json and package-lock.json from the v0.3.3 release
5-
curl https://raw.githubusercontent.com/dvallin/spacegun/f88cfd1cf653995a301ef4db4a1e387ef3ca01a1/package.json -o package.json
6-
curl https://raw.githubusercontent.com/dvallin/spacegun/f88cfd1cf653995a301ef4db4a1e387ef3ca01a1/package-lock.json -o package-lock.json
7-
84
node2nix \
95
--nodejs-10 \
106
--node-env ../../../../development/node-packages/node-env.nix \
117
--development \
128
--input package.json \
13-
--lock package-lock.json \
149
--output node-packages.nix \
1510
--composition node-composition.nix
16-
17-
rm -f package.json package-lock.json

0 commit comments

Comments
 (0)