about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/cluster/nomad/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/cluster/nomad/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/networking/cluster/nomad/default.nix26
1 files changed, 19 insertions, 7 deletions
diff --git a/nixpkgs/pkgs/applications/networking/cluster/nomad/default.nix b/nixpkgs/pkgs/applications/networking/cluster/nomad/default.nix
index fec737ddb2ae..a4236a9408cc 100644
--- a/nixpkgs/pkgs/applications/networking/cluster/nomad/default.nix
+++ b/nixpkgs/pkgs/applications/networking/cluster/nomad/default.nix
@@ -1,8 +1,8 @@
 { stdenv, buildGoPackage, fetchFromGitHub }:
 
 buildGoPackage rec {
-  name = "nomad-${version}";
-  version = "0.9.4";
+  pname = "nomad";
+  version = "0.9.5";
   rev = "v${version}";
 
   goPackagePath = "github.com/hashicorp/nomad";
@@ -10,14 +10,26 @@ buildGoPackage rec {
 
   src = fetchFromGitHub {
     owner = "hashicorp";
-    repo = "nomad";
+    repo = pname;
     inherit rev;
-    sha256 = "1jgvnmmrz7ffpm6aamdrvklj94n7b43swk9cycqhlfbnzijianpn";
+    sha256 = "01491470idb11z0ab4anb5caw46vy9s94a17l92j0z2f3f4k6xfl";
   };
 
-  # We disable Nvidia GPU scheduling on Linux, as it doesn't work there:
-  # Ref: https://github.com/hashicorp/nomad/issues/5535
-  buildFlags = stdenv.lib.optionalString (stdenv.isLinux) "-tags nonvidia";
+  # ui:
+  #  Nomad release commits include the compiled version of the UI, but the file
+  #  is only included if we build with the ui tag.
+  # nonvidia:
+  #  We disable Nvidia GPU scheduling on Linux, as it doesn't work there:
+  #  Ref: https://github.com/hashicorp/nomad/issues/5535
+  preBuild = let
+    tags = ["ui"]
+      ++ stdenv.lib.optional stdenv.isLinux "nonvidia";
+    tagsString = stdenv.lib.concatStringsSep " " tags;
+  in ''
+    export buildFlagsArray=(
+      -tags="${tagsString}"
+    )
+ '';
 
   meta = with stdenv.lib; {
     homepage = https://www.nomadproject.io/;