darkman: 1.5.4 -> 2.0.1
https://gitlab.com/WhyNotHugo/darkman/-/blob/main/CHANGELOG.md
This commit is contained in:
parent
57610d2f8f
commit
cb9a16d3b0
@ -1,29 +1,38 @@
|
||||
{ lib, fetchFromGitLab, buildGoModule, scdoc, nix-update-script }:
|
||||
{ lib
|
||||
, fetchFromGitLab
|
||||
, buildGoModule
|
||||
, scdoc
|
||||
, nix-update-script
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "darkman";
|
||||
version = "1.5.4";
|
||||
version = "2.0.1";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "WhyNotHugo";
|
||||
repo = "darkman";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-6SNXVe6EfVwcXH9O6BxNw+v4/uhKhCtVS3XE2GTc2Sc=";
|
||||
sha256 = "sha256-FaEpVy/0PqY5Bmw00hMyFZb9wcwYwEuCKMatYN8Xk3o=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-xEPmNnaDwFU4l2G4cMvtNeQ9KneF5g9ViQSFrDkrafY=";
|
||||
|
||||
nativeBuildInputs = [ scdoc ];
|
||||
patches = [
|
||||
./go-mod.patch
|
||||
./makefile.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace darkman.service \
|
||||
--replace "/usr/bin/darkman" "$out/bin/darkman"
|
||||
--replace-fail /usr/bin/darkman $out/bin/darkman
|
||||
substituteInPlace contrib/dbus/nl.whynothugo.darkman.service \
|
||||
--replace "/usr/bin/darkman" "$out/bin/darkman"
|
||||
--replace-fail /usr/bin/darkman $out/bin/darkman
|
||||
substituteInPlace contrib/dbus/org.freedesktop.impl.portal.desktop.darkman.service \
|
||||
--replace "/usr/bin/darkman" "$out/bin/darkman"
|
||||
--replace-fail /usr/bin/darkman $out/bin/darkman
|
||||
'';
|
||||
|
||||
vendorHash = "sha256-3lILSVm7mtquCdR7+cDMuDpHihG+gDJTcQa1cM2o7ZU=";
|
||||
nativeBuildInputs = [ scdoc ];
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
make build
|
||||
@ -32,6 +41,7 @@ buildGoModule rec {
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dm755 darkman -t $out/bin
|
||||
make PREFIX=$out install
|
||||
runHook postInstall
|
||||
'';
|
||||
|
28
pkgs/applications/misc/darkman/go-mod.patch
Normal file
28
pkgs/applications/misc/darkman/go-mod.patch
Normal file
@ -0,0 +1,28 @@
|
||||
diff --git a/go.mod b/go.mod
|
||||
index 2d396a4..c4fea4b 100644
|
||||
--- a/go.mod
|
||||
+++ b/go.mod
|
||||
@@ -1,14 +1,19 @@
|
||||
module gitlab.com/WhyNotHugo/darkman
|
||||
|
||||
-go 1.16
|
||||
+go 1.18
|
||||
|
||||
require (
|
||||
github.com/adrg/xdg v0.3.3
|
||||
github.com/godbus/dbus/v5 v5.0.4
|
||||
- github.com/kr/pretty v0.2.0 // indirect
|
||||
github.com/rxwycdh/rxhash v0.0.0-20230131062142-10b7a38b400d
|
||||
github.com/sj14/astral v0.1.2
|
||||
- github.com/spf13/cobra v1.7.0 // indirect
|
||||
- gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
|
||||
+ github.com/spf13/cobra v1.7.0
|
||||
gopkg.in/yaml.v3 v3.0.1
|
||||
)
|
||||
+
|
||||
+require (
|
||||
+ github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||
+ github.com/kr/pretty v0.2.0 // indirect
|
||||
+ github.com/spf13/pflag v1.0.5 // indirect
|
||||
+ gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
|
||||
+)
|
12
pkgs/applications/misc/darkman/makefile.patch
Normal file
12
pkgs/applications/misc/darkman/makefile.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 9048e45..0fb1f5a 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -26,7 +26,6 @@ site/index.html: darkman.1
|
||||
mandoc -T html -O style=man-style.css < darkman.1 > site/index.html
|
||||
|
||||
install: build
|
||||
- @install -Dm755 darkman ${DESTDIR}${PREFIX}/bin/darkman
|
||||
@install -Dm644 darkman.service ${DESTDIR}${PREFIX}/lib/systemd/user/darkman.service
|
||||
@install -Dm644 darkman.1 ${DESTDIR}${PREFIX}/share/man/man1/darkman.1
|
||||
@install -Dm644 LICENCE ${DESTDIR}${PREFIX}/share/licenses/darkman/LICENCE
|
Loading…
Reference in New Issue
Block a user