Skip to content

Remove <nixpkgs> impurities #5

@dhess

Description

@dhess

This overlay is amazing! Thank you for doing this. I'm already using it for one of my Haskell projects and I'm planning to integrate it into all of them soon.

It would be even better if you removed all of the <nixpkgs/pkgs/...> path impurities, so that you could pin the nixpkgs used throughout the project. It appears that you only use this for importing functions that nixpkgs doesn't export via pkgs, but it should still make debugging issues much easier since you would know, based on the nixpkgs-stackage revision you're using, which nixpkgs is being used for functions, as well.

I implement this technique in all of my overlays with great success. For example, here is where I create the "fetch nixpkgs" function for one of my overlays:

https://github.com/quixoftic/nixpkgs-quixoftic/blob/a6dae43adb95ca397a0de3bbb7b4602098d13a5f/lib.nix#L5

and here is an example of where I use it in the same overlay to use some unexported nixpkgs functionality:

https://github.com/quixoftic/nixpkgs-quixoftic/blob/6d73f854ca90b46d28d118848a06c03307dd2eb8/pkgs/kernels/linux-beagleboard.nix#L6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions