!RbXGJhHMsnQcNIDFWN:nixos.org

Nix Haskell

611 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 infrastructure123 Servers

Load older messages


SenderMessageTime
12 Oct 2024
@qe7ftcyrpg:matrix.orgFlorian

Hi, shouldn't haskellPackages.developPackage prevent errrors like Missing (or bad) header file: zlib.h when running the project with cabal. I added a flake to https://github.com/haskellfoundation/error-message-index. But trying when trying to run it i run into this problem. This is the flake.nix

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    utils.url = "github:numtide/flake-utils";
  };

  outputs = { self, nixpkgs, utils }:
    utils.lib.eachDefaultSystem (system:
      let pkgs = import nixpkgs { inherit system; };
      in {
        devShell = pkgs.haskellPackages.developPackage {
          root = ./message-index/.;
          modifier = drv:
            pkgs.haskell.lib.overrideCabal drv (attrs: {
              buildTools = (attrs.buildTools or [ ]) ++ [
                pkgs.haskellPackages.cabal-install
              ];
            });
        };
      });
}

12:14:12
@qe7ftcyrpg:matrix.orgFloriancabal seems to building the dependencies which should already be installed by nix12:25:51
@b:chreekat.netchreekat @qe7ftcyrpg:matrix.org: you have to include zlib (the system library) in your buildDepends. 17:00:19
@sternenseemann:systemli.orgsterni Florian: For some reason, cabal-install doesn't want to use the packages from the package db you provide via Nix. This can have a variety of reasons. You can set active-repositories: :none in your cabal.project to make cabal-install ignore its knowledge of other versions of packages to prevent such situations. 17:05:20
@sternenseemann:systemli.orgsterni best put in the project.local file of course. Alternatively the --offline flag works, but I remember it sometimes doesn't quite work. 17:06:01
13 Oct 2024
@mequbic:matrix.orgiqubic (she/her) So, I have this shell.nix file: https://dpaste.com/BURVRG6Q9 16:29:05
@mequbic:matrix.orgiqubic (she/her)Is there any way I can update this to force the use of ghc 9.10.x16:29:26
@mequbic:matrix.orgiqubic (she/her) * Is there any way I can update this to force the use of ghc 9.10.x?16:29:29
@maralorn:maralorn.demaralorn
In reply to @mequbic:matrix.org
Is there any way I can update this to force the use of ghc 9.10.x?
Just replace pkgs.haskellPackages with pkgs.haskell.packages.ghc910
17:17:55
@frero:pvv.ntnu.nofredrikr joined the room.17:30:04
@hellwolf:matrix.orghellwolf hmm, how to use nix commands to resolve the path of 'ghc-doc' to thigns like /nix/store/navhsgf167zjfy25yfzdrvhmsj857yyd-ghc-9.10.1-doc/share/doc/ghc/? 18:17:16
@hellwolf:matrix.orghellwolfrelated: how to depends on ghc without its docs?18:18:45
@hellwolf:matrix.orghellwolf ^-- just checked source, I guess it is enableDocs 18:20:06
@hellwolf:matrix.orghellwolf
$ ls `nix eval --raw nixpkgs#haskell.compiler.ghc910.doc.outPath`/share/doc/ghc/html
Haddock  index.html  libraries  users_guide

Nvm, found it, it seems easy.

18:27:22
@alexfmpe:matrix.orgalexfmpeCurious, why do you need that?18:34:39
@alexfmpe:matrix.orgalexfmpeAre you trying to filter out the docs or something?18:35:25
@hellwolf:matrix.orghellwolfI was trying to browse docs locally, in case I don't have internet. I would like to host a local static server for those files at `http://ghc-docs.localdomain/{latest}'18:51:36
@hellwolf:matrix.orghellwolf * I was trying to browse docs locally, in case I don't have internet. I would like to host a local static server for those files at `http://ghc-docs.localdomain/{latest,ghc910,etc...}' 18:51:54
@hellwolf:matrix.orghellwolf * I was trying to browse docs locally, in case I don't have internet. I would like to host a local static server for those files at `http://ghc-docs.localdomain/{latest,ghc910,...}' 18:51:57
@hellwolf:matrix.orghellwolf

Also, in case I use different versions of ghc as dependencies for some project development, I might as well have the docs disabled, since they do use quite some space.

Though admittedly, I have auto-optimise-store = true which probably hardlinked a lot of duplicated doc files across versions.

18:53:57
@hellwolf:matrix.orghellwolf
In reply to @hellwolf:matrix.org
I was trying to browse docs locally, in case I don't have internet. I would like to host a local static server for those files at `http://ghc-docs.localdomain/{latest,ghc910,...}'
If anyone has similar setup with NixOS, please share... Otherwise, when I have it working, I will share mine to the discourse forum.
18:55:44
@hellwolf:matrix.orghellwolf
In reply to @hellwolf:matrix.org
I was trying to browse docs locally, in case I don't have internet. I would like to host a local static server for those files at `http://ghc-docs.localdomain/{latest,ghc910,...}'
* If anyone has similar setup with NixOS, please share... Otherwise, when I have it working some other time, I will share mine to the discourse forum.
18:55:56
@hellwolf:matrix.orghellwolf * I was trying to browse docs locally, in case I don't have internet. I would like to host a local static server for those files at `http://ghc-docs.localhost/{latest,ghc910,...}' 18:56:26
@hellwolf:matrix.orghellwolfOr even better... have your own hoogle instance. Lately the public hoogle is quite unreliable and slow. I think it would help the infra that if we NixOS people can self-host and share the burden by decentralizing it.18:57:49
@maralorn:maralorn.demaralorn
In reply to @hellwolf:matrix.org
I was trying to browse docs locally, in case I don't have internet. I would like to host a local static server for those files at `http://ghc-docs.localhost/{latest,ghc910,...}'
Are wa talking about the ghc user guide?
18:58:04
@maralorn:maralorn.demaralorn
In reply to @hellwolf:matrix.org
Or even better... have your own hoogle instance. Lately the public hoogle is quite unreliable and slow.

I think it would help the infra that if we NixOS people can self-host and share the burden by decentralizing it.
Uh, that’s pretty easy.
18:58:25
@hellwolf:matrix.orghellwolf


    The User's Guide

    The User's Guide has all you need to know about using GHC: command line options, language extensions, GHCi, etc.

    Libraries

    Documentation for the libraries that come with GHC.

    GHC API

    Documentation for the GHC API.

18:58:44
@maralorn:maralorn.demaralornhttps://code.maralorn.de/maralorn/config/src/commit/6d3f843360da71e73f30985d50d1bf97ce80b9d0/home-manager/roles/clients/haskell-env.nix#L318:59:06
@hellwolf:matrix.orghellwolf
In reply to @maralorn:maralorn.de
Uh, that’s pretty easy.
that's good to hear.... any nixos configuration to share?
18:59:07
@hellwolf:matrix.orghellwolfthanks!18:59:27

Show newer messages


Back to Room ListRoom Version: 6