spacegun: use workaround to deploy the project as a remote development project using the package-lock.json configuration
This commit is contained in:
parent
8150fd8d0d
commit
520203fe30
@ -1,15 +1,20 @@
|
|||||||
{ pkgs, nodejs, stdenv, lib, ... }:
|
{ pkgs, fetchFromGitHub, nodejs, stdenv, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
src = fetchFromGitHub {
|
||||||
packageName = with lib; concatStrings (map (entry: (concatStrings (mapAttrsToList (key: value: "${key}-${value}") entry))) (importJSON ./package.json));
|
owner = "dvallin";
|
||||||
|
repo = "spacegun";
|
||||||
|
rev = "v0.3.3";
|
||||||
|
sha256 = "0cd9yzms44dj9ix8lrhbkby5zsyb8wambs24j6c3ibr67sggr6sq";
|
||||||
|
};
|
||||||
|
|
||||||
nodePackages = import ./node-composition.nix {
|
nodePackages = import ./node-composition.nix {
|
||||||
inherit pkgs nodejs;
|
inherit pkgs nodejs;
|
||||||
inherit (stdenv.hostPlatform) system;
|
inherit (stdenv.hostPlatform) system;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
nodePackages."${packageName}".override {
|
nodePackages.package.override {
|
||||||
|
inherit src;
|
||||||
nativeBuildInputs = [ pkgs.makeWrapper pkgs.nodePackages.node-gyp-build ];
|
nativeBuildInputs = [ pkgs.makeWrapper pkgs.nodePackages.node-gyp-build ];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
@ -1,10 +1,17 @@
|
|||||||
#!/usr/bin/env nix-shell
|
#!/usr/bin/env nix-shell
|
||||||
#! nix-shell -i bash -p nodePackages.node2nix
|
#! nix-shell -i bash -p nodePackages.node2nix
|
||||||
|
|
||||||
|
# Download package.json and package-lock.json from the v0.3.3 release
|
||||||
|
curl https://raw.githubusercontent.com/dvallin/spacegun/f88cfd1cf653995a301ef4db4a1e387ef3ca01a1/package.json -o package.json
|
||||||
|
curl https://raw.githubusercontent.com/dvallin/spacegun/f88cfd1cf653995a301ef4db4a1e387ef3ca01a1/package-lock.json -o package-lock.json
|
||||||
|
|
||||||
node2nix \
|
node2nix \
|
||||||
--nodejs-10 \
|
--nodejs-10 \
|
||||||
--node-env ../../../../development/node-packages/node-env.nix \
|
--node-env ../../../../development/node-packages/node-env.nix \
|
||||||
--development \
|
--development \
|
||||||
--input package.json \
|
--input package.json \
|
||||||
|
--lock package-lock.json \
|
||||||
--output node-packages.nix \
|
--output node-packages.nix \
|
||||||
--composition node-composition.nix
|
--composition node-composition.nix
|
||||||
|
|
||||||
|
rm -f package.json package-lock.json
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,3 +0,0 @@
|
|||||||
[
|
|
||||||
{ "spacegun": "git+https://github.com/dvallin/spacegun.git#v0.3.3" }
|
|
||||||
]
|
|
Loading…
x
Reference in New Issue
Block a user