Comments (10)
For the record, I believe the relevant upstream issue is NixOS/nix#5663. This comment from Eelco makes me skeptical that an upstream solution is forthcoming.
from ghc.nix.
@MangoIV do you have any opinion on how best to do this?
from ghc.nix.
it actually does, see this line:
Line 59 in f324c9a
from ghc.nix.
how best to do this
the pain here comes from not being able to be able to pass arguments to flake commands, that's why there's this userSettings
attrset.
I agree this is not nice, afaik it's worked on on the nix side of things but I can't estimate when that lands.
from ghc.nix.
fwiw I documented the use of userSettings
here:
Line 145 in f324c9a
Perhaps I should highlight this more prominently?
from ghc.nix.
I also thought about a flake template so that people can init a custom flake that takes their settings, but I haven't quite had a deep enough look into it.
from ghc.nix.
another way would be to generate all outputs but that would be quite the hack.
from ghc.nix.
fwiw I documented the use of
userSettings
here:Line 145 in f324c9a
Perhaps I should highlight this more prominently?
The problem with userSettings
is that it's not uncommon for a user to have more than one GHC tree, each using a different devShell
. Modifying the flake makes this workflow very error-prone. I suppose we could recommend that users instead have one ghc.nix checkout per GHC working tree, although this seems non-ideal.
I agree this is not nice, afaik it's worked on on the nix side of things but I can't estimate when that lands.
Even worse, as far as I'm aware, it's not even clear that there is upstream consensus that the status quo is even problematic (or, rather, that there is a solution that wouldn't do more harm than good). For this reason, I do wonder whether we wouldn't be better off offering devShell
s for common cases, letting the "special" cases be handled by userSettings
.
another way would be to generate all outputs but that would be quite the hack.
I agree; generating all outputs seems unnecessary. I think merely handling the common cases (for some value of "common") would be sufficient.
CCing @Ericson2314 as I know he has thought about this and is quite involved on the nix side of things.
from ghc.nix.
I think merely handling the common cases (for some value of "common") would be sufficient
if John Ericson doesn't know a good solution I can open a corresponding issue as an intermediate solution and also handle that, if you could perhaps tell what's most used in your experience, that would be great.
from ghc.nix.
@bgamari can you perhaps look whether #172 looks like an intermediate solution for you?
from ghc.nix.
Related Issues (20)
- withHadrianDeps no longer works HOT 4
- /tmp/nix-shell-32141-0/rc: line 3: ./boot: Is a directory HOT 1
- boot fails with version `GLIBC_2.33' not found
- Provide LD to the environment HOT 1
- error: nix-shell requires a single derivation HOT 4
- feature: future improvement possibilities HOT 3
- feature: future improvement possibilities HOT 1
- Rename master branch to main
- Add CI pipelines for WebAssembly and Javascript targets
- More stable nixpkgs sources HOT 4
- Haskell packages and haskell-language-server must come from same source
- Missmatch in Cabal Hash HOT 11
- Issues with WSL and mounted file systems HOT 1
- Add cachix to nixConfig
- Building GHC JS Backend fail: Missing C Library `gmp` HOT 5
- check whether `wasi` and `js` devShells work in CI
- GHC.nix script doesn't work on strict mode
- The provided HLS (version 1.10) is unusable HOT 9
- Can we archive this repo? HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ghc.nix.