on master help sign in
Add release.nix
36f1897Dmitry Bushev
release.nixnew file+28
@@ -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+ })
stackage-overlay.jsonnew file+6
@@ -0,0 +1,6 @@
1+{
2+ "owner": "4e6",
3+ "repo": "nixpkgs-stackage",
4+ "rev": "c028e190e6a7dc731d79e66fcec7db362025040d",
5+ "sha256": "09b69v611d1bxkv3ak68wpah97gk24xbyc2kgkmi0fgcq87qrd4v"
6+}