!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

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

Load older messages


SenderMessageTime
14 Aug 2025
@artem.types:matrix.orgArtemare you saying I should use "default-package-overrides" instead of "extra-packages" for a package outside of LTS? (I'm sorry for being slow!)15:46:38
@artem.types:matrix.orgArtem

modulo the extension .sh, that started doing something but failed with:

Running hackage2nix to regenerate pkgs/development/haskell-modules/hackage-packages.nix …
 .Regenerating transitive-broken.yaml … (pass --fast to /home/artem/nixpkgs/maintainers/scripts/haskell/regenerate-hackage-packages.sh to skip this step)
these 4 paths will be fetched (0.31 MiB download, 1.14 MiB unpacked):
  /nix/store/mmi8dxjdsv8r9jxnyd3dqwqakxda1796-jq-1.8.1
  /nix/store/kwxm52f2g9ap890pfj2j4ryzq2gj2i69-jq-1.8.1-bin
  /nix/store/h0xayyfsl9f17bss0x1xhhz7c3n5fq43-jq-1.8.1-dev
  /nix/store/1q3rqjv37glfxsmqcyvnz3ghqj1wjw4a-oniguruma-6.9.10-lib
copying path '/nix/store/1q3rqjv37glfxsmqcyvnz3ghqj1wjw4a-oniguruma-6.9.10-lib' from 'https://cache.nixos.org'...
copying path '/nix/store/mmi8dxjdsv8r9jxnyd3dqwqakxda1796-jq-1.8.1' from 'https://cache.nixos.org'...
copying path '/nix/store/kwxm52f2g9ap890pfj2j4ryzq2gj2i69-jq-1.8.1-bin' from 'https://cache.nixos.org'...
copying path '/nix/store/h0xayyfsl9f17bss0x1xhhz7c3n5fq43-jq-1.8.1-dev' from 'https://cache.nixos.org'...
error: access to absolute path '/home/artem/.local' is forbidden in restricted mode

15:53:55
@artem.types:matrix.orgArtemI'll have to get back to this. In the meantime, I'm submit a PR unbreaking liquid-fixpoint at least: https://github.com/NixOS/nixpkgs/pull/433722 let me know if it's horribly formatted and against the guidelines...16:10:30
@b:chreekat.netchreekatLooks like it's under "grandfathered dependencies", so probably needs a new champion . https://github.com/commercialhaskell/stackage/blob/master/build-constraints.yaml#L565716:10:43
@sternenseemann:systemli.orgsterni (he/him) Artem: may be https://github.com/NixOS/nixpkgs/issues/400784, try running with --fast 16:34:07
@maralorn:maralorn.demaralornYes17:09:10
@maralorn:maralorn.demaralornAh, oops.17:09:24
@artem.types:matrix.orgArtem --fast did fix it 19:41:32
@artem.types:matrix.orgArtemregenerate-hackage-packages.sh seems to reformat the whole hackage-packages.nix. Am I doing something wrong?19:53:28
@maralorn:maralorn.demaralornDepends on the diff?^^19:54:43
@maralorn:maralorn.demaralornPossibly you have the wrong nixfmt in scope? Not sure.19:55:10
@maralorn:maralorn.demaralornYeah, nixfmt seems to be picked up from your environment.19:56:35
@maralorn:maralorn.demaralornEasiest fix is probably loading loading the shell.nix.19:57:31
@artem.types:matrix.orgArtem maralorn: which shell.nix? 20:01:55
@artem.types:matrix.orgArtemoh, maybe the root of nixpkgs, let me try it20:03:08
@artem.types:matrix.orgArtemthat did the trick, thanks!20:14:24
@artem.types:matrix.orgArtem chreekat: what is "grandfathered depedndencies" exactly? MAINTAINERS.md doesn't explain (other than saying you move there packages that you no longer maintain) 20:24:18
15 Aug 2025
@b:chreekat.netchreekatI think it's unmaintained (from Stackage perspective) dependencies of actively maintained packages. At one time they were included implicitly, and at some point they were made explicit. I'm not confident about that, however.04:44:22
@artem.types:matrix.orgArtemmakes sense, thank you05:22:59
18 Aug 2025
@artem.types:matrix.orgArtem how good is the Haskell builder with custom setups? I'm getting a pretty basic error when a custom setup uses a function from another package, and that package is listed in the cabal file's custom-setup:setup-depends, but when I'm building it with Nix, I'm getting "module not found" on the import-line in Setup.hs for an import from that other package.
That's liquidhaskell, by the way. The import line is here: https://github.com/ucsd-progsys/liquidhaskell/blob/6baa675f6bb000d016f0c859d7f865263679dc43/Setup.hs#L3 and it comes from the liquidhaskell-boot package. I am building it on top of my branch from https://github.com/NixOS/nixpkgs/pull/433722: I just enabled liquidhaskell and liquidhaskell-boot on top of the packages that are enabled in that PR. This should be the entirety of the dependency tree of liquidhaskell...
17:25:51
@artem.types:matrix.orgArtem * how good is the Haskell builder with custom setups? I'm getting a pretty basic error when a custom setup uses a function from another package, and that package is listed in the cabal file's custom-setup:setup-depends, but when I'm building it with Nix, I'm getting "module not found" on the import-line in Setup.hs for an import from that other package.
That's liquidhaskell, by the way. The import line is here: https://github.com/ucsd-progsys/liquidhaskell/blob/6baa675f6bb000d016f0c859d7f865263679dc43/Setup.hs#L3 and it comes from the liquidhaskell-boot package. I am building it on top of my branch from https://github.com/NixOS/nixpkgs/pull/433722 (with nix-build -A haskellPackages.liquidhaskell): I just enabled liquidhaskell and liquidhaskell-boot on top of the packages that are enabled in that PR. This should be the entirety of the dependency tree of liquidhaskell...
17:26:48
@artem.types:matrix.orgArtem * how good is the Haskell builder with custom setups? I'm getting a pretty basic error when a custom setup uses a function from another package, and that package is listed in the cabal file's custom-setup:setup-depends, but when I'm building it with Nix, I'm getting "module not found" on the import-line in Setup.hs for an import from that other package.
That's liquidhaskell, by the way. The import line is here: https://github.com/ucsd-progsys/liquidhaskell/blob/6baa675f6bb000d016f0c859d7f865263679dc43/Setup.hs#L3 and it comes from the liquidhaskell-boot package. I am building it on top of my branch from https://github.com/NixOS/nixpkgs/pull/433722 (with nix-build -A haskellPackages.liquidhaskell): I just enabled liquidhaskell and liquidhaskell-boot on top of the packages that are enabled in that PR. This should be the entirety of the dependency tree of liquidhaskell...
17:26:55
@artem.types:matrix.orgArtem this issue (https://github.com/NixOS/nixpkgs/issues/16998) on non-Haskell setup dependencies implies that Haskell setup dependencies should work just fine. So, it's me who is at fault, clearly! 17:31:46
@artem.types:matrix.orgArtemI put the whole output in the thread below if it helps18:39:49
@artem.types:matrix.orgArtem
❯ nix-build -A haskellPackages.liquidhaskell
this derivation will be built:
  /nix/store/n130lvvlqafx11lq2gmgg8gr5xsvh6mv-liquidhaskell-0.9.10.1.2.drv
building '/nix/store/n130lvvlqafx11lq2gmgg8gr5xsvh6mv-liquidhaskell-0.9.10.1.2.drv'...
Running phase: setupCompilerEnvironmentPhase
Build with /nix/store/a6ch4glhsgzpn9i9cqzpdlmbli5ylff7-ghc-9.10.2.
Running phase: unpackPhase
unpacking source archive /nix/store/g1wjnbnkrgcdh8wc4wx0g27k4p8v4ifn-liquidhaskell-0.9.10.1.2.tar.gz
source root is liquidhaskell-0.9.10.1.2
setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file "liquidhaskell-0.9.10.1.2/src/Prelude_LHAssumptions.hs"
Running phase: patchPhase
Running phase: compileBuildDriverPhase
setupCompileFlags: -package-db=/build/tmp.2rh53Ciwyp/setup-package.conf.d -threaded
[1 of 2] Compiling Main             ( Setup.hs, /build/tmp.2rh53Ciwyp/Main.o )
Setup.hs:3:1: error: [GHC-87110]
    Could not find module ‘Language.Haskell.Liquid.Cabal’.
    Use -v to see a list of the files searched for.
  |
3 | import Language.Haskell.Liquid.Cabal (liquidHaskellMain)
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: builder for '/nix/store/n130lvvlqafx11lq2gmgg8gr5xsvh6mv-liquidhaskell-0.9.10.1.2.drv' failed with exit code 1;
       last 17 log lines:
       > Running phase: setupCompilerEnvironmentPhase
       > Build with /nix/store/a6ch4glhsgzpn9i9cqzpdlmbli5ylff7-ghc-9.10.2.
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/g1wjnbnkrgcdh8wc4wx0g27k4p8v4ifn-liquidhaskell-0.9.10.1.2.tar.gz
       > source root is liquidhaskell-0.9.10.1.2
       > setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file "liquidhaskell-0.9.10.1.2/src/Prelude_LHAssumptions.hs"
       > Running phase: patchPhase
       > Running phase: compileBuildDriverPhase
       > setupCompileFlags: -package-db=/build/tmp.2rh53Ciwyp/setup-package.conf.d -threaded
       > [1 of 2] Compiling Main             ( Setup.hs, /build/tmp.2rh53Ciwyp/Main.o )
       > Setup.hs:3:1: error: [GHC-87110]
       >     Could not find module ‘Language.Haskell.Liquid.Cabal’.
       >     Use -v to see a list of the files searched for.
       >   |
       > 3 | import Language.Haskell.Liquid.Cabal (liquidHaskellMain)
       >   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
       >
       For full logs, run:
         nix log /nix/store/n130lvvlqafx11lq2gmgg8gr5xsvh6mv-liquidhaskell-0.9.10.1.2.drv

18:39:58
@artem.types:matrix.orgArtem
❯  nix log /nix/store/n130lvvlqafx11lq2gmgg8gr5xsvh6mv-liquidhaskell-0.9.10.1.2.drv
Running phase: setupCompilerEnvironmentPhase
@nix { "action": "setPhase", "phase": "setupCompilerEnvironmentPhase" }
Build with /nix/store/a6ch4glhsgzpn9i9cqzpdlmbli5ylff7-ghc-9.10.2.
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/g1wjnbnkrgcdh8wc4wx0g27k4p8v4ifn-liquidhaskell-0.9.10.1.2.tar.gz
source root is liquidhaskell-0.9.10.1.2
setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file "liquidhaskell-0.9.10.1.2/src/Prelude_LHAssumptions.hs"
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: compileBuildDriverPhase
@nix { "action": "setPhase", "phase": "compileBuildDriverPhase" }
setupCompileFlags: -package-db=/build/tmp.2rh53Ciwyp/setup-package.conf.d -threaded
[1 of 2] Compiling Main             ( Setup.hs, /build/tmp.2rh53Ciwyp/Main.o )
Setup.hs:3:1: error: [GHC-87110]
    Could not find module ‘Language.Haskell.Liquid.Cabal’.
    Use -v to see a list of the files searched for.
  |
3 | import Language.Haskell.Liquid.Cabal (liquidHaskellMain)
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
18:40:18
19 Aug 2025
@alex:tunstall.xyzAlex
In reply to @artem.types:matrix.org
how good is the Haskell builder with custom setups? I'm getting a pretty basic error when a custom setup uses a function from another package, and that package is listed in the cabal file's custom-setup:setup-depends, but when I'm building it with Nix, I'm getting "module not found" on the import-line in Setup.hs for an import from that other package.
That's liquidhaskell, by the way. The import line is here: https://github.com/ucsd-progsys/liquidhaskell/blob/6baa675f6bb000d016f0c859d7f865263679dc43/Setup.hs#L3 and it comes from the liquidhaskell-boot package. I am building it on top of my branch from https://github.com/NixOS/nixpkgs/pull/433722 (with nix-build -A haskellPackages.liquidhaskell): I just enabled liquidhaskell and liquidhaskell-boot on top of the packages that are enabled in that PR. This should be the entirety of the dependency tree of liquidhaskell...
I've previously gotten it to work without doing anything special. I have no idea what's wrong with your case.
00:51:40
@bglgwyng:matrix.orgbglgwyngDoes haskell.nix internally generate plan.json and use it? Or it just uses pre-built package sets.06:18:16
@maralorn:maralorn.demaralorn bglgwyng: haskell.nix uses plan.json (at least that’s one of the available modes) 06:53:04
@artem.types:matrix.orgArtem FTW: I made this typo again: liquidhaskell-boot = doJailbreak super.smtlib-backends-tests; and that's why liquidhaskell couldn't find a module in liquidhaskell-boot... 14:09:50

Show newer messages


Back to Room ListRoom Version: 6