From 0e91ee971b6b161619776447dbf627205d102894 Mon Sep 17 00:00:00 2001 From: jD91mZM2 Date: Sun, 16 Jun 2019 17:24:04 +0200 Subject: [PATCH] Yet another shell.nix update --- shell.nix | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/shell.nix b/shell.nix index d314b07..1005d2e 100644 --- a/shell.nix +++ b/shell.nix @@ -1,9 +1,21 @@ -with import {}; -stdenv.mkDerivation { - name = "redox"; +{ pkgs ? import {} }: +pkgs.mkShell rec { hardeningDisable = [ "all" ]; - nativeBuildInputs = [ gnumake cmake nasm pkgconfig gcc automake autoconf bison gperf qemu ]; - buildInputs = [ openssl gettext libtool flex libpng perl perlPackages.HTMLParser ]; + # used in mk/prefix.mk to patch interpreter when PREFIX_BINARY=1 + NIX_INTERPRETER = "${pkgs.stdenv.cc.libc}/lib/ld-linux-x86-64.so.2"; + + LIBRARY_PATH = pkgs.lib.makeLibraryPath [ + pkgs.gcc-unwrapped pkgs.stdenv.cc.libc + (toString prefix/x86_64-unknown-redox) + ]; + LD_LIBRARY_PATH = LIBRARY_PATH; + + nativeBuildInputs = with pkgs; [ gnumake cmake nasm pkgconfig gcc automake autoconf bison gperf qemu rustup ]; + buildInputs = with pkgs; [ fuse openssl gettext libtool flex libpng perl perlPackages.HTMLParser ]; + + shellHook = '' + export PATH="/run/wrappers/bin:$PATH" + ''; }