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: _: {
25 # link languages and theme toml files since helix-term expects them (for tests)
26 preConfigure = "ln -s ${common.root}/{languages.toml,theme.toml} ..";
27 buildInputs = (prev.buildInputs or [ ]) ++ [ common.cCompiler.cc.lib ];
29 # link languages and theme toml files since helix-view expects them
30 helix-view = _: { preConfigure = "ln -s ${common.root}/{languages.toml,theme.toml} .."; };
31 helix-syntax = _prev: {
32 preConfigure = "mkdir -p ../runtime/grammars";
33 postInstall = "cp -r ../runtime $out/runtime";
36 mainBuild = common: prev:
38 inherit (common) pkgs lib;
39 helixSyntax = lib.buildCrate {
41 memberName = "helix-syntax";
42 defaultCrateOverrides = {
43 helix-syntax = common.crateOverrides.helix-syntax;
47 runtimeDir = pkgs.runCommand "helix-runtime" { } ''
49 ln -s ${common.root}/runtime/* $out
50 ln -sf ${helixSyntax}/runtime/grammars $out
53 lib.optionalAttrs (common.memberName == "helix-term") {
54 nativeBuildInputs = [ pkgs.makeWrapper ];
56 if [ -f "$out/bin/hx" ]; then
57 wrapProgram "$out/bin/hx" --set HELIX_RUNTIME "${runtimeDir}"
61 shell = common: prev: {
62 packages = prev.packages ++ (with common.pkgs; [ lld_13 lldb cargo-tarpaulin ]);
64 { name = "HELIX_RUNTIME"; eval = "$PWD/runtime"; }
65 { name = "RUST_BACKTRACE"; value = "1"; }
66 { name = "RUSTFLAGS"; value = "-C link-arg=-fuse-ld=lld -C target-cpu=native"; }
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