anchor.diff:          "ihaskell-static-canvas"
           "ihaskell-widgets"
         ]);
  -  dontCheck = pkgs.haskell.lib.dontCheck;
  -  haskellPackages = pkgs.haskellPackages.override {
  +  dontCheck = nixpkgs.haskell.lib.dontCheck;
  +  haskellPackages = nixpkgs.haskellPackages.override {
       overrides = self: super: {
  -      ihaskell       = pkgs.haskell.lib.overrideCabal (
  +      ihaskell       = nixpkgs.haskell.lib.overrideCabal (
                          self.callCabal2nix "ihaskell"          src                  {}) (_drv: {
           doCheck = false;
           # Nix-built IHaskell expects to load a *.dyn_o file instead of *.o,
  
positive.code:     ihaskell-static-canvas
      # ihaskell-widgets
    ] ++ packages self);
    jupyter = pkgs.python3.buildEnv.override {
      extraLibs = let ps = pkgs.python3Packages; in [ ps.jupyter ps.notebook ];
    };
    ihaskellSh = pkgs.writeScriptBin "ihaskell-notebook" ''
      #! ${pkgs.stdenv.shell}
      export GHC_PACKAGE_PATH="$(echo ${ihaskellEnv}/lib/*/package.conf.d| tr ' ' ':'):$GHC_PACKAGE_PATH"
      export PATH="${pkgs.stdenv.lib.makeBinPath ([ ihaskell ihaskellEnv jupyter ] ++ systemPackages pkgs)}"
      ${ihaskell}/bin/ihaskell install -l $(${ihaskellEnv}/bin/ghc --print-libdir) --use-rtsopts="${rtsopts}" && ${jupyter}/bin/jupyter notebook
    '';
  in
  pkgs.buildEnv {
    name = "ihaskell-with-packages";
    buildInputs = [ pkgs.makeWrapper ];
    paths = [ ihaskellEnv jupyter ];
    postBuild = ''
      ln -s ${ihaskellSh}/bin/ihaskell-notebook $out/bin/
  
negative.code: { nixpkgs ? import <nixpkgs> {}, packages ? (_: []), rtsopts ? "-M3g -N2", systemPackages ? (_: []) }:
  
  let
    cleanSource = name: type: let
        baseName = baseNameOf (toString name);
        lib = nixpkgs.lib;
      in !(
        (type == "directory" &&
          (  baseName == ".git"
  