!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
21 Jan 2025
@jean-paul.:matrix.orgjean-paul.(and it is a mess of Python which looks miserable to try to understand/fix)13:12:33
@maralorn:maralorn.demaralorn MangoIV might know about this. ^ 13:28:30
@mangoiv.:matrix.orgMangoIV I have done a very cursed thing for wire once but you’ll have to do some adjustments for it to work with your project. 13:29:58
@mangoiv.:matrix.orgMangoIV It’s a two stage process where first we extract meta data from the nix code (this has to be done in nix because dependencies are not easy to analyse outside of it (main reason being string contexts) and then after you collect this json there’s a pretty simple haskell script that builds an SBOM from it 13:30:58
@jean-paul.:matrix.orgjean-paul.I guess since the requested format for this particular SBOM is "table in google docs" maybe I should just write the nix expression to get the info and then sed/copy/paste/whatever13:32:35
@mangoiv.:matrix.orgMangoIV

https://github.com/wireapp/wire-server/blob/0b236a6560a3fe228dae5898a0b840b573b23922/nix/wire-server.nix#L477

This is the entry point to the nix code ^

https://github.com/wireapp/wire-server/blob/develop/hack/bin/bombon.hs

This is the entry point to the haskell code

13:34:42
@mangoiv.:matrix.orgMangoIVhttps://github.com/wireapp/wire-server/blob/develop/hack/bin/Sbom.hs13:35:01
@jean-paul.:matrix.orgjean-paul. MangoIV: Thanks 13:35:04
@mangoiv.:matrix.orgMangoIV There’s some really cursed issues with extracting info from nix code but since this is a one off I duct tape fixed them 13:36:07
@mangoiv.:matrix.orgMangoIV So don’t expect a „clean“ solution 13:36:22
@mangoiv.:matrix.orgMangoIV(Also yes, it’s expected for the nix script to memory leak like crazy and take multiple minutes)13:37:35
@mangoiv.:matrix.orgMangoIV If you wanna improve it, probably don’t do the recursion manually but use genericClosure. That should also fix the problem with nixpkgs being an actual graph (vs a tree) 13:38:31
@jean-paul.:matrix.orgjean-paul.probably won't, going for minimum effort here as the motivation appears to by CYA rather than anything remotely valuable, interesting, or useful13:39:17
@mangoiv.:matrix.orgMangoIV It probably won’t be useful anyway. All tools that I have seen work with SBom have an insanely high false positive rate and none of this stuff is actionable at all (except if you’re able to spend half of your companies time on it) 13:42:17
@emilazy:matrix.orgemilyhmm, what kind of SBOM only covers direct dependencies?14:43:10
@emilazy:matrix.orgemilyI thought including the whole tree was kind of the point14:43:23
@jean-paul.:matrix.orgjean-paul.The kind where someone is just checking a box because someone told them to check a box, I think15:02:08
@jean-paul.:matrix.orgjean-paul.Another team has to do this for a non-Nix JavaScript project with >3000 transitive dependencies, someone was probably worried about wasting a whole week on this instead of just a morning15:03:17
@maralorn:maralorn.demaralornI mean I have basically one question: Do we have AGPL in our closure.^^15:04:22
@maralorn:maralorn.demaralorn* I mean I have basically one question: Do we have AGPL in our closure?^^15:04:25
@joaomoreira:matrix.orgJoão MoreiraOkay, I was able to do it. If anyone could please review, merge: https://github.com/NixOS/nixpkgs/pull/37193421:37:39
@joaomoreira:matrix.orgJoão Moreira * Okay, I was able to do it thanks to y'all. If anyone could please review, merge: https://github.com/NixOS/nixpkgs/pull/37193421:37:52
@joaomoreira:matrix.orgJoão MoreiraI also want to package HVM3 in this same approach in the future.21:38:44
@oak:universumi.fioak 🏳️‍🌈♥️ changed their profile picture.22:35:12
@oak:universumi.fioak 🏳️‍🌈♥️ changed their profile picture.22:37:00
23 Jan 2025
@tobioloke:matrix.orgtobz619 joined the room.10:14:02
24 Jan 2025
@kspatlas:tchncs.deKSP Atlasis there a good way to use the Haskell VSCode extension on NixOS? It seems to depend on GHCup which can't be installed because it depends on a package marked as broken14:09:12
@kspatlas:tchncs.deKSP Atlasill send this in the main haskell room too since i feel it would fit in both14:10:05
@maralorn:maralorn.demaralorn KSP Atlas: That extension is usable without ghcup. Use the manual install option and install HLS via Nix. GHCUP does not offer working binaries for nixos so there is no point in fixing its build. 14:26:15
@maralorn:maralorn.demaralorn * KSP Atlas: That extension is usable without ghcup. Use the "manual install" option and install HLS via Nix. GHCUP does not offer working binaries for nixos so there is no point in fixing its build. 14:26:27

Show newer messages


Back to Room ListRoom Version: 6