add .#lib and .#test devShell aliases

This commit is contained in:
rhiannon morris 2022-05-08 19:29:03 +02:00
parent 77c1492cad
commit 41056559f2

View file

@ -19,22 +19,22 @@
};
builders = pkgs.idris2-pkgs._builders;
packages =
let inherit (builders) idrisPackage;
in rec {
quox-lib = idrisPackage ./lib { };
quox = idrisPackage ./exe { extraPkgs = packages; };
quox-tests = idrisPackage ./tests { extraPkgs = packages; };
};
packages = rec {
quox-lib = builders.idrisPackage ./lib { };
quox = builders.idrisPackage ./exe { extraPkgs = packages; };
quox-tests = builders.idrisPackage ./tests { extraPkgs = packages; };
};
devShells =
let mkDevShell = _: pkg:
pkgs.mkShell { buildInputs = [ (builders.devEnv pkg) ]; };
in builtins.mapAttrs mkDevShell packages;
shells = packages //
(with packages; { lib = quox-lib; test = quox-tests; });
in builtins.mapAttrs mkDevShell shells;
in {
inherit packages devShells;
defaultPackage = packages.quox;
devShell = devShells.quox-lib;
devShell = devShells.lib;
}
);
}