go-bindata: Use buildGoModule

This commit is contained in:
Aaron Jheng 2023-01-03 03:31:34 +00:00
parent 54f1ef62b9
commit 4434e57cf7
No known key found for this signature in database
GPG key ID: F6A547A869D050A3

View file

@ -1,20 +1,30 @@
{ lib, buildGoPackage, fetchFromGitHub }:
{ lib, buildGoModule, fetchFromGitHub, fetchpatch }:
buildGoPackage rec {
buildGoModule rec {
pname = "go-bindata";
version = "3.24.0";
goPackagePath = "github.com/kevinburke/go-bindata";
src = fetchFromGitHub {
owner = "kevinburke";
repo = pname;
rev = "v${version}";
sha256 = "sha256-dEfD5oV2nXLVg+a7PlB6LqhEBosG7eTptqKKDWcQAss=";
hash = "sha256-dEfD5oV2nXLVg+a7PlB6LqhEBosG7eTptqKKDWcQAss=";
};
vendorHash = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo=";
patches = [
# Add go modules support
(fetchpatch {
url = "https://github.com/kevinburke/go-bindata/commit/b5c6f880d411b9c24a8ae1c8b608ab80cb9aacb4.patch";
hash = "sha256-dzzp5p+jdg09oo6jeSlms+MMMDWUXpsescj132MT6D8=";
})
];
subPackages = [ "go-bindata" ];
ldflags = [ "-s" "-w" ];
meta = with lib; {
homepage = "https://github.com/kevinburke/go-bindata";
changelog = "https://github.com/kevinburke/go-bindata/blob/v${version}/CHANGELOG.md";