mirror of
https://github.com/helix-editor/helix.git
synced 2025-04-03 02:47:45 +03:00
build(nix): use nix-cargo-integration, make shell.nix use flake devshell
This commit is contained in:
parent
9640ed1425
commit
a3f01503e2
5 changed files with 99 additions and 137 deletions
28
shell.nix
28
shell.nix
|
@ -1,22 +1,6 @@
|
|||
{ lib, stdenv, pkgs }:
|
||||
|
||||
pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [
|
||||
(rust-bin.stable.latest.default.override { extensions = ["rust-src"]; })
|
||||
lld_10
|
||||
lldb
|
||||
# pythonPackages.six
|
||||
stdenv.cc.cc.lib
|
||||
# pkg-config
|
||||
];
|
||||
RUSTFLAGS = "-C link-arg=-fuse-ld=lld -C target-cpu=native";
|
||||
RUST_BACKTRACE = "1";
|
||||
# https://github.com/rust-lang/rust/issues/55979
|
||||
LD_LIBRARY_PATH = lib.makeLibraryPath (with pkgs; [
|
||||
stdenv.cc.cc.lib
|
||||
]);
|
||||
|
||||
shellHook = ''
|
||||
export HELIX_RUNTIME=$PWD/runtime
|
||||
'';
|
||||
}
|
||||
# Flake's devShell for non-flake-enabled nix instances
|
||||
let
|
||||
src = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.flakeCompat.locked;
|
||||
compat = fetchTarball { url = "https://github.com/edolstra/flake-compat/archive/${src.rev}.tar.gz"; sha256 = src.narHash; };
|
||||
in
|
||||
(import compat { src = ./.; }).shellNix.default
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue