-
-
Notifications
You must be signed in to change notification settings - Fork 16.6k
racket: patching out runtime variant detection, fix #114993 #118490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Result of 2 packages built successfully:
15 suggestions:
Result of 1 package failed to build:2 packages built successfully:
15 suggestions:
Note that build failures may predate this PR, and could be nondeterministic or hardware dependent. |
@@ -71,6 +71,7 @@ stdenv.mkDerivation rec { | |||
buildInputs = [ fontconfig libffi libtool sqlite gsettings-desktop-schemas gtk3 ] | |||
++ lib.optionals stdenv.isDarwin [ libiconv CoreFoundation ncurses ]; | |||
|
|||
patches = [ ./variant.patch ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment why we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, done
I am sorry, I don't have time to review this right now, but I'd like to link racket/racket#3685 which seems to be relevant. In any case, thank you for your work in improving our Racket support! |
Result of 1 package marked as broken and skipped:
1 package failed to build:
|
It's not directly related, but, for anyone reading this thread, there's been some coordination going on for Nix- and Guix-related issues with Racket over at racket/racket#3707. Among other things, most (hopefully all!) patches to the Racket source should no longer be needed for the forthcoming Racket 8.1. |
@@ -0,0 +1,54 @@ | |||
diff --git racket/collects/setup/variant.rkt racket/collects/setup/variant.rkt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does the following patch work for you?
--- racket/collects/setup/variant.rkt
+++ racket/collects/setup/variant.rkt
@@ -6,7 +6,8 @@
(provide variant-suffix)
-(define plain-variant
+(define plain-variant 'cs)
+#;(define plain-variant
(delay/sync
(cond
[(cross-installation?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I could, this should save some patch lines :)
Will check results later when build finish
ping @corpix |
I marked this as stale due to inactivity. → More info |
Not relevant anymore |
I'm sorry for the late response. |
Motivation for this change
raco exe some-racket-file.rkt
is not working since update to Racket 8.0, see #114993It fails because Racket try to detect a runtime variant reading a string from it's own executable. Of course it fails to correctly detect runtime type using this method because racket executable is a wrapper script.
This pull request removes patching out a runtime detection mechanism, hardcoding
'cs
runtime variant (because this is a variant built by racket derivation).I don't like this solution. But maybe someone who will see this pull request could suggest a better way to mitigate the problem?
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)