terminal user interface to jujutsu. Focused on speed and clarity
9
fork

Configure Feed

Select the types of activity you want to include in your feed.

try using nix

+94 -54
+1 -1
dune-project
··· 19 19 (name jj_tui) 20 20 (synopsis "A short synopsis") 21 21 (description "A longer description") 22 - (depends ocaml dune eio-project notty stdio nottui lwd base eio_main angstrom ppx_expect) 22 + (depends ocaml dune eio-process notty stdio nottui lwd base eio_main angstrom ppx_expect ppx_jane) 23 23 (tags 24 24 (topics "to describe" your project))) 25 25
+23 -10
flake.lock
··· 67 67 }, 68 68 "nixpkgs": { 69 69 "locked": { 70 + "lastModified": 1713537308, 71 + "narHash": "sha256-XtTSSIB2DA6tOv+l0FhvfDMiyCmhoRbNB+0SeInZkbk=", 72 + "path": "/nix/store/v4pcs3nzx54m5bmxd39win0rgl2d2hbx-source", 73 + "rev": "5c24cf2f0a12ad855f444c30b2421d044120c66f", 74 + "type": "path" 75 + }, 76 + "original": { 77 + "id": "nixpkgs-unstable", 78 + "type": "indirect" 79 + } 80 + }, 81 + "nixpkgs_2": { 82 + "locked": { 70 83 "lastModified": 1682362401, 71 84 "narHash": "sha256-/UMUHtF2CyYNl4b60Z2y4wwTTdIWGKhj9H301EDcT9M=", 72 85 "owner": "nixos", ··· 86 99 "flake-compat": "flake-compat", 87 100 "flake-utils": "flake-utils_2", 88 101 "mirage-opam-overlays": "mirage-opam-overlays", 89 - "nixpkgs": "nixpkgs", 102 + "nixpkgs": "nixpkgs_2", 90 103 "opam-overlays": "opam-overlays", 91 - "opam-repository": "opam-repository", 104 + "opam-repository": [ 105 + "opam-repository" 106 + ], 92 107 "opam2json": "opam2json" 93 108 }, 94 109 "locked": { ··· 124 139 "opam-repository": { 125 140 "flake": false, 126 141 "locked": { 127 - "lastModified": 1705008664, 128 - "narHash": "sha256-TTjTal49QK2U0yVOmw6rJhTGYM7tnj3Kv9DiEEiLt7E=", 142 + "lastModified": 1715353135, 143 + "narHash": "sha256-Yf8IeZmqvJUtMpFQcCi3X1s/taCYvA7CBT+UVYWU1tw=", 129 144 "owner": "ocaml", 130 145 "repo": "opam-repository", 131 - "rev": "fa77046c6497f8ca32926acdb7eb1e61777d4c17", 146 + "rev": "2ae169d7d000fa40fe08d43c9b39554518020322", 132 147 "type": "github" 133 148 }, 134 149 "original": { ··· 161 176 "root": { 162 177 "inputs": { 163 178 "flake-utils": "flake-utils", 164 - "nixpkgs": [ 165 - "opam-nix", 166 - "nixpkgs" 167 - ], 168 - "opam-nix": "opam-nix" 179 + "nixpkgs": "nixpkgs", 180 + "opam-nix": "opam-nix", 181 + "opam-repository": "opam-repository" 169 182 } 170 183 }, 171 184 "systems": {
+68 -42
flake.nix
··· 1 1 { 2 2 inputs = { 3 - opam-nix.url = "github:tweag/opam-nix"; 4 3 flake-utils.url = "github:numtide/flake-utils"; 5 - nixpkgs.follows = "opam-nix/nixpkgs"; 4 + nixpkgs.url = "nixpkgs-unstable"; 5 + opam-nix = { 6 + url = "github:tweag/opam-nix"; 7 + inputs.opam-repository.follows = "opam-repository"; 8 + }; 9 + opam-repository = { 10 + url = "github:ocaml/opam-repository"; 11 + flake = false; 12 + }; 6 13 }; 7 - outputs = { self, flake-utils, opam-nix, nixpkgs }@inputs: 14 + 15 + outputs = { self, flake-utils, opam-nix, opam-repository, nixpkgs, ... }@inputs: 16 + let 17 + package = "jj_tui"; 18 + overlay = final: prev: { 19 + ${package} = prev.${package}.overrideAttrs (_: { 20 + # Do not add share/nix-support, so that dependencies from 21 + # the scope don't leak into dependent derivations 22 + doNixSupport = false; 23 + }); 24 + dune-release = prev.dune-release.overrideAttrs (_: { 25 + doCheck = false; 26 + }); 27 + }; 28 + in 8 29 flake-utils.lib.eachDefaultSystem (system: 9 30 let 10 - pkgs = nixpkgs.legacyPackages.${system}; 31 + pkgs = import nixpkgs { overlays = [ overlay ]; inherit system; }; 11 32 on = opam-nix.lib.${system}; 12 - localPackagesQuery = builtins.mapAttrs (_: pkgs.lib.last) 13 - (on.listRepo (on.makeOpamRepo ./.)); 14 - devPackagesQuery = { 15 - # You can add "development" packages here. They will get added to the devShell automatically. 16 - ocaml-lsp-server = "*"; 17 - ocamlformat = "*"; 33 + localPackages = { 34 + eio-process="*"; 35 + jj_tui="*"; 36 + notty="*"; 18 37 }; 19 - query = devPackagesQuery // { 20 - ## You can force versions of certain packages here, e.g: 21 - ## - force the ocaml compiler to be taken from opam-repository: 22 - ocaml-base-compiler = "5.1.1"; 23 - ## - or force the compiler to be taken from nixpkgs and be a certain version: 24 - # ocaml-system = "5.1.1"; 25 - ## - or force ocamlfind to be a certain version: 26 - # ocamlfind = "1.9.2"; 38 + devPackages = { 39 + ppx_yojson_conv = "*"; 40 + ppx_expect = "*"; 27 41 }; 28 - scope = on.buildOpamProject' { } ./. query; 29 - overlay = final: prev: 30 - { 31 - # You can add overrides here 32 - }; 33 - scope' = scope.overrideScope' overlay; 34 - # Packages from devPackagesQuery 35 - devPackages = builtins.attrValues 36 - (pkgs.lib.getAttrs (builtins.attrNames devPackagesQuery) scope'); 37 - # Packages in this workspace 42 + packagesFromNames = set: 43 + (builtins.map (s: builtins.getAttr s scope) 44 + (builtins.attrNames set)); 45 + allPackages = localPackages // devPackages; 46 + scope = 47 + ( 48 + let 49 + scope = 50 + on.buildDuneProject 51 + { 52 + repos = [ opam-repository ]; 53 + inherit pkgs; 54 + resolveArgs = { with-test = true; }; 55 + } 56 + package 57 + ./. 58 + (allPackages); 59 + in 60 + scope.overrideScope' overlay 61 + ); 62 + in 63 + { 38 64 packages = 39 - pkgs.lib.getAttrs (builtins.attrNames localPackagesQuery) scope'; 40 - in { 41 - legacyPackages = scope'; 65 + (nixpkgs.lib.filterAttrs (name: value: builtins.hasAttr name localPackages) scope) // 66 + { default = self.packages.${system}.${package}; }; 42 67 43 - # inherit packages; 44 - 45 - ## If you want to have a "default" package which will be built with just `nix build`, do this instead of `inherit packages;`: 46 - packages = packages // { default = packages.jj_tui; }; 47 - 48 - devShells.default = pkgs.mkShell { 49 - inputsFrom = builtins.attrValues packages; 50 - buildInputs = devPackages ++ [ 51 - # You can add packages from nixpkgs here 52 - ]; 53 - }; 68 + devShell = 69 + pkgs.mkShell { 70 + buildInputs = (with pkgs; 71 + [ 72 + # dev tools 73 + ocamlformat_0_24_1 74 + yarn 75 + dune-release 76 + ]) ++ packagesFromNames devPackages; 77 + inputsFrom = [ self.packages.${system}.default ] 78 + ++ packagesFromNames localPackages; 79 + }; 54 80 }); 55 81 }
+2 -1
jj_tui.opam
··· 12 12 depends: [ 13 13 "ocaml" 14 14 "dune" {>= "3.9"} 15 - "eio-project" 15 + "eio-process" 16 16 "notty" 17 17 "stdio" 18 18 "nottui" ··· 21 21 "eio_main" 22 22 "angstrom" 23 23 "ppx_expect" 24 + "ppx_jane" 24 25 "odoc" {with-doc} 25 26 ] 26 27 build: [