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
|
||||
|
||||
packageName = with lib; concatStrings (map (entry: (concatStrings (mapAttrsToList (key: value: "${key}-${value}") entry))) (importJSON ./package.json));
|
||||
src = fetchFromGitHub {
|
||||
owner = "dvallin";
|
||||
repo = "spacegun";
|
||||
rev = "v0.3.3";
|
||||
sha256 = "0cd9yzms44dj9ix8lrhbkby5zsyb8wambs24j6c3ibr67sggr6sq";
|
||||
};
|
||||
|
||||
nodePackages = import ./node-composition.nix {
|
||||
inherit pkgs nodejs;
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
};
|
||||
in
|
||||
nodePackages."${packageName}".override {
|
||||
nodePackages.package.override {
|
||||
inherit src;
|
||||
nativeBuildInputs = [ pkgs.makeWrapper pkgs.nodePackages.node-gyp-build ];
|
||||
|
||||
postInstall = ''
|
||||
|
|
|
@ -1,10 +1,17 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#! 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 \
|
||||
--nodejs-10 \
|
||||
--node-env ../../../../development/node-packages/node-env.nix \
|
||||
--development \
|
||||
--input package.json \
|
||||
--lock package-lock.json \
|
||||
--output node-packages.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…
Reference in a new issue