ilyakooo0 / haskell-nix-extra-hackage

❄️ A tool to use custom forks of Hackage packages with haskell.nix
MIT License
3 stars 0 forks source link

error while evaluating extra-hackage-tarballs' #1

Open Emmanuel-PLF opened 2 years ago

Emmanuel-PLF commented 2 years ago

Hi, I try to use your code to override ekg-json with https://github.com/vshabanov/ekg-json : aeson-2.0 but when I enter in the shell, I have this error : error: A definition for optionextra-hackage-tarballs' is not of type null or attribute set'. Definition values: direnv: - In <unknown-file>: direnv: [ direnv: { direnv: index = <derivation /nix/store/1g3b4gis8iz6y478fld0jwf0rzg5ra23-index.tar.gz.drv>; direnv: name = "local-package-overrides-hackage"; direnv: } direnv: ... direnv: … while evaluating the attribute 'mergedValue' direnv: at /nix/store/m2vv0bxfchzrjngx8wi0i7dhzb9q2g50-source/lib/modules.nix:695:5: direnv: 694| # Type-check the remaining definitions, and merge them. Or throw if no definitions. direnv: 695| mergedValue = direnv: | ^ direnv: 696| if isDefined then direnv: … while evaluating the optionextra-hackage-tarballs': direnv: … while evaluating the attribute 'value' direnv: at /nix/store/m2vv0bxfchzrjngx8wi0i7dhzb9q2g50-source/lib/modules.nix:661:9: ` my default.nix :

`let sources = import ./nix/sources.nix {}; haskellNix = import sources.haskellNix {}; pkgs = import haskellNix.sources.nixpkgs-unstable haskellNix.nixpkgsArgs; mkHackage = import sources.haskell-nix-extra-hackage { inherit pkgs; }; hsPkgs = pkgs.haskell-nix.project ({ src = pkgs.haskell-nix.haskellLib.cleanGit { name = "mongo-servant"; src = ./.; };

compiler-nix-name = "ghc8107";

} // (mkHackage [ { src = sources.ekg-json; name = "ekg-json"; } ]) ); in hsPkgs`

Thanks for your help

ilyakooo0 commented 2 years ago

I am time constrained right now and can't investigate. You might have more luck with this fork: https://github.com/mlabs-haskell/haskell-nix-extra-hackage/tree/separate-hackages, although I didn't look too hard into it either (:

Please post any findings

Emmanuel-PLF commented 2 years ago

Thanks for your answer. I tried the link but it doesn't work, I've got an error in haskell-nix script about "val.name" missing, I don't want to investigate, I'm giving up now..