• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A Nix-friendly SQLite-enhanced fork of Flitter, a speedrunning split timer for Unix-style terminals


Commit MetaInfo

Revisão37505f2bece1774b09a5e51a22bbe5ceffc9f39b (tree)
Hora2023-04-25 15:09:27
AutorCorbin <cds@corb...>
CommiterCorbin

Mensagem de Log

Become a Nix flake.

And we have to use 22.11 because LWT is broken on unstable.

Mudança Sumário

Diff

--- a/default.nix
+++ /dev/null
@@ -1,22 +0,0 @@
1-{ nixpkgs ? import <nixpkgs> {} }:
2-let
3- pkgs = nixpkgs.pkgs;
4- py = pkgs.python3.withPackages (ps: [ ps.pynput ]);
5-in pkgs.ocamlPackages.buildDunePackage {
6- pname = "flitter";
7- version = "0.0.1";
8-
9- src = ./.;
10-
11- useDune2 = true;
12-
13- patchPhase = ''
14- sed -i -e 's,python3,${py}/bin/python3,g' src/hotkeys.ml
15- '';
16-
17- buildInputs = [ pkgs.git ];
18- propagatedBuildInputs = with pkgs.ocamlPackages; [
19- core core_kernel core_unix
20- lwt re color sexp_pretty uutf lwt_ppx uuseg notty
21- ];
22-}
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,61 @@
1+{
2+ "nodes": {
3+ "flake-utils": {
4+ "inputs": {
5+ "systems": "systems"
6+ },
7+ "locked": {
8+ "lastModified": 1681202837,
9+ "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
10+ "owner": "numtide",
11+ "repo": "flake-utils",
12+ "rev": "cfacdce06f30d2b68473a46042957675eebb3401",
13+ "type": "github"
14+ },
15+ "original": {
16+ "owner": "numtide",
17+ "repo": "flake-utils",
18+ "type": "github"
19+ }
20+ },
21+ "nixpkgs": {
22+ "locked": {
23+ "lastModified": 1682303062,
24+ "narHash": "sha256-x+KAADp27lbxeoPXLUMxKcRsUUHDlg+qVjt5PjgBw9A=",
25+ "owner": "NixOS",
26+ "repo": "nixpkgs",
27+ "rev": "f5364316e314436f6b9c8fd50592b18920ab18f9",
28+ "type": "github"
29+ },
30+ "original": {
31+ "owner": "NixOS",
32+ "ref": "nixos-22.11",
33+ "repo": "nixpkgs",
34+ "type": "github"
35+ }
36+ },
37+ "root": {
38+ "inputs": {
39+ "flake-utils": "flake-utils",
40+ "nixpkgs": "nixpkgs"
41+ }
42+ },
43+ "systems": {
44+ "locked": {
45+ "lastModified": 1681028828,
46+ "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
47+ "owner": "nix-systems",
48+ "repo": "default",
49+ "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
50+ "type": "github"
51+ },
52+ "original": {
53+ "owner": "nix-systems",
54+ "repo": "default",
55+ "type": "github"
56+ }
57+ }
58+ },
59+ "root": "root",
60+ "version": 7
61+}
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,42 @@
1+{
2+ description = "A WIP rework of flitter";
3+ inputs = {
4+ nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";
5+ flake-utils.url = "github:numtide/flake-utils";
6+ };
7+ outputs = { self, nixpkgs, flake-utils }:
8+ flake-utils.lib.eachDefaultSystem (system:
9+ let
10+ pkgs = import nixpkgs { inherit system; };
11+ py = pkgs.python3.withPackages (ps: [ ps.pynput ]);
12+ in
13+ {
14+ packages.default = pkgs.ocamlPackages.buildDunePackage {
15+ pname = "flitter";
16+ version = "0.0.1";
17+
18+ src = ./.;
19+
20+ useDune2 = true;
21+
22+ patchPhase = ''
23+ sed -i -e 's,python3,${py}/bin/python3,g' src/hotkeys.ml
24+ '';
25+
26+ buildInputs = [ pkgs.git ];
27+ propagatedBuildInputs = with pkgs.ocamlPackages; [
28+ core core_kernel core_unix
29+ lwt re color sexp_pretty uutf lwt_ppx uuseg notty
30+ ];
31+ };
32+ devShells.default = pkgs.mkShell {
33+ packages = with pkgs; [
34+ # working with S-expressions
35+ ocamlPackages.sexp
36+ # maintaining OCaml code
37+ ocamlformat ocamlPackages.utop
38+ ];
39+ };
40+ }
41+ );
42+}
--- a/shell.nix
+++ /dev/null
@@ -1,12 +0,0 @@
1-{ nixpkgs ? import <nixpkgs> {} }:
2-let
3- inherit (nixpkgs) pkgs;
4-in pkgs.stdenv.mkDerivation {
5- name = "flitter-dev-env";
6- buildInputs = with pkgs; [
7- # working with S-expressions
8- ocamlPackages.sexp
9- # maintaining OCaml code
10- ocamlformat ocamlPackages.utop
11- ];
12-}