!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

729 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.org146 Servers

Load older messages


SenderMessageTime
4 Nov 2024
@maralorn:maralorn.demaralornWe somehow need to converge what cabal does and what nix does in terms of build targets. For hoogle I would highly recommend using the unoverriden hoogle. That might currently not be super convenient to do in nixpkgs, but its definitely the right solution. For tests it depends on what we want. But I see no reason why it would be hard to disable tests for dependencies but enable all tests and binaries for the current repo.11:55:30
@maralorn:maralorn.demaralorn * We somehow need to converge what cabal does and what nix does in terms of build targets. For hoogle I would highly recommend using the unoverriden hoogle. That might currently not be super convenient to do in nixpkgs, but its definitely the right solution. For tests it depends on what we want. But I see no reason why it would be hard to disable tests for dependencies but enable all tests and binaries for the current repo. I actually think that is already the default with your approach.11:55:45
@lxsameer:matrix.orglxsameer
In reply to @maralorn:maralorn.de
We somehow need to converge what cabal does and what nix does in terms of build targets. For hoogle I would highly recommend using the unoverriden hoogle. That might currently not be super convenient to do in nixpkgs, but its definitely the right solution. For tests it depends on what we want. But I see no reason why it would be hard to disable tests for dependencies but enable all tests and binaries for the current repo. I actually think that is already the default with your approach.
"unoverriden hoogle" like adding hoogle to the list of cabal dependencies? or use the one from nixpkgs?
11:57:17
@lxsameer:matrix.orglxsameeras for tests, I can see that cabal added quickcheck and stuff like that to the freeze file, so it must be ok for the repo, I have to test it though11:58:06
@maralorn:maralorn.demaralornThat’s what I had expected.11:59:56
@maralorn:maralorn.demaralornI mean use the one from nixpkgs. There is no sensible requirement to recompile hoogle with the library versions you picked.12:00:33
@lxsameer:matrix.orglxsameerok then, in that case if I want to use the same package set, it will conflict. would it be possible to use a different packageset or the default one for hoogle then?12:02:29
@lxsameer:matrix.orglxsameerso beside the inclusion of flags, and cleanups what would be the next step folks?12:03:08
@maralorn:maralorn.demaralornidk, if your project works I’d say you ship it. 😄12:04:28
@maralorn:maralorn.demaralornBut I am happy to review the stuff in more detail, give feedback and brainstorm next steps.12:05:01
@lxsameer:matrix.orglxsameercool, I like that, I'll clean up the code, and ping you. and hopefully make it available for others to use12:10:25
@lxsameer:matrix.orglxsameerI tried to use a newer GHC (9.10) to test this solution, and I made sure that the freeze file is generated with the same compiler version (9.10) but I run into a conflict with the base version. base package is shipped with the compiler right?13:02:38
@sternenseemann:systemli.orgsterni (he/him)
In reply to @lxsameer:matrix.org
for each dependency separately?
everywhere the freeze file contains flags, yes. I assume the default is implied otherwise
13:48:06
@sternenseemann:systemli.orgsterni (he/him) it won’t if you just add it to PATH for a development environment 13:48:56
@sternenseemann:systemli.orgsterni (he/him)some libs depend on QuickCheck so that they can expose non orphan Arbitrary instances13:49:49
@sternenseemann:systemli.orgsterni (he/him)
In reply to @lxsameer:matrix.org
I tried to use a newer GHC (9.10) to test this solution, and I made sure that the freeze file is generated with the same compiler version (9.10) but I run into a conflict with the base version. base package is shipped with the compiler right?
yes
13:50:10
@sternenseemann:systemli.orgsterni (he/him) and non reinstallable because it exposes some GHC modules 13:50:38
@lxsameer:matrix.orglxsameer

hmmm so what would be the solution here? here is an example of the error:

error: builder for '/nix/store/yyyhyvzwp2vrz3n1wqbzirv8zm06dh2s-primitive-0.8.0.0.drv' failed with exit code 1;
       last 23 log lines:
       > Running phase: setupCompilerEnvironmentPhase
       > Build with /nix/store/flx8by8vi8dcx2vaw9rp4gz214kk2dhv-ghc-9.10.1.
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/9fwj05l9qsrjp73mgkhsqx210w19xvd1-primitive-0.8.0.0.tar.gz
       > source root is primitive-0.8.0.0
       > setting SOURCE_DATE_EPOCH to timestamp 1000000000 of file primitive-0.8.0.0/test/src/PrimLaws.hs
       > Running phase: patchPhase
       > Replace Cabal file with edited version from mirror://hackage/primitive-0.8.0.0/revision/1.cabal.
       > Running phase: compileBuildDriverPhase
       > setupCompileFlags: -package-db=/build/tmp.3OGcxDtvet/setup-package.conf.d -threaded
       > [1 of 2] Compiling Main             ( /nix/store/4mdp8nhyfddh7bllbi7xszz7k9955n79-Setup.hs, /build/tmp.3OGcxDtvet/Main.o )
       > [2 of 2] Linking Setup
       > Running phase: updateAutotoolsGnuConfigScriptsPhase
       > Running phase: configurePhase
       > configureFlags: --verbose --prefix=/nix/store/8yjr4gf9cw5wm6gbavvfv9n9kf4xn5i8-primitive-0.8.0.0 --libdir=$prefix/lib/$compiler/lib --libsubdir=$abi/$libname --docdir=/nix/store/wk5mqmy36a6mh95aphwr169g7v
hiq4i4-primitive-0.8.0.0-doc/share/doc/primitive-0.8.0.0 --with-gcc=gcc --package-db=/build/tmp.3OGcxDtvet/package.conf.d --ghc-option=-j16 --ghc-option=+RTS --ghc-option=-A64M --ghc-option=-RTS --enable-library-p
rofiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --disable-tests --disable-benchmarks --enable-library-vanilla --di
sable-library-for-ghci --enable-split-sections --enable-library-stripping --enable-executable-stripping --ghc-option=-haddock --extra-lib-dirs=/nix/store/53iigsmf32bwkfdhhihq2rppgk23k2rg-ncurses-6.4.20221231/lib -
-extra-lib-dirs=/nix/store/pmf31rbzvv618qirwmzppjb63wsrl4zi-libffi-3.4.6/lib --extra-lib-dirs=/nix/store/yljlqz62v8a9brqmvib9pa4k7yanb15a-elfutils-0.191/lib --extra-lib-dirs=/nix/store/y54504sbwlbbm14hkvv48yw4smjw
649c-gmp-with-cxx-6.3.0/lib
       > Using Parsec parser
       > Configuring primitive-0.8.0.0...
       > Error: [Cabal-8010]
       > Encountered missing or private dependencies:
       >     base >=4.9 && <4.20
       > CallStack (from HasCallStack):
       >   dieWithException, called at libraries/Cabal/Cabal/src/Distribution/Simple/Configure.hs:1457:11 in Cabal-3.12.0.0-inplace:Distribution.Simple.Configure
       >
       For full logs, run 'nix log /nix/store/yyyhyvzwp2vrz3n1wqbzirv8zm06dh2s-primitive-0.8.0.0.drv'.

13:52:05
@lxsameer:matrix.orglxsameercool13:53:10
@maralorn:maralorn.demaralornIs primitive in your lock file?15:39:26
@maralorn:maralorn.demaralornAnd is this using the primitive version from your lock file?15:43:26
@lxsameer:matrix.orglxsameeroh flake.lock? I forgot about that one16:06:03
@lxsameer:matrix.orglxsameerlet me investigate16:06:11
@lxsameer:matrix.orglxsameer
In reply to @maralorn:maralorn.de
And is this using the primitive version from your lock file?
removed the flake.lock, still the same issue. primitive is in the freeze file with the correct version
16:10:47
@lxsameer:matrix.orglxsameerI just noticed that even though I used cabal-install from ghc910 packageset, the ghc on the path is 9.616:17:13
@sternenseemann:systemli.orgsterni (he/him)

Build with /nix/store/flx8by8vi8dcx2vaw9rp4gz214kk2dhv-ghc-9.10.1.

doesn't look like it

16:28:21
@sternenseemann:systemli.orgsterni (he/him) lxsameer: is primitive 0.9 or 0.8 in your freeze file? 16:29:20
@lxsameer:matrix.orglxsameer
In reply to @sternenseemann:systemli.org

Build with /nix/store/flx8by8vi8dcx2vaw9rp4gz214kk2dhv-ghc-9.10.1.

doesn't look like it

for the time I was generating the freeze file
16:30:05
@lxsameer:matrix.orglxsameerI regenerated the freeze file and it is 0.9.0.0 now, buuuuut16:30:26
@sternenseemann:systemli.orgsterni (he/him)okay, yeah that won't work16:30:30

Show newer messages


Back to Room ListRoom Version: 6