mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-29 19:30:11 +00:00
k3s: remove patch to require opencontainers/runc
This patch is not needed anymore. Additionally, refactors default.nix slightly.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user