about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2021-01-03 11:18:51 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2021-01-03 11:19:28 +0100
commit6c9b5071e4d645c8d6757175f398c52d4883eb30 (patch)
treeac8bd9d3c3b2d90399e17a038e90116a265c0b5c
parent20489e31cd2cada27690612689a3bf5e608c5109 (diff)
Revert "Merge pull request #107030 from cpcloud/nomad-nvml"
This broke eval.

https://github.com/NixOS/nixpkgs/pull/107030#issuecomment-753591854

This reverts commit 20489e31cd2cada27690612689a3bf5e608c5109, reversing
changes made to 590feeecfbbe947d8f85a335c48846b5af0bdd35.
-rw-r--r--pkgs/applications/networking/cluster/nomad/0.11.nix8
-rw-r--r--pkgs/applications/networking/cluster/nomad/0.12.nix8
-rw-r--r--pkgs/applications/networking/cluster/nomad/generic.nix46
-rw-r--r--pkgs/top-level/all-packages.nix4
4 files changed, 18 insertions, 48 deletions
diff --git a/pkgs/applications/networking/cluster/nomad/0.11.nix b/pkgs/applications/networking/cluster/nomad/0.11.nix
index 58bdb694eed51..2fd7c0403a3c4 100644
--- a/pkgs/applications/networking/cluster/nomad/0.11.nix
+++ b/pkgs/applications/networking/cluster/nomad/0.11.nix
@@ -1,11 +1,7 @@
-{ callPackage
-, buildGoPackage
-, nvidia_x11
-, nvidiaGpuSupport
-}:
+{ callPackage, buildGoPackage }:
 
 callPackage ./generic.nix {
-  inherit buildGoPackage nvidia_x11 nvidiaGpuSupport;
+  inherit buildGoPackage;
   version = "0.11.8";
   sha256 = "1dhh07bifr02jh2lls8fv1d9ra67ymgh8qxqvpvm0cd0qdd469z1";
 }
diff --git a/pkgs/applications/networking/cluster/nomad/0.12.nix b/pkgs/applications/networking/cluster/nomad/0.12.nix
index b6e053e757de2..0120887957a85 100644
--- a/pkgs/applications/networking/cluster/nomad/0.12.nix
+++ b/pkgs/applications/networking/cluster/nomad/0.12.nix
@@ -1,11 +1,7 @@
-{ callPackage
-, buildGoPackage
-, nvidia_x11
-, nvidiaGpuSupport
-}:
+{ callPackage, buildGoPackage }:
 
 callPackage ./generic.nix {
-  inherit buildGoPackage nvidia_x11 nvidiaGpuSupport;
+  inherit buildGoPackage;
   version = "0.12.9";
   sha256 = "1a0ig6pb0z3qp7zk4jgz3h241bifmjlyqsfikyy3sxdnzj7yha27";
 }
diff --git a/pkgs/applications/networking/cluster/nomad/generic.nix b/pkgs/applications/networking/cluster/nomad/generic.nix
index dc22ab41d8b64..0bfdb0b27f6e6 100644
--- a/pkgs/applications/networking/cluster/nomad/generic.nix
+++ b/pkgs/applications/networking/cluster/nomad/generic.nix
@@ -1,12 +1,4 @@
-{ lib
-, buildGoPackage
-, fetchFromGitHub
-, version
-, sha256
-, nvidiaGpuSupport
-, patchelf
-, nvidia_x11
-}:
+{ stdenv, buildGoPackage, fetchFromGitHub, version, sha256 }:
 
 buildGoPackage rec {
   pname = "nomad";
@@ -22,33 +14,23 @@ buildGoPackage rec {
     inherit rev sha256;
   };
 
-  nativeBuildInputs = lib.optionals nvidiaGpuSupport [
-    patchelf
-  ];
-
   # ui:
   #  Nomad release commits include the compiled version of the UI, but the file
   #  is only included if we build with the ui tag.
-  preBuild =
-    let
-      tags = [ "ui" ] ++ lib.optional (!nvidiaGpuSupport) "nonvidia";
-      tagsString = lib.concatStringsSep " " tags;
-    in
-    ''
-      export buildFlagsArray=(
-        -tags="${tagsString}"
-      )
-    '';
-
-  # The dependency on NVML isn't explicit. We have to make it so otherwise the
-  # binary will not know where to look for the relevant symbols.
-  postFixup = lib.optionalString nvidiaGpuSupport ''
-    for bin in $out/bin/*; do
-      patchelf --add-needed "${nvidia_x11}/lib/libnvidia-ml.so" "$bin"
-    done
-  '';
+  # 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 lib; {
+  meta = with stdenv.lib; {
     homepage = "https://www.nomadproject.io/";
     description = "A Distributed, Highly Available, Datacenter-Aware Scheduler";
     platforms = platforms.unix;
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index ed519b867c87e..0321d183b91ef 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -6129,13 +6129,9 @@ in
   # with different versions we pin Go for all versions.
   nomad_0_11 = callPackage ../applications/networking/cluster/nomad/0.11.nix {
     buildGoPackage = buildGo114Package;
-    inherit (linuxPackages) nvidia_x11;
-    nvidiaGpuSupport = config.cudaSupport or (!stdenv.isLinux);
   };
   nomad_0_12 = callPackage ../applications/networking/cluster/nomad/0.12.nix {
     buildGoPackage = buildGo114Package;
-    inherit (linuxPackages) nvidia_x11;
-    nvidiaGpuSupport = config.cudaSupport or (!stdenv.isLinux);
   };
   nomad_1_0 = callPackage ../applications/networking/cluster/nomad/1.0.nix {
     buildGoPackage = buildGo115Package;