Open langston-barrett opened 6 years ago
Yes, I added that function :)
I was planning to reuse it in this guide once I updated it to use (and pin to) a newer nixpkgs
revision
Oh, I see you in the commit history :smile:
I think this function doesn't drop in as I expected, can I ask for your advice? I have the following
config = {
packageOverrides = pkgs: rec {
haskellPackages =
let
generatedOverrides = pkgs.haskell.lib.packagesFromDirectory { directory = "./nix"; };
manualOverrides = haskellPackagesNew: haskellPackagesOld: {};
in
pkgs.haskellPackages.override {
overrides =
pkgs.lib.composeExtensions generatedOverrides manualOverrides;
};
};
};
but it generates the error
error: string './nix' doesn't represent an absolute path, at /nix/store/y83nlg83yv3glcj7hjwcrngmxxzxkl9g-source/pkgs/development/haskell-modules/lib.nix:394:44
How can I get it to accept a relative path, like generatedOverrides
does now?
@siddharthist: I believe you need to remove the quotes around "./nix"
. i.e.: { directory = ./nix; }
Ah, as it says in the nixpkgs manual, such paths are made absolute at parse time: https://nixos.org/nix/manual/#idm140737318050944
This function seems to do the same work as some of the code here: https://github.com/Gabriel439/haskell-nix/blob/master/project4/README.md. Is there overlap that could be reduced here?