nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at release-22.11 51 lines 1.2 kB view raw
1{ lib 2, stdenv 3, fetchurl 4, gawk 5, git 6, gnugrep 7, installShellFiles 8, jre 9, makeWrapper 10, crowdin-cli 11, testers 12, unzip 13}: 14 15stdenv.mkDerivation rec { 16 pname = "crowdin-cli"; 17 version = "3.9.1"; 18 19 src = fetchurl { 20 url = "https://github.com/crowdin/${pname}/releases/download/${version}/${pname}.zip"; 21 sha256 = "sha256-n5eDe29+HhH4YHNLzRhIpx2ceH1pw0TaXdTtVZYNT48="; 22 }; 23 24 nativeBuildInputs = [ installShellFiles makeWrapper unzip ]; 25 26 installPhase = '' 27 runHook preInstall 28 29 install -D crowdin-cli.jar $out/lib/crowdin-cli.jar 30 31 installShellCompletion --cmd crowdin --bash ./crowdin_completion 32 33 makeWrapper ${jre}/bin/java $out/bin/crowdin \ 34 --argv0 crowdin \ 35 --add-flags "-jar $out/lib/crowdin-cli.jar" \ 36 --prefix PATH : ${lib.makeBinPath [ gawk gnugrep git ]} 37 38 runHook postInstall 39 ''; 40 41 passthru.tests.version = testers.testVersion { package = crowdin-cli; }; 42 43 meta = with lib; { 44 mainProgram = "crowdin"; 45 homepage = "https://github.com/crowdin/crowdin-cli/"; 46 description = "A command-line client for the Crowdin API"; 47 sourceProvenance = with sourceTypes; [ binaryBytecode ]; 48 license = licenses.mit; 49 maintainers = with maintainers; [ DamienCassou ]; 50 }; 51}