diff options
Diffstat (limited to 'pkgs/development/compilers/chez-racket')
-rw-r--r-- | pkgs/development/compilers/chez-racket/default.nix | 59 | ||||
-rw-r--r-- | pkgs/development/compilers/chez-racket/setup-hook.sh | 5 | ||||
-rw-r--r-- | pkgs/development/compilers/chez-racket/shared.nix | 40 |
3 files changed, 0 insertions, 104 deletions
diff --git a/pkgs/development/compilers/chez-racket/default.nix b/pkgs/development/compilers/chez-racket/default.nix deleted file mode 100644 index 158dfa052933..000000000000 --- a/pkgs/development/compilers/chez-racket/default.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ stdenv, buildPackages, callPackage }: - -let - 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 = "t${chezArch}${chezOs}"; - # Chez Scheme uses an ad-hoc `configure`, hence we don't use the usual - # stdenv abstractions. - forBoot = { - pname = "chez-scheme-racket-boot"; - configurePhase = '' - runHook preConfigure - ./configure --pb ZLIB=$ZLIB LZ4=$LZ4 - runHook postConfigure - ''; - makeFlags = [ "${chezSystem}.bootquick" ]; - installPhase = '' - runHook preInstall - mkdir -p $out - pushd boot - mv $(ls -1 | grep -v "^pb$") -t $out - popd - runHook postInstall - ''; - }; - boot = buildPackages.callPackage (import ./shared.nix forBoot) {}; - forFinal = { - pname = "chez-scheme-racket"; - configurePhase = '' - runHook preConfigure - cp -r ${boot}/* -t ./boot - ./configure -m=${chezSystem} --installprefix=$out --installman=$out/share/man ZLIB=$ZLIB LZ4=$LZ4 - runHook postConfigure - ''; - preBuild = '' - pushd ${chezSystem}/c - ''; - postBuild = '' - popd - ''; - setupHook = ./setup-hook.sh; - }; - final = callPackage (import ./shared.nix forFinal) {}; -in -final diff --git a/pkgs/development/compilers/chez-racket/setup-hook.sh b/pkgs/development/compilers/chez-racket/setup-hook.sh deleted file mode 100644 index 1d81489bd4e4..000000000000 --- a/pkgs/development/compilers/chez-racket/setup-hook.sh +++ /dev/null @@ -1,5 +0,0 @@ -addChezLibraryPath() { - addToSearchPath CHEZSCHEMELIBDIRS "$1/lib/csv-site" -} - -addEnvHooks "$targetOffset" addChezLibraryPath diff --git a/pkgs/development/compilers/chez-racket/shared.nix b/pkgs/development/compilers/chez-racket/shared.nix deleted file mode 100644 index 46f53204309b..000000000000 --- a/pkgs/development/compilers/chez-racket/shared.nix +++ /dev/null @@ -1,40 +0,0 @@ -args: -{ stdenv, lib, fetchFromGitHub, coreutils, darwin -, ncurses, libiconv, libX11, zlib, lz4 -}: - -stdenv.mkDerivation (args // { - version = "unstable-2021-12-11"; - - src = fetchFromGitHub { - owner = "racket"; - repo = "ChezScheme"; - rev = "8846c96b08561f05a937d5ecfe4edc96cc99be39"; - sha256 = "IYJQzT88T8kFahx2BusDOyzz6lQDCbZIfSz9rZoNF7A="; - fetchSubmodules = true; - }; - - prePatch = '' - rm -rf zlib/*.c lz4/lib/*.c - ''; - - postPatch = '' - export ZLIB="$(find ${zlib.out}/lib -type f | sort | head -n1)" - export LZ4="$(find ${lz4.out}/lib -type f | sort | head -n1)" - ''; - - nativeBuildInputs = lib.optionals stdenv.isDarwin (with darwin; [ cctools autoSignDarwinBinariesHook ]); - buildInputs = [ libiconv libX11 lz4 ncurses zlib ]; - - enableParallelBuilding = true; - - env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=format-truncation"; - - meta = { - description = "Fork of Chez Scheme for Racket"; - homepage = "https://github.com/racket/ChezScheme"; - license = lib.licenses.asl20; - maintainers = with lib.maintainers; [ l-as ]; - platforms = lib.platforms.unix; - }; -}) |