You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First I tried this code with shelllcheck and it worked:
# test-shellcheck-overlay.nix{sources?import./nixpkgs/nix/sources.nix}: # import the sourceswith{overlay=_: pkgs:
{niv=importsources.niv{};# use the sources :)shellcheck=pkgs.haskellPackages.callCabal2nix"shellcheck"sources.shellcheck{};};};letmypkgs=importsources.nixpkgs{overlays=[overlay];};inmypkgs.mkShell{buildInputs=[mypkgs.shellcheck# when shellcheck overlay present we go from 0.7.0 to 0.7.1];}
Then I tried with hlint since I knew it could possibly be more complicated and depend on boot packages or ghc version specific things:
# test-niv-overlay.nix{sources?import./nixpkgs/nix/sources.nix}: # import the sourceswith{overlay=_: pkgs:
{niv=importsources.niv{};# use the sources :)hlint=pkgs.haskellPackages.callCabal2nix"hlint"sources.hlint{};};};letmypkgs=importsources.nixpkgs{overlays=[overlay];};inmypkgs.mkShell{buildInputs=[# without overlay this gives 2.2.2, after it should give 3.1.6 using# nix-shell test-niv-overlay.nix --run "hlint --version"mypkgs.hlint# should be 3.1.6 but it's not];}
It returns:
-*- mode: compilation; default-directory: "~/hci/" -*-
Compilation started at Sat Jul 18 23:18:52
nix-shell test-niv-overlay.nix --run "hlint --version"
error: anonymous function at /nix/store/2cvhh84x9jycqpgbxxpsq46qyyhbijbv-cabal2nix-hlint/default.nix:1:1 called without required argument 'ghc-lib-parser-ex', at /nix/store/08xfivmynisgv4lxp4d9x457x8a1qhcp-source/pkgs/development/haskell-modules/make-package-set.nix:87:27
(use '--show-trace' to show detailed location information)
Compilation exited abnormally with code 1 at Sat Jul 18 23:18:53
I have a feeling maybe I can provide ghc-lib-parser-ex... maybe via a different overlay.. but I'm not sure if that should be necessary.
The text was updated successfully, but these errors were encountered:
Hi! So, I'm not sure this is really a niv issue but I can try to help. When you're using callCabal2nix, it generates a nix file that takes hlint's dependencies as arguments, and then (IIRC) uses callPackage (the haskell one) on that. So that means your haskell package set does not have ghc-lib-parser-ex. There are various ways to add packages, but most likely you'll need to override the haskell package set. This ticket and the manual are good starting points.
First I tried this code with shelllcheck and it worked:
Then I tried with hlint since I knew it could possibly be more complicated and depend on boot packages or ghc version specific things:
It returns:
I have a feeling maybe I can provide ghc-lib-parser-ex... maybe via a different overlay.. but I'm not sure if that should be necessary.
The text was updated successfully, but these errors were encountered: