Skip to content

Commit

Permalink
k3d: 5.7.4 -> 5.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
petrzjunior committed Jan 19, 2025
1 parent b56cac7 commit 1b32844
Showing 1 changed file with 29 additions and 12 deletions.
41 changes: 29 additions & 12 deletions pkgs/by-name/k3/k3d/package.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
, k3sVersion ? null
{
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
k3sVersion ? null,
}:

let
Expand All @@ -15,30 +16,40 @@ let
in
buildGoModule rec {
pname = "k3d";
version = "5.7.4";
version = "5.8.1";

src = fetchFromGitHub {
owner = "k3d-io";
repo = "k3d";
tag = "v${version}";
hash = "sha256-z+7yeX0ea/6+4aWbA5NYW/HzvVcJiSkewOvo+oXp9bE=";
hash = "sha256-o56kBcuTOrDG8ZovGsIK+LIMi2Wps3kYJrqQuJHMd+A=";
};

vendorHash = "sha256-lFmIRtkUiohva2Vtg4AqHaB5McVOWW5+SFShkNqYVZ8=";
deleteVendor = true;

nativeBuildInputs = [ installShellFiles ];

excludedPackages = [ "tools" "docgen" ];
excludedPackages = [
"tools"
"docgen"
];

ldflags =
let t = "github.com/k3d-io/k3d/v${lib.versions.major version}/version"; in
[ "-s" "-w" "-X ${t}.Version=v${version}" ] ++ lib.optionals k3sVersionSet [ "-X ${t}.K3sVersion=v${k3sVersion}" ];
let
t = "github.com/k3d-io/k3d/v${lib.versions.major version}/version";
in
[
"-s"
"-w"
"-X ${t}.Version=v${version}"
]
++ lib.optionals k3sVersionSet [ "-X ${t}.K3sVersion=v${k3sVersion}" ];

preCheck = ''
# skip test that uses networking
substituteInPlace version/version_test.go \
--replace "TestGetK3sVersion" "SkipGetK3sVersion"
--replace-fail "TestGetK3sVersion" "SkipGetK3sVersion"
'';

postInstall = ''
Expand Down Expand Up @@ -70,7 +81,13 @@ buildGoModule rec {
multi-node k3s cluster on a single machine using docker.
'';
license = licenses.mit;
maintainers = with maintainers; [ kuznero jlesquembre ngerstle jk ricochet ];
maintainers = with maintainers; [
kuznero
jlesquembre
ngerstle
jk
ricochet
];
platforms = platforms.linux ++ platforms.darwin;
};
}

0 comments on commit 1b32844

Please sign in to comment.