Closed yvan-sraka closed 10 months ago
@KtorZ is that PR a correct fix for your issue?
@yvan-sraka that sounds slightly better indeed, but still sub-optimal if I can say as we still only know about the location of that file after entering the shell. And there's not much scripting possible from it.
What could be nice would be to be able to build that file as a standalone derivation? So that we can pre-build the cabal.project.local prior to entering the nix shell.
So if this was instead a function that was exposed
function patchProjectLocal() {
cat /nix/store/... >> "$1"
}
Would that do?
exposing it outside of the DevX shell might be a bit tricky as that's our single entry point for GH Actions.
We could probably expose it as separate attributes in the flake though if someone wanted to
nix build .#ghc810-iog-cabalProjectLocal
or something?
I like the idea of a separate attribute more than the function.
I like the idea of a separate attribute more than the function.
It could be both, but you wouldn't be able to use the separate attribute from the devx GitHub actions.
I updated the PR, now you have e.g. nix build ".#cabalProjectLocal.static"
:)