Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
58 lines
1.3 KiB
Nix
58 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
stdenvNoCC,
|
|
fetchFromGitHub,
|
|
sunwait,
|
|
wallutils,
|
|
}:
|
|
|
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
|
pname = "sunpaper";
|
|
version = "2.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "hexive";
|
|
repo = "sunpaper";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-koCK0ntzRf8OXoUj5DJdPWsFDD8EAMjnGdM1B5oeBBc=";
|
|
};
|
|
|
|
buildInputs = [
|
|
sunwait
|
|
wallutils
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace sunpaper.sh \
|
|
--replace-fail "sunwait" "${lib.getExe sunwait}" \
|
|
--replace-fail "setwallpaper" "${lib.getExe' wallutils "setwallpaper"}" \
|
|
--replace-fail '$HOME/sunpaper/images/' "$out/share/sunpaper/images/" \
|
|
--replace-fail '/usr/share' '/etc'
|
|
'';
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -Dm555 sunpaper.sh $out/bin/sunpaper
|
|
mkdir -p "$out/share/sunpaper/images"
|
|
cp -R images $out/share/sunpaper/
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
doInstallCheck = true;
|
|
|
|
installCheckPhase = ''
|
|
$out/bin/sunpaper --help > /dev/null
|
|
'';
|
|
|
|
meta = {
|
|
description = "Utility to change wallpaper based on local weather, sunrise and sunset times";
|
|
homepage = "https://github.com/hexive/sunpaper";
|
|
license = lib.licenses.asl20;
|
|
mainProgram = "sunpaper";
|
|
maintainers = with lib.maintainers; [ jevy ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
})
|