2 description = "A post-modern text editor.";
5 nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
6 nixCargoIntegration = {
7 url = "github:yusdacra/nix-cargo-integration";
8 inputs.nixpkgs.follows = "nixpkgs";
11 url = "github:edolstra/flake-compat";
16 outputs = inputs@{ self, nixCargoIntegration, ... }:
17 nixCargoIntegration.lib.makeOutputs {
19 buildPlatform = "crate2nix";
20 renameOutputs = { "helix-term" = "helix"; };
21 # Set default app to hx (binary is from helix-term release build)
22 # Set default package to helix-term release build
23 defaultOutputs = { app = "hx"; package = "helix"; };
25 crateOverrides = common: _: {
27 # link languages and theme toml files since helix-term expects them (for tests)
28 preConfigure = "ln -s ${common.root}/{languages.toml,theme.toml} ..";
29 buildInputs = (prev.buildInputs or [ ]) ++ [ common.cCompiler.cc.lib ];
31 # link languages and theme toml files since helix-view expects them
32 helix-view = _: { preConfigure = "ln -s ${common.root}/{languages.toml,theme.toml} .."; };
33 helix-syntax = _prev: {
34 preConfigure = "mkdir -p ../runtime/grammars";
35 postInstall = "cp -r ../runtime $out/runtime";
38 mainBuild = common: prev:
40 inherit (common) pkgs lib;
41 helixSyntax = lib.buildCrate {
43 memberName = "helix-syntax";
44 defaultCrateOverrides = {
45 helix-syntax = common.crateOverrides.helix-syntax;
49 runtimeDir = pkgs.runCommand "helix-runtime" { } ''
51 ln -s ${common.root}/runtime/* $out
52 ln -sf ${helixSyntax}/runtime/grammars $out
55 lib.optionalAttrs (common.memberName == "helix-term") {
56 nativeBuildInputs = [ pkgs.makeWrapper ];
58 if [ -f "$out/bin/hx" ]; then
59 wrapProgram "$out/bin/hx" --set HELIX_RUNTIME "${runtimeDir}"
63 shell = common: prev: {
64 packages = prev.packages ++ (with common.pkgs; [ lld_10 lldb cargo-tarpaulin ]);
66 { name = "HELIX_RUNTIME"; eval = "$PWD/runtime"; }
67 { name = "RUST_BACKTRACE"; value = "1"; }
68 { 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