diff options
Diffstat (limited to 'pkgs/development/compilers/chez-racket')
-rw-r--r-- | pkgs/development/compilers/chez-racket/default.nix | 25 | ||||
-rw-r--r-- | pkgs/development/compilers/chez-racket/shared.nix | 5 |
2 files changed, 18 insertions, 12 deletions
diff --git a/pkgs/development/compilers/chez-racket/default.nix b/pkgs/development/compilers/chez-racket/default.nix index fa32934243c6d..158dfa0529334 100644 --- a/pkgs/development/compilers/chez-racket/default.nix +++ b/pkgs/development/compilers/chez-racket/default.nix @@ -1,16 +1,23 @@ { stdenv, buildPackages, callPackage }: let - chezSystemMap = { - # See `/workarea` of source code for list of systems - "aarch64-darwin" = "tarm64osx"; - "aarch64-linux" = "tarm64le"; - "armv7l-linux" = "tarm32le"; - "x86_64-darwin" = "ta6osx"; - "x86_64-linux" = "ta6le"; - }; + chezArch = + /**/ if stdenv.hostPlatform.isAarch then "arm${toString stdenv.hostPlatform.parsed.cpu.bits}" + else if stdenv.hostPlatform.isx86_32 then "i3" + else if stdenv.hostPlatform.isx86_64 then "a6" + else if stdenv.hostPlatform.isPower then "ppc${toString stdenv.hostPlatform.parsed.cpu.bits}" + else throw "Add ${stdenv.hostPlatform.parsed.cpu.arch} to chezArch to enable building chez-racket"; + + chezOs = + /**/ if stdenv.hostPlatform.isDarwin then "osx" + else if stdenv.hostPlatform.isFreeBSD then "fb" + else if stdenv.hostPlatform.isLinux then "le" + else if stdenv.hostPlatform.isNetBSD then "nb" + else if stdenv.hostPlatform.isOpenBSD then "ob" + else throw "Add ${stdenv.hostPlatform.uname.system} to chezOs to enable building chez-racket"; + inherit (stdenv.hostPlatform) system; - chezSystem = chezSystemMap.${system} or (throw "Add ${system} to chezSystemMap to enable building chez-racket"); + chezSystem = "t${chezArch}${chezOs}"; # Chez Scheme uses an ad-hoc `configure`, hence we don't use the usual # stdenv abstractions. forBoot = { diff --git a/pkgs/development/compilers/chez-racket/shared.nix b/pkgs/development/compilers/chez-racket/shared.nix index f5a9bbc1e5b4b..46f53204309b2 100644 --- a/pkgs/development/compilers/chez-racket/shared.nix +++ b/pkgs/development/compilers/chez-racket/shared.nix @@ -24,12 +24,11 @@ stdenv.mkDerivation (args // { ''; nativeBuildInputs = lib.optionals stdenv.isDarwin (with darwin; [ cctools autoSignDarwinBinariesHook ]); - buildInputs = [ ncurses libX11 zlib lz4 ] - ++ lib.optional stdenv.isDarwin libiconv; + buildInputs = [ libiconv libX11 lz4 ncurses zlib ]; enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=format-truncation"; + env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=format-truncation"; meta = { description = "Fork of Chez Scheme for Racket"; |