arion/nix/overlay.nix

36 lines
1 KiB
Nix
Raw Normal View History

2019-06-14 16:10:37 +02:00
self: super:
let
inherit (self.arion-project) haskellPkgs;
2019-06-23 21:27:13 +02:00
srcDir = ../src; # TODO gitignoreSource + whitelist nix and arion-image
eval = import (srcDir + "/nix/eval-composition.nix");
build = args@{...}:
let composition = eval args;
in composition.config.build.dockerComposeYaml;
hlib = super.haskell.lib;
2019-06-14 16:10:37 +02:00
in
{
2019-06-23 21:27:13 +02:00
2019-06-15 22:07:20 +02:00
arion-v0 = super.callPackage ../arion.nix {};
2019-06-23 21:27:13 +02:00
arion = hlib.justStaticExecutables (hlib.overrideCabal haskellPkgs.arion-compose (o: {
passthru = o.passthru // {
inherit eval build;
};
pname = "arion"; # Cover up the needlessly long Haskell package name
2019-06-23 21:27:13 +02:00
}));
tests = super.callPackage ../tests {};
2019-03-03 23:42:40 +01:00
doc = super.callPackage ../doc {};
2019-06-14 16:10:37 +02:00
arion-project = super.recurseIntoAttrs {
haskellPkgs = super.haskellPackages.extend (import ./haskell-overlay.nix self super);
shell = haskellPkgs.shellFor {
packages = p: [p.arion-compose];
buildInputs = [
haskellPkgs.cabal-install
haskellPkgs.ghcid
2019-09-27 21:01:57 +02:00
super.docker-compose
2019-06-14 16:10:37 +02:00
];
};
};
}