chore: migrate to by-name package
This commit is contained in:
parent
7ad57dac80
commit
735fffa17b
@ -1,53 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
CoreServices,
|
||||
Security,
|
||||
fetchFromGitea,
|
||||
installShellFiles,
|
||||
openssl,
|
||||
pkg-config,
|
||||
rustPlatform,
|
||||
stdenv,
|
||||
}:
|
||||
rustPlatform.buildRustPackage (
|
||||
finalAttrs: {
|
||||
pname = "codeberg-cli";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "RobWalt";
|
||||
repo = "codeberg-cli";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-g5V3Noqh7Y9v/t/dt7n45/NblqNtpZCKELPc9DOkb8A=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-zTg/3PcFWzBmKZA7lRIpM3P03d1qpNVBczqWFbnxpic=";
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
installShellFiles
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
[ openssl ]
|
||||
++ lib.optionals stdenv.isDarwin [
|
||||
CoreServices
|
||||
Security
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd berg \
|
||||
--bash <($out/bin/berg completion bash) \
|
||||
--fish <($out/bin/berg completion fish) \
|
||||
--zsh <($out/bin/berg completion zsh)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "CLI Tool for Codeberg similar to gh and glab";
|
||||
homepage = "https://codeberg.org/RobWalt/codeberg-cli";
|
||||
license = with licenses; [ agpl3Plus ];
|
||||
maintainers = with maintainers; [ robwalt ];
|
||||
mainProgram = "berg";
|
||||
};
|
||||
}
|
||||
)
|
55
pkgs/by-name/co/codeberg-cli/package.nix
Normal file
55
pkgs/by-name/co/codeberg-cli/package.nix
Normal file
@ -0,0 +1,55 @@
|
||||
{
|
||||
darwin,
|
||||
fetchFromGitea,
|
||||
installShellFiles,
|
||||
lib,
|
||||
openssl,
|
||||
pkg-config,
|
||||
rustPlatform,
|
||||
stdenv,
|
||||
}:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "codeberg-cli";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchFromGitea {
|
||||
domain = "codeberg.org";
|
||||
owner = "RobWalt";
|
||||
repo = "codeberg-cli";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-g5V3Noqh7Y9v/t/dt7n45/NblqNtpZCKELPc9DOkb8A=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-zTg/3PcFWzBmKZA7lRIpM3P03d1qpNVBczqWFbnxpic=";
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
installShellFiles
|
||||
];
|
||||
|
||||
buildInputs =
|
||||
[ openssl ]
|
||||
++ lib.optionals stdenv.isDarwin (
|
||||
let
|
||||
d = darwin.apple_sdk.frameworks;
|
||||
in
|
||||
[
|
||||
d.CoreServices
|
||||
d.Security
|
||||
]
|
||||
);
|
||||
|
||||
postInstall = ''
|
||||
installShellCompletion --cmd berg \
|
||||
--bash <($out/bin/berg completion bash) \
|
||||
--fish <($out/bin/berg completion fish) \
|
||||
--zsh <($out/bin/berg completion zsh)
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "CLI Tool for Codeberg similar to gh and glab";
|
||||
homepage = "https://codeberg.org/RobWalt/codeberg-cli";
|
||||
license = with licenses; [ agpl3Plus ];
|
||||
maintainers = with maintainers; [ robwalt ];
|
||||
mainProgram = "berg";
|
||||
};
|
||||
}
|
@ -504,10 +504,6 @@ with pkgs;
|
||||
inherit (darwin.apple_sdk.frameworks) Security;
|
||||
};
|
||||
|
||||
codeberg-cli = callPackage ../applications/version-management/codeberg-cli {
|
||||
inherit (darwin.apple_sdk.frameworks) Security CoreServices;
|
||||
};
|
||||
|
||||
conftest = callPackage ../development/tools/conftest { };
|
||||
|
||||
coldsnap = callPackage ../tools/admin/coldsnap {
|
||||
|
Loading…
Reference in New Issue
Block a user