[Nix-dev] A Journey into our brand-new Haskell infrastructure: Part II

Peter Simons simons at cryp.to
Sat Jan 17 12:12:18 CET 2015


Hi Richard,

 > Everytime I try and override a package with ghcWithPackages, it ends
 > up rebuilding every Haskell library. For instance, I have this
 > shell.nix <https://gist.github.com/purefn/026625ad116b05ff9a8d>.

I cannot reproduce this phenomenon. I saved your configuration to "default.nix"

 | with (import <nixpkgs> {}).pkgs;
 | let
 |   modifiedHaskellPackages = haskellngPackages.override {
 |     overrides = self: super: {
 |       AesonBson = self.callPackage
 |         ({ mkDerivation, aeson, attoparsec, base, bson, hspec, HUnit, stdenv
 |         , text, unordered-containers, vector
 |         }:
 |         mkDerivation {
 |           pname = "AesonBson";
 |           version = "0.2.1";
 |           src = fetchgit {
 |             url = "https://github.com/fujimura/aesonbson.git";
 |             rev = "7ac58f74317fe0f61098654e231f03adc219989d";
 |             sha256 = "1miic2lq08ply6mjqdmamwsamxv2dnz5hj1yyjb74bgklh3mc36l";
 |           };
 |           buildDepends = [
 |             aeson attoparsec base bson unordered-containers vector
 |           ];
 |           testDepends = [ aeson base bson hspec HUnit text ];
 |           homepage = "https://github.com/nh2/AesonBson";
 |           description = "Mapping between Aeson's JSON and Bson objects";
 |           license = "unknown";
 |         }) {};
 |     };
 |   };
 | in
 |   modifiedHaskellPackages

and ran:

 | $ nix-build default.nix -A Agda --dry-run
 | these paths will be fetched (0.00 MiB download, 184.82 MiB unpacked):
 |   /nix/store/1h61xarq9xg07i1llir8614dpi2sj42z-haskell-geniplate-0.6.0.5
 |   /nix/store/2jys12fgb7mg76mp409mi4s00h0gxhsz-haskell-haskeline-0.7.1.3
 |   /nix/store/3nbq1p5pbi86qk3jh847a09jgnn5yd7y-haskell-equivalence-0.2.5
 |   /nix/store/g1z56xzv909x64hjjz69ic3jrx018axj-haskell-boxes-0.1.4
 |   /nix/store/kj13l38gqpy34v55z68rjzfpvy64ibv8-haskell-data-hash-0.2.0.0
 |   /nix/store/lw5bi37cm64l7rl5n43khigjl8j2pakn-haskell-STMonadTrans-0.3.2
 |   /nix/store/pr8mgqmswraryw8r719j7bpj9ci0xn06-haskell-strict-0.3.2
 |   /nix/store/svrr5kp8dk5dhg09q6spj82fq6h0g1rw-haskell-Agda-2.4.2.2
 |   /nix/store/xa8wgxcmwbgf32pva55gjwivj7ssjvxp-haskell-terminfo-0.4.0.0
 |
 | $ nix-build default.nix -A AesonBson --dry-run
 | these derivations will be built:
 |   /nix/store/5yqdwlpkp7axnmgpi1g8xdfj1pcrmir6-aesonbson-7ac58f7.drv
 |   /nix/store/n3lgwsg30hzs9mvypkf6n3s8svbgd6kz-haskell-AesonBson-0.2.1.drv
 | these paths will be fetched (0.00 MiB download, 3.57 MiB unpacked):
 |   /nix/store/sphsnkamvvc1jyirpnbjf2fcr5c70mkh-haskell-data-binary-ieee754-0.4.4
 |   /nix/store/z5s0srhcv6bi03bckin6dr8zb2zmmckd-haskell-bson-0.3.1

As far as I can tell, no unnecessary re-building takes place.

Best regards,
Peter



More information about the nix-dev mailing list