arion/nix/overlay.nix

54 lines
1.3 KiB
Nix
Raw Normal View History

2019-06-14 16:10:37 +02:00
self: super:
let
inherit (self.arion-project) haskellPkgs;
inherit (super) lib;
2019-06-23 21:27:13 +02:00
2019-10-04 16:37:39 +02:00
sources = import ./sources.nix;
2019-10-25 01:07:10 +02:00
fakeRepo = src: super.runCommand "source" { inherit src; buildInputs = [super.git]; } ''
cp -r --no-preserve=mode $src $out
git init
cp -r .git $out
'';
2019-06-14 16:10:37 +02:00
in
{
2019-06-23 21:27:13 +02:00
2019-10-04 17:16:41 +02:00
inherit (import ./.. { pkgs = self; }) arion;
tests = super.callPackage ../tests {};
2019-10-24 19:36:58 +02:00
doc-options = import ../docs/options.nix {};
doc-options-check = self.runCommand "doc-options-check" {} ''
diff --color -u ${../docs/modules/ROOT/partials/NixOSOptions.adoc} ${self.doc-options}
touch $out
'';
doc = self.stdenv.mkDerivation {
name = "arion-documentation";
buildInputs = [super.antora];
2019-10-25 01:07:10 +02:00
src = fakeRepo ../.;
2019-10-24 19:36:58 +02:00
HOME = ".";
buildPhase = "antora antora-playbook";
installPhase = ''
mkdir $out
mv public/* $out/
'';
};
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-10-04 16:37:39 +02:00
self.niv
2019-10-04 17:24:01 +02:00
self.releaser
2019-06-14 16:10:37 +02:00
];
};
};
2019-10-04 16:37:39 +02:00
inherit (import (sources.niv) {}) niv;
2019-10-04 17:24:01 +02:00
releaser = self.haskellPackages.callCabal2nix "releaser" sources.releaser {};
}