about summary refs log tree commit diff
path: root/pkgs/by-name
diff options
context:
space:
mode:
authorAleksana2024-05-02 18:33:42 +0800
committerGitHub2024-05-02 18:33:42 +0800
commitcfb4e10da71b72b6a3351a2a43df67e40e110642 (patch)
treec8adb1d0ec20b6e164b32885e04c02c6c91d2b3a /pkgs/by-name
parentfa30f48f018cb71dc5d564a2ed722e81833466e9 (diff)
parent038d03ee619c738a16c263864fdce5fec454b5f6 (diff)
Merge pull request #306090 from uncenter/feat/add-license
license-go: init at 5.0.4
Diffstat (limited to 'pkgs/by-name')
-rw-r--r--pkgs/by-name/li/license-go/package.nix36
1 files changed, 36 insertions, 0 deletions
diff --git a/pkgs/by-name/li/license-go/package.nix b/pkgs/by-name/li/license-go/package.nix
new file mode 100644
index 000000000000..2aa87c802070
--- /dev/null
+++ b/pkgs/by-name/li/license-go/package.nix
@@ -0,0 +1,36 @@
+{
+  lib,
+  buildGoModule,
+  fetchFromGitHub,
+}:
+let
+  version = "5.0.4";
+in
+buildGoModule {
+  pname = "license-go";
+  inherit version;
+
+  src = fetchFromGitHub {
+    owner = "nishanths";
+    repo = "license";
+    rev = "v${version}";
+    hash = "sha256-Rz/eIGa3xLjirPMOs4otfmwy4OzJgopKPbka2OKt8Fo=";
+  };
+
+  vendorHash = "sha256-kx3lPhmEo515sHgHBqDC6udz6xkZvB+nn6x3/JaBHbo=";
+
+  ldflags = [
+    "-s"
+    "-w"
+    "-X main.version=${version}"
+    "-X main.builtBy=nixpkgs"
+  ];
+
+  meta = {
+    description = "Command line license text generator";
+    homepage = "https://github.com/nishanths/license";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [ uncenter ];
+    mainProgram = "license";
+  };
+}