# Pastebin LOndShpJ { nixpkgs ? import {} }: let haskellPackages = nixpkgs.haskell.packages.ghc8101.override { overrides = self: super: { # Sometimes this doesn't work, if you're asking for really new # packages, because nixpkgs points at a specific revision of # all-cabal-hashes, a list of every package on hackage. # In those cases, you want to use `super.callHackageDirect`. # https://github.com/NixOS/nixpkgs/blob/f5b6ea126f0f85cd2126984607e95151daf9a859/pkgs/development/haskell-modules/make-package-set.nix#L184 # # Although microlens is found by callHackage, here's the # equivalent so you know how it works: # # microlens = super.callHackageDirect { # pkg = "microlens"; # ver = "0.4.11.2"; # # replace this with the hash nix tells you it actually found. # sha256 = "0000000000000000000000000000000000000000000000000000"; # } {}; microlens = super.callHackage "microlens" "0.4.11.2" {}; }; }; in haskellPackages.microlens