Files
nixpkgs/pkgs/by-name/do/doctl/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

56 lines
1.2 KiB
Nix

{
stdenv,
lib,
buildGoModule,
fetchFromGitHub,
installShellFiles,
buildPackages,
}:
buildGoModule rec {
pname = "doctl";
version = "1.145.0";
vendorHash = null;
doCheck = false;
subPackages = [ "cmd/doctl" ];
ldflags =
let
t = "github.com/digitalocean/doctl";
in
[
"-X ${t}.Major=${lib.versions.major version}"
"-X ${t}.Minor=${lib.versions.minor version}"
"-X ${t}.Patch=${lib.versions.patch version}"
"-X ${t}.Label=release"
];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
export HOME=$(mktemp -d) # attempts to write to /homeless-shelter
for shell in bash fish zsh; do
${stdenv.hostPlatform.emulator buildPackages} $out/bin/doctl completion $shell > doctl.$shell
installShellCompletion doctl.$shell
done
'';
src = fetchFromGitHub {
owner = "digitalocean";
repo = "doctl";
tag = "v${version}";
hash = "sha256-JeIpx+i1JDVfJqCKTZMTJ7rDMGO4yA/eR56C3qr08zg=";
};
meta = {
description = "Command line tool for DigitalOcean services";
mainProgram = "doctl";
homepage = "https://github.com/digitalocean/doctl";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.siddharthist ];
};
}