Files
nixpkgs/pkgs/by-name/fo/forgejo-cli/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

68 lines
1.5 KiB
Nix

{
lib,
stdenv,
rustPlatform,
fetchFromGitea,
pkg-config,
installShellFiles,
writableTmpDirAsHomeHook,
libgit2,
oniguruma,
openssl,
zlib,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "forgejo-cli";
version = "0.3.0";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "Cyborus";
repo = "forgejo-cli";
tag = "v${finalAttrs.version}";
hash = "sha256-8KPR7Fx26hj5glKDjczCLP6GgQBUsA5TpjhO5UZOpik=";
};
cargoHash = "sha256-kW7Pexydkosaufk1e8P5FaY+dgkeeTG5qgJxestWkVs=";
nativeBuildInputs = [
pkg-config
installShellFiles
writableTmpDirAsHomeHook # Needed for shell completions
];
buildInputs = [
libgit2
oniguruma
openssl
zlib
];
env = {
RUSTONIG_SYSTEM_LIBONIG = true;
BUILD_TYPE = "nixpkgs";
};
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd fj \
--bash <($out/bin/fj completion bash) \
--fish <($out/bin/fj completion fish) \
--zsh <($out/bin/fj completion zsh)
'';
meta = {
description = "CLI application for interacting with Forgejo";
homepage = "https://codeberg.org/Cyborus/forgejo-cli";
changelog = "https://codeberg.org/Cyborus/forgejo-cli/releases/tag/v${finalAttrs.version}";
license = with lib.licenses; [
asl20
mit
];
maintainers = with lib.maintainers; [
awwpotato
isabelroses
];
mainProgram = "fj";
};
})