nixpkgs/pkgs/applications/misc/darkman/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

60 lines
1.4 KiB
Nix
Raw Normal View History

{ lib
, fetchFromGitLab
, buildGoModule
, scdoc
, nix-update-script
}:
2022-08-24 22:15:39 +00:00
buildGoModule rec {
pname = "darkman";
version = "2.0.1";
2022-08-24 22:15:39 +00:00
src = fetchFromGitLab {
owner = "WhyNotHugo";
repo = "darkman";
rev = "v${version}";
hash = "sha256-FaEpVy/0PqY5Bmw00hMyFZb9wcwYwEuCKMatYN8Xk3o=";
2022-08-24 22:15:39 +00:00
};
patches = [
./go-mod.patch
./makefile.patch
];
2022-08-24 22:15:39 +00:00
postPatch = ''
substituteInPlace darkman.service \
--replace-fail /usr/bin/darkman $out/bin/darkman
2022-08-24 22:15:39 +00:00
substituteInPlace contrib/dbus/nl.whynothugo.darkman.service \
--replace-fail /usr/bin/darkman $out/bin/darkman
2022-08-24 22:15:39 +00:00
substituteInPlace contrib/dbus/org.freedesktop.impl.portal.desktop.darkman.service \
--replace-fail /usr/bin/darkman $out/bin/darkman
2022-08-24 22:15:39 +00:00
'';
vendorHash = "sha256-3lILSVm7mtquCdR7+cDMuDpHihG+gDJTcQa1cM2o7ZU=";
nativeBuildInputs = [ scdoc ];
2022-08-24 22:15:39 +00:00
buildPhase = ''
runHook preBuild
make build
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm755 darkman -t $out/bin
2022-08-24 22:15:39 +00:00
make PREFIX=$out install
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
2022-08-24 22:15:39 +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-14 10:44:34 +00:00
platforms = platforms.linux;
2023-10-22 18:58:36 +00:00
mainProgram = "darkman";
2022-08-24 22:15:39 +00:00
};
}