!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

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

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


SenderMessageTime
24 Jun 2025
@maralorn:maralorn.demaralornHuh, wild06:49:28
@maralorn:maralorn.demaralornI mean that is a test dependency. Does cabal-install by default build the test suites of dependencies?07:03:23
@maralorn:maralorn.demaralornI had a look at the .cabal file and it looks normalish.07:04:26
@b:chreekat.netchreekat I wonder if nixos is a red herring. @artem.types:matrix.org you don't have any stray GHC environment files or cabal project files around, do you? 08:01:10
@magic_rb:matrix.redalder.orgmagic_rb how can i create a haskellPackages set with a patched GHC? 13:33:43
@magic_rb:matrix.redalder.orgmagic_rb

in a devshell i get the ghc i want with:

      (ghc.overrideAttrs (old: {
        patches = old.patches or [ ] ++ [ ./dont-free-stable-ptr.patch ];
      })).override
      { useLLVM = true; }
13:34:04
@magic_rb:matrix.redalder.orgmagic_rb but im not sure how to make haskellPackages use that 13:34:20
@magic_rb:matrix.redalder.orgmagic_rboh maybe i found it13:37:01
@magic_rb:matrix.redalder.orgmagic_rb

nope, i still dont know how to do it, i tried

          haskellPackages = pkgs.haskellPackages.override {
            ghc = modifyGhc pkgs.haskellPackages.ghc;
          };

modifyGhc applies the modifications i sent above

13:56:59
@artem.types:matrix.orgArtem chreekat: man, you made my day: it looks like the default GHC environment screwed things up 13:59:17
@b:chreekat.netchreekatLol I knew it14:15:38
@maralorn:maralorn.demaralorn
In reply to @magic_rb:matrix.redalder.org
how can i create a haskellPackages set with a patched GHC?
You can browse through nixpkgs around haskell-modules/make-package-set.nix and look at the function arguments you can override.
14:28:11
@magic_rb:matrix.redalder.orgmagic_rb
In reply to @maralorn:maralorn.de
You can browse through nixpkgs around haskell-modules/make-package-set.nix and look at the function arguments you can override.
Yeah i got somewhere i think, i wont declare success till it compiles and works
14:32:25
@ners:nixos.devnershttps://github.com/ners/nix-wasm/blob/main/flake.nix As a working example, here I create a Haskell package set with the WASM GHC (and recreate the entire stdenv while I'm at it).14:45:32
@maralorn:maralorn.demaralornIt is much more complicated than what you are trying to do though, since it is cross-compiling.15:53:30

Show newer messages


Back to Room ListRoom Version: 6