idris2-tap/flake.nix

43 lines
1.1 KiB
Nix
Raw Normal View History

2022-05-26 08:23:50 -04:00
{ description = "basic test framework for idris 2";
inputs = {
2022-05-26 12:03:14 -04:00
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";
};
2022-05-26 08:23:50 -04:00
};
outputs = { self, nixpkgs, idris2-pkgs, flake-utils }:
2022-05-26 12:03:14 -04:00
flake-utils.lib.eachDefaultSystem (system:
2022-05-26 10:29:47 -04:00
let
pkgs = import nixpkgs {
inherit system;
overlays = [ idris2-pkgs.overlay ];
};
2022-05-26 12:03:14 -04:00
builders = pkgs.idris2-pkgs._builders;
2022-05-26 08:23:50 -04:00
2022-05-26 12:03:14 -04:00
packages = let ipkg = builders.idrisPackage; in rec {
tap = ipkg ./. { };
tap-example = ipkg ./example { extraPkgs = packages; };
2022-05-26 10:29:47 -04:00
};
2022-05-26 12:03:14 -04:00
2022-05-26 10:29:47 -04:00
devShells =
let mkDevShell = _: pkg:
2022-05-26 12:03:14 -04:00
pkgs.mkShell { buildInputs = [ (builders.devEnv pkg) ]; };
in builtins.mapAttrs mkDevShell packages;
2022-05-26 10:29:47 -04:00
in {
inherit packages devShells;
defaultPackage = packages.tap;
2022-05-26 12:03:14 -04:00
devShell = devShells.tap;
2022-05-26 10:29:47 -04:00
}
);
2022-05-26 08:23:50 -04:00
}