3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/networking/cluster/spacegun/default.nix

28 lines
848 B
Nix
Raw Normal View History

2019-10-06 12:43:27 +01:00
{ 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;
};
}