From 329a922fb273bb2f6139a9043c91489c2c1d7c05 Mon Sep 17 00:00:00 2001 From: Danielle Lancashire Date: Wed, 9 Sep 2020 18:29:54 +0200 Subject: [PATCH] nomad: Pin to go1.14 for 0.11 and 0.12 This commit pins go versions for nomad 0.11 and 0.12. Future versions of Nomad should have their versions pinned from the beginning, even if they support the latest-at-the-time version of Go to prevent accidental version bumps on unsupported go versions. See https://github.com/NixOS/nixpkgs/pull/96414 for further discussion around this change. --- pkgs/applications/networking/cluster/nomad/0.11.nix | 3 ++- pkgs/applications/networking/cluster/nomad/0.12.nix | 3 ++- pkgs/top-level/all-packages.nix | 11 +++++++++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/cluster/nomad/0.11.nix b/pkgs/applications/networking/cluster/nomad/0.11.nix index 9d0f2248ddc..ff0d1c69f41 100644 --- a/pkgs/applications/networking/cluster/nomad/0.11.nix +++ b/pkgs/applications/networking/cluster/nomad/0.11.nix @@ -1,6 +1,7 @@ -{ callPackage }: +{ callPackage, buildGoPackage }: callPackage ./generic.nix { + inherit buildGoPackage; version = "0.11.4"; sha256 = "1sykp9sji6f564s7bz0cvnr9w5x92n0l1r1djf1bl7jvv2mi1mcb"; } diff --git a/pkgs/applications/networking/cluster/nomad/0.12.nix b/pkgs/applications/networking/cluster/nomad/0.12.nix index b39748e9eba..3687b58b5a7 100644 --- a/pkgs/applications/networking/cluster/nomad/0.12.nix +++ b/pkgs/applications/networking/cluster/nomad/0.12.nix @@ -1,6 +1,7 @@ -{ callPackage }: +{ callPackage, buildGoPackage }: callPackage ./generic.nix { + inherit buildGoPackage; version = "0.12.3"; sha256 = "100ynhc4nm4mmjxx1jhq2kjbqshxvi5x8y482520j8gsyn40g6zc"; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index be21cc88773..390d16d9acf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5687,8 +5687,15 @@ in noip = callPackage ../tools/networking/noip { }; nomad = nomad_0_11; - nomad_0_11 = callPackage ../applications/networking/cluster/nomad/0.11.nix { }; - nomad_0_12 = callPackage ../applications/networking/cluster/nomad/0.12.nix { }; + # Nomad never updates major go versions within a release series and is unsupported + # on Go versions that it did not ship with. Due to historic bugs when compiled + # with different versions we pin Go for all versions. + nomad_0_11 = callPackage ../applications/networking/cluster/nomad/0.11.nix { + buildGoPackage = buildGo114Package; + }; + nomad_0_12 = callPackage ../applications/networking/cluster/nomad/0.12.nix { + buildGoPackage = buildGo114Package; + }; notable = callPackage ../applications/misc/notable { };