about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/cluster/spacegun/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/cluster/spacegun/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/networking/cluster/spacegun/default.nix15
1 files changed, 10 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/applications/networking/cluster/spacegun/default.nix b/nixpkgs/pkgs/applications/networking/cluster/spacegun/default.nix
index 64623f88ddaa..684e9f65a5bf 100644
--- a/nixpkgs/pkgs/applications/networking/cluster/spacegun/default.nix
+++ b/nixpkgs/pkgs/applications/networking/cluster/spacegun/default.nix
@@ -1,16 +1,21 @@
-{ pkgs, nodejs, stdenv, lib, ... }:
+{ pkgs, fetchFromGitHub, nodejs, stdenv, lib, ... }:
 
 let
-
-  packageName = with lib; concatStrings (map (entry: (concatStrings (mapAttrsToList (key: value: "${key}-${value}") entry))) (importJSON ./package.json));
+  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."${packageName}".override {
-  nativeBuildInputs = [ pkgs.makeWrapper ];
+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