| 25 Jan 2025 |
Collin Arnett | This might be a really dumb idea but I was wondering what the best way would be to go about calling a nix flake from haskell. I have a test suite that requires some rather large files that are needed for testing and I would like the lifecycle of those files to be managed by nix. Ideally, the haskell code could resolve the path of the files I'm looking for during the test and nix could handle the evaluation if necessary. Nix managing these filles would be far nicer than haskell or manual management since if the file does not exist it can be fetched and stored lazily, only being cleaned up on GC.
The most bruteforce and straight forward way of doing this would be to drive the nix command to build the target, then parse the nix output for the resulting path. Is there some haskell package that has a better orchestration interface for Nix like I'm describing, should I just move forward with bruteforce method or is there some sort of really obvious way of doing what I'm asking? | 23:38:25 |
| 26 Jan 2025 |
Collin Arnett | This seems pretty nice https://hackage.haskell.org/package/hercules-ci-cnix-expr although undocumented. | 00:25:52 |
| @vigress9:matrix.org changed their profile picture. | 05:04:59 |
| @vigress9:matrix.org removed their profile picture. | 05:05:05 |
maralorn | @collinarnett:matrix.org I would pass in the files via environment variable and set that variable in the nix derivation for the testPhase and in the nix shell. | 09:56:46 |
lambdatheultimatealias | I have a package that depends on amazonka-core which is broken on haskell-updates now. I know cachix has the same problem. Do I need to do anything? Is there a plan for amazonka-core? | 14:15:27 |
Collin Arnett | Yeah I guess that makes sense. I think it would be really cool if Nix was more like a library I could call rather than wrapping everything in Nix. | 14:56:12 |
maralorn | Collin Arnett: I hear that a lot. | 15:11:15 |
sterni | lambdatheultimatealias: there are no concrete plans, no. We'd appreciate if someone could look into amazonka. | 15:35:47 |
lambdatheultimatealias | sterni: Ok. It appears somebody else got there first. I don't know if it built yet. Hopefully this does the trick! https://github.com/mpscholten/nixpkgs/commit/c1cfff548f951e57f09a9e32cc4bc7e1048429e3 | 17:18:00 |
| Quentin Le Guennec joined the room. | 19:40:09 |
lambdatheultimatealias | Here's a more helpful link. It looks like there's a PR to be reviewed already: https://github.com/NixOS/nixpkgs/pull/376564 | 20:10:36 |
hellwolf | nix-shell$ ghc-pkg list --global
/nix/store/qj54vnsx6nk18nmy8r21w7src01hbq2g-ghc-9.10.1/lib/ghc-9.10.1/lib/package.conf.d
...
How do you get that /nix/store/qj54vnsx6nk18nmy8r21w7src01hbq2g-ghc-9.10.1/lib/ghc-9.10.1/lib/package.conf.d path programatically?
| 21:56:10 |
hellwolf | $ ghc --print-global-package-db
/nix/store/qj54vnsx6nk18nmy8r21w7src01hbq2g-ghc-9.10.1/lib/ghc-9.10.1/lib/package.conf.d
| 23:25:49 |
| 27 Jan 2025 |
chreekat | I've looked at this some more, comparing results on different commits, and I haven't found any reason to think I'm wrong yet | 12:51:51 |
chreekat | I did see a commit around that time that reverted a stackage bump because all-cabal-hashes apparently wasn't updating? I need to ask more questions about that. But could it have had an effect? | 12:52:55 |
| ahaskeller joined the room. | 13:52:41 |
sterni | hm refined github has a feature where you can alt click on the hidden comments thing and it tries to load all of them | 17:06:41 |
sterni | it's still pretty clunky but better than clicking a million times | 17:06:57 |
Profpatsch | sternenseemann: IT WHAT? | 17:29:29 |
Profpatsch | TIL | 17:29:35 |
sterni | I’ve installed it now for this purpose only, haskell-updates is unusable without it now with the extra noise GitHub’s lack of base commit updating causes | 17:30:55 |
Profpatsch | sternenseemann: Ah, refined github | 17:36:13 |
Profpatsch | I thought vanilla | 17:36:15 |
sterni | hahaha no | 17:36:25 |
Profpatsch | I noticed again today how much Github has stagnated | 17:37:03 |
Profpatsch | Things that have been bugs for over a decade now | 17:37:12 |
Profpatsch | honestly I don’t think it will improve | 17:37:25 |
Profpatsch | But kinda scary to give a large extension like that access to your github session cookie | 17:37:57 |
Profpatsch | who knows what it does | 17:38:02 |