2 description = "A post-modern text editor.";
5 nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
6 rust-overlay.url = "github:oxalica/rust-overlay";
7 nixCargoIntegration = {
8 url = "github:yusdacra/nix-cargo-integration";
9 inputs.nixpkgs.follows = "nixpkgs";
10 inputs.rustOverlay.follows = "rust-overlay";
14 outputs = inputs@{ self, nixCargoIntegration, ... }:
15 nixCargoIntegration.lib.makeOutputs {
17 buildPlatform = "crate2nix";
18 renameOutputs = { "helix-term" = "helix"; };
19 # Set default app to hx (binary is from helix-term release build)
20 # Set default package to helix-term release build
21 defaultOutputs = { app = "hx"; package = "helix"; };
23 crateOverrides = common: _: rec {
24 # link languages and theme toml files since helix-view expects them
25 helix-view = _: { preConfigure = "ln -s ${common.root}/{languages.toml,theme.toml,base16_theme.toml} .."; };
26 helix-syntax = prev: {
30 helix = pkgs.fetchgit {
31 url = "https://github.com/helix-editor/helix.git";
32 rev = "a8fd33ac012a79069ef1409503a2edcf3a585153";
33 fetchSubmodules = true;
34 sha256 = "sha256-5AtOC55ttWT+7RYMboaFxpGZML51ix93wAkYJTt+8JI=";
37 pkgs.runCommand prev.src.name { } ''
39 ln -s ${prev.src}/* $out
40 ln -sf ${helix}/helix-syntax/languages $out
42 preConfigure = "mkdir -p ../runtime/grammars";
43 postInstall = "cp -r ../runtime $out/runtime";
47 inherit (common) pkgs lib;
48 helixSyntax = lib.buildCrate {
50 memberName = "helix-syntax";
51 defaultCrateOverrides = {
52 helix-syntax = helix-syntax;
56 runtimeDir = pkgs.runCommand "helix-runtime" { } ''
58 ln -s ${common.root}/runtime/* $out
59 ln -sf ${helixSyntax}/runtime/grammars $out
63 # link languages and theme toml files since helix-term expects them (for tests)
64 preConfigure = "ln -s ${common.root}/{languages.toml,theme.toml,base16_theme.toml} ..";
65 buildInputs = (prev.buildInputs or [ ]) ++ [ common.cCompiler.cc.lib ];
66 nativeBuildInputs = [ pkgs.makeWrapper ];
68 if [ -f "$out/bin/hx" ]; then
69 wrapProgram "$out/bin/hx" --set HELIX_RUNTIME "${runtimeDir}"
74 shell = common: prev: {
75 packages = prev.packages ++ (with common.pkgs; [ lld_13 lldb cargo-tarpaulin cargo-flamegraph ]);
77 { name = "HELIX_RUNTIME"; eval = "$PWD/runtime"; }
78 { name = "RUST_BACKTRACE"; value = "1"; }
79 { name = "RUSTFLAGS"; value = "-C link-arg=-fuse-ld=lld -C target-cpu=native -Clink-arg=-Wl,--no-rosegment"; }
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list