{ inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; outputs = { self, nixpkgs }: let inherit (nixpkgs) lib; systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; forAllSystems = f: lib.genAttrs systems (system: f system nixpkgs.legacyPackages.${system}); in { mkSqlite = import ./src/mk-sqlite.nix { inherit lib; }; packages = forAllSystems (system: pkgs: let productVars = { enableMinimal = [ true false ]; enableDebug = [ true false ]; enableInteractive = [ true false ]; }; in lib.mergeAttrsList (lib.mapCartesianProduct ({ enableMinimal, enableDebug, enableInteractive, }: let result = self.mkSqlite { inherit pkgs enableMinimal enableDebug enableInteractive; }; in { "sqlite${result._suffix}" = result.sqlite; "sqlite-amalgamation${result._suffix}" = result.amalgamation; "sqlite-cli${result._suffix}" = result.sqlite-cli; "sqlite-static${result._suffix}" = result.sqlite-static; }) productVars)); checks = forAllSystems (system: pkgs: { checkStaticExts = import ./checks/check-static-exts.nix { inherit self pkgs; }; checkStaticExtsCross = import ./checks/check-static-exts-cross.nix { inherit self pkgs; }; checkStaticExtsCrossAndroid = import ./checks/check-static-exts-cross-android.nix { inherit self pkgs; }; }); }; }