chromium,chromedriver: 129.0.6668.91 -> 129.0.6668.100
[NixPkgs.git] / pkgs / by-name / su / sunpaper / package.nix
blobfa9917a2d2af18cdb7dceff4aa83d81d77a7e13c
1 { lib
2 , stdenvNoCC
3 , fetchFromGitHub
4 , sunwait
5 , wallutils
6 }:
8 stdenvNoCC.mkDerivation (finalAttrs: {
9   pname = "sunpaper";
10   version = "2.1";
12   src = fetchFromGitHub {
13     owner = "hexive";
14     repo = "sunpaper";
15     rev = "v${finalAttrs.version}";
16     hash = "sha256-koCK0ntzRf8OXoUj5DJdPWsFDD8EAMjnGdM1B5oeBBc=";
17   };
19   buildInputs = [
20     sunwait
21     wallutils
22   ];
24   postPatch = ''
25     substituteInPlace sunpaper.sh \
26       --replace-fail "sunwait" "${lib.getExe sunwait}" \
27       --replace-fail "setwallpaper" "${lib.getExe' wallutils "setwallpaper"}" \
28       --replace-fail '$HOME/sunpaper/images/' "$out/share/sunpaper/images/" \
29       --replace-fail '/usr/share' '/etc'
30   '';
32   installPhase = ''
33     runHook preInstall
35     install -Dm555 sunpaper.sh $out/bin/sunpaper
36     mkdir -p "$out/share/sunpaper/images"
37     cp -R images $out/share/sunpaper/
39     runHook postInstall
40   '';
42   doInstallCheck = true;
44   installCheckPhase = ''
45     $out/bin/sunpaper --help > /dev/null
46   '';
48   meta = {
49     description = "Utility to change wallpaper based on local weather, sunrise and sunset times";
50     homepage = "https://github.com/hexive/sunpaper";
51     license = lib.licenses.asl20;
52     mainProgram = "sunpaper";
53     maintainers = with lib.maintainers; [ jevy ];
54     platforms = lib.platforms.linux;
55   };