massren: use buildGoModule
This commit is contained in:
parent
097c115f02
commit
3c6b84a2ce
|
@ -1,6 +1,6 @@
|
||||||
{ lib, buildGoPackage, fetchFromGitHub }:
|
{ lib, buildGoModule, fetchFromGitHub, fetchpatch }:
|
||||||
|
|
||||||
buildGoPackage rec {
|
buildGoModule rec {
|
||||||
pname = "massren";
|
pname = "massren";
|
||||||
version = "1.5.6";
|
version = "1.5.6";
|
||||||
|
|
||||||
|
@ -8,10 +8,32 @@ buildGoPackage rec {
|
||||||
owner = "laurent22";
|
owner = "laurent22";
|
||||||
repo = "massren";
|
repo = "massren";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-17y+vmspvZKKRRaEwzP3Zya4r/z+2aSGG6oNZiA8D64=";
|
hash = "sha256-17y+vmspvZKKRRaEwzP3Zya4r/z+2aSGG6oNZiA8D64=";
|
||||||
};
|
};
|
||||||
|
|
||||||
goPackagePath = "github.com/laurent22/massren";
|
vendorHash = null;
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Add Go Modules support
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/laurent22/massren/commit/83df215b6e112d1ec375b08d8c44dadc5107155d.patch";
|
||||||
|
hash = "sha256-FMTmUrv6zGq11vexUirAuK3H6r78RtoipqyWoh+pzrs=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
ldflags = [ "-s" "-w" ];
|
||||||
|
|
||||||
|
preCheck =
|
||||||
|
let
|
||||||
|
skippedTests = [
|
||||||
|
# Possible error about github.com/mattn/go-sqlite3
|
||||||
|
"Test_guessEditorCommand"
|
||||||
|
"Test_processFileActions"
|
||||||
|
];
|
||||||
|
in
|
||||||
|
''
|
||||||
|
buildFlagsArray+=("-run" "[^(${builtins.concatStringsSep "|" skippedTests})]")
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Easily rename multiple files using your text editor";
|
description = "Easily rename multiple files using your text editor";
|
||||||
|
|
Loading…
Reference in a new issue