mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 08:43:06 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
49 lines
1.5 KiB
Nix
49 lines
1.5 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, installShellFiles
|
|
, stdenv
|
|
}:
|
|
|
|
buildGoModule rec {
|
|
pname = "zarf";
|
|
version = "0.41.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "defenseunicorns";
|
|
repo = "zarf";
|
|
rev = "v${version}";
|
|
hash = "sha256-rY9xWqJ+2Yfs6VRHTF89LmuEruAavDI7MgBm4UFEuBs=";
|
|
};
|
|
|
|
vendorHash = "sha256-Cz+w0tOEamCxf61hvQ03X/kXPY+qrmdBN8s26lr/wZ8=";
|
|
proxyVendor = true;
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
preBuild = ''
|
|
mkdir -p build/ui
|
|
touch build/ui/index.html
|
|
'';
|
|
|
|
doCheck = false;
|
|
|
|
ldflags = [ "-s" "-w" "-X" "github.com/defenseunicorns/zarf/src/config.CLIVersion=${src.rev}" "-X" "k8s.io/component-base/version.gitVersion=v0.0.0+zarf${src.rev}" "-X" "k8s.io/component-base/version.gitCommit=${src.rev}" "-X" "k8s.io/component-base/version.buildDate=1970-01-01T00:00:00Z" ];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
export K9S_LOGS_DIR=$(mktemp -d)
|
|
installShellCompletion --cmd zarf \
|
|
--bash <($out/bin/zarf completion --no-log-file bash) \
|
|
--fish <($out/bin/zarf completion --no-log-file fish) \
|
|
--zsh <($out/bin/zarf completion --no-log-file zsh)
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "DevSecOps for Air Gap & Limited-Connection Systems. https://zarf.dev";
|
|
mainProgram = "zarf";
|
|
homepage = "https://github.com/defenseunicorns/zarf.git";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ ragingpastry ];
|
|
};
|
|
}
|