From ea1446f5566f65146b2794d494e8bfe5a4ca1291 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Fri, 14 Jan 2022 16:15:35 -0500 Subject: nomad: drop support for nomad 1.0 --- pkgs/applications/networking/cluster/nomad/1.0.nix | 11 ----- pkgs/applications/networking/cluster/nomad/1.1.nix | 2 +- pkgs/applications/networking/cluster/nomad/1.2.nix | 2 +- .../networking/cluster/nomad/generic.nix | 15 ++++-- .../networking/cluster/nomad/genericModule.nix | 54 ---------------------- pkgs/top-level/all-packages.nix | 5 -- 6 files changed, 12 insertions(+), 77 deletions(-) delete mode 100644 pkgs/applications/networking/cluster/nomad/1.0.nix delete mode 100644 pkgs/applications/networking/cluster/nomad/genericModule.nix 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; -- cgit 1.4.1