Skip to content

Commit 36ea4a4

Browse files
Merge pull request #215987 from RobWalt/cod
2 parents ce7cd06 + b5daaee commit 36ea4a4

3 files changed

Lines changed: 52 additions & 0 deletions

File tree

maintainers/maintainer-list.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14228,6 +14228,12 @@
1422814228
githubId = 1069318;
1422914229
name = "Robin Lambertz";
1423014230
};
14231+
robwalt = {
14232+
email = "robwalter96@gmail.com";
14233+
github = "robwalt";
14234+
githubId = 26892280;
14235+
name = "Robert Walter";
14236+
};
1423114237
roconnor = {
1423214238
email = "roconnor@theorem.ca";
1423314239
github = "roconnor";
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{ lib
2+
, CoreServices
3+
, Security
4+
, fetchFromGitea
5+
, installShellFiles
6+
, openssl
7+
, pkg-config
8+
, rustPlatform
9+
, stdenv
10+
}:
11+
rustPlatform.buildRustPackage rec {
12+
pname = "codeberg-cli";
13+
version = "0.3.5";
14+
15+
src = fetchFromGitea {
16+
domain = "codeberg.org";
17+
owner = "RobWalt";
18+
repo = "codeberg-cli";
19+
rev = "v${version}";
20+
hash = "sha256-KjH78yqfZoN24TBYyFZuxf7z9poRov0uFYQ8+eq9p/o=";
21+
};
22+
23+
cargoHash = "sha256-RE4Zwa5vUWPc42w5GaaYkS6fLIbges1fAsOUuwqR2ag=";
24+
nativeBuildInputs = [ pkg-config installShellFiles ];
25+
26+
buildInputs = [ openssl ]
27+
++ lib.optionals stdenv.isDarwin [ CoreServices Security ];
28+
29+
postInstall = ''
30+
installShellCompletion --cmd berg \
31+
--bash <($out/bin/berg completion bash) \
32+
--fish <($out/bin/berg completion fish) \
33+
--zsh <($out/bin/berg completion zsh)
34+
'';
35+
36+
meta = with lib; {
37+
description = "CLI Tool for Codeberg similar to gh and glab";
38+
homepage = "https://codeberg.org/RobWalt/codeberg-cli";
39+
license = with licenses; [ agpl3Plus ];
40+
maintainers = with maintainers; [ robwalt ];
41+
};
42+
}

pkgs/top-level/all-packages.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,10 @@ with pkgs;
475475
inherit (darwin.apple_sdk.frameworks) Security;
476476
};
477477

478+
codeberg-cli = callPackage ../applications/version-management/codeberg-cli {
479+
inherit (darwin.apple_sdk.frameworks) Security CoreServices;
480+
};
481+
478482
conftest = callPackage ../development/tools/conftest { };
479483

480484
coldsnap = callPackage ../tools/admin/coldsnap {

0 commit comments

Comments
 (0)