about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/github/github-release/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-03-22 16:41:59 +0100
committerAlyssa Ross <hi@alyssa.is>2024-03-22 16:41:59 +0100
commit46a88117a05c3469af5d99433af140c3de8ca088 (patch)
treed7f0557756d8f07a3081b3498c05ddc5a8ad429d /nixpkgs/pkgs/development/tools/github/github-release/default.nix
parente97457545cea0b2ca421da257c83d8f1ef451d85 (diff)
parenta343533bccc62400e8a9560423486a3b6c11a23b (diff)
downloadnixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar
nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.gz
nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.bz2
nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.lz
nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.xz
nixlib-46a88117a05c3469af5d99433af140c3de8ca088.tar.zst
nixlib-46a88117a05c3469af5d99433af140c3de8ca088.zip
Merge commit 'a343533bccc62400e8a9560423486a3b6c11a23b'
Diffstat (limited to 'nixpkgs/pkgs/development/tools/github/github-release/default.nix')
-rw-r--r--nixpkgs/pkgs/development/tools/github/github-release/default.nix30
1 files changed, 26 insertions, 4 deletions
diff --git a/nixpkgs/pkgs/development/tools/github/github-release/default.nix b/nixpkgs/pkgs/development/tools/github/github-release/default.nix
index 4326d4bf71ca..40fe1575d045 100644
--- a/nixpkgs/pkgs/development/tools/github/github-release/default.nix
+++ b/nixpkgs/pkgs/development/tools/github/github-release/default.nix
@@ -1,6 +1,6 @@
-{ buildGoPackage, fetchFromGitHub, lib }:
+{ buildGoModule, fetchFromGitHub, fetchpatch, lib, testers, github-release }:
 
-buildGoPackage rec {
+buildGoModule rec {
   pname = "github-release";
   version = "0.10.0";
 
@@ -8,10 +8,32 @@ buildGoPackage rec {
     owner = "github-release";
     repo = "github-release";
     rev = "v${version}";
-    sha256 = "sha256-J5Y0Kvon7DstTueCsoYvw6x4cOH/C1IaVArE0bXtZts=";
+    hash = "sha256-J5Y0Kvon7DstTueCsoYvw6x4cOH/C1IaVArE0bXtZts=";
   };
 
-  goPackagePath = "github.com/github-release/github-release";
+  vendorHash = null;
+
+  patches = [
+    # Update version info
+    (fetchpatch {
+      url = "https://github.com/github-release/github-release/commit/ee13bb17b74135bfe646d9be1807a6bc577ba7c6.patch";
+      hash = "sha256-9ZcHwai0HOgapDcpvn3xssrVP9cuNAz9rTgrR4Jfdfg=";
+    })
+
+    # Add Go Modules support.
+    # See https://github.com/Homebrew/homebrew-core/pull/162414.
+    (fetchpatch {
+      url = "https://github.com/github-release/github-release/pull/129/commits/074f4e8e1688642f50a7a3cc92b5777c7b484139.patch";
+      hash = "sha256-OBFbOvNhqcNiuSCP0AfClntj7y5habn+r2eBkmClsgI=";
+    })
+  ];
+
+  ldflags = [ "-s" "-w" ];
+
+  passthru.tests.version = testers.testVersion {
+    package = github-release;
+    version = "v${version}";
+  };
 
   meta = with lib; {
     description = "Commandline app to create and edit releases on Github (and upload artifacts)";