parent
f523177869
commit
10f8ff8b6e
@ -0,0 +1,27 @@ |
||||
{ pkgs, nodejs, stdenv, lib, ... }: |
||||
|
||||
let |
||||
|
||||
packageName = with lib; concatStrings (map (entry: (concatStrings (mapAttrsToList (key: value: "${key}-${value}") entry))) (importJSON ./package.json)); |
||||
|
||||
nodePackages = import ./node-composition.nix { |
||||
inherit pkgs nodejs; |
||||
inherit (stdenv.hostPlatform) system; |
||||
}; |
||||
in |
||||
nodePackages."${packageName}".override { |
||||
nativeBuildInputs = [ pkgs.makeWrapper ]; |
||||
|
||||
postInstall = '' |
||||
# Patch shebangs in node_modules, otherwise the webpack build fails with interpreter problems |
||||
patchShebangs --build "$out/lib/node_modules/spacegun/node_modules/" |
||||
# compile Typescript sources |
||||
npm run build |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
description = "Version controlled multi-cluster deployment manager for kubernetes"; |
||||
maintainers = with maintainers; [ kampka ]; |
||||
license = licenses.mit; |
||||
}; |
||||
} |
@ -0,0 +1,10 @@ |
||||
#!/usr/bin/env nix-shell |
||||
#! nix-shell -i bash -p nodePackages.node2nix |
||||
|
||||
node2nix \ |
||||
--nodejs-10 \ |
||||
--node-env ../../../../development/node-packages/node-env.nix \ |
||||
--development \ |
||||
--input package.json \ |
||||
--output node-packages.nix \ |
||||
--composition node-composition.nix |
@ -0,0 +1,17 @@ |
||||
# This file has been generated by node2nix 1.7.0. Do not edit! |
||||
|
||||
{pkgs ? import <nixpkgs> { |
||||
inherit system; |
||||
}, system ? builtins.currentSystem, nodejs ? pkgs."nodejs-10_x"}: |
||||
|
||||
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 |
||||
import ./node-packages.nix { |
||||
inherit (pkgs) fetchurl fetchgit; |
||||
inherit nodeEnv; |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,3 @@ |
||||
[ |
||||
{ "spacegun": "git+https://github.com/dvallin/spacegun.git#v0.3.3" } |
||||
] |
Loading…
Reference in new issue