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; builders = pkgs.idris2-pkgs._builders;
packages = packages = rec {
let inherit (builders) idrisPackage; quox-lib = builders.idrisPackage ./lib { };
in rec { quox = builders.idrisPackage ./exe { extraPkgs = packages; };
quox-lib = idrisPackage ./lib { }; quox-tests = builders.idrisPackage ./tests { extraPkgs = packages; };
quox = idrisPackage ./exe { extraPkgs = packages; };
quox-tests = idrisPackage ./tests { extraPkgs = packages; };
}; };
devShells = devShells =
let mkDevShell = _: pkg: let mkDevShell = _: pkg:
pkgs.mkShell { buildInputs = [ (builders.devEnv 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 { in {
inherit packages devShells; inherit packages devShells;
defaultPackage = packages.quox; defaultPackage = packages.quox;
devShell = devShells.quox-lib; devShell = devShells.lib;
} }
); );
} }