<typetetris>
What is the attribute name for the override?
<typetetris>
Thanks for you always answering my questions!
<michaelpj>
typetetris: `sourceOverrides` is an attribute set that gets `//`d with the thing that comes out of niv, and if you look at `sources.json` you'll see that repo is `nix-tools`
hekkaidekapus} has quit [Quit: hekkaidekapus}]
hekkaidekapus has joined #haskell.nix
fendor has joined #haskell.nix
fendor has quit [Remote host closed the connection]
<typetetris>
I can't connect the documentation of materialization with what I am seeing, trying to use it. Adding "index-state" to "cabalProject" call didn't change the output for example as described.
<typetetris>
no `nix-hash` command is mentioned in the output I am seeing.
<typetetris>
michaelpj: Next question would be, how to materialize the stuff for haskell-language-server and the stuff in tools, but the ticket probably isn't the correct place for that.
<michaelpj>
you can't really materialize the stuff in tools. It's designed to be easy-to-use, not easy to customize. If you want to do that I advise just having the `cabalProject` expression for HLS in your own config
<michaelpj>
(I'm not a huge fan of the 'tools' thing partially for this reason)
<typetetris>
michaelpj: Ok, thanks.
<typetetris>
is there also `hackage-package'` ?
<typetetris>
okay, I have to use `hackage-project` then I guess?
<typetetris>
How are the paths for the `materialized` attribute set there? I can only see `checkMaterialization` being passed around?
<michaelpj>
typetetris: those ones aren't totally materialized, I've just pinned the `plan-sha256`. Which makes it fixed-output, but not totally read-from-disk
codygman has quit [Read error: Connection reset by peer]
codygman has joined #haskell.nix
<typetetris>
michaelpj: Ok. One last thing and I think I am set for now: What about hoogle? Using shellFor tells me hoogle isn't materialized. Can I get that materialized too?
<michaelpj>
typetetris: uh, not sure. I'd have to dig around in the `haskell.nix` source to figure out where that comes from...
<typetetris>
tried to do that ... I couldn't spot it in the 15 min I spent on it.
acarrico has joined #haskell.nix
fendor has quit [Quit: Leaving]
<typetetris>
What is really strange: My test suites, compiled with `-threaded -with-rtsopts=-N` seem to use only one cpu since I started using haskell.nix?
<typetetris>
Is that to be expected?
<michaelpj>
as in, it runs single-threaded in the derivation that runs the test, or it runs single-threaded when you do `cabal test`?
fendor has joined #haskell.nix
<typetetris>
`cabal test` does run them in parallel, but building the executable `(cabalProject { ... }).projectName.components.tests.test-suite-exe` and calling `test-suite-exe` does run on one core.
<michaelpj>
is there some argument that cabal passes to make it run in parallel which isn't being passed elsewhere? Do you get it in parallel if you build the test executable with cabal and run that directly?
<typetetris>
This is rather strange ... executable from haskell.nix reports the same `+RTS --info` stuff as `cabal test test-suite-name --test-option=+RTS --test-option=--info` ... `,("RTS way", "rts_thr")` and `,("Flag -with-rtsopts", "-N")`
<typetetris>
`test-suite-exe +RTS -N32` doesn't help also ...
<michaelpj>
you know, I think I might have also observed this and been mystified
<michaelpj>
in that I had my test suite be a lot slower when I built it in a nix-shell but not outside. And that was just using `cabal build`
<michaelpj>
I'd be interested to see if you get the same non-parallel behaviour if you `cabal build` the test-suite inside a `nix-shell`
<typetetris>
michealpj: Definitely the nix-shell. Calling the executable produced by `haskell.nix` outside the nix-shell it is parallel as expected.
<typetetris>
michaelpj: I was using direnv and didn't have this behaviour, so it is not triggered by env variables. Some kind of cgroup stuff. I will ask on #nixos.
fendor has quit [Remote host closed the connection]
<typetetris>
okay normal nix-shell doesn't show that behaviour
<michaelpj>
okay now I'm confused about which combination shows which behaviour! Could you open an issue if you manage to figure out which combination triggers it?
<typetetris>
michaelpj: Yes, will do. I'll try to make a trivial example reproducing it.
<typetetris>
Seems like some derivation `...components.exes.stuff` in `buildInputs` is sufficient.
<michaelpj>
there's definitely something weird here
<typetetris>
Maybe there is a setupHook attached to those.
<typetetris>
Is it ok if I link to a repo with the test case or should I c&p all files in the ticket?
codygman has quit [Read error: Connection reset by peer]
codygman has joined #haskell.nix
pjb has quit [Remote host closed the connection]
<michaelpj>
typetetris: link to a repo is fine
fendor has joined #haskell.nix
pjb has joined #haskell.nix
<typetetris>
I am baffled. I can't reproduce it with a minimal example so far ...
codygman has quit [Ping timeout: 272 seconds]
codygman has joined #haskell.nix
codygman has quit [Read error: Connection reset by peer]
codygman has joined #haskell.nix
<michaelpj>
one of those kinds of bugs...
jD91mZM2 has joined #haskell.nix
<typetetris>
michaelpj: It has `Cpus_allowed_list: 28` in its `/proc/<pid>/status` so somehow cpusets or cgroups have been used to restrict it.
<typetetris>
clever from #nixos claims it is a bug in `nix-shell` it restricts itself to one cpu and sometimes it doesn't lift that restriction ...