| 16 Sep 2025 |
Alex | In reply to @bglgwyng:matrix.org Do you think IFD on plan.json be slow? I thought that if plan.json is cached and the evalution of its derviation is fast, then it would be ok. Or, is just every IFD slow then? If it's cached it's not a problem.
But often it's not cached, because Nix doesn't know that the store paths produced by IFD depend on the store path being imported.
So any GC deletes the path unless(?) you're in the middle of evaluating it. | 07:35:39 |
bglgwyng | I'll check it. If I implemented correctly as I intended, then plan.json's rebuild should only depends on *.cabal files and repositories option values, which are not changed often. | 07:37:07 |
MangoIV | I think haskell.nix can do Windows cross, I wasn't aware nixpkgs can do that | 07:37:35 |
Alex | In reply to @mangoiv.:matrix.org I think haskell.nix can do Windows cross, I wasn't aware nixpkgs can do that True, Windows support should not be expected in Nixpkgs in general. | 07:38:21 |
sterni (he/him) | In reply to @bglgwyng:matrix.org Do you mean a bug in builtins.functionArgs? haskellPackages.mkDerivation | 09:49:44 |
sterni (he/him) | or rather the callPackage implementation | 09:49:59 |
bglgwyng | Yes. I realized that after I tried to fix the issue. | 09:54:08 |
bglgwyng | I think that callCabal2Nix result would better expose expr of itself as an attribute. | 09:54:40 |
bglgwyng | When expr is exposed, functionArgs expr might give us enough information | 09:55:17 |
bglgwyng | * When expr is exposed, functionArgs expr might give us enough information to correct the behavior | 09:55:30 |
sterni (he/him) | I mean that's “just” another target, but true. Support for targets that relate to IOGs business are probably going to be more fleshed out (Android, iOS, Windows, …). I think Windows has been worked again in Nixpkgs recently, though.
The big thing is probably that they have an qemu based iserv setup for TH in cross. | 10:01:08 |
sterni (he/him) | We should probably eventually look into that again… | 10:01:24 |
bglgwyng | I hoped callCabal2Nix is enough to do my stuffs, but it turns out not. I realized that I need more control over arguments passed to cabl2nix expression. | 10:23:40 |
bglgwyng | It seems that I need to define mkDerivation, which is to be passed to cabal2nix expression. | 10:24:06 |
bglgwyng | Do we have a nice example other than one ine nixpkgs? | 10:24:20 |
cdepillabout | stacklock2nix has this same problem. Here's how I'm solving it: https://github.com/cdepillabout/stacklock2nix/blob/108f6ab6d0208e3842443bea26dfd72b37d82f28/nix/build-support/stacklock2nix/cabal2nixArgsForPkg.nix | 10:26:46 |
bglgwyng | Thanks! | 10:27:12 |
sterni (he/him) | bglgwyng: https://github.com/NixOS/nixpkgs/pull/443442 | 13:56:12 |
bglgwyng | Great! | 15:09:28 |
| 17 Sep 2025 |
bglgwyng | > Using Parsec parser
> Did not find a GI repository for GLib-2.0 in ["/nix/store/367sp8xqvk70a050fm6f8a93lig0gx41-ghc-9.10.1/share/gir-1.0","/nix/store/6zdgga8jx741p46wmx8xyibwz3x3fps6-ncurses-6.5/share/gir-1.0","/nix/store/hnzqas16kwcvaj2j5wb4izxdh692f9vn-elfutils-0.193/share/gir-1.0","/nix/store/05h9vfzhqf7l6w1xczixici2ldw9y788-pkg-config-wrapper-0.29.2/share/gir-1.0","/nix/store/c38cqq7a91inmdgciv3r22kmx49y6axj-attoparsec-0.14.4/share/gir-1.0","/nix/store/xwfxs15j96m3jbgxj2r0swvckj2x0xj7-vector-0.13.2.0/share/gir-1.0","/nix/store/gx2l0rnp3qcnysdddkg9dqnh2mz6w08k-patchelf-0.15.2/share/gir-1.0","/opt/homebrew/share/gir-1.0"].
> CallStack (from HasCallStack):
> error, called at lib/Data/GI/GIR/Repository.hs:94:20 in haskell-gi-0.26.17-J7744VfCWJN7HmDfsyCDMT:Data.GI.GIR.Repository
For full logs, run:
nix log /nix/store/2gwlmv6cq5bw8ra7jriga1i0gyjmq5p4-gi-glib-2.0.30.drv
Does anyone know what it means? I tried to build cabal2nix result of gi-glib(+ some configurations) and found this error.
| 02:42:19 |
alexfmpe | Redacted or Malformed Event | 06:29:24 |
alexfmpe | In reply to @sternenseemann:systemli.org We should probably eventually look into that again… I threw a day or two at this a couple months back trying to cargo cult what haskell.nix did, only with nixpkgs' general emulation utils rather than hardcode qemu/wine etc. | 06:32:18 |
alexfmpe | My motivation was mobile so I tried doing it for android TH but got stuck on some linkage shenanigans I don't remember | 06:32:44 |
alexfmpe | And think I couldn't try with windows due to executables not building properly | 06:33:13 |
alexfmpe | But now that I think about it, maybe I can try some other cross just to get the general shape of things out the door | 06:33:57 |
alexfmpe | The emulation stuff can also be used for cross testing, but a lot of suites use TH for test discovery so that needs to work first | 06:35:17 |
alexfmpe | In reply to @mangoiv.:matrix.org I think haskell.nix can do Windows cross, I wasn't aware nixpkgs can do that https://github.com/NixOS/nixpkgs/pull/357744#issue-2677729790 | 06:39:45 |
bglgwyng | Can someone help me with this? | 12:28:23 |
bglgwyng | I made a reproducer here
https://github.com/bglgwyng/override-haskell-gi-base/blob/main/flake.nix#L19 | 12:28:29 |
bglgwyng | What I found weird is that the gi-glib definitions is virtually the same with the haskellPackages.gi-glib which is build successfully | 12:29:13 |