2022-09-09 14:08:57 +00:00
|
|
|
{ lib, fetchFromGitLab, buildGoModule, scdoc, nix-update-script }:
|
|
|
|
|
|
|
|
buildGoModule rec {
|
|
|
|
pname = "darkman";
|
2023-02-16 17:41:37 +00:00
|
|
|
version = "1.5.4";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "WhyNotHugo";
|
|
|
|
repo = "darkman";
|
|
|
|
rev = "v${version}";
|
2023-02-16 17:41:37 +00:00
|
|
|
sha256 = "sha256-6SNXVe6EfVwcXH9O6BxNw+v4/uhKhCtVS3XE2GTc2Sc=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
vendorHash = "sha256-xEPmNnaDwFU4l2G4cMvtNeQ9KneF5g9ViQSFrDkrafY=";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ scdoc ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace darkman.service \
|
|
|
|
--replace "/usr/bin/darkman" "$out/bin/darkman"
|
|
|
|
substituteInPlace contrib/dbus/nl.whynothugo.darkman.service \
|
|
|
|
--replace "/usr/bin/darkman" "$out/bin/darkman"
|
|
|
|
substituteInPlace contrib/dbus/org.freedesktop.impl.portal.desktop.darkman.service \
|
|
|
|
--replace "/usr/bin/darkman" "$out/bin/darkman"
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
make build
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
make PREFIX=$out install
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
passthru.updateScript = nix-update-script { };
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
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 ];
|
2022-11-21 17:40:18 +00:00
|
|
|
platforms = platforms.linux;
|
2023-11-16 04:20:00 +00:00
|
|
|
mainProgram = "darkman";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
}
|