Merge pull request #118490 from corpix/fix/racket

racket: patching out runtime variant detection, fix #114993
This commit is contained in:
Mario Rodas 2021-10-24 16:22:59 -05:00 committed by GitHub
commit 6b23e8fc78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 4 deletions

View file

@ -72,6 +72,13 @@ stdenv.mkDerivation rec {
buildInputs = [ fontconfig libffi libtool sqlite gsettings-desktop-schemas gtk3 ]
++ lib.optionals stdenv.isDarwin [ libiconv CoreFoundation ncurses ];
patches = [
# Hardcode variant detection because we wrap the Racket binary making it
# fail to detect its variant at runtime.
# See: https://github.com/NixOS/nixpkgs/issues/114993#issuecomment-812951247
./force-cs-variant.patch
];
preConfigure = ''
unset AR
for f in src/lt/configure src/cs/c/configure src/bc/src/string.c src/ChezScheme/workarea; do
@ -97,10 +104,6 @@ stdenv.mkDerivation rec {
enableParallelBuilding = false;
postFixup = lib.optionalString stdenv.isDarwin ''
wrapProgram $out/bin/drracket --prefix DYLD_LIBRARY_PATH : ${xorg.libX11}/lib
'';
meta = with lib; {
description = "A programmable programming language";
longDescription = ''

View file

@ -0,0 +1,18 @@
Hardcode Racket variant to CS
Hardcode variant detection because nixpkgs wraps the Racket binary making it
fail to detect its variant at runtime.
https://github.com/NixOS/nixpkgs/issues/114993#issuecomment-812951247
--- old/collects/setup/variant.rkt
+++ new/collects/setup/variant.rkt
@@ -7,7 +7,8 @@
(provide variant-suffix
script-variant?)
-(define plain-variant
+(define plain-variant 'cs)
+#;(define plain-variant
(delay/sync
(cond
[(cross-installation?)