Skip to content

Instantly share code, notes, and snippets.

@shajra
Last active February 9, 2017 08:07
Show Gist options
  • Select an option

  • Save shajra/15ef77cdd4e83a823857ffe8a6c11df9 to your computer and use it in GitHub Desktop.

Select an option

Save shajra/15ef77cdd4e83a823857ffe8a6c11df9 to your computer and use it in GitHub Desktop.
Overrides not overriding for Haskell in Nix?
$ nix-build -E '
let n = import <nixpkgs> {}; hp = n.haskellPackages; l = n.haskell.lib;
in hp.aeson
' # MAKES HADDOCK
/nix/store/rxny4hw6m5hxs69pl27n48whyizx1f1y-aeson-0.11.3.0
$ nix-build -E '
let n = import <nixpkgs> {}; hp = n.haskellPackages; l = n.haskell.lib;
in l.dontHaddock (l.doHaddock hp.aeson)
' # MAKES HADDOCK
/nix/store/rxny4hw6m5hxs69pl27n48whyizx1f1y-aeson-0.11.3.0
$ nix-build -E '
let n = import <nixpkgs> {}; hp = n.haskellPackages; l = n.haskell.lib;
in l.doHaddock (l.doHaddock hp.aeson)
' # MAKES HADDOCK
/nix/store/rxny4hw6m5hxs69pl27n48whyizx1f1y-aeson-0.11.3.0
$ nix-build -E '
let n = import <nixpkgs> {}; hp = n.haskellPackages; l = n.haskell.lib;
in l.dontHaddock (l.dontHaddock hp.aeson)
' # MAKES NO HADDOCK
/nix/store/g8h0hg7bq4pllzdww5icakj5kbk2ph0l-aeson-0.11.3.0
$ nix-build -E '
let n = import <nixpkgs> {}; hp = n.haskellPackages; l = n.haskell.lib;
in l.doHaddock (l.dontHaddock hp.aeson)
' # MAKES NO HADDOCK
/nix/store/g8h0hg7bq4pllzdww5icakj5kbk2ph0l-aeson-0.11.3.0
@shajra

shajra commented Feb 9, 2017

Copy link
Copy Markdown
Author

Am I using nixpkgs.haskell.lib correctly? If so, why is this the resultant behavior? I really would expect the "outside" application of an override to win. I'm looking at the Nixpkgs code now, and my visual read of the code isn't corresponding what what's clearly happening above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment