nixpkgs/pkgs/tools/text/crowdin-cli/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.2 KiB
Nix
Raw Normal View History

2021-08-08 18:31:30 +00:00
{ lib
, stdenv
, fetchurl
, gawk
, git
, gnugrep
, installShellFiles
, jre
, makeWrapper
, crowdin-cli
, testers
2021-08-08 18:31:30 +00:00
, unzip
}:
stdenv.mkDerivation rec {
pname = "crowdin-cli";
2022-11-17 23:19:38 +00:00
version = "3.9.1";
2021-08-08 18:31:30 +00:00
src = fetchurl {
url = "https://github.com/crowdin/${pname}/releases/download/${version}/${pname}.zip";
2022-11-17 23:19:38 +00:00
sha256 = "sha256-n5eDe29+HhH4YHNLzRhIpx2ceH1pw0TaXdTtVZYNT48=";
2021-08-08 18:31:30 +00:00
};
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 = crowdin-cli; };
2021-08-08 18:31:30 +00:00
meta = with lib; {
mainProgram = "crowdin";
2021-08-08 18:31:30 +00:00
homepage = "https://github.com/crowdin/crowdin-cli/";
description = "A command-line client for the Crowdin API";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
2021-08-08 18:31:30 +00:00
license = licenses.mit;
maintainers = with maintainers; [ DamienCassou ];
};
}