diff options
author | Tuomas Tynkkynen <tuomas@tuxera.com> | 2018-02-28 20:52:49 +0200 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas@tuxera.com> | 2018-02-28 20:52:49 +0200 |
commit | 34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852 (patch) | |
tree | d3e3546a41a812d151d1980cb8ee6808a8b8c7c6 /pkgs/development/compilers/ccl/default.nix | |
parent | ad17db3562766979371f0ae9cc0d2428f44a9d58 (diff) | |
parent | f1dd205c4e5ac28931ae8cdcde9d3c9a8ed2a0f5 (diff) | |
download | nixlib-34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852.tar nixlib-34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852.tar.gz nixlib-34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852.tar.bz2 nixlib-34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852.tar.lz nixlib-34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852.tar.xz nixlib-34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852.tar.zst nixlib-34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852.zip |
Merge remote-tracking branch 'upstream/master' into staging
Conflicts: pkgs/applications/misc/pytrainer/default.nix pkgs/development/tools/pew/default.nix pkgs/tools/misc/you-get/default.nix
Diffstat (limited to 'pkgs/development/compilers/ccl/default.nix')
-rw-r--r-- | pkgs/development/compilers/ccl/default.nix | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/pkgs/development/compilers/ccl/default.nix b/pkgs/development/compilers/ccl/default.nix index 696728e6f32c..087f74700214 100644 --- a/pkgs/development/compilers/ccl/default.nix +++ b/pkgs/development/compilers/ccl/default.nix @@ -2,7 +2,7 @@ let options = rec { - /* TODO: there are also MacOS, FreeBSD and Windows versions */ + /* TODO: there are also FreeBSD and Windows versions */ x86_64-linux = { arch = "linuxx86"; sha256 = "0hs1f3z7crgzvinpj990kv9gvbsipxvcvwbmk54n51nasvc5025q"; @@ -21,6 +21,18 @@ let runtime = "armcl"; kernel = "linuxarm"; }; + x86_64-darwin = { + arch = "darwinx86"; + sha256 = "5adbea3d8b4a2e29af30d141f781c6613844f468c0ccfa11bae908c3e9641939"; + runtime = "dx86cl64"; + kernel = "darwinx8664"; + }; + i686-darwin = { + arch = "darwinx86"; + sha256 = x86_64-darwin.sha256; + runtime = "dx86cl"; + kernel = "darwinx8632"; + }; armv6l-linux = armv7l-linux; }; cfg = options.${stdenv.system}; @@ -37,12 +49,22 @@ stdenv.mkDerivation rec { sha256 = cfg.sha256; }; - buildInputs = [ gcc glibc m4 ]; + buildInputs = if stdenv.isDarwin then [ m4 ] else [ gcc glibc m4 ]; CCL_RUNTIME = cfg.runtime; CCL_KERNEL = cfg.kernel; - postPatch = '' + postPatch = if stdenv.isDarwin then '' + substituteInPlace lisp-kernel/${CCL_KERNEL}/Makefile \ + --replace "M4 = gm4" "M4 = m4" \ + --replace "dtrace" "/usr/sbin/dtrace" \ + --replace "mig" "/usr/bin/mig" \ + --replace "/bin/rm" "${coreutils}/bin/rm" \ + --replace "/bin/echo" "${coreutils}/bin/echo" + + substituteInPlace lisp-kernel/m4macros.m4 \ + --replace "/bin/pwd" "${coreutils}/bin/pwd" + '' else '' substituteInPlace lisp-kernel/${CCL_KERNEL}/Makefile \ --replace "/bin/rm" "${coreutils}/bin/rm" \ --replace "/bin/echo" "${coreutils}/bin/echo" @@ -63,7 +85,7 @@ stdenv.mkDerivation rec { cp -r . "$out/share/ccl-installation" mkdir -p "$out/bin" - echo -e '#!/bin/sh\n'"$out/share/ccl-installation/${CCL_RUNTIME}"' "$@"\n' > "$out"/bin/"${CCL_RUNTIME}" + echo -e '#!${stdenv.shell}\n'"$out/share/ccl-installation/${CCL_RUNTIME}"' "$@"\n' > "$out"/bin/"${CCL_RUNTIME}" chmod a+x "$out"/bin/"${CCL_RUNTIME}" ln -s "$out"/bin/"${CCL_RUNTIME}" "$out"/bin/ccl ''; |