summary refs log tree commit diff
diff options
context:
space:
mode:
authorEuan Kemp <euank@euank.com>2023-05-22 17:18:23 +0900
committerEuan Kemp <euank@euank.com>2023-05-22 17:18:23 +0900
commit2257ccd54463d051611862d6a82753238eff22fd (patch)
treeeb555ae67a121342a9cc774c990275dc3c3228f2
parentc71ef26ecc9e4353589b4987d27d7c60e3b94755 (diff)
downloadnixpkgs-2257ccd54463d051611862d6a82753238eff22fd.tar
nixpkgs-2257ccd54463d051611862d6a82753238eff22fd.tar.gz
nixpkgs-2257ccd54463d051611862d6a82753238eff22fd.tar.bz2
nixpkgs-2257ccd54463d051611862d6a82753238eff22fd.tar.lz
nixpkgs-2257ccd54463d051611862d6a82753238eff22fd.tar.xz
nixpkgs-2257ccd54463d051611862d6a82753238eff22fd.tar.zst
nixpkgs-2257ccd54463d051611862d6a82753238eff22fd.zip
k3s: name builder less confusingly
Per PR feedback
-rw-r--r--pkgs/applications/networking/cluster/k3s/builder.nix (renamed from pkgs/applications/networking/cluster/k3s/builders/1_26.nix)6
-rw-r--r--pkgs/applications/networking/cluster/k3s/default.nix7
2 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/applications/networking/cluster/k3s/builders/1_26.nix b/pkgs/applications/networking/cluster/k3s/builder.nix
index fa34782d39a..0d3d127e484 100644
--- a/pkgs/applications/networking/cluster/k3s/builders/1_26.nix
+++ b/pkgs/applications/networking/cluster/k3s/builder.nix
@@ -1,3 +1,9 @@
+# builder.nix contains a "builder" expression that, given k3s version and hash
+# variables, creates a package for that version.
+# Due to variance in k3s's build process, this builder only works for k3s 1.26+
+# currently.
+# It is likely we will have to split out additional builders for additional
+# versions in the future, or customize this one further.
 { lib
 , makeWrapper
 , socat
diff --git a/pkgs/applications/networking/cluster/k3s/default.nix b/pkgs/applications/networking/cluster/k3s/default.nix
index 5a6b68eb5a9..d8ecd79b5ca 100644
--- a/pkgs/applications/networking/cluster/k3s/default.nix
+++ b/pkgs/applications/networking/cluster/k3s/default.nix
@@ -1,11 +1,10 @@
 { lib, stdenv, callPackage }:
 
 let
-  # The 1_26 builder can compile 1.26, and hopefully newer versions
-  k3s_1_26_builder = import ./builders/1_26.nix;
+  k3s_builder = import ./builder.nix;
 in
 {
-  k3s_1_26 = (callPackage k3s_1_26_builder { }) {
+  k3s_1_26 = (callPackage k3s_builder { }) {
     k3sVersion = "1.26.4+k3s1";
     k3sCommit = "8d0255af07e95b841952563253d27b0d10bd72f0";
     k3sRepoSha256 = "0qlszdnlsvj3hzx2p0wl3zhaw908w8a62z6vlf2g69a3c75f55cs";
@@ -21,7 +20,7 @@ in
   };
 
   # 1_27 can be built with the same builder as 1_26
-  k3s_1_27 = (callPackage k3s_1_26_builder { }) (import ./1_27/versions.nix) // {
+  k3s_1_27 = (callPackage k3s_builder { }) (import ./1_27/versions.nix) // {
     updateScript = ./1_27/update-script.sh;
   };
 }