diff options
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/cluster/spacegun/default.nix')
-rw-r--r-- | nixpkgs/pkgs/applications/networking/cluster/spacegun/default.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/networking/cluster/spacegun/default.nix b/nixpkgs/pkgs/applications/networking/cluster/spacegun/default.nix new file mode 100644 index 000000000000..2180d8d30489 --- /dev/null +++ b/nixpkgs/pkgs/applications/networking/cluster/spacegun/default.nix @@ -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; + }; +} |