!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

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

Load older messages


SenderMessageTime
23 Oct 2024
@emilazy:matrix.orgemilyoh, I missed that one.11:54:37
@dyniec:matrix.orgdyniec changed their profile picture.12:10:51
@b:chreekat.netchreekat
In reply to @maralorn:maralorn.de
Well, there is also apparently no ghc-lib-parser and thus no ormolu, hlint, hindent and stuff like that. A bit unclear to me whether that’s normal on nightly.
It's back as of today
12:18:41
@b:chreekat.netchreekatThey just bumped nightly to 9.8.3 so probably ran into the same issue as you folks did12:19:30
@b:chreekat.netchreekatYeah they were missing for one day :)12:21:20
@maralorn:maralorn.demaralornAh, excellent, Sir Explainalot.12:52:16
@sternenseemann:systemli.orgsterni (he/him) emily: lambdabot actually matters, someone actively maintains it 23:09:05
24 Oct 2024
@mangoiv.:matrix.orgMangoIV
In reply to @b:chreekat.net
They just bumped nightly to 9.8.3 so probably ran into the same issue as you folks did
Yeah you can look in the thread, about Next GHC prios, they were also quite bummed when GHC said “no GHC 98s for you anymore” :P
09:42:26
@nki:m.nkagami.menki ⚡️ changed their profile picture.17:13:16
@nki:m.nkagami.menki ⚡️ changed their profile picture.17:13:28
@nki:m.nkagami.menki ⚡️ changed their profile picture.17:13:40
25 Oct 2024
@sternenseemann:systemli.orgsterni (he/him)https://github.com/NixOS/nixpkgs/commit/fe7d494468a8df2432d1c1ff4f1824dfc9af71cf#commitcomment-14835694112:45:37
@sternenseemann:systemli.orgsterni (he/him) exposing a new symbol named Unit from Control.DeepSeq seems unnecessary in a minor GHC release. That apparently breaks three packages in stackage nightly… 23:14:47
@maralorn:maralorn.demaralornIs deepseq a core lib?23:16:45
@sternenseemann:systemli.orgsterni (he/him)yes23:23:17
26 Oct 2024
@bitestring:matrix.orgbitestring

Hello, I am new to Nix and Haskell world. I am trying to produce a Haskell library that would be consumed in Rust main function. I am using Rust's bindgen to import the header files generated by GHC. However when I import it in bindgen, I am getting following error

Unable to generate bindings: ClangDiagnostic("./include/../../../.stack-work/dist/x86_64-linux/ghc-9.6.6/build/Lib_stub.h:1:10: fatal error: 'HsFFI.h' file not found\n")

How do I tell Rust where to find GHC's header files? Thanks in advance.

10:09:16
@bitestring:matrix.orgbitestringBTW I am using flake.nix to provide dependencies like GHC, Stack, Cargo to my project.10:12:28
@sternenseemann:systemli.orgsterni (he/him) HsFFI.h is in the include directory of the rts library bundled with GHC. It is at a location outside the default search path, so you probably need to tell bindgen explicitly where to find it 11:07:11
@bitestring:matrix.orgbitestring I found it under /nix/store/f2hib3gih6fdvvnsyy5qs51adfz8j9d3-ghc-9.6.6/lib/ghc-9.6.6/lib/x86_64-linux-ghc-9.6.6/rts-1.0.2/include/HsFFI.h. So should I add it to CPATH explicitly? 11:13:51
@bitestring:matrix.orgbitestringBut how would I add it without hardcoding the version numbers?11:14:38
@bitestring:matrix.orgbitestring

Made it work

devShells.${system}.default = pkgs.mkShell {
        buildInputs = dependencies;
        nativeBuildInputs = [ pkgs.pkg-config ];
        LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath dependencies;
        CPATH = "${pkgs.ghc}/lib/ghc-9.6.6/lib/x86_64-linux-ghc-9.6.6/rts-1.0.2/include";
};

It would be nice if I don't have to hardcode versions. Thanks anyway.

11:29:14
@sternenseemann:systemli.orgsterni (he/him) I don't know if CPATH is the best option, not sure what bindgen looks at 12:10:57
@sternenseemann:systemli.orgsterni (he/him) you can compute the path completely except for the rts version which is not known statically. Alternatively you can use shell globbing in shellHook which is probably the most robust solution. 12:11:44
@vigress9:matrix.org@vigress9:matrix.org I'm pretty sure you don't need to set LD_LIBRARY_PATH if you use packages instead of buildInputs 12:18:30
@bitestring:matrix.orgbitestringOkay. Will explore those options. I am completely new to Nix. So my configs are definitely not production quality :) 12:41:41
@lxsameer:matrix.orglxsameerhey folks, I'm using cabal2nix at the moment, but I'm facing with a lot of broken packages, to a degree that I'm giving up on fixing them. is there any other solution to use nix and haskell together and use packages from hackage or stackage but still end up with reproducible build?13:48:43
@lenny:flipdot.orgLenny.btw does anyone have a flake template based on this post they could share? https://abhinavsarkar.net/posts/nix-for-haskell/ somehow it doesn't include one 😅14:11:08
@rosscomputerguy:matrix.orgTristan RossDoes Haskell have any blockers for 24.11 or is everything good? I don't see a check mark for it on the release schedule.14:17:16
@lxsameer:matrix.orglxsameer
In reply to @lenny:flipdot.org
btw does anyone have a flake template based on this post they could share? https://abhinavsarkar.net/posts/nix-for-haskell/

somehow it doesn't include one 😅
here is mine: https://git.sr.ht/~lxsameer/nixit/tree/master/item/modules/haskell/default.nix
14:22:56
@maralorn:maralorn.demaralorn
In reply to @lxsameer:matrix.org
hey folks, I'm using cabal2nix at the moment, but I'm facing with a lot of broken packages, to a degree that I'm giving up on fixing them. is there any other solution to use nix and haskell together and use packages from hackage or stackage but still end up with reproducible build?
Are you using the default compiler version?
14:24:10

Show newer messages


Back to Room ListRoom Version: 6