!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

723 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.org144 Servers

Load older messages


SenderMessageTime
3 Feb 2025
@alexfmpe:matrix.orgalexfmpe * nix-build --keep-going will spit out all the ones that failed - i.e. the ones who need the tests to stay disabled 12:08:35
@alexfmpe:matrix.orgalexfmpe* taking dontCheck as an example: I have a .nix file that filters haskellPackages and filters for all derivations with doCheck == false, then does doCheck = true for all of them13:51:44
@alexfmpe:matrix.orgalexfmpe* taking `dontCheck` as an example: I have a .nix file that filters haskellPackages and filters for all derivations with `doCheck == false`, then does `doCheck = true` for all of them13:52:03
@alexfmpe:matrix.orgalexfmpe * taking
dontCheck as an example:
I have a .nix file that filters haskellPackages for all derivations with doCheck == false, then does doCheck = true for all of them
13:52:40
@alexfmpe:matrix.orgalexfmpe * taking
dontCheck as an example:
I have a .nix file that filters haskellPackages for derivations with doCheck == false, then does doCheck = true for all of them
13:52:53
@alexfmpe:matrix.orgalexfmpe

if that step turns out to be wonky, can always inject an easily grepable "I built" on the checked packages

  overrideCabal (old: {
    postFixup = ''
      ${old.postFixup or ""}
      echo "Override no longer needed for ${old.pname}"
    '';
  })
14:08:36
@alexfmpe:matrix.orgalexfmpe
$ nix-build -A haskell.packages.ghc98.hello --check 2>&1 | tail -n 3
patching script interpreter paths in /nix/store/6da7xi7dd6wjpgl3bn09xp4p4qjw1ckf-hello-1.0.0.2-doc
Override no longer needed for hello
/nix/store/ais54949224v9ndhgqgj5fz47ah95pij-hello-1.0.0.2
14:10:54
@alexfmpe:matrix.orgalexfmpe at the cost of extra builds due to --check 14:11:25
@alexfmpe:matrix.orgalexfmpe ah huh actually that won't work because --check errors if the input hasn't been built, would need some force rebuild option 14:13:03
@alexfmpe:matrix.orgalexfmpeannoying that nix doesn't output the built store paths when there were also failures 14:13:31
@alex:tunstall.xyzAlex
In reply to @alexfmpe:matrix.org
annoying that nix doesn't output the built store paths when there were also failures
You could achieve this by splitting your nix-build command into a nix-instantiate (gives drv), a nix-build (realises drv into outputs), and a nix-store --query (can list outputs for drv).
21:49:16
4 Feb 2025
@alexfmpe:matrix.orgalexfmpeThanks, I'll try that07:19:39
@axman6:matrix.orgAxman6 joined the room.07:56:52
@unebnf:matrix.orgunebnf joined the room.07:58:14
@magic_rb:matrix.redalder.orgmagic_rb @axman6:matrix.org youll have to go through pkgsCross.something-something.hostPackages.ghc 08:06:36
@magic_rb:matrix.redalder.orgmagic_rbThats the general way to get a cross compiler with nixpkgs. The javascript one works, havent tested the wasm one08:07:06
@axman6:matrix.orgAxman6 so pkgsCross.wasi32.hostPackages.ghc121 or something? 08:07:59
@magic_rb:matrix.redalder.orgmagic_rb Something along those lines, open up a nix repl and see whats available 08:08:20
@axman6:matrix.orgAxman6s/Packages/Platform08:08:57
@axman6:matrix.orgAxman6yeah doing that now08:09:02
@magic_rb:matrix.redalder.orgmagic_rb
In reply to @axman6:matrix.org
s/Packages/Platform
Good catch
08:09:12
@magic_rb:matrix.redalder.orgmagic_rbYou might end up compiling a lot from source, so get a coffee or smth08:09:31
@axman6:matrix.orgAxman6hmm, no ghc in there, nor haskell08:09:48
@magic_rb:matrix.redalder.orgmagic_rbCheck the JS one, im sure i got that working in the past. So that we confirm were looking in the right place08:10:21
@axman6:matrix.orgAxman6 .hostPlatform is mostly just info about the host platform, I can't see packages in there (not that I've looked hard) 08:11:32
@magic_rb:matrix.redalder.orgmagic_rbAh then hostPackages?08:11:43
@magic_rb:matrix.redalder.orgmagic_rbDunno08:11:46
@axman6:matrix.orgAxman6 there's .gcc but I'd expect that 08:11:48
@axman6:matrix.orgAxman6doesn't exist08:11:52
@magic_rb:matrix.redalder.orgmagic_rbAh08:11:55

Show newer messages


Back to Room ListRoom Version: 6