diff options
author | Francesco Gazzetta <fgaz@fgaz.me> | 2021-01-07 21:11:46 +0100 |
---|---|---|
committer | Vincent Laporte <vbgl@users.noreply.github.com> | 2021-10-16 19:12:56 +0200 |
commit | 18d24771da3a19113122ba961b4b206613883f60 (patch) | |
tree | 2ff059e60fedd75bf32c1e7184795f12767cdb5c /pkgs/tools/misc/flitter | |
parent | 0ad041e5bcf5358ba100f806e2e925ef5c7be7bf (diff) |
flitter: init at unstable-2020-10-05
Diffstat (limited to 'pkgs/tools/misc/flitter')
-rw-r--r-- | pkgs/tools/misc/flitter/default.nix | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/pkgs/tools/misc/flitter/default.nix b/pkgs/tools/misc/flitter/default.nix new file mode 100644 index 0000000000000..49903559c136a --- /dev/null +++ b/pkgs/tools/misc/flitter/default.nix @@ -0,0 +1,55 @@ +{ lib +, stdenv +, ocamlPackages +, fetchFromGitHub +, makeWrapper +, python3 +}: + +ocamlPackages.buildDunePackage rec { + pname = "flitter"; + # request to tag releases: https://github.com/alexozer/flitter/issues/34 + version = "unstable-2020-10-05"; + + useDune2 = true; + + src = fetchFromGitHub { + owner = "alexozer"; + repo = "flitter"; + rev = "666c5483bc93efa6d01e0b7a927461269f8e14de"; + sha256 = "1k3m7bjq5yrrq7vhnbdykni65dsqhq6knnv9wvwq3svb3n07z4w3"; + }; + + # https://github.com/alexozer/flitter/issues/28 + postPatch = '' + for f in src/colors.ml src/duration.ml src/event_loop.ml src/splits.ml; do + substituteInPlace "$f" \ + --replace 'Unix.gettimeofday' 'Caml_unix.gettimeofday' + done + ''; + + nativeBuildInputs = [ + makeWrapper + ]; + + buildInputs = with ocamlPackages; [ + core + lwt_ppx + sexp_pretty + color + notty + ]; + + postInstall = '' + wrapProgram $out/bin/flitter \ + --prefix PATH : "${python3.withPackages (pp: [ pp.pynput ])}/bin" + ''; + + meta = with lib; { + description = "A Livesplit-inspired speedrunning split timer for Linux/macOS terminal"; + license = licenses.mit; + maintainers = with maintainers; [ fgaz ]; + homepage = "https://github.com/alexozer/flitter"; + platforms = platforms.unix; + }; +} |