Merge pull request #281705 from umlx5h/gtrash-init

gtrash: init at 0.0.5
This commit is contained in:
maxine 2024-01-22 18:22:54 +01:00 committed by GitHub
commit 4a7a8c15a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 56 additions and 0 deletions

View File

@ -19316,6 +19316,11 @@
githubId = 1607770;
name = "Ulrik Strid";
};
umlx5h = {
github = "umlx5h";
githubId = 20206121;
name = "umlx5h";
};
unclamped = {
name = "Maru";
email = "clear6860@tutanota.com";

View File

@ -0,0 +1,51 @@
{ lib
, buildGoModule
, fetchFromGitHub
, installShellFiles
}:
buildGoModule rec {
pname = "gtrash";
version = "0.0.5";
src = fetchFromGitHub {
owner = "umlx5h";
repo = "gtrash";
rev = "v${version}";
hash = "sha256-5+wcrU2mx/ZawMCSCU4xddMlMVpoIW/Duv7XqUVIDoo=";
};
vendorHash = "sha256-iWNuPxetYH9xJpf3WMoA5c50kII9DUpWvhTVSE1kSk0=";
subPackages = [ "." ];
# disabled because it is required to run on docker.
doCheck = false;
CGO_ENABLED = 0;
GOFLAGS = [ "-trimpath" ];
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
"-X main.builtBy=nixpkgs"
];
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
installShellCompletion --cmd gtrash \
--bash <($out/bin/gtrash completion bash) \
--fish <($out/bin/gtrash completion fish) \
--zsh <($out/bin/gtrash completion zsh)
'';
meta = with lib; {
description = "A Trash CLI manager written in Go";
homepage = "https://github.com/umlx5h/gtrash";
changelog = "https://github.com/umlx5h/gtrash/releases/tag/v${version}";
license = licenses.mit;
maintainers = with maintainers; [ umlx5h ];
mainProgram = "gtrash";
};
}