2 If user need access to more haskell package for building his
3 diagrams, he simply has to pass these package through the
4 extra packages function as follow in `config.nix`:
7 diagrams-builder.override {
8 extraPackages = self : [myHaskellPackage];
19 extraPackages ? (self: [ ]),
24 # Used same technique as for the yiCustom package.
25 wrappedGhc = ghcWithPackages (self: [ diagrams-builder ] ++ extraPackages self);
26 ghc = lib.getExe' wrappedGhc "ghc";
28 exeWrapper = backend: ''
30 "${diagrams-builder}/bin/diagrams-builder-${backend}" "$out/bin/diagrams-builder-${backend}" \
31 --set NIX_GHC ${ghc} \
32 --set NIX_GHC_LIBDIR "$(${ghc} --print-libdir)"
44 name = "diagrams-builder";
46 nativeBuildInputs = [ makeWrapper ];
48 buildCommand = lib.concatStringsSep "\n" (map exeWrapper backends);
50 # Will be faster to build the wrapper locally then to fetch it from a binary cache.
51 preferLocalBuild = true;
52 meta = diagrams-builder.meta;