stacklock2nix
stacklock2nix copied to clipboard
Approach of copying subdirs for git extra-deps breaks in the presence of relative symlinks
In stack.yaml
I have something like:
- git: https://github.com/tensorflow/haskell.git
commit: 925c2e95151c0ea1592c26b51a5d98e4ca4a2fe7
subdirs:
- tensorflow
- tensorflow-proto
I see that this leads to a different src
derivation for each subdir here: https://github.com/cdepillabout/stacklock2nix/blob/22676dfc45fa1c33899ba1da1a23665172a18ba7/nix/build-support/stacklock2nix/default.nix#L390
But for this repo, that leads to a failing build, because the tensorflow-proto
subdir has a relative symlink third_party
in it that points to ../third_party
- this symlink becomes dangling when only the subdir is copied to the store. (third_party
itself happens to have a submodule in it, but that's #44.)