!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

704 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 infrastructure139 Servers

Load older messages


SenderMessageTime
6 Apr 2026
@sternenseemann:systemli.orgsterni(the build-tool-depends thing btw si another example for a stupid hack packages use to get the executable into PATH for the test suite)11:41:00
@alexfmpe:matrix.orgalexfmpeI do think it's worth looking into at some point down the line, just have a bunch of other cabal2nix/haskellPackages stuff on my queue already11:57:27
9 Apr 2026
@eliasp:kde.orgeliasp joined the room.14:13:34
@eliasp:kde.orgeliasp

Hi
I have very little knowledge when it comes to the general Haskell ecosystem/build process etc - I'm struggling with applying a custom patch via haskell.lib.compose.appendPatch to a package (hledger).
It fails applying the patch, complaining it can't find the file targeted in the patch…

       > applying patch /nix/store/s3f1dgvk0ddzp87sg9j2npb7j7avdanw-imp-add-continue-rule-for-CSV-import.patch
       > can't find file to patch at input line 3
       > Perhaps you used the wrong -p or --strip option?
       > The text leading up to this was:
       > --------------------------
       > |--- a/hledger-lib/Hledger/Read/RulesReader.hs
       > |+++ b/hledger-lib/Hledger/Read/RulesReader.hs
       > --------------------------
       > File to patch:
       > Skip this patch? [y]
       > Skipping patch.

Do I need to do anything special to apply patches to Haskell packages? Couldn't find anything relevant to my problem in the docs.

14:18:02
@eliasp:kde.orgeliasp Oh, nvm - just realized I'm being stupid and should apply the patch to hledger-lib instead of hledger 🤦 14:19:14
@sternenseemann:systemli.orgsterni you also need to use the relative argument of fetchpatch so the paths are correct 15:28:12
10 Apr 2026
@epimonic:matrix.org@epimonic:matrix.org left the room.11:46:02
11 Apr 2026
@alexfmpe:matrix.orgalexfmpe do we propagate buildToolDepends, testToolDepends, etc?
I'm experimenting with allowing doCheck via canExecute (e.g. pkgsStatic) and running into a lot of things missing hspec-discover
23:06:33
@alexfmpe:matrix.orgalexfmpesomehow it builds fine on native23:06:40
@alexfmpe:matrix.orgalexfmpe I'm also wondering whether addTestToolDepend self.buildHaskellPackages.hspec-discover is what we should always do
or if there's a point to this (commented) conditional:
https://github.com/NixOS/nixpkgs/blob/86ab6aea5099ecae02ef2331cfd3f1d53362f1db/pkgs/development/haskell-modules/configuration-common.nix#L1209
23:07:57
12 Apr 2026
@sternenseemann:systemli.orgsterniI don’t think so. do you have some examples? I have a suspicion, but would need to check.07:41:57
@leona:leona.isleona changed their profile picture.12:15:40
@alexfmpe:matrix.orgalexfmpeall of these build on haskellPackages but need that override on pkgsStatic.haskellPackages https://github.com/alexfmpe/nixpkgs/blob/27752ed2109458fdc93a0917123f9566920c13e6/pkgs/development/haskell-modules/configuration-nix.nix#L2271-L228713:28:44
@alexfmpe:matrix.orgalexfmpe
$ nix-shell default.nix -A haskellPackages.say --run 'hspec-discover'
Usage: hspec-discover SRC CUR DST [--module-name=NAME]

$ nix-shell default.nix -A pkgsStatic.haskellPackages.say --run 'hspec-discover'
/tmp/nix-shell-3496921-3747326576/rc: line 3: hspec-discover: command not found
13:31:18
@sternenseemann:systemli.orgsterni A the answer is likely that these packages depend on hspec which depends (not build-tool-depends!) on hspec-discover which gets propagated and is executable when natively compiling 21:07:24
@sternenseemann:systemli.orgsterni e.g. say has the packaging bug that it doesn't declare the dependency at all, should be using build-tool-depends. 21:07:48
@sternenseemann:systemli.orgsterni we have a hack in cabal2nix that fixes if you use build-depends : hpsec-discover, but if you don't declare the dep at all, it's problematic of course 21:08:13
@alexfmpe:matrix.orgalexfmpeAh, guess the hack hid the problem 21:52:17
@alexfmpe:matrix.orgalexfmpeSo the fix here is to PR those addFooToolDepends unconditionally yeah?21:52:39
@alexfmpe:matrix.orgalexfmpe(well, the non-upstream fix)21:53:42
@alexfmpe:matrix.orgalexfmpe* Ah, guess the hack masks the problem 21:54:22
@alexfmpe:matrix.orgalexfmpehttps://github.com/NixOS/nixpkgs/pull/50937123:41:54
13 Apr 2026
@sternenseemann:systemli.orgsterni
In reply to @alexfmpe:matrix.org
Ah, guess the hack masks the problem
the hack solves the problem, but in this case the package doesn’t declare the dependency at all
10:31:40
@sternenseemann:systemli.orgsterni
In reply to @alexfmpe:matrix.org
So the fix here is to PR those addFooToolDepends unconditionally yeah?
yes
10:31:48
14 Apr 2026
@ashinnv:matrix.orgM̸̙̜̔̇Ǎ̴͎̙͔G̸̞̈N̸͔͍̝͗͋̾Ő̷͖̼͈̽̚L̷̻͚̓̔I̷̛͔̰̟̔Å̴̩̍ ̷̦̒̇͝M̷̱̠̺̉̎A̵̼̎͗͘Ỹ̸̬̲͂̕H̷̙̖͂Ē̷͉̦̌͒M̶͈̥̽̐ Houston, we've had a Microsoft changed their display name from M̸̙̜̔̇Ǎ̴͎̙͔G̸̞̈N̸͔͍̝͗͋̾Ő̷͖̼͈̽̚L̷̻͚̓̔I̷̛͔̰̟̔Å̴̩̍ ̷̦̒̇͝M̷̱̠̺̉̎A̵̼̎͗͘Ỹ̸̬̲͂̕H̷̙̖͂Ē̷͉̦̌͒M̶͈̥̽̐ (you don't get my real name) to M̸̙̜̔̇Ǎ̴͎̙͔G̸̞̈N̸͔͍̝͗͋̾Ő̷͖̼͈̽̚L̷̻͚̓̔I̷̛͔̰̟̔Å̴̩̍ ̷̦̒̇͝M̷̱̠̺̉̎A̵̼̎͗͘Ỹ̸̬̲͂̕H̷̙̖͂Ē̷͉̦̌͒M̶͈̥̽̐ Houston, we've had a Microsoft.15:59:50
@alexfmpe:matrix.orgalexfmpe how can I turn on strictDeps by default on the package set? I'd like to locally build maintained or so against it to catch them all in one go 16:33:26
@alexfmpe:matrix.orgalexfmpeI mean, I can use my local nixpkgs config and all, but presumably we'd like to also enable the flag by default once fixed?16:34:03
@alexfmpe:matrix.orgalexfmpeah, I can jam it right in our call to mkDerivation16:50:14
@alexfmpe:matrix.orgalexfmpewhat's the actual command whose results https://github.com/cdepillabout/nix-haskell-updates-status is looking at?17:51:33
@alex:tunstall.xyzAlex

Curiously, I don't seem to have been pinged by those mentions. Perhaps because they are in the code and not the Git objects.

Microhs cross and musl Hugs being broken are things I was already aware of, so not really a big deal.

20:03:52

There are no newer messages yet.


Back to Room ListRoom Version: 6