12 Oct 2024 |
Florian | 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 |
Florian | cabal seems to building the dependencies which should already be installed by nix | 12:25:51 |
chreekat | @qe7ftcyrpg:matrix.org: you have to include zlib (the system library) in your buildDepends. | 17:00:19 |
sterni | 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 |
sterni | 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 |
iqubic (she/her) | So, I have this shell.nix file: https://dpaste.com/BURVRG6Q9 | 16:29:05 |
iqubic (she/her) | Is there any way I can update this to force the use of ghc 9.10.x | 16:29:26 |
iqubic (she/her) | * Is there any way I can update this to force the use of ghc 9.10.x? | 16:29:29 |
maralorn | 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 |
| fredrikr joined the room. | 17:30:04 |
hellwolf | 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 | related: how to depends on ghc without its docs? | 18:18:45 |
hellwolf | ^-- just checked source, I guess it is enableDocs | 18:20:06 |
hellwolf | $ 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 | Curious, why do you need that? | 18:34:39 |
alexfmpe | Are you trying to filter out the docs or something? | 18:35:25 |
hellwolf | 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}' | 18:51:36 |
hellwolf | * 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 | * 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 | 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 | 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 | 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 | * 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 | 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. | 18:57:49 |
maralorn | 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 | 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 |
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 | https://code.maralorn.de/maralorn/config/src/commit/6d3f843360da71e73f30985d50d1bf97ce80b9d0/home-manager/roles/clients/haskell-env.nix#L3 | 18:59:06 |
hellwolf | 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 | thanks! | 18:59:27 |