3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #174156 from jevy/sunpaper

sunpaper: init at unstable-2022-04-01
This commit is contained in:
ckie 2022-06-11 20:51:40 +03:00 committed by GitHub
commit 4d63c8b732
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 59 additions and 0 deletions

View file

@ -5960,6 +5960,12 @@
githubId = 1667473;
name = "Jethro Kuan";
};
jevy = {
email = "jevin@quickjack.ca";
github = "jevy";
githubId = 110620;
name = "Jevin Maltais";
};
jfb = {
email = "james@yamtime.com";
github = "tftio";

View file

@ -0,0 +1,51 @@
{ lib
, stdenvNoCC
, fetchFromGitHub
, sunwait
, wallutils
, rPackages
}:
stdenvNoCC.mkDerivation rec {
pname = "sunpaper";
version = "unstable-2022-04-01";
src = fetchFromGitHub {
owner = "hexive";
repo = "sunpaper";
rev = "8d518dfddb5e80215ef3b884ff009df1d4bb74c2";
sha256 = "sCG7igD2ZwfHoRpR3Kw7dAded4hG2RbMLR/9nH+nZh8=";
};
buildInputs = [
wallutils
sunwait
];
postPatch = ''
substituteInPlace sunpaper.sh \
--replace "sunwait" "${sunwait}/bin/sunwait" \
--replace "setwallpaper" "${wallutils}/bin/setwallpaper" \
--replace '$HOME/sunpaper/images/' "$out/share/sunpaper/images/"
'';
installPhase = ''
mkdir -p "$out/bin" "$out/share/sunpaper/images"
cp sunpaper.sh $out/bin/sunpaper
cp -R images $out/share/sunpaper/
'';
doInstallCheck = true;
installCheckPhase = ''
$out/bin/sunpaper --help > /dev/null
'';
meta = with lib; {
description = "A utility to change wallpaper based on local weather, sunrise and sunset times";
homepage = "https://github.com/hexive/sunpaper";
license = lib.licenses.unfree;
maintainers = with maintainers; [ jevy ];
platforms = platforms.unix;
};
}

View file

@ -10508,6 +10508,8 @@ with pkgs;
sunwait = callPackage ../applications/misc/sunwait { };
sunpaper = callPackage ../tools/X11/sunpaper { };
surface-control = callPackage ../applications/misc/surface-control { };
syntex = callPackage ../tools/graphics/syntex {};