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";
26 path = "${toString ./.}/${rel}";
29 outputs = nci.lib.makeOutputs {
31 renameOutputs = {"helix-term" = "helix";};
32 # Set default app to hx (binary is from helix-term release build)
33 # Set default package to helix-term release build
44 crateOverrides = common: _: {
47 name = "helix-source";
49 # filter out unneeded stuff that cause rebuilds
52 (n: builtins.baseNameOf path != n)
71 # disable fetching and building of tree-sitter grammars in the helix-term build.rs
72 HELIX_DISABLE_AUTO_GRAMMAR_BUILD = "1";
74 buildInputs = (prev.buildInputs or []) ++ [common.cCompiler.cc.lib];
76 # link languages and theme toml files since helix-term expects them (for tests)
78 ${prev.preConfigure or ""}
80 lib.concatMapStringsSep
82 (path: "ln -sf ${mkRootPath path} ..")
83 ["languages.toml" "theme.toml" "base16_theme.toml"]
87 meta.mainProgram = "hx";
90 shell = common: prev: {
95 [lld_13 cargo-flamegraph rust-analyzer]
96 ++ (lib.optional (stdenv.isx86_64 && stdenv.isLinux) cargo-tarpaulin)
97 ++ (lib.optional stdenv.isLinux lldb)
103 name = "HELIX_RUNTIME";
104 eval = "$PWD/runtime";
107 name = "RUST_BACKTRACE";
113 if common.pkgs.stdenv.isLinux
114 then "-C link-arg=-fuse-ld=lld -C target-cpu=native -Clink-arg=-Wl,--no-rosegment"
121 makeOverridableHelix = system: old: config: let
122 pkgs = nixpkgs.legacyPackages.${system};
123 grammars = pkgs.callPackage ./grammars.nix config;
124 runtimeDir = pkgs.runCommand "helix-runtime" {} ''
126 ln -s ${mkRootPath "runtime"}/* $out
128 ln -s ${grammars} $out/grammars
131 pkgs.runCommand "${old.name}-wrapped"
133 inherit (old) pname version meta;
135 nativeBuildInputs = [pkgs.makeWrapper];
136 makeWrapperArgs = config.makeWrapperArgs or [];
140 cp -r --no-preserve=mode,ownership ${old}/* $out/
142 wrapProgram "$out/bin/hx" ''${makeWrapperArgs[@]} --set HELIX_RUNTIME "${runtimeDir}"
146 // {override = makeOverridableHelix system old;};
157 program = lib.getExe self.${system}.packages.helix;
165 system: packages: rec {
167 helix = makeOverridableHelix system helix-unwrapped {};
168 helix-debug = makeOverridableHelix system helix-unwrapped-debug {};
169 helix-unwrapped = packages.helix;
170 helix-unwrapped-debug = packages.helix-debug;
177 extra-substituters = ["https://helix.cachix.org"];
178 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