about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/cluster/spacegun/default.nix
blob: 684e9f65a5bf82acb0d87f57a1f0fbdc49afa9ca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{ pkgs, fetchFromGitHub, nodejs, stdenv, lib, ... }:

let
  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.package.override {
  inherit src;
  nativeBuildInputs = [ pkgs.makeWrapper pkgs.nodePackages.node-gyp-build ];

  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;
  };
}