default.nix (553B)
1 { stdenv, lib, fetchFromGitHub, tzdata }: 2 3 stdenv.mkDerivation rec { 4 pname = "batzconverter"; 5 version = "2.1.0"; 6 name = "${pname}-${version}"; 7 8 src = fetchFromGitHub { 9 owner = "chmouel"; 10 repo = "batzconverter"; 11 rev = "${version}"; 12 sha256 = "sha256-BhkceUNdNq/NVxriYjM36wnO7PiPnE+FhYNnyFQjn9E="; 13 }; 14 15 installPhase = '' 16 mkdir -p $out/bin 17 # Some other hard-coded paths to fix: 18 sed -i 's#/usr/share/zoneinfo/#${tzdata}/share/zoneinfo/#g' \ 19 batz.sh 20 cp batz.sh $out/bin/batz 21 chmod +x $out/bin/batz 22 ''; 23 }