Skip to content

Commit

Permalink
flitter: init at unstable-2020-10-05
Browse files Browse the repository at this point in the history
  • Loading branch information
fgaz authored and vbgl committed Oct 16, 2021
1 parent 0ad041e commit 18d2477
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
55 changes: 55 additions & 0 deletions pkgs/tools/misc/flitter/default.nix
Original file line number Diff line number Diff line change
@@ -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;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2849,6 +2849,8 @@ with pkgs;

fits-cloudctl = callPackage ../tools/admin/fits-cloudctl { };

flitter = callPackage ../tools/misc/flitter { };

frangipanni = callPackage ../tools/text/frangipanni { };

fselect = callPackage ../tools/misc/fselect { };
Expand Down

0 comments on commit 18d2477

Please sign in to comment.