@@ -0,0 +1,28 @@
1+{ schematicSrc ? { outPath = ./.; revCount = 0; gitTag = "dirty"; }
2+, supportedSystems ? [ "x86_64-linux" ]
3+}:
4+
5+let
6+ nixpkgs = import <nixpkgs> {};
7+ inherit (nixpkgs) pkgs lib;
8+
9+ stackageOverlayPath = pkgs.fetchFromGitHub (lib.importJSON ./stackage-overlay.json);
10+
11+ nixpkgsArgs = {
12+ overlays = [ (import stackageOverlayPath) ];
13+ #config = { allowUnfree = false; inHydra = true; };
14+ };
15+
16+ release = import <nixpkgs/pkgs/top-level/release-lib.nix> { inherit nixpkgsArgs supportedSystems; };
17+
18+ mkSchematic = system:
19+ let
20+ nixpkgs = release.pkgsFor system;
21+ stackage = nixpkgs.haskell.packages.stackage.lib.callStackage2nix "schematic" schematicSrc { inherit nixpkgs; };
22+ in
23+ stackage.schematic;
24+
25+in
26+ lib.genAttrs supportedSystems (system: {
27+ schematic = mkSchematic system;
28+ })