diff --git a/pkgs/applications/networking/cluster/k3s/default.nix b/pkgs/applications/networking/cluster/k3s/default.nix index 5a772f320760..9b8933ef3e99 100644 --- a/pkgs/applications/networking/cluster/k3s/default.nix +++ b/pkgs/applications/networking/cluster/k3s/default.nix @@ -2,7 +2,7 @@ let k3s_builder = import ./builder.nix lib; - common = opts: callPackage (k3s_builder opts); + forVersions = versions: callPackage (k3s_builder (import versions)) extraArgs; # extraArgs is the extra arguments passed in by the caller to propagate downward. # This is to allow all-packages.nix to do: # @@ -12,15 +12,7 @@ let extraArgs = removeAttrs args [ "callPackage" ]; in { - k3s_1_34 = (common (import ./1_34/versions.nix) extraArgs).overrideAttrs { - patches = [ ./go_runc_require.patch ]; - }; - - k3s_1_35 = (common (import ./1_35/versions.nix) extraArgs).overrideAttrs { - patches = [ ./go_runc_require.patch ]; - }; - - k3s_1_36 = (common (import ./1_36/versions.nix) extraArgs).overrideAttrs { - patches = [ ./go_runc_require.patch ]; - }; + k3s_1_34 = forVersions ./1_34/versions.nix; + k3s_1_35 = forVersions ./1_35/versions.nix; + k3s_1_36 = forVersions ./1_36/versions.nix; } diff --git a/pkgs/applications/networking/cluster/k3s/go_runc_require.patch b/pkgs/applications/networking/cluster/k3s/go_runc_require.patch deleted file mode 100644 index 8d8d5912afd1..000000000000 --- a/pkgs/applications/networking/cluster/k3s/go_runc_require.patch +++ /dev/null @@ -1,18 +0,0 @@ -# Adds explicit require of opencontainers/runc to go.mod before version.sh is called and -# removes it afterwards so that later build commands don't complain about inconsistent -# vendoring. -diff --git a/scripts/package-cli b/scripts/package-cli -index a15d754926..bc450dbe4e 100755 ---- a/scripts/package-cli -+++ b/scripts/package-cli -@@ -3,7 +3,10 @@ set -e -x - - cd $(dirname $0)/.. - -+runc_require=$(grep "github.com/opencontainers/runc" go.mod | awk -F '=> ' '{print $2}' | xargs -0 printf 'require %s') -+echo "$runc_require" >> go.mod - . ./scripts/version.sh -+sed -i '$d' go.mod - - GO=${GO-go} -