-
Notifications
You must be signed in to change notification settings - Fork 134
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
Update flake and potery deps #569
Open
anpin
wants to merge
6
commits into
tweag:main
Choose a base branch
from
anpin:fix_poetry
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…n't be found if placed under [tool.poetry.dependencies] tweag#568
✅ Deploy Preview for tweag-jupyterwith ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
fixing ocaml kernel requires knowledge of some deep magic beyond my current understanding [I 2025-02-13 21:47:20.765 ServerApp] Kernel started: 24b40db1-ce0c-4f76-ba46-5b3bf34dc4bb
/nix/store/p2s5ccpqgzgcq16b277rmfqg5bv0aflx-extra-ocaml-path: line 2: declare: BASHOPTS: readonly variable
[I 2025-02-13 21:47:23.754 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (1/5), new random ports
/nix/store/p2s5ccpqgzgcq16b277rmfqg5bv0aflx-extra-ocaml-path: line 2: declare: BASHOPTS: readonly variable
[I 2025-02-13 21:47:26.769 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (2/5), new random ports
/nix/store/p2s5ccpqgzgcq16b277rmfqg5bv0aflx-extra-ocaml-path: line 2: declare: BASHOPTS: readonly variable
[I 2025-02-13 21:47:29.782 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (3/5), new random ports
/nix/store/p2s5ccpqgzgcq16b277rmfqg5bv0aflx-extra-ocaml-path: line 2: declare: BASHOPTS: readonly variable
[I 2025-02-13 21:47:32.795 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (4/5), new random ports
/nix/store/p2s5ccpqgzgcq16b277rmfqg5bv0aflx-extra-ocaml-path: line 2: declare: BASHOPTS: readonly variable
[I 2025-02-13 21:47:35.808 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (5/5), new random ports
/nix/store/p2s5ccpqgzgcq16b277rmfqg5bv0aflx-extra-ocaml-path: line 2: declare: BASHOPTS: readonly variable
[W 2025-02-13 21:47:38.823 ServerApp] AsyncIOLoopKernelRestarter: restart failed
|
hey @balsoft, pinging you since you are opam-nix maintainer. maybe you can help with this one? |
I tried this very crude fix and it got me further diff --git a/modules/kernels/ocaml/default.nix b/modules/kernels/ocaml/default.nix
index a023be6..ed17a50 100644
--- a/modules/kernels/ocaml/default.nix
+++ b/modules/kernels/ocaml/default.nix
@@ -76,6 +76,15 @@
name = "extra-ocaml-path";
packages = ocamlPackageDerivations ++ allRuntimePackages;
};
+ patchedRuntimeEnv = pkgs.runCommand "patched-extra-ocaml-path" {
+ inherit runtimeEnv;
+ } ''
+ sed -e '/^declare -r BASH/d'\
+ -e '/^declare -ar BASH/d'\
+ -e '/^declare -ir/d'\
+ -e '/^declare -r/d'\
+ ${runtimeEnv.inputDerivation} > $out
+ '';
ocamlinit = ''
#use "${scope.ocamlfind}/lib/ocaml/${scope.ocaml.version}/site-lib/topfind";;
Topfind.log:=ignore;;
@@ -93,7 +102,7 @@
# This is not the case with the nix store, so we have to point it to
# the corresponding store paths manually.
wrapProgram $out/bin/$filename \
- --run 'source ${runtimeEnv.inputDerivation}; source $stdenv/setup' \
+ --run 'source ${patchedRuntimeEnv}; source $stdenv/setup' \
--suffix CAML_LD_LIBRARY_PATH : "$CAML_LD_LIBRARY_PATH"
done
'';
(END) [I 2025-02-13 22:28:29.516 ServerApp] Kernel started: 4b8410a2-46c7-4989-a372-e42ee0a2b9b6
install: cannot create regular file '/build/env-vars': No such file or directory
2025-02-14T01:28:29 STDOUT>> Findlib has been successfully loaded. Additional directives:
2025-02-14T01:28:29 STDOUT>> #require "package";; to load a package
2025-02-14T01:28:29 STDOUT>> #list;; to list the available packages
2025-02-14T01:28:29 STDOUT>> #camlp4o;; to load camlp4 (standard syntax)
2025-02-14T01:28:29 STDOUT>> #camlp4r;; to load camlp4 (revised syntax)
2025-02-14T01:28:29 STDOUT>> #predicates "p,q,...";; to set these predicates
2025-02-14T01:28:29 STDOUT>> Topfind.reset();; to force that packages will be reloaded
2025-02-14T01:28:29 STDOUT>> #thread;; to enable threads
2025-02-14T01:28:29 STDOUT>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR: