about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/networking/cluster/nomad
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-09-08 00:46:04 +0000
committerAlyssa Ross <hi@alyssa.is>2019-09-16 22:13:21 +0000
commitafcf2d55332c5c01c2d989e9d010577d257cb6cc (patch)
treee1c816a271686b014a6403bcad7c57dd2ee4d9c7 /nixpkgs/pkgs/applications/networking/cluster/nomad
parent175b9acd282aaf65b5f354ea6e95c1348fe3daa3 (diff)
parent4e60699fa727e4a0f9a3e78948012f86da32cfef (diff)
downloadnixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar
nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar.gz
nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar.bz2
nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar.lz
nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar.xz
nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.tar.zst
nixlib-afcf2d55332c5c01c2d989e9d010577d257cb6cc.zip
Merge commit '4e60699fa727e4a0f9a3e78948012f86da32cfef'
Diffstat (limited to 'nixpkgs/pkgs/applications/networking/cluster/nomad')
-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/;