From 1b8431ab0d2bed46410ecbe6871509332655d5d1 Mon Sep 17 00:00:00 2001 From: isabel Date: Mon, 15 Apr 2024 08:36:57 +0100 Subject: [PATCH] fork-cleaner: init at 2.3.1 --- pkgs/by-name/fo/fork-cleaner/package.nix | 41 ++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 pkgs/by-name/fo/fork-cleaner/package.nix diff --git a/pkgs/by-name/fo/fork-cleaner/package.nix b/pkgs/by-name/fo/fork-cleaner/package.nix new file mode 100644 index 000000000000..30a670ab189b --- /dev/null +++ b/pkgs/by-name/fo/fork-cleaner/package.nix @@ -0,0 +1,41 @@ +{ + lib, + buildGoModule, + fetchFromGitHub, +}: +let + version = "2.3.1"; +in +buildGoModule { + name = "fork-cleaner"; + inherit version; + + src = fetchFromGitHub { + owner = "caarlos0"; + repo = "fork-cleaner"; + rev = "v${version}"; + sha256 = "sha256-JNmpcDwmxR+s4regOWz8FAJllBNRfOCmVwkDs7tlChA="; + }; + + vendorHash = "sha256-QuIaXXkch5PCpX8P755X8j7MeNnbewWo7NB+Vue1/Pk="; + + # allowGoRefence adds the flag `-trimpath` which is also denoted by, fork-cleaner goreleaser config + # + allowGoReference = true; + + ldflags = [ + "-s" + "-w" + "-X main.version=${version}" + "-X main.builtBy=nixpkgs" + ]; + + meta = { + description = "Quickly clean up unused forks on your GitHub account"; + homepage = "https://github.com/caarlos0/fork-cleaner"; + changelog = "https://github.com/caarlos0/fork-cleaner/releases/tag/${version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ isabelroses ]; + mainProgram = "fork-cleaner"; + }; +}