summary refs log tree commit diff
diff options
context:
space:
mode:
authortechknowlogick <techknowlogick@gitea.io>2022-01-14 16:15:35 -0500
committerzowoq <59103226+zowoq@users.noreply.github.com>2022-01-29 20:34:22 +1000
commitea1446f5566f65146b2794d494e8bfe5a4ca1291 (patch)
treee513ddd7e8a7d0a1894a96086db87eb56f7d6ad6
parentc1d884944e08c8e9b49de6037394f0ac1847bf71 (diff)
downloadnixpkgs-ea1446f5566f65146b2794d494e8bfe5a4ca1291.tar
nixpkgs-ea1446f5566f65146b2794d494e8bfe5a4ca1291.tar.gz
nixpkgs-ea1446f5566f65146b2794d494e8bfe5a4ca1291.tar.bz2
nixpkgs-ea1446f5566f65146b2794d494e8bfe5a4ca1291.tar.lz
nixpkgs-ea1446f5566f65146b2794d494e8bfe5a4ca1291.tar.xz
nixpkgs-ea1446f5566f65146b2794d494e8bfe5a4ca1291.tar.zst
nixpkgs-ea1446f5566f65146b2794d494e8bfe5a4ca1291.zip
nomad: drop support for nomad 1.0
-rw-r--r--pkgs/applications/networking/cluster/nomad/1.0.nix11
-rw-r--r--pkgs/applications/networking/cluster/nomad/1.1.nix2
-rw-r--r--pkgs/applications/networking/cluster/nomad/1.2.nix2
-rw-r--r--pkgs/applications/networking/cluster/nomad/generic.nix15
-rw-r--r--pkgs/applications/networking/cluster/nomad/genericModule.nix54
-rw-r--r--pkgs/top-level/all-packages.nix5
6 files changed, 12 insertions, 77 deletions
diff --git a/pkgs/applications/networking/cluster/nomad/1.0.nix b/pkgs/applications/networking/cluster/nomad/1.0.nix
deleted file mode 100644
index 079c957ebb0..00000000000
--- a/pkgs/applications/networking/cluster/nomad/1.0.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ callPackage
-, buildGoPackage
-, nvidia_x11
-, nvidiaGpuSupport
-}:
-
-callPackage ./generic.nix {
-  inherit buildGoPackage nvidia_x11 nvidiaGpuSupport;
-  version = "1.0.13";
-  sha256 = "19wlma2y8lpb7p01wb0l20rb6nvrvldz0mm3qfisx33y56ykjyh8";
-}
diff --git a/pkgs/applications/networking/cluster/nomad/1.1.nix b/pkgs/applications/networking/cluster/nomad/1.1.nix
index 5a3e964ad5f..750e49fc1e1 100644
--- a/pkgs/applications/networking/cluster/nomad/1.1.nix
+++ b/pkgs/applications/networking/cluster/nomad/1.1.nix
@@ -4,7 +4,7 @@
 , nvidiaGpuSupport
 }:
 
-callPackage ./genericModule.nix {
+callPackage ./generic.nix {
   inherit buildGoModule nvidia_x11 nvidiaGpuSupport;
   version = "1.1.8";
   sha256 = "05k1r157h3jaqzzsrkgc96zcny3mi8dvixc2v1w0lwcxixqk0y2l";
diff --git a/pkgs/applications/networking/cluster/nomad/1.2.nix b/pkgs/applications/networking/cluster/nomad/1.2.nix
index 1bf38a8457b..3eb99e73703 100644
--- a/pkgs/applications/networking/cluster/nomad/1.2.nix
+++ b/pkgs/applications/networking/cluster/nomad/1.2.nix
@@ -4,7 +4,7 @@
 , nvidiaGpuSupport
 }:
 
-callPackage ./genericModule.nix {
+callPackage ./generic.nix {
   inherit buildGoModule nvidia_x11 nvidiaGpuSupport;
   version = "1.2.3";
   sha256 = "0qjj1pnq2yv4r8dv03m08ii4118drjnswf4n1r95dqh8j3bymv5i";
diff --git a/pkgs/applications/networking/cluster/nomad/generic.nix b/pkgs/applications/networking/cluster/nomad/generic.nix
index c028e476020..180cf48e3fb 100644
--- a/pkgs/applications/networking/cluster/nomad/generic.nix
+++ b/pkgs/applications/networking/cluster/nomad/generic.nix
@@ -1,27 +1,30 @@
 { lib
-, buildGoPackage
+, buildGoModule
 , fetchFromGitHub
 , version
 , sha256
+, vendorSha256
 , nvidiaGpuSupport
 , patchelf
 , nvidia_x11
+, nixosTests
 }:
 
-buildGoPackage rec {
+buildGoModule rec {
   pname = "nomad";
   inherit version;
-  rev = "v${version}";
 
-  goPackagePath = "github.com/hashicorp/nomad";
   subPackages = [ "." ];
 
   src = fetchFromGitHub {
     owner = "hashicorp";
     repo = pname;
-    inherit rev sha256;
+    rev = "v${version}";
+    inherit sha256;
   };
 
+  inherit vendorSha256;
+
   nativeBuildInputs = lib.optionals nvidiaGpuSupport [
     patchelf
   ];
@@ -39,6 +42,8 @@ buildGoPackage rec {
     done
   '';
 
+  passthru.tests.nomad = nixosTests.nomad;
+
   meta = with lib; {
     homepage = "https://www.nomadproject.io/";
     description = "A Distributed, Highly Available, Datacenter-Aware Scheduler";
diff --git a/pkgs/applications/networking/cluster/nomad/genericModule.nix b/pkgs/applications/networking/cluster/nomad/genericModule.nix
deleted file mode 100644
index c2e65731753..00000000000
--- a/pkgs/applications/networking/cluster/nomad/genericModule.nix
+++ /dev/null
@@ -1,54 +0,0 @@
-{ lib
-, buildGoModule
-, fetchFromGitHub
-, version
-, sha256
-, vendorSha256
-, nvidiaGpuSupport
-, patchelf
-, nvidia_x11
-, nixosTests
-}:
-
-buildGoModule rec {
-  pname = "nomad";
-  inherit version;
-
-  subPackages = [ "." ];
-
-  src = fetchFromGitHub {
-    owner = "hashicorp";
-    repo = pname;
-    rev = "v${version}";
-    inherit sha256;
-  };
-
-  inherit vendorSha256;
-
-  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.
-  tags = [ "ui" ] ++ lib.optional (!nvidiaGpuSupport) "nonvidia";
-
-  # 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
-  '';
-
-  passthru.tests.nomad = nixosTests.nomad;
-
-  meta = with lib; {
-    homepage = "https://www.nomadproject.io/";
-    description = "A Distributed, Highly Available, Datacenter-Aware Scheduler";
-    platforms = platforms.unix;
-    license = licenses.mpl20;
-    maintainers = with maintainers; [ rushmorem pradeepchhetri endocrimes maxeaubrey ];
-  };
-}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 391ecbbfa45..80896900dd1 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -8089,11 +8089,6 @@ with pkgs;
   # with different versions we pin Go for all versions.
   # Upstream partially documents used Go versions here
   # https://github.com/hashicorp/nomad/blob/master/contributing/golang.md
-  nomad_1_0 = callPackage ../applications/networking/cluster/nomad/1.0.nix {
-    buildGoPackage = buildGo115Package;
-    inherit (linuxPackages) nvidia_x11;
-    nvidiaGpuSupport = config.cudaSupport or false;
-  };
   nomad_1_1 = callPackage ../applications/networking/cluster/nomad/1.1.nix {
     buildGoModule = buildGo116Module;
     inherit (linuxPackages) nvidia_x11;