Hello,
Complete noob here, learning both nix and starting racket at the same time - might not be a good idea.
I installed Racket using nix, below is my derivation to install it
let
pkgs = import <nixpkgs> { };
in
pkgs.mkShell {
buildInputs = [
pkgs.racket
];
}
I ran racket
- played around with the repl and things looked good. I ran drracket
which resulted in ffi-lib error
ffi-lib: could not load foreign library
path: libX11.6.dylib
Update my nix derivation
let
pkgs = import <nixpkgs> { };
in
pkgs.mkShell {
buildInputs = [
pkgs.racket
pkgs.xorg.libX11
#pkgs.xorg.libX11.dev
];
LD_LIBRARY_PATH="${pkgs.xorg.libX11}/lib";
}
This both installs libX11 and set up the library load path environment variable. At this point I tried drracket again with no luck - same error.
After browsing documentation and blog posts I came to the conclusion that I might need additional changes to the configuration
This is the configuration code/dictionary set up by nix when installing racket
;; generated by unixstyle-install
#hash(
(doc-dir . "/nix/store/pa9q13354fhxfalyvcd5hlxk4h2amv4b-racket-8.8/share/doc/racket")
(lib-dir . "/nix/store/pa9q13354fhxfalyvcd5hlxk4h2amv4b-racket-8.8/lib/racket")
(pkgs-dir . "/nix/store/pa9q13354fhxfalyvcd5hlxk4h2amv4b-racket-8.8/share/racket/pkgs")
(share-dir . "/nix/store/pa9q13354fhxfalyvcd5hlxk4h2amv4b-racket-8.8/share/racket")
(include-dir . "/nix/store/pa9q13354fhxfalyvcd5hlxk4h2amv4b-racket-8.8/include/racket")
(bin-dir . "/nix/store/pa9q13354fhxfalyvcd5hlxk4h2amv4b-racket-8.8/bin")
(apps-dir . "/nix/store/pa9q13354fhxfalyvcd5hlxk4h2amv4b-racket-8.8/share/applications")
(man-dir . "/nix/store/pa9q13354fhxfalyvcd5hlxk4h2amv4b-racket-8.8/share/man")
(absolute-installation? . #t)
(compiled-file-roots . (same "/nix/store/pa9q13354fhxfalyvcd5hlxk4h2amv4b-racket-8.8/lib/racket/compiled"))
(build-stamp . "")
(doc-search-url . "https://download.racket-lang.org/releases/8.8/doc/local-redirect/index.html")
(catalogs . ("https://download.racket-lang.org/releases/8.8/catalog/" #f))
)
What (in) or how do I update the configuration for racket to look at environment load path?
I understand this might be a question that is more nix centric. Attempt to ask a question here because my belief that racket configuration can be updated to use the LD_LIBRARY_PATH
Thanks
-Bhaskar