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