2 description = "A post-modern text editor.";
5 nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
7 url = "github:oxalica/rust-overlay";
8 inputs.nixpkgs.follows = "nixpkgs";
11 url = "github:yusdacra/nix-cargo-integration";
12 inputs.nixpkgs.follows = "nixpkgs";
13 inputs.rust-overlay.follows = "rust-overlay";
24 ncl = nci.lib.nci-lib;
27 path = "${toString ./.}/${rel}";
48 ignorePaths = path: type: let
49 # split the nix store path into its components
50 components = lib.splitString "/" path;
51 # drop off the `/nix/hash-source` section from the path
52 relPathComponents = lib.drop 4 components;
53 # reassemble the path components
54 relPath = lib.concatStringsSep "/" relPathComponents;
56 lib.all (p: ! (lib.hasPrefix p relPath)) pathsToIgnore;
59 name = "helix-source";
61 # filter out unnecessary paths
64 outputs = nci.lib.makeOutputs {
68 # rename helix-term to helix since it's our main package
69 rename = {"helix-term" = "helix";};
70 # Set default app to hx (binary is from helix-term release build)
71 # Set default package to helix-term release build
77 cCompiler.package = with common.pkgs;
82 packages = with common.pkgs;
83 [lld_13 cargo-flamegraph rust-analyzer]
84 ++ (lib.optional (stdenv.isx86_64 && stdenv.isLinux) cargo-tarpaulin)
85 ++ (lib.optional stdenv.isLinux lldb);
88 name = "HELIX_RUNTIME";
89 eval = "$PWD/runtime";
92 name = "RUST_BACKTRACE";
98 if common.pkgs.stdenv.isLinux
99 then "-C link-arg=-fuse-ld=lld -C target-cpu=native -Clink-arg=-Wl,--no-rosegment"
105 pkgConfig = common: {
107 # Wrap helix with runtime
108 wrapper = _: old: let
109 inherit (common) pkgs;
110 makeOverridableHelix = old: config: let
111 grammars = pkgs.callPackage ./grammars.nix config;
112 runtimeDir = pkgs.runCommand "helix-runtime" {} ''
114 ln -s ${mkRootPath "runtime"}/* $out
116 ln -s ${grammars} $out/grammars
119 common.internal.pkgsSet.utils.wrapDerivation old
121 nativeBuildInputs = [pkgs.makeWrapper];
122 makeWrapperArgs = config.makeWrapperArgs or [];
127 ln -sf ${old}/bin/* $out/bin/
128 wrapProgram "$out/bin/hx" ''${makeWrapperArgs[@]} --set HELIX_RUNTIME "${runtimeDir}"
132 // {override = makeOverridableHelix old;};
134 makeOverridableHelix old {};
135 overrides.fix-build.overrideAttrs = prev: {
136 src = filteredSource;
138 # disable fetching and building of tree-sitter grammars in the helix-term build.rs
139 HELIX_DISABLE_AUTO_GRAMMAR_BUILD = "1";
141 buildInputs = ncl.addBuildInputs prev [common.config.cCompiler.package.cc.lib];
143 # link languages and theme toml files since helix-term expects them (for tests)
145 ${prev.preConfigure or ""}
147 lib.concatMapStringsSep
149 (path: "ln -sf ${mkRootPath path} ..")
150 ["languages.toml" "theme.toml" "base16_theme.toml"]
154 meta.mainProgram = "hx";
168 helix-unwrapped = packages.helix.passthru.unwrapped;
169 helix-unwrapped-debug = packages.helix-debug.passthru.unwrapped;
176 extra-substituters = ["https://helix.cachix.org"];
177 extra-trusted-public-keys = ["helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="];
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