| 16 Jul 2024 |
thirdofmay18081814goya | will try it out | 20:53:05 |
MangoIV | Yeah the 5 is a minor version. | 20:53:53 |
| 17 Jul 2024 |
thirdofmay18081814goya | is there any way to use error handling concepts from haskell in nix | 14:50:37 |
thirdofmay18081814goya | some sort of Maybe monad | 14:50:44 |
thirdofmay18081814goya | debugging this stuff is hell | 14:50:49 |
maralorn | Not really.^^ It’s all pretty horrible. | 15:18:51 |
maralorn | But you can post error messages and we can try to decipher them. 😄 | 15:19:11 |
| starlit joined the room. | 17:28:39 |
starlit | How is the syntax to override a haskellPackage? I want to overlay/override haskellPackages.ncurses from inputs.nixpkgs to the one from inputs.nixpkgs-haskellpackages-ncurses. This is what I got so far.
overlay = overlayFinal: overlayPrev: {
ncurses =
inputs.nixpkgs-haskellpackages-ncurses.legacyPackages.${system}.haskellPackages.ncurses;
};
| 19:04:56 |
maralorn | I don’t think what you are trying to do is feasible. | 19:16:48 |
maralorn | I don’t think you can link together libraries compiled with different ghc versions. | 19:17:23 |
maralorn | Maybe you can give us a bit more context on what problem you are trying to solve and we can give you pointers. | 19:18:24 |
starlit | maralorn: I have my flake.nix which uses haskell-template for a Haskel/Cabal project.
In my helda.cabal, I have ncurses as a dependency
build-depends:
, ncurses
The problem is that haskellPackages.ncurses is marked as broken
rg -A12 '"ncurses"' pkgs/development/haskell-modules/hackage-packages.nix
216136: "ncurses" = callPackage
216137- ({ mkDerivation, base, c2hs, containers, ncurses, text
216138- , transformers
216139- }:
216140- mkDerivation {
216141: pname = "ncurses";
216142- version = "0.2.16";
216143- sha256 = "0gsyyaqyh5r9zc0rhwpj5spyd6i4w2vj61h4nihgmmh0yyqvf3z5";
216144- revision = "1";
216145- editedCabalFile = "1wfdy716s5p1sqp2gsg43x8wch2dxg0vmbbndlb2h3d8c9jzxnca";
216146- libraryHaskellDepends = [ base containers text transformers ];
216147- librarySystemDepends = [ ncurses ];
216148- libraryToolDepends = [ c2hs ];
216149- description = "Modernised bindings to GNU ncurses";
216150- license = lib.licenses.gpl3Only;
216151- hydraPlatforms = lib.platforms.none;
216152- broken = true;
216153- }) {inherit (pkgs) ncurses;};
The latest successful build is from 49d15c3e29a870d1b6121f7310a747783ddd961f.
hydra-check haskellPackages.ncurses
Build Status for nixpkgs.haskellPackages.ncurses.x86_64-linux on unstable
✔ ncurses-0.2.16 from 2021-12-25 - https://hydra.nixos.org/build/162301952
So I was trying to workaround this by overlaying haskellPackages.ncurses with the one from 49d15c3e29a870d1b6121f7310a747783ddd961f.
| 19:48:10 |
maralorn | @starlit: I see. Well I'd recommend you just override ncurses with unmarkBroken and see if it works.
| 20:18:45 |
maralorn | An example overlay for haskellPackages:
haskellPackages.override { overrides = self: super: { ncurses = pkgs.haskell.lib.doJailbreak super. ncurses; }; }
| 20:24:48 |
maralorn | * An example overlay for haskellPackages:
haskellPackages.override { overrides = self: super: { ncurses = pkgs.haskell.lib.unmarkBroken super. ncurses; }; }
| 20:25:10 |
maralorn | If it fails to build we can most likely find a solution for that. | 20:25:43 |
maralorn | (And once we have the fix we can upstream it to nixpkgs.) | 20:25:53 |
starlit | In reply to @maralorn:maralorn.de
@starlit: I see. Well I'd recommend you just override ncurses with unmarkBroken and see if it works.
@nix { "action": "setPhase", "phase": "setupCompilerEnvironmentPhase" }
Running phase: setupCompilerEnvironmentPhase
Build with /nix/store/sk5if9vmsykj16phb87wv7a8pv08wi62-ghc-9.6.5.
@nix { "action": "setPhase", "phase": "unpackPhase" }
Running phase: unpackPhase
unpacking source archive /nix/store/kav9yjn2q7l9zdxk96z5ymcy0w48l4vj-ncurses-0.2.16.tar.gz
source root is ncurses-0.2.16
setting SOURCE_DATE_EPOCH to timestamp 1472432977 of file ncurses-0.2.16/Setup.hs
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: patchPhase
Replace Cabal file with edited version from mirror://hackage/ncurses-0.2.16/revision/1.cabal.
@nix { "action": "setPhase", "phase": "compileBuildDriverPhase" }
Running phase: compileBuildDriverPhase
setupCompileFlags: -package-db=/build/tmp.D8cye0V4Fj/setup-package.conf.d -threaded
[1 of 2] Compiling Main ( Setup.hs, /build/tmp.D8cye0V4Fj/Main.o )
[2 of 2] Linking Setup
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "configurePhase" }
Running phase: configurePhase
configureFlags: --verbose --prefix=/nix/store/5ygqahwg0a9yz44721m3j6fa0i2lfff9-ncurses-0.2.16 --libdir=$prefix/lib/$compiler/lib --libsubdir=$abi/$libname --docdir=/nix/store/llr08kp2w5s4qc21zvx9zz5jw9ys42xz-ncurses-0.2.16-doc/share/doc/ncurses-0.2.16 --with-gcc=gcc --package-db=/build/tmp.D8cye0V4Fj/package.conf.d --ghc-option=-j4 --ghc-option=+RTS --ghc-option=-A64M --ghc-option=-RTS --enable-library-profiling --profiling-detail=exported-functions --disable-profiling --enable-shared --disable-coverage --enable-static --disable-executable-dynamic --enable-tests --disable-benchmarks --enable-library-vanilla --disable-library-for-ghci --enable-split-sections --enable-library-stripping --enable-executable-stripping --ghc-option=-haddock --extra-lib-dirs=/nix/store/qi2525fzsnmgayxba5gxc2xi3x80g99x-ncurses-6.4.20221231/lib --extra-lib-dirs=/nix/store/nj9g42fdsm8l2z43kfcahch3px2q209a-libffi-3.4.6/lib --extra-lib-dirs=/nix/store/3bffbi88dmkpr5ib58wsngqd6bfdjzgj-elfutils-0.191/lib --extra-lib-dirs=/nix/store/vgzmgmppvpb6gqlc56jhcn007cjn7xg9-gmp-with-cxx-6.3.0/lib --extra-include-dirs=/nix/store/wdpbay39lcqhc7yp1472f33lgjiai7x0-ncurses-6.4.20221231-dev/include --extra-lib-dirs=/nix/store/wdpbay39lcqhc7yp1472f33lgjiai7x0-ncurses-6.4.20221231-dev/lib --extra-lib-dirs=/nix/store/qi2525fzsnmgayxba5gxc2xi3x80g99x-ncurses-6.4.20221231/lib
Using Parsec parser
Warning: ncurses.cabal:85:21: version operators used. To use version operators
the package needs to specify at least 'cabal-version: >= 1.8'.
Configuring ncurses-0.2.16...
Flags chosen: force-narrow-library=False, use-pkgconfig=False
Dependency base >=4.6 && <5.0: using base-4.18.2.1
Dependency containers >=0.2: using containers-0.6.7
Dependency text >=0.7: using text-2.0.2
Dependency transformers >=0.2: using transformers-0.6.1.0
Source component graph: component lib
Configured component graph:
component ncurses-0.2.16-9arnZ0bDMmPEMvgPKnlSMs
include base-4.18.2.1
include containers-0.6.7
include text-2.0.2
include transformers-0.6.1.0
Linked component graph:
unit ncurses-0.2.16-9arnZ0bDMmPEMvgPKnlSMs
include base-4.18.2.1
include containers-0.6.7
include text-2.0.2
include transformers-0.6.1.0
UI.NCurses=ncurses-0.2.16-9arnZ0bDMmPEMvgPKnlSMs:UI.NCurses,UI.NCurses.Panel=ncurses-0.2.16-9arnZ0bDMmPEMvgPKnlSMs:UI.NCurses.Panel
Ready component graph:
definite ncurses-0.2.16-9arnZ0bDMmPEMvgPKnlSMs
depends base-4.18.2.1
depends containers-0.6.7
depends text-2.0.2
depends transformers-0.6.1.0
Using Cabal-3.10.3.0 compiled by ghc-9.6
Using compiler: ghc-9.6.5
Using install prefix:
/nix/store/5ygqahwg0a9yz44721m3j6fa0i2lfff9-ncurses-0.2.16
Executables installed in:
/nix/store/5ygqahwg0a9yz44721m3j6fa0i2lfff9-ncurses-0.2.16/bin
Libraries installed in:
/nix/store/5ygqahwg0a9yz44721m3j6fa0i2lfff9-ncurses-0.2.16/lib/ghc-9.6.5/lib/x86_64-linux-ghc-9.6.5/ncurses-0.2.16-9arnZ0bDMmPEMvgPKnlSMs
Dynamic Libraries installed in:
/nix/store/5ygqahwg0a9yz44721m3j6fa0i2lfff9-ncurses-0.2.16/lib/ghc-9.6.5/lib/x86_64-linux-ghc-9.6.5
Private executables installed in:
/nix/store/5ygqahwg0a9yz44721m3j6fa0i2lfff9-ncurses-0.2.16/libexec/x86_64-linux-ghc-9.6.5/ncurses-0.2.16
Data files installed in:
/nix/store/5ygqahwg0a9yz44721m3j6fa0i2lfff9-ncurses-0.2.16/share/x86_64-linux-ghc-9.6.5/ncurses-0.2.16
Documentation installed in:
/nix/store/llr08kp2w5s4qc21zvx9zz5jw9ys42xz-ncurses-0.2.16-doc/share/doc/ncurses-0.2.16
Configuration files installed in:
/nix/store/5ygqahwg0a9yz44721m3j6fa0i2lfff9-ncurses-0.2.16/etc
No alex found
Using ar found on system at:
/nix/store/wwfrj9kvfi14xclc38qfwm71ah6aawdh-binutils-2.41/bin/ar
Using c2hs version 0.28.8 found on system at:
/nix/store/n5khviada8v23vvfyldlk6dvd7fp1hzw-c2hs-0.28.8/bin/c2hs
No cpphs found
No doctest found
Using gcc version 13.3.0 given by user at:
/nix/store/mpm3i0sbqc9svfch6a17179fs64dz2kv-gcc-wrapper-13.3.0/bin/gcc
Using ghc version 9.6.5 found on system at:
/nix/store/sk5if9vmsykj16phb87wv7a8pv08wi62-ghc-9.6.5/bin/ghc
Using ghc-pkg version 9.6.5 found on system at:
/nix/store/sk5if9vmsykj16phb87wv7a8pv08wi62-ghc-9.6.5/bin/ghc-pkg-9.6.5
No ghcjs found
No ghcjs-pkg found
No greencard found
Using haddock version 2.29.2 found on system at:
/nix/store/sk5if9vmsykj16phb87wv7a8pv08wi62-ghc-9.6.5/bin/haddock-ghc-9.6.5
No happy found
Using haskell-suite found on system at: haskell-suite-dummy-location
Using haskell-suite-pkg found on system at: haskell-suite-pkg-dummy-location
No hmake found
Using hpc version 0.68 found on system at:
/nix/store/sk5if9vmsykj16phb87wv7a8pv08wi62-ghc-9.6.5/bin/hpc-ghc-9.6.5
Using hsc2hs version 0.68.9 found on system at:
/nix/store/sk5if9vmsykj16phb87wv7a8pv08wi62-ghc-9.6.5/bin/hsc2hs-ghc-9.6.5
Using hscolour version 1.25 found on system at:
/nix/store/ipffkmswbacfpi6dl71yxs1llpa0ncw1-hscolour-1.25/bin/HsColour
No jhc found
Using ld found on system at:
/nix/store/l46fjkzva0bhvy9p2r7p4vi68kr7a1db-binutils-wrapper-2.41/bin/ld.gold
No pkg-config found
Using runghc version 9.6.5 found on system at:
/nix/store/sk5if9vmsykj16phb87wv7a8pv08wi62-ghc-9.6.5/bin/runghc-9.6.5
Using strip version 2.41 found on system at:
/nix/store/mpm3i0sbqc9svfch6a17179fs64dz2kv-gcc-wrapper-13.3.0/bin/strip
Using tar found on system at:
/nix/store/95ljdxg4drk1iq8jkjfq2c0z5vbwv8vm-gnutar-1.35/bin/tar
No uhc found
@nix { "action": "setPhase", "phase": "buildPhase" }
Running phase: buildPhase
Preprocessing library for ncurses-0.2.16..
c2hs: C header contains errors:
dist/build/UI/NCurses/Enums.chs.h:140: (column 25) [ERROR] >>> Unknown identifier!
Cannot find a definition for `KEY_EVENT' in the header file.
| 21:23:26 |
starlit | dist/build/UI/NCurses/Enums.chs.h:140: (column 25) [ERROR] >>> Unknown identifier!
Cannot find a definition for `KEY_EVENT' in the header file.
This file ncurses-0.2.16/src/lib/UI/NCurses/Enums.chs
| 21:29:38 |
maralorn | Huh | 21:30:47 |
maralorn | ncurses had its last release in 2016. | 21:30:58 |
maralorn | I this point I‘d rather recommend just building your wohl project with haskellPackages from the old nixpkgs snapshot. | 21:31:02 |
maralorn | * I this point I‘d rather recommend just building your whole project with haskellPackages from the old nixpkgs snapshot. | 21:31:11 |
alexfmpe | is there a way to eval all of haskellPackages? | 23:29:34 |
alexfmpe | and only that | 23:29:47 |
| 18 Jul 2024 |
thirdofmay18081814goya | does cabal still suck for reproducibility | 01:44:28 |
thirdofmay18081814goya | nvm that, are you guys using cabal2nix or haskell.nix? | 01:49:10 |
thirdofmay18081814goya | In reply to @alexfmpe:matrix.org is there a way to eval all of haskellPackages? :lf github:NixOS/nixpkgs then outputs.legacyPackages.x86_64-linux.haskellPackages | 02:17:31 |
thirdofmay18081814goya | does haskellPackages not have overrideScope? | 04:27:23 |