aveltras has quit [Quit: Connection closed for inactivity]
manveru_ has joined #haskell.nix
manveru has quit [Ping timeout: 256 seconds]
buggymcbugfix has quit [Ping timeout: 256 seconds]
buggymcbugfix has joined #haskell.nix
manveru_ is now known as manveru
proofofkeags has joined #haskell.nix
hexagoxe- has joined #haskell.nix
hexagoxel has quit [Ping timeout: 256 seconds]
hexagoxe- is now known as hexagoxel
<ocharles>
I'm gonna spend a bit of time looking into this
<michaelpj>
hmm, I would have hoped we'd have noticed if dataFiles was broken...
<ocharles>
Oh, this conversation is something else. I meant the explosion of src directories
<ocharles>
But dataFiles doesn't work properly for me either, but that's easier to work around
<ocharles>
I'm looking at some `plan-to-nix-pkgs.drv` derivations and they have `-src` inputs that are full directories, so that already looks suspicious according to what you said on GitHub
<michaelpj>
maybe this `canCleanSource` thing is broken
<ocharles>
Yea, I'm already in that file (and `clean-source-with.nix`)
<ocharles>
I'm familiar enough to do some digging, will report back!
__monty__ has joined #haskell.nix
<ocharles>
Something is definitely up. If I do `nix-instantiate -E 'let pkgs = import ./nix/pkgs {}; in pkgs.circuithub-haskell-nix.hsPkgs.circuithub-prelude.components.library'`, I get a `.drv` back with a src input that is just the `prelude/` directory (fine), but if I watch `/nix/store` with inotify tools at the same time, it literally copies the whole directory into the store. Not much of an update, but a confirmation of a problem
<__monty__>
ocharles: Doesn't nix always copy the src to the store?
<ocharles>
Only when it's forced in a particular way. I believe the point of cleanSourceWith is to let you chain a bunch of filters, and then only copy in a filtered version of a directory
<ocharles>
Also, this is all copied in with the name `circuithub-src-root-prelude`, so I don't think the intention is that it sees the entire repository, but just the subdirectory it needs
<ocharles>
By doing `includeSiblings = true`, every package that is project local copies the entire root directory into the store. I'm not quite sure what to suggest - there seems to be talk about "cross package references", but I don't know much more beyond that (we certainly don't expect one sub-directory to be able to refer to sibling or parent files)
<ocharles>
Just trying out a branch with that set to `false` now
<michaelpj>
yeah, seems suspicious
<michaelpj>
need the equivalent of `disallowedRequisites` but for source files, somehow...
<michaelpj>
it's really hard to ensure this sort of thing doesn't creep in
<ocharles>
Honestly I'd just say "no, Haskell.nix will only copy the directory containing a `.cabal` file per package". If you're doing all sorts of weird shit saying "data-files: ../foo", then we'd provide you with the necessary tools to augment your cabalProject call
<michaelpj>
I do agree that this should not be on by default
<ocharles>
I suspect this will dramatically speed up evaluation too, because watching /nix/store with inotifytools shows entering a shell each package ends up copying the entire root folder into the store
immae has joined #haskell.nix
buggymcbugfix_ has joined #haskell.nix
buggymcbugfix has quit [Ping timeout: 256 seconds]
<michaelpj>
immae: we probably need moritz for that, and he's pretty busy with other stuff atm...
<immae>
Any idea of the time it would require to get attention?
<immae>
(Just to know if it’s worth waiting or forking)
<michaelpj>
immae: no idea
<michaelpj>
I left a comment with a suggestion, though
<michaelpj>
I think it would be easier to not do this via magic-comment+nix-tools
<immae>
Ah I think too (I assumed it was not a very nice way to do), but I saw no other way :D
<immae>
Thanks for the comment
<michaelpj>
yeah, I'm not sure the docs mention sha256map yet
<ocharles>
Yep, reverting that change in 843 has got evaluation on CI down to under 2 mins!
<ocharles>
happy dayz
<immae>
If we wait long enough there will be the "fetchAllRefs" flag to builtins.fetchGit, but that might not be a happy solution either
<michaelpj>
does cabal fetch all refs by default?
<immae>
I have no idea what cabal does, I assume there is no sane way in git to only get a given reference
<immae>
so either fetching a branch or the whole repo
<michaelpj>
I guess I'm asking the ur-question: does this work in Cabal?
<michaelpj>
i.e. would a non-nix user who tried to use that project succeed?
<immae>
in stack it works
<michaelpj>
or would cabal complain?
<michaelpj>
ah righ
<immae>
I don’t diretly use cabal
<michaelpj>
so stack presumably fetches all refs then
<immae>
Let me try and figure out
<immae>
(I’m sure that stack’s message only say "fetching abcd123", but it doesn’t tell what it does internally)
<michaelpj>
generally our preference is "do whatever the build tool does"
<immae>
notes
<immae>
* noted
<immae>
I’ll investigate and update appropriately
_d0t has joined #haskell.nix
<_d0t>
ohai! Is there a way to get a list of all non-haskell dependencies for a given project or component?
<michaelpj>
ocharles: sounds great! I wish we had some kind of "eval time regression" CI test for this kind of thing...
<michaelpj>
_d0t: probably you can do stuff with the normal `nix-store` query commands, but I always have to look up how those work...
<michaelpj>
do you want this in an automated way, or just for exploratory purposes?
<michaelpj>
if the latter, the `nix-tree` utility is nice
<_d0t>
It's the latter and I wanna use it as an input for nix-shell.
<_d0t>
Basically, I want a separate shell that contains only non-haskell dependencies.
<michaelpj>
and you can't use `shellFor` from `haskell.nix`?
<_d0t>
I can, but it'll pull haskell stuff.
<michaelpj>
then I think no easy way of doing that automatically short of replicating the logic `shellFor` uses
<_d0t>
this is rather unfortunate :(
<michaelpj>
what are you trying to achieve?
<_d0t>
so, I have a stack project here, and I would like stack and haskell.nix to use the same native packages. For that, I would like to add some haskell.nix-based shell to stack.yaml via shell-file pragma.
<immae>
michaelpj: with an equivalent to sha256map I can indeed avoid having to patch the nix-tools, which is very nice
<immae>
Thanks for the pointer!
<_d0t>
I'm curious about one more thing. Has anyone tried to build reflex-platform projects using haskell.nix?