python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / applications / misc / darkman / default.nix
blob22ed4bea8eefa91c2cd42a99a6f458902875108f
1 { lib, fetchFromGitLab, buildGoModule, scdoc, nix-update-script }:
3 buildGoModule rec {
4   pname = "darkman";
5   version = "1.4.0";
7   src = fetchFromGitLab {
8     owner = "WhyNotHugo";
9     repo = "darkman";
10     rev = "v${version}";
11     sha256 = "sha256-Q/pjQmlyREl32C0LiwypEz1qBw2AeBOZbUIwNP392Sc=";
12   };
14   vendorSha256 = "09rjqw6v1jaf0mhmycw9mcay9q0y1fya2azj8216gdgkl48ics08";
16   nativeBuildInputs = [ scdoc ];
18   postPatch = ''
19     substituteInPlace darkman.service \
20       --replace "/usr/bin/darkman" "$out/bin/darkman"
21     substituteInPlace contrib/dbus/nl.whynothugo.darkman.service \
22       --replace "/usr/bin/darkman" "$out/bin/darkman"
23     substituteInPlace contrib/dbus/org.freedesktop.impl.portal.desktop.darkman.service \
24       --replace "/usr/bin/darkman" "$out/bin/darkman"
25   '';
27   buildPhase = ''
28     runHook preBuild
29     make build
30     runHook postBuild
31   '';
33   installPhase = ''
34     runHook preInstall
35     make PREFIX=$out install
36     runHook postInstall
37   '';
39   passthru.updateScript = nix-update-script {
40     attrPath = pname;
41   };
43   meta = with lib; {
44     description = "Framework for dark-mode and light-mode transitions on Linux desktop";
45     homepage = "https://gitlab.com/WhyNotHugo/darkman";
46     license = licenses.isc;
47     maintainers = [ maintainers.ajgrf ];
48   };