diff --git a/INSTALL.md b/INSTALL.md index 1d408002f..9580ebc52 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -35,7 +35,6 @@ brew update brew install \ boost \ cmake \ - coreutils \ flex \ fmt \ git \ diff --git a/bin/llvm-kompile-clang b/bin/llvm-kompile-clang index aeecb672a..1db40397e 100644 --- a/bin/llvm-kompile-clang +++ b/bin/llvm-kompile-clang @@ -34,11 +34,11 @@ HERE infer_library_name() { base_name="$(basename "$1")" dir_name="$(dirname "$1")" - + if [[ "$base_name" =~ \. ]]; then echo "$1" else - if [[ "$(uname)" == "Darwin" ]]; then + if [[ "$OSTYPE" == "darwin"* ]]; then ext=".dylib" else ext=".so" @@ -81,7 +81,7 @@ while [[ $# -gt 0 ]]; do shift ;; -save-temps) - save_temps=true + save_temps=true ;; -o) output=true diff --git a/nix/llvm-backend.nix b/nix/llvm-backend.nix index 8ae6f352b..00a7990a8 100644 --- a/nix/llvm-backend.nix +++ b/nix/llvm-backend.nix @@ -1,4 +1,4 @@ -{ lib, src, cmake, coreutils, flex, fmt, pkgconfig, llvm, libllvm, libcxxabi, stdenv, boost, gmp +{ lib, src, cmake, flex, fmt, pkgconfig, llvm, libllvm, libcxxabi, stdenv, boost, gmp , jemalloc, libffi, libiconv, libyaml, mpfr, ncurses, python39, unixtools, # Runtime dependencies: host, perl, @@ -14,7 +14,7 @@ stdenv.mkDerivation { nativeBuildInputs = [ cmake flex llvm pkgconfig ]; buildInputs = [ libyaml ]; propagatedBuildInputs = [ - boost coreutils fmt gmp jemalloc libffi mpfr ncurses python-env unixtools.xxd + boost fmt gmp jemalloc libffi mpfr ncurses python-env unixtools.xxd ] ++ lib.optional stdenv.isDarwin libiconv; dontStrip = true; @@ -32,7 +32,6 @@ stdenv.mkDerivation { 'extra_python_flags=($(${python-env}/bin/pybind11-config --includes))' substituteInPlace bin/llvm-kompile-clang \ - --replace 'uname' '${coreutils}/bin/uname' \ --replace '"-lgmp"' '"-I${gmp.dev}/include" "-L${gmp}/lib" "-lgmp"' \ --replace '"-lmpfr"' '-I${mpfr.dev}/include "-L${mpfr}/lib" "-lmpfr"' \ --replace '"-lffi"' '"-L${libffi}/lib" "-lffi"' \