{ description = "quox: quantitative extensional type theory"; 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.flake-utils.follows = "flake-utils"; inputs.nixpkgs.follows = "nixpkgs"; }; tap = { url = "git+https://git.rhiannon.website/rhi/idris2-tap?ref=main"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; inputs.idris2-pkgs.follows = "idris2-pkgs"; }; }; outputs = { self, nixpkgs, idris2-pkgs, flake-utils, tap }: flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; overlays = [ idris2-pkgs.overlay ]; }; builders = pkgs.idris2-pkgs._builders; testDeps = tap.packages.${system}; packages = let ipkg = builders.idrisPackage; in rec { quox-lib = ipkg ./lib { }; quox = ipkg ./exe { extraPkgs = packages; }; quox-tests = ipkg ./tests { extraPkgs = packages // testDeps; }; }; devShells = let mkDevShell = _: pkg: pkgs.mkShell { buildInputs = [ (builders.devEnv pkg) ]; }; shells = packages // (with packages; { exe = quox; lib = quox-lib; tests = quox-tests; }); in builtins.mapAttrs mkDevShell shells; in { inherit packages devShells; defaultPackage = packages.quox; devShell = devShells.lib; } ); }