diff options
author | maxine <35892750+amaxine@users.noreply.github.com> | 2024-01-22 18:22:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-22 18:22:54 +0100 |
commit | 4a7a8c15a46ce9afca24b4a5572441d0e7a4cbe2 (patch) | |
tree | bcc95474bcc0c46f2bc3d9b38c86bb3d0e4beca9 | |
parent | 50bbfedc661cab1033776ead6b3c44fea5f5085a (diff) | |
parent | a20f6f4acb6926d6f46125c9d989837f9c848bbb (diff) |
Merge pull request #281705 from umlx5h/gtrash-init
gtrash: init at 0.0.5
-rw-r--r-- | maintainers/maintainer-list.nix | 5 | ||||
-rw-r--r-- | pkgs/by-name/gt/gtrash/package.nix | 51 |
2 files changed, 56 insertions, 0 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 8d1584235d846..dbed94efca197 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -19316,6 +19316,11 @@ githubId = 1607770; name = "Ulrik Strid"; }; + umlx5h = { + github = "umlx5h"; + githubId = 20206121; + name = "umlx5h"; + }; unclamped = { name = "Maru"; email = "clear6860@tutanota.com"; diff --git a/pkgs/by-name/gt/gtrash/package.nix b/pkgs/by-name/gt/gtrash/package.nix new file mode 100644 index 0000000000000..aee737aa83dff --- /dev/null +++ b/pkgs/by-name/gt/gtrash/package.nix @@ -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"; + }; +} |