1{ lib, stdenv, fetchFromGitHub }:
2
3stdenv.mkDerivation (finalAttrs: {
4 pname = "sunwait";
5 version = "0.9.1";
6
7 src = fetchFromGitHub {
8 owner = "risacher";
9 repo = "sunwait";
10 rev = finalAttrs.version;
11 hash = "sha256-v2cNjecJ4SstOsvDe/Lu0oOyBd8I8LMHZIH+f9ZC7Fc=";
12 };
13
14 makeFlags = [ "C=${stdenv.cc.targetPrefix}c++" ];
15
16 installPhase = ''
17 install -Dm755 sunwait -t $out/bin
18 '';
19
20 meta = {
21 description = "Calculates sunrise or sunset times with civil, nautical, astronomical and custom twilights";
22 homepage = "https://github.com/risacher/sunwait";
23 license = lib.licenses.gpl3Only;
24 maintainers = with lib.maintainers; [ eclairevoyant ];
25 mainProgram = "sunwait";
26 platforms = lib.platforms.all;
27 };
28})