| 21 Nov 2024 |
lxsameer | In reply to @maralorn:maralorn.de Re 2. well, that only happens if the hackage index you use to generate the freeze file is newer than the one nixpkgs. Maybe there is a way to couple that? When I work on a project, i usually add deps that are newer than nixpkgs pin | 19:47:13 |
lxsameer | In reply to @maralorn:maralorn.de Re 3. yeah, that’s because zlib is a haskell package and a system package. The haskell package needs the system package. As you can see in the hackage-packages.nix file in nixpkgs hackage2nix emits code which correctly overrides the inputs of the haskell package with the system package. Your override generation has no such logic and thus you get a loop. interesting, I disabled it and it works in my case. But i guess we need a way to exclude those packages for now | 19:47:40 |
sterni (he/him) | lxsameer: index & flags are easy: generate the packages using cabal2nix (maybe as a library) directly. This allows you to reuse the db cabal-install used to generate the freeze file and you can pass all flags to cabal2nix so that the generated expression reflects them correctly | 21:03:01 |
sterni (he/him) | the infinite loop is trickier. hackage2nix has some code for dealing with that I'd need to look up how it works as well though | 21:03:25 |
lxsameer | In reply to @sternenseemann:systemli.org lxsameer: index & flags are easy: generate the packages using cabal2nix (maybe as a library) directly. This allows you to reuse the db cabal-install used to generate the freeze file and you can pass all flags to cabal2nix so that the generated expression reflects them correctly could you please elaborate? an example would be appriciated | 21:03:53 |
sterni (he/him) | E.g. if you run cabal2nix cabal://postgresql-libpq -f use-pkg-config normally, it a) applies the flag before generating the code, so conditional dependencies are correct and b) it'll use the package index downloaded by cabal update | 21:09:53 |
sterni (he/him) | you can use cabal2nix as a library and these expressions can just be dumped into your overlay instead of the updateHackage mechanism | 21:10:24 |
lxsameer | In reply to @sternenseemann:systemli.org E.g. if you run cabal2nix cabal://postgresql-libpq -f use-pkg-config normally, it a) applies the flag before generating the code, so conditional dependencies are correct and b) it'll use the package index downloaded by cabal update ah got it, but does cabal2nix will use hackage as well? | 21:23:25 |
sterni (he/him) | what do you mean? | 21:23:52 |
lxsameer | in my understanding, cabal2nix, only uses the nixpkgs's version of a haskell package right? | 21:25:24 |
sterni (he/him) | cabal2nix can ingest a variety of things. In the ifd helpers in nixpkgs we can't impurely get anything, so we use the database we have checked in (or rather something equivalent to the database). But if you invoke cabal2nix outside of a derivation you can do whatever. | 23:35:01 |
sterni (he/him) | the cabal:// syntax uses the cabal-install provided database to get the cabal file and source of the package | 23:35:33 |
| 22 Nov 2024 |
| flounders joined the room. | 09:53:10 |
lxsameer | cool, I'll give it a shot | 10:38:51 |
lxsameer | In reply to @sternenseemann:systemli.org cabal2nix can ingest a variety of things. In the ifd helpers in nixpkgs we can't impurely get anything, so we use the database we have checked in (or rather something equivalent to the database). But if you invoke cabal2nix outside of a derivation you can do whatever. One final question, you are suggesting to call the cabal2nix as process and capturing the output right? You don't mean using callCabal2nix. Am I correct? | 17:28:57 |
sterni (he/him) | I don't mean callCabal2nix no, that uses derivations | 17:29:28 |
sterni (he/him) | it's probably best to use the library that cabal2nix exposes, as I've mentioned before | 17:30:07 |
lxsameer | thank you. | 17:31:47 |
alexfmpe | how can I see hydra cached status?
I did a nixpkgs bump on a project to last haskell-updates -> master merge and getting unexpected builds given it's in master for 2 weeks now and usually we cache even before then
on my NixOS I had a 15min build of ~20 packages due to overrides, but when doing the same on MacOS I get ~100 packages | 21:12:25 |
maralorn | alexfmpe, you can try to find the job you are interested in on hydra.nixos.org. There you can also see the built commit. | 21:19:23 |
alexfmpe | https://hydra.nixos.org/eval/1809838 seems allright | 21:41:37 |
alexfmpe | I wonder if some builder is having hiccups | 21:41:44 |
alexfmpe | * I wonder if some cache is having hiccups | 21:41:59 |
maralorn | I regularly do sudo rm /root/.cache/nix because that cache caches cache misses. | 21:43:03 |
alexfmpe | yikes | 21:43:13 |
alexfmpe | lessee | 21:43:20 |
maralorn | I never could proof a wrong miss in the upstream cache even though I often suspected it. | 21:44:09 |
Alex | In reply to @maralorn:maralorn.de I regularly do sudo rm /root/.cache/nix because that cache caches cache misses. Why not disable the caching of failures altogether? There's a Nix config option for that. | 22:00:14 |
emily | or just upgrade Nix; there's no "cached failure" without an error message these days | 22:08:30 |
emily | unless I misunderstand | 22:08:45 |