!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

721 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.org143 Servers

Load older messages


SenderMessageTime
20 Nov 2025
@magic_rb:matrix.redalder.orgmagic_rbcan hetzner VMs execute armv6? probably not22:10:53
@opna2608:matrix.orgPunaif you do wanna go the debian GHC way, you can yoink code from this https://github.com/NixOS/nixpkgs/pull/43925822:10:59
@alex:tunstall.xyzAlex
In reply to @opna2608:matrix.org
cross-compiled haskell.compiler.ghc94 just segfaulted the moment i tried to do anything with it on ppc64. maybe it does better on armv6 though.
otherwise, trixie has a prebuilt ghc 9.6.6 for armel that you could yoink for bootstrapping, I think that should work for armv6?
https://packages.debian.org/trixie/ghc
Try overriding it to force an unregisterised build (there is an option in the arguments for this).
22:14:26
21 Nov 2025
@opna2608:matrix.orgPuna

that works, neat!

puna@Yubel ~> /nix/store/vyxi39wvrq4kzr0d18q4vplrczhh7ijk-ghc-powerpc64-unknown-linux-gnuabielfv1-9.4.8/bin/ghci
GHCi, version 9.4.8: https://www.haskell.org/ghc/  :? for help
ghci> :load /dev/shm/peano.hs
[1 of 2] Compiling Main             ( /dev/shm/peano.hs, interpreted )
Ok, one module loaded.
ghci> toPeano 21             
Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ (Succ Zero))))))))))))))))))))
00:04:00
@magic_rb:matrix.redalder.orgmagic_rbHowd you overwrite it? Show code00:04:25
@opna2608:matrix.orgPuna
↪ nix-build --no-out-link --max-jobs 1 --cores 30 -E '
  with import ./. { };

  pkgsCross.ppc64-elfv1.haskell.compiler.ghc94.override {
    enableUnregisterised = true;
  }'
00:04:46
@magic_rb:matrix.redalder.orgmagic_rb Ill have to do the same most likely 00:04:51
@magic_rb:matrix.redalder.orgmagic_rbDidnt they plan to remove unregistered builds?00:05:00
@magic_rb:matrix.redalder.orgmagic_rbThough, theyve been planning to remove unregistered ever since i know what GHC is, sooo probably not happening soon00:05:39
@alex:tunstall.xyzAlex
In reply to @magic_rb:matrix.redalder.org
Didnt they plan to remove unregistered builds?
That's no good if GHC can't generate valid code with NCG/LLVM for your platform.
Anyway, it might not be needed for newer GHCs (IIRC with RISC-V changing Nixpkgs version without changing GHC fixed the registerised segfault).
00:08:53
@sternenseemann:systemli.orgsterni (he/him)I'm working on it14:21:42
23 Nov 2025
@acidbong:envs.netAcid Bong joined the room.10:21:02
28 Nov 2025
@acidbong:envs.netAcid Bong about Haskell docs: is there a way to prevent a Hs package (like Cachix) to pull docs for all its libraries when added in NixOS' environment.systemPackages? specifically for Cachix it reaches 1.5 GB, while the cachix.bin closure alone is only 155 MB (most of which is Nix' closure) 16:14:44
@maralorn:maralorn.demaralorn Acid Bong: Maybe put cachix.bin in environment.systemPackages? 16:17:19
@acidbong:envs.netAcid Bong i did, NixOS still pulled doc outputs

weird thing about Nixpkgs' outputs in general: they're all reachable from one another (meaning ffmpeg.dev is the same as ffmpeg.lib.bin.dev.bin.dev)

my workaround was to use symlinkJoin, but that looked kinda convoluted
16:20:50
@me:linj.techlinj

cannot reproduce. closure size of my cachix is only 155MiB

nix path-info -Sh $(nix build github:nixos/nixpkgs/nixos-unstable#cachix --print-out-paths)
/nix/store/k77ik2kcv82y2qvv3lg6x4r2cfwjbix2-cachix-1.9.1-bin 155.8 MiB

16:25:44
@ghpzin:envs.netghpzin You might disable documentation.doc.enable, if you do not want to pull them for any package. 16:25:51
@ghpzin:envs.netghpzin You might disable documentation.doc.enable, if you do not want to pull them for any package in environment.systemPackages 16:26:06
@acidbong:envs.netAcid Bong the way to reproduce is to have environment.systemPackages = [pkgs.cachix]; 16:27:44
@acidbong:envs.netAcid Bong it does help, but I want to have doc output from other packages 16:28:24
@acidbong:envs.netAcid Bong* it does help, but I want to have doc output from other packages, so not perfect16:28:31
@me:linj.techlinjinteresting, let me try16:28:58
@acidbong:envs.netAcid Bong it'll start like this:
these 279 paths will be fetched (160.57 MiB download, 1693.50 MiB unpacked):
  /nix/store/i6kmc2cg12acc5kx55vpkxwb1a07a17s-Diff-1.0.2-doc
  /nix/store/1aqpij0r645krf360sp91755gbr23g6k-OneTuple-0.4.2-doc
  /nix/store/nfnj3wiv2hmiybkywz72749b7vy17hpj-QuickCheck-2.15.0.1-doc
  /nix/store/19yjvfpkjxxcvi8kyvj21wk8qlf1qfy9-SHA-1.6.4.4-doc
  /nix/store/lr0vzbpjqzxli3i255y6rxxmihh75ljx-StateVar-1.2.2-doc
  /nix/store/0y1dvczs1hhnhq21fhx6gpv8jdswxcd3-adjunctions-4.4.3-doc
  /nix/store/qi4r1j0mf1qrfxkzgdcd402gkm8g1dz5-aeson-2.2.3.0-doc
  /nix/store/91hz94r3z28al926pj1z49nwd3a7l7xk-aeson-pretty-0.8.10-doc
  /nix/store/1qzz56rc62qbcaz6735nfrz68llmzmn9-algebraic-graphs-0.7-doc
  /nix/store/njypyw5wkzqjz8yg5h5jsc7fprhjacfq-amazonka-2.0-unstable-2025-04-16-doc
  /nix/store/mhr4sj0rv8amf2df1bqa1p23r2zxwa4v-amazonka-core-2.0-unstable-2025-04-16-doc
...
16:31:40
@acidbong:envs.netAcid Bong actually, this seems more like a buildEnv issue than Haskell (it's just only Haskell that has doc outputs for every library out there) 16:35:47
@me:linj.techlinj Acid Bong: Yeah, you are right. 17:05:07
@me:linj.techlinj Maybe we should add a variant of cachix that uses justStaticExecutables instead of enableSeparateBinOutput 17:05:47
@acidbong:envs.netAcid Bongi seem to be not alone in this: https://github.com/NixOS/nixpkgs/issues/31676817:07:32
@acidbong:envs.netAcid Bong maybe do that for all top-level standalone haskell packages? 17:07:58
@acidbong:envs.netAcid Bongalthough Nixfmt is fine already17:09:12
@me:linj.techlinj No, I do not think they are the same issue. Actually, from a certain perspective,
your "issue" is not an issue. It works as expected: you have documentation.doc.enable = true so cachix doc is pulled in
17:10:44

Show newer messages


Back to Room ListRoom Version: 6