on 0.4.3.0 help sign in
schematic/release.nix
32 lines 898 B history raw
1{ schematicSrc ? { outPath = ./.; revCount = 0; gitTag = "dirty"; }
2, supportedSystems ? [ "x86_64-linux" ]
3}:
5let
6 _nixpkgs = import <nixpkgs> {};
7 inherit (_nixpkgs) pkgs lib;
9 stackageOverlayPath = pkgs.fetchFromGitHub {
10 owner = "typeable";
11 repo = "nixpkgs-stackage";
12 rev = "abe0a03ba2bde609b0707ce45301ec836cb3ed29";
13 sha256 = "0ksdk83zbsgvs30izwsfyjh4xxwz8dsn9a5igrs3pjap4whpzqfv";
14 };
16 nixpkgsArgs = {
17 overlays = [ (import stackageOverlayPath) ];
18 };
20 release = import <nixpkgs/pkgs/top-level/release-lib.nix> { inherit nixpkgsArgs supportedSystems; };
22 mkStackage = system:
23 let
24 nixpkgs = release.pkgsFor system;
25 stackage = nixpkgs.haskell.packages.stackage.lib.callStackage2nix "schematic" schematicSrc { inherit nixpkgs; };
26 in
27 stackage;
29in
30 lib.genAttrs supportedSystems (system: {
31 inherit (mkStackage system) schematic;
32 })