!RbXGJhHMsnQcNIDFWN:nixos.org

Haskell in Nixpkgs/NixOS

690 Members
For discussions and questions about Haskell with Nix, cabal2nix and haskellPackages in nixpkgs | Current Docs: https://nixos.org/manual/nixpkgs/unstable/#haskell | Current PR: https://github.com/nixos/nixpkgs/pulls?q=is%3Apr+is%3Aopen+head%3Ahaskell-updates | Maintainer Docs: https://github.com/NixOS/nixpkgs/blob/haskell-updates/pkgs/development/haskell-modules/HACKING.md | More Nix: #community:nixos.org | More Haskell: #haskell-space:matrix.org | Merger Schedule: https://cloud.maralorn.de/apps/calendar/p/H6migHmKX7xHoTFa/dayGridMonth/now | Join #haskell.nix:libera.chat for question about the alternative haskell.nix infrastructure137 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
6 Jul 2025
@alex:tunstall.xyzAlex
In reply to @collinarnett:matrix.org
Does the hoogle server serve the haddocs as well? I'm not really sure what I'm looking for so I would like to browse the docs like I would on hackage.
Note that how Hoogle serves Haddocks is affected by the --local flag.
(For most users, running with --local works better.)
See https://github.com/ndmitchell/hoogle/blob/e83646ee1b62eb724def6c838a34017b60fc519a/docs/Install.md#server
00:14:08
@woobilicious:matrix.orgwoobiliciousIs there anyway to "export" a build plan for haskell apps based on the nixpkgs version? trying to think how to compile my code for windows, and cabal obvious isn't going to pull in the exact same versions without some hints. I guess I could look at cross compiling using mingw64 version of ghc in nixpkgs, but that might just be a huge headache.05:56:37
@alex:tunstall.xyzAlex
In reply to @woobilicious:matrix.org
Is there anyway to "export" a build plan for haskell apps based on the nixpkgs version? trying to think how to compile my code for windows, and cabal obvious isn't going to pull in the exact same versions without some hints. I guess I could look at cross compiling using mingw64 version of ghc in nixpkgs, but that might just be a huge headache.
Have you tried cabal freeze?
06:23:48
@woobilicious:matrix.orgwoobiliciousoh thanks, I didn't realise that existed...kinda half forgot cabal added some modern features, as I used to use stack on windows and nixpkgs now.06:44:58
8 Jul 2025
@dmjio:matrix.org@dmjio:matrix.org

is there a function to parse a flake lockfile into a set?

let sources = parseFlakeLock (builtins.readFile ./flake.lock);

something like this

16:07:35
@ners:nixos.devnersYes, in fact flake-compat is based on this principle. See examples here: https://github.com/nix-community/flake-compat16:13:58
@ners:nixos.devners *

Yes, in fact flake-compat is based on this principle. See examples here: https://github.com/nix-community/flake-compat

Basically: builtins.fromJSON (builtins.readFile ./flake.lock);

16:14:48
@dmjio:matrix.org@dmjio:matrix.org

so I'm just doing this rn

  # fetch from flake.lock
  with (builtins.fromJSON (builtins.readFile ../flake.lock));
  fetchFromFlakeLock = args:
    fetchFromGitHub {
      inherit (args.locked) owner repo rev;
      hash = args.locked.narHash;
    };
  servant = fetchFromFlake (nodes.servant);
19:50:58
@dmjio:matrix.org@dmjio:matrix.org does fetchFromFlakeLock already exist somewhere 19:51:18

Show newer messages


Back to Room ListRoom Version: 6