summary refs log tree commit diff
path: root/pkgs/applications/networking/cluster/nomad-autoscaler/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/networking/cluster/nomad-autoscaler/default.nix')
-rw-r--r--pkgs/applications/networking/cluster/nomad-autoscaler/default.nix26
1 files changed, 12 insertions, 14 deletions
diff --git a/pkgs/applications/networking/cluster/nomad-autoscaler/default.nix b/pkgs/applications/networking/cluster/nomad-autoscaler/default.nix
index cfa86ea2dca..4bdaf769086 100644
--- a/pkgs/applications/networking/cluster/nomad-autoscaler/default.nix
+++ b/pkgs/applications/networking/cluster/nomad-autoscaler/default.nix
@@ -1,9 +1,9 @@
-{ lib, fetchFromGitHub, buildGoModule, go, removeReferencesTo, buildEnv }:
+{ lib, fetchFromGitHub, buildGoModule, buildEnv }:
 
 let
   package = buildGoModule rec {
     pname = "nomad-autoscaler";
-    version = "0.3.4";
+    version = "0.3.5";
 
     outputs = [
       "out"
@@ -25,26 +25,24 @@ let
       owner = "hashicorp";
       repo = "nomad-autoscaler";
       rev = "v${version}";
-      sha256 = "sha256-SmlcQH+K/axl6Gj+bX0Quk6K/usP0c1hWnIdFjS1dn8=";
+      sha256 = "sha256-2d36ddAjbt+nPmsHawgMq1CnKB2VNv8yMKMrPx5L+yw=";
     };
 
-    vendorSha256 = "sha256-tO8vi9jBV6rVcGk/OoaXzpnQi4yPdozYZZwAMFCz2+c=";
+    vendorSha256 = "sha256-g3INNvAQ124kBJSe5cnsIq1y8sWpPYKLwJONgbIUaoM=";
 
-    subPackages = [ "." ];
-
-    nativeBuildInputs = [ removeReferencesTo ];
-
-    # buildGoModule overrides normal buildPhase, can't use makeTargets
-    postBuild = ''
+    buildPhase = ''
+      runHook preBuild
       make build plugins
+      runHook postBuild
     '';
 
     # tries to pull tests from network, and fails silently anyway
     doCheck = false;
 
-    postInstall = ''
-      mkdir -p $bin/bin
-      mv $out/bin/nomad-autoscaler $bin/bin/nomad-autoscaler
+    installPhase = ''
+      runHook preInstall
+      mkdir -p $bin/bin $out/bin
+      mv bin/nomad-autoscaler $bin/bin
       ln -s $bin/bin/nomad-autoscaler $out/bin/nomad-autoscaler
 
       for d in $outputs; do
@@ -54,7 +52,6 @@ let
 
       # have out contain all of the plugins
       for plugin in bin/plugins/*; do
-        remove-references-to -t ${go} "$plugin"
         cp "$plugin" $out/share/
       done
 
@@ -73,6 +70,7 @@ let
       mv bin/plugins/prometheus $prometheus/share/
       mv bin/plugins/target-value $target_value/share/
       mv bin/plugins/threshold $threshold/share/
+      runHook postInstall
     '';
 
     # make toggle-able, so that overrided versions can disable this check if