Files
nixpkgs/pkgs/by-name/cr/crowdin-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

62 lines
1.3 KiB
Nix

{
lib,
stdenv,
fetchurl,
gawk,
git,
gnugrep,
installShellFiles,
jre,
makeWrapper,
testers,
unzip,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "crowdin-cli";
version = "4.11.0";
src = fetchurl {
url = "https://github.com/crowdin/crowdin-cli/releases/download/${finalAttrs.version}/crowdin-cli.zip";
hash = "sha256-5nQq/p6Zd/CC9Qqwwxk3Cu3CoCL2eNgNGHVC3pRGnVI=";
};
nativeBuildInputs = [
installShellFiles
makeWrapper
unzip
];
installPhase = ''
runHook preInstall
install -D crowdin-cli.jar $out/lib/crowdin-cli.jar
installShellCompletion --cmd crowdin --bash ./crowdin_completion
makeWrapper ${jre}/bin/java $out/bin/crowdin \
--argv0 crowdin \
--add-flags "-jar $out/lib/crowdin-cli.jar" \
--prefix PATH : ${
lib.makeBinPath [
gawk
gnugrep
git
]
}
runHook postInstall
'';
passthru.tests.version = testers.testVersion { package = finalAttrs.finalPackage; };
meta = with lib; {
mainProgram = "crowdin";
homepage = "https://github.com/crowdin/crowdin-cli/";
description = "Command-line client for the Crowdin API";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.mit;
maintainers = with maintainers; [ DamienCassou ];
};
})