| 22 Feb 2025 |
emily | anyway, it was something about Hadrian issues with new GHCs making us use an old GHC for bootstrap, but I wasn't clear on the details | 14:40:07 |
emily | In reply to @emilazy:matrix.org the minimal bootstrap is the elaborate C/Mes/etc. stuff, I wasn't talking about Haskell (the "256 bytes + Linux kernel + build orchestrator" thing a la Guix) | 14:41:20 |
alexfmpe | Thanks, worked like a charm | 18:52:11 |
alexfmpe | I was handed a list of dozens of packages that don't need dontCheck anymore | 18:52:37 |
alexfmpe | I don't see how to use the same approach for doJailbreak though
Turns out this works for doCheck because that's a property of stdenv.mkDerivation
however doJailbreak triggers splicing in postPatch so it's not directly inspectable from the outside | 18:55:51 |
alexfmpe | also much less likely to vary between ghc versions than test suite failures | 18:58:04 |
alexfmpe | * also much more likely to vary between ghc versions than test suite failures | 18:58:10 |
Alex | Here's an idea: override Haskell's mkDerivation to add all of the function arguments to passthru. Since it's passthru, it shouldn't invalidate caching.
Otherwise, there's also this ugly hack.
nix-repl> (haskell.lib.doJailbreak haskellPackages.lens).postPatch
"echo \"Run jailbreak-cabal to lift version restrictions on build inputs.\"\n/nix/store/7q7kmsirmz061126189935lwjw5yhdlv-jailbreak-cabal-1.4/bin/jailbreak-cabal lens.cabal\n"
nix-repl> (haskell.lib.dontJailbreak haskellPackages.lens).postPatch
""
| 20:10:47 |
Alex | Ah, wait, by "from the outside", you mean not within the Nix interpreter itself? As in, you need a property within the .drv that an external program can read? | 20:12:41 |
alexfmpe | In reply to @alex:tunstall.xyz Ah, wait, by "from the outside", you mean not within the Nix interpreter itself? As in, you need a property within the .drv that an external program can read? Nono I meant "after the fact". Like, when accessing haskellPackages.foo | 22:58:08 |
alexfmpe | In reply to @alex:tunstall.xyz
Here's an idea: override Haskell's mkDerivation to add all of the function arguments to passthru. Since it's passthru, it shouldn't invalidate caching.
Otherwise, there's also this ugly hack.
nix-repl> (haskell.lib.doJailbreak haskellPackages.lens).postPatch
"echo \"Run jailbreak-cabal to lift version restrictions on build inputs.\"\n/nix/store/7q7kmsirmz061126189935lwjw5yhdlv-jailbreak-cabal-1.4/bin/jailbreak-cabal lens.cabal\n"
nix-repl> (haskell.lib.dontJailbreak haskellPackages.lens).postPatch
""
Oh, you're saying to disable postPatch all together | 22:58:50 |
alexfmpe | I guess that's usable | 22:59:21 |
alexfmpe | I did think about shoving 'jailbreak' in passthru, but that only lets me read, not write right? | 23:00:28 |
alexfmpe | doCheck works because the one I can set is the same mkDerivation will read | 23:00:49 |
alexfmpe | passthru just 'mirrors' | 23:00:59 |
alexfmpe | There's no pass-by-reference | 23:01:10 |
alexfmpe | In reply to @alexfmpe:matrix.org I guess that's usable As in, few false positivirs | 23:01:54 |
alexfmpe | * As in, few false positives | 23:02:02 |
Alex | Well you can override mkDerivation to completely ignore doJailbreak too. It's not entirely clear to me what you're trying to do. | 23:02:13 |
alexfmpe | In reply to @alexfmpe:matrix.org As in, few false positives Vanishingly few if I just sed out the jailbreak-cabal line | 23:02:44 |
alexfmpe | In reply to @alex:tunstall.xyz Well you can override mkDerivation to completely ignore doJailbreak too. It's not entirely clear to me what you're trying to do. Brute force discovery of needless jailbreaks | 23:03:07 |
alexfmpe | Find all jailbreaked ones, unjailbreak, attempt build of all, report the ones that worked | 23:03:38 |
alexfmpe | Technically it can't report the ones whose deps failed, but doing it one at a time takes an eternity of eval | 23:04:23 |
alexfmpe | * Technically it can't report the ones whose deps failed to build due to that change, but doing it one at a time takes an eternity of eval | 23:04:42 |
alexfmpe | In reply to @alex:tunstall.xyz Well you can override mkDerivation to completely ignore doJailbreak too. It's not entirely clear to me what you're trying to do. I guess I could do this for a one off, but the idea is having a fire and forget script one can run whenever | 23:06:50 |
alexfmpe | Rather than some patch to mkDerivation or generic-builder | 23:07:52 |
alexfmpe | This is why I said 'from the outside' | 23:08:08 |
alexfmpe | eh, I guess you could still have a .patch file and apply it from the script | 23:08:32 |
alexfmpe | Think I can hack a 'getter' and 'setter' for jailbreak by doing invasive surgery to postPatch | 23:08:53 |
alexfmpe | That lets me use the same overall shape I did for dontCheck hunting | 23:09:11 |