blob: 66b67be5b6075774c8ef8294e0f1e15fa76846a8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
{ lib
, fetchFromGitLab
, buildGoModule
, scdoc
, nix-update-script
}:
buildGoModule rec {
pname = "darkman";
version = "2.0.1";
src = fetchFromGitLab {
owner = "WhyNotHugo";
repo = "darkman";
rev = "v${version}";
hash = "sha256-FaEpVy/0PqY5Bmw00hMyFZb9wcwYwEuCKMatYN8Xk3o=";
};
patches = [
./go-mod.patch
./makefile.patch
];
postPatch = ''
substituteInPlace darkman.service \
--replace-fail /usr/bin/darkman $out/bin/darkman
substituteInPlace contrib/dbus/nl.whynothugo.darkman.service \
--replace-fail /usr/bin/darkman $out/bin/darkman
substituteInPlace contrib/dbus/org.freedesktop.impl.portal.desktop.darkman.service \
--replace-fail /usr/bin/darkman $out/bin/darkman
'';
vendorHash = "sha256-3lILSVm7mtquCdR7+cDMuDpHihG+gDJTcQa1cM2o7ZU=";
nativeBuildInputs = [ scdoc ];
buildPhase = ''
runHook preBuild
make build
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm755 darkman -t $out/bin
make PREFIX=$out install
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "Framework for dark-mode and light-mode transitions on Linux desktop";
homepage = "https://gitlab.com/WhyNotHugo/darkman";
license = licenses.isc;
maintainers = [ maintainers.ajgrf ];
platforms = platforms.linux;
mainProgram = "darkman";
};
}
|