!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

700 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://haskell4nix.readthedocs.io/140 Servers

Load older messages


SenderMessageTime
13 Aug 2025
@artem.types:matrix.orgArtemI'm trying to unbrake some packages from liquidhaskell ecosystem. One package's test suite assumes Z3 is available in the PATH. What's a better way to fix it: dontCheck or add z3 as a dependency somewhere (where?).16:27:58
@emilazy:matrix.orgemily probably nativeCheckInputs 16:28:52
@artem.types:matrix.orgArtem @emily this looks plausible except I don't see it ever be used inside haskell-modules. I see a bunch of those in other *-modules, but they have a different setup, so I'm not sure where to put these nativeCheckInputs for a haskell package 16:37:37
@qyliss:fairydust.spaceAlyssa RossWhere would you put extra buildInputs or nativeBuildInputs?16:41:27
@qyliss:fairydust.spaceAlyssa RossThose must be used somewhere16:41:36
@artem.types:matrix.orgArtemI'm not really seeing those in haskell-modules either16:48:14
@qyliss:fairydust.spaceAlyssa RossI do, in configuration-nix.nix16:48:55
@qyliss:fairydust.spaceAlyssa Rossoh, addBuildDepend sounds relevant16:49:10
@qyliss:fairydust.spaceAlyssa RossIt doesn't look like there's an equivalent for nativeCheckInputs, so add one?16:50:52
@maralorn:maralorn.demaralornI love how this extra abstraction layer in the haskell builder trips up proficient nixpkgs users … otoh I am always confused how those fields are called in the default builder. 😄16:50:52
@maralorn:maralorn.demaralorn There is testSystemdDepends. 16:52:21
@qyliss:fairydust.spaceAlyssa RossIs that nativeCheckInputs though?16:52:52
@maralorn:maralorn.demaralorn
  testPkgconfigDepends ? [ ],
  testDepends ? [ ],
  testHaskellDepends ? [ ],
  testSystemDepends ? [ ],
  testFrameworkDepends ? [ ],
16:53:01
@artem.types:matrix.orgArtem

There is testSystemdDepends.
with testSystemDepends it seems like it, thanks

16:53:52
@artem.types:matrix.orgArtem *

There is testSystemdDepends.

with testSystemDepends it seems like it, thanks

16:53:59
@maralorn:maralorn.demaralornno. It uses buildInputs.16:54:40
@qyliss:fairydust.spaceAlyssa RossThen that's not the right thing!17:14:49
@artem.types:matrix.orgArtem
  smtlib-backends-process = overrideCabal (drv: {
    testSystemDepends = (drv.testSystemDepends or [ ]) ++ [ pkgs.z3 ];
  }) super.smtlib-backends-process;

works. So, should I try to use something closer to nativeCheckInputs instead?

17:21:22
@maralorn:maralorn.demaralornWell it was clearly the intent by the author of the Haskell builder to use it like this. He might have been wrong about it. Can you come up with a bug which can be triggered by this confusion?17:55:21
@maralorn:maralorn.demaralornWell, I think your solution is fine and the rest might need fixing in the Haskell builder.17:55:55
@qyliss:fairydust.spaceAlyssa Ross
In reply to @maralorn:maralorn.de
Well it was clearly the intent by the author of the Haskell builder to use it like this. He might have been wrong about it. Can you come up with a bug which can be triggered by this confusion?
Wrong package will be used when cross compiling I think
17:58:08
@maralorn:maralorn.demaralornAh, well. How can you even test when cross compiling?^^18:04:53
@qyliss:fairydust.spaceAlyssa RossImagine cross compiling from glibc to musl, or x86_64 to i68618:05:38
@maralorn:maralorn.demaralornI mean I also find the code around that very confusing because it has "otherBuildInputsSystem" and "otherBuildInputs" which are both used and there is a TODO there.18:05:48
@qyliss:fairydust.spaceAlyssa RossCross compiling doesn't necessarily mean you can't execute18:05:50
@maralorn:maralorn.demaralornI see. Fair.18:06:10
@qyliss:fairydust.spaceAlyssa Ross Which is why we have a predicate in Nixpkgs called canExecute, which stdenv uses to decide whether to have checkPhase and reference checkInputs and nativeBuildInputs 18:06:14
@emilazy:matrix.orgemily(btw I have solved the LLVM 12 problem. still a WIP draft locally. but my experiment was a success)18:06:49
@emilazy:matrix.orgemily(it is a joyous occasion)18:07:05
@qyliss:fairydust.spaceAlyssa Ross * Which is why we have a predicate in Nixpkgs called canExecute, which stdenv uses to decide whether to have checkPhase and reference checkInputs and nativeCheckInputs 18:07:40

Show newer messages


Back to Room ListRoom Version: 6