I believe Peter's message <[email protected]> could answer my question. I will give it a try.
> Hello fellow Haskellers,
>
> I have a bunch of local Haskell packages, mostly libraries. The package
> X lives in the directory `<ertes-src/X/main>`. There are lots of direct
> and indirect dependencies between them. My current solution is ad hoc
> and rather ugly. I'm using the following hand-crafted `shell.nix` file
> in every project:
>
> { pkgs ? import <nixpkgs> {} }:
>
> let inherit (pkgs.haskellngPackages) callPackage;
>
> extPkg = path: deps:
> (callPackage (import path) deps).override (args: args // {
> mkDerivation = expr:
> args.mkDerivation (expr // {
> src = pkgs.fetchdarcs { url = path; };
> });
> });
>
> thisPkg = callPackage (import ./devel.nix) {
> direct-dep1 = extPkg <ertes-src/dep1/main> {
> indirect-dep1 = ...;
> indirect-dep2 = ...;
> };
> direct-dep2 = extPkg <ertes-src/dep2/main> {};
> };
>
> in thisPkg.env
>
> Do not pay too much attention to the `extPkg` function. It just works
> around cabal2nix' lack of support for Darcs URLs.
>
> My question is: Is there a nicer and more principled way to solve this?
> Ideally I could simply add all of my local packages in some way to my
> `~/.nixpkgs/config.nix`. Then they could just depend on each other
> regularly and I wouldn't need any shell.nix hackery. I'm guessing that
> I need to override haskellngPackages in some way or perhaps create my
> own using some override.
>
>
> Greets,
> Ertugrul
signature.asc
Description: PGP signature
_______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
