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