forked from mirrors/nixpkgs
28 lines
841 B
Nix
28 lines
841 B
Nix
{ 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; [ ];
|
|
license = licenses.mit;
|
|
};
|
|
}
|