!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

695 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://nixos.org/manual/nixpkgs/unstable/#haskell | Current PR: https://github.com/nixos/nixpkgs/pulls?q=is%3Apr+is%3Aopen+head%3Ahaskell-updates | Maintainer Docs: https://github.com/NixOS/nixpkgs/blob/haskell-updates/pkgs/development/haskell-modules/HACKING.md | More Nix: #community:nixos.org | More Haskell: #haskell-space:matrix.org | Merger Schedule: https://cloud.maralorn.de/apps/calendar/p/H6migHmKX7xHoTFa/dayGridMonth/now | Join #haskell.nix:libera.chat for question about the alternative haskell.nix infrastructure138 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
15 Sep 2025
@bglgwyng:matrix.orgbglgwyng
{
        packages.zlib1 = (pkgs.haskellPackages.zlib).override { zlib = pkgs.zlib; };
        # it works
        packages.zlib2 = (pkgs.haskellPackages.callCabal2nix "zlib" inputs.zlib-src { }).override { zlib = pkgs.zlib; };
        # it works
        packages.splitmix1 = (pkgs.haskellPackages.splitmix).override { testu01 = null; };
        # it doesn't work
        packages.splitmix2 = (pkgs.haskellPackages.callCabal2nix "splitmix" inputs.splitmix-src { }).override { testu01 = null; };
      };

Only the last one failed with 'error: function 'anonymous lambda' called without required argument 'testu01''

15:02:33
@bglgwyng:matrix.orgbglgwyngHere is the reproducer https://github.com/bglgwyng/haskellPackages-override15:02:59
@bglgwyng:matrix.orgbglgwyng *
{
        packages.zlib1 = (pkgs.haskellPackages.zlib).override { zlib = pkgs.zlib; };
        # it works
        packages.zlib2 = (pkgs.haskellPackages.callCabal2nix "zlib" inputs.zlib-src { }).override { zlib = pkgs.zlib; };
        # it works
        packages.splitmix1 = (pkgs.haskellPackages.splitmix).override { testu01 = null; };
        # it doesn't work
        packages.splitmix2 = (pkgs.haskellPackages.callCabal2nix "splitmix" inputs.splitmix-src { }).override { testu01 = null; };
      };

Only the last one failed with error: function 'anonymous lambda' called without required argument 'testu01'

15:03:21
@bglgwyng:matrix.orgbglgwyng I can see testu01 in the arguments of cabal2nix-splitmix, but somehow the override failed. 15:04:08
@keypusher:matrix.orgkeypusherI have a hard time getting protoc (on the PATH) while building a package with callCabal2Nix. It's used by cabal extension.15:20:20
@keypusher:matrix.orgkeypusherAre there any tricks to troubleshooting that?15:21:06
@sternenseemann:systemli.orgsterni keypusher: cabal2nix does not really have the ability to do that automatically since Cabal does not allow specifying a dependency on a build tool that is not itself a Cabal package. You need to use addBuildTools or the like from haskell.lib.compose. 15:32:07
@sternenseemann:systemli.orgsterni bglgwyng: on what system does packages.splitmix2 fail to evaluate? 15:36:34
@keypusher:matrix.orgkeypusherOh ok. I tried googling "haskell.lib.compose addBuildtools" but came up a bit short. You don't happen to have some useful url?15:37:31
@keypusher:matrix.orgkeypusherthanks btw!15:37:53

Show newer messages


Back to Room ListRoom Version: 6