From 5c1acb09fad67f270c862104d7efce38141caede Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Tue, 10 Jun 2025 16:15:34 -0400 Subject: [PATCH] nomad: 1.9.7 -> 1.10.2 --- .../networking/cluster/nomad/default.nix | 30 +++++++++++++++---- pkgs/top-level/all-packages.nix | 1 + 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/networking/cluster/nomad/default.nix b/pkgs/applications/networking/cluster/nomad/default.nix index c48a154d39e0..b86cbb7d8bdf 100644 --- a/pkgs/applications/networking/cluster/nomad/default.nix +++ b/pkgs/applications/networking/cluster/nomad/default.nix @@ -12,7 +12,7 @@ let { buildGoModule, version, - sha256, + hash, vendorHash, license, ... @@ -21,7 +21,7 @@ let attrs' = builtins.removeAttrs attrs [ "buildGoModule" "version" - "sha256" + "hash" "vendorHash" "license" ]; @@ -37,9 +37,15 @@ let owner = "hashicorp"; repo = pname; rev = "v${version}"; - inherit sha256; + inherit hash; }; + # Nomad requires Go 1.24.4, but nixpkgs doesn't have it in unstable yet. + postPatch = '' + substituteInPlace go.mod \ + --replace-warn "go 1.24.4" "go 1.24.3" + ''; + nativeBuildInputs = [ installShellFiles ]; ldflags = [ @@ -59,7 +65,7 @@ let ''; meta = with lib; { - homepage = "https://www.nomadproject.io/"; + homepage = "https://developer.hashicorp.com/nomad"; description = "Distributed, Highly Available, Datacenter-Aware Scheduler"; mainProgram = "nomad"; inherit license; @@ -81,12 +87,24 @@ rec { # Upstream partially documents used Go versions here # https://github.com/hashicorp/nomad/blob/master/contributing/golang.md - nomad = nomad_1_9; + nomad = nomad_1_10; + + nomad_1_10 = generic { + buildGoModule = buildGo124Module; + version = "1.10.2"; + hash = "sha256-7i/tMQwaEmLGXNarrdPzmorv+SHrxCzeaF3BI9Jjhwg="; + vendorHash = "sha256-yq8xQ9wThPK/X9/lEHD8FCXq1Mrz0lO6UvrP2ipXMnw="; + license = lib.licenses.bsl11; + passthru.tests.nomad = nixosTests.nomad; + preCheck = '' + export PATH="$PATH:$NIX_BUILD_TOP/go/bin" + ''; + }; nomad_1_9 = generic { buildGoModule = buildGo124Module; version = "1.9.7"; - sha256 = "sha256-U02H6DPr1friQ9EwqD/wQnE2Fm20OE5xNccPDJfnsqI="; + hash = "sha256-U02H6DPr1friQ9EwqD/wQnE2Fm20OE5xNccPDJfnsqI="; vendorHash = "sha256-9GnwqkexJAxrhW9yJFaDTdSaZ+p+/dcMuhlusp4cmyw="; license = lib.licenses.bsl11; passthru.tests.nomad = nixosTests.nomad; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e8e13fc89a50..5b66517ccb63 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3854,6 +3854,7 @@ with pkgs; inherit (callPackages ../applications/networking/cluster/nomad { }) nomad nomad_1_9 + nomad_1_10 ; nomacs-qt6 = nomacs.override { qtVersion = 6; };