idris2-tap/flake.nix
2022-05-26 19:09:53 +02:00

42 lines
1.1 KiB
Nix

{ description = "basic test framework for idris 2";
inputs = {
nixpkgs.url = "nixpkgs/21.11";
flake-utils = {
url = "github:numtide/flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
idris2-pkgs = {
url = "github:claymager/idris2-pkgs";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
};
outputs = { self, nixpkgs, idris2-pkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ idris2-pkgs.overlay ];
};
builders = pkgs.idris2-pkgs._builders;
packages = let ipkg = builders.idrisPackage; in rec {
tap = ipkg ./. { };
tap-example = ipkg ./example { extraPkgs = packages; };
};
devShells =
let mkDevShell = _: pkg:
pkgs.mkShell { buildInputs = [ (builders.devEnv pkg) ]; };
in builtins.mapAttrs mkDevShell packages;
in {
inherit packages devShells;
defaultPackage = packages.tap;
devShell = devShells.tap;
}
);
}