!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

729 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/ | More Nix: #community:nixos.org | More Haskell: #haskell-space:matrix.org146 Servers

Load older messages


SenderMessageTime
4 Nov 2024
@sternenseemann:systemli.orgsterni (he/him) you could try reversing the order of the args and manually added set 18:05:07
@sternenseemann:systemli.orgsterni (he/him)i think it should work then that it is only affected by explicit input18:05:24
@lxsameer:matrix.orglxsameerbut it would be possible to do it in a derivation that you're directly working with (e.g. packages.default, the main derivation of the project). right?18:10:50
@lxsameer:matrix.orglxsameerhow often do we update the all-cabal-hashes on nixos-unstable?18:28:24
@asymmetric:matrix.dapp.org.uk@asymmetric:matrix.dapp.org.uk left the room.19:19:49
@maralorn:maralorn.demaralorn
In reply to @lxsameer:matrix.org
but it would be possible to do it in a derivation that you're directly working with (e.g. packages.default, the main derivation of the project). right?
I think with that brute force hammer that might be problematic.
23:18:46
@maralorn:maralorn.demaralorn
In reply to @lxsameer:matrix.org
how often do we update the all-cabal-hashes on nixos-unstable?
Well, normally we do that every one or two weeks. But due to lack of maintainer time the frequency dropped quite severely lately.
23:19:39
@lxsameer:matrix.orglxsameer
In reply to @maralorn:maralorn.de
I think with that brute force hammer that might be problematic.
What other option do we have?
23:22:24
@lxsameer:matrix.orglxsameer
In reply to @maralorn:maralorn.de
Well, normally we do that every one or two weeks. But due to lack of maintainer time the frequency dropped quite severely lately.
I can take care of it. Should i directly taget the unstable branch or staging?
23:22:59
@maralorn:maralorn.demaralornNot sure. Need to think.23:24:19
@lxsameer:matrix.orglxsameerCool let me know then23:25:48
@maralorn:maralorn.demaralorn
In reply to @lxsameer:matrix.org
I can take care of it. Should i directly taget the unstable branch or staging?
Well, the bumping is the easy part. The problem is that after the bump we refresh the derivation in hackage-packages.nix and then need fix all the build errors which arise. While we do that we avoid to bump the pin again because that could introduce new errors before we can merge the branch (haskell-updates) into master. So we iterate over PRs like this: https://github.com/NixOS/nixpkgs/pull/351154
23:26:24
@maralorn:maralorn.demaralornWell, the best idea I have from the top of my head is what I suggested a few days ago.23:30:02
@maralorn:maralorn.demaralornWhich is something like:23:30:21
@lxsameer:matrix.orglxsameerCooool. I'll give it a shot23:30:39
@maralorn:maralorn.demaralorn
  1. For every package you override with overrideCabal in your generated overlay you set something like passthru.auto-added = true.
23:31:48
@maralorn:maralorn.demaralorn
  1. You override mkDerivation to iterate over all haskell inputs, inspect whether they have a value auto-added which is true and if yes you a) also set that value on this derivation and b) disable tests and profiling builds.
23:33:36
@maralorn:maralorn.demaralornAdmittedly that’s a bit dishonest by me because that addresses the issue I was concerned about (cache.nixos.org) but not necessarily the one you wer concerned about (enabling test for the main package you are trying to build.)23:35:12
@maralorn:maralorn.demaralorn But I guess this method can be extended by introducing a second variable. auto-build-target and stopping the propagation of auto-added when auto-build-target is set. 23:36:25
@maralorn:maralorn.demaralornA bit gnarly I admit, but it seems like it’s doable.23:37:06
5 Nov 2024
@lxsameer:matrix.orglxsameerGood i'll implement it tomorrow. Thank you00:00:20
@lxsameer:matrix.orglxsameer
In reply to @maralorn:maralorn.de
Well, the best idea I have from the top of my head is what I suggested a few days ago.
Quick question, a passthru from pkg A that depends on B and B to C will propagates from A to C right?
12:23:03
@maralorn:maralorn.demaralornAh, wait.13:20:59
@maralorn:maralorn.demaralorn"passthru" is nix derivation speak for "if you set a value here (in the derivation description) it will be exposed from the final derivation". passthru has a priori nothing to do with passing values to dependencies. I just had the idea to abuse them for that.13:29:02
@lxsameer:matrix.orglxsameeryeah i know that much, but the thing i didn't understand is that how it is going to help us disable the test for indirect dependencies?13:33:14
@maralorn:maralorn.demaralornBy my step 2. up there. That should propagate the passthru flag from A to C.13:40:57
@lxsameer:matrix.orglxsameer I don't get it. let's use a concrete example. in the list of overrides, I override hasql and set a passthru A to true. In the mkDerivation iterate through inputs and if the input has the the A passthru I disable the tests and profiling and set A as well. But hasql's mkDerivation will have the passthru and not the inputs 13:54:48
@lxsameer:matrix.orglxsameerright13:55:00
@maralorn:maralorn.demaralornBut the inputs of hasql don’t need overriding, unless they have any input which is already overriden and they would get their flag propagated from there.14:07:23
@maralorn:maralorn.demaralornThe aim is explicitely not to disable tests on dependencies. We only need to disable tests on reverse dependencies of anything we override.14:08:30

Show newer messages


Back to Room ListRoom Version: 6