aboutsummaryrefslogtreecommitdiff
path: root/shell.nix
diff options
context:
space:
mode:
authorYusuf Bera Ertan2021-06-13 05:03:42 +0000
committerBlaž Hrastnik2021-06-13 05:46:51 +0000
commita3f01503e28ee3bcbfd14e9753a1c135bbba49e7 (patch)
treed2002b3343b337cf203ba19f69fe53a8ad38f3ba /shell.nix
parent9640ed1425f2db904fb42cd0c54dc6fbc05ca292 (diff)
build(nix): use nix-cargo-integration, make shell.nix use flake devshell
Diffstat (limited to 'shell.nix')
-rw-r--r--shell.nix28
1 files changed, 6 insertions, 22 deletions
diff --git a/shell.nix b/shell.nix
index d6cb543a..5c5a774e 100644
--- a/shell.nix
+++ b/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