at master 44 lines 1.1 kB view raw
1{ 2 fetchFromGitea, 3 installShellFiles, 4 lib, 5 openssl, 6 pkg-config, 7 rustPlatform, 8 stdenv, 9}: 10rustPlatform.buildRustPackage rec { 11 pname = "codeberg-cli"; 12 version = "0.5.1"; 13 14 src = fetchFromGitea { 15 domain = "codeberg.org"; 16 owner = "Aviac"; 17 repo = "codeberg-cli"; 18 rev = "v${version}"; 19 hash = "sha256-81435dgw7fy4igUN3TYNjRans8uRZ/6TQWBxu0benwU="; 20 }; 21 22 cargoHash = "sha256-1E7UuDbJKrnhMQI6trk7nHkeywCPFg1021pQhRcb4kQ="; 23 nativeBuildInputs = [ 24 pkg-config 25 installShellFiles 26 ]; 27 28 buildInputs = [ openssl ]; 29 30 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 31 installShellCompletion --cmd berg \ 32 --bash <($out/bin/berg completion bash) \ 33 --fish <($out/bin/berg completion fish) \ 34 --zsh <($out/bin/berg completion zsh) 35 ''; 36 37 meta = with lib; { 38 description = "CLI Tool for Codeberg similar to gh and glab"; 39 homepage = "https://codeberg.org/Aviac/codeberg-cli"; 40 license = with licenses; [ agpl3Plus ]; 41 maintainers = with maintainers; [ robwalt ]; 42 mainProgram = "berg"; 43 }; 44}