-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
68 lines (53 loc) · 1.64 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{ compiler ? "ghcjs" }:
let
bootstrap = import <nixpkgs> { };
nixpkgs = builtins.fromJSON (builtins.readFile ./nixpkgs.json);
reflex-platform = import ( bootstrap.fetchFromGitHub {
owner = "reflex-frp";
repo = "reflex-platform";
rev = "b7c00b3574d0ef42974eda0f2812c794c7b5d4f3";
sha256 = "1jfz17y2fq051caby4y4aslxrpvgwwa30ivfw0l5wn5pp5zlrpad";
# inherit ( builtins.fromJSON (builtins.readFile ./reflex-platform.json) ) rev sha256;
}) {};
src = bootstrap.fetchFromGitHub
{
owner = "NixOS";
repo = "nixpkgs";
inherit (nixpkgs) rev sha256;
};
config =
{
allowBroken = true;
packageOverrides = pkgs : rec
{
haskellPackages = reflex-platform.${compiler}.override
{
overrides = self: super:
{
loggia-common = self.callPackage ./common/default.nix {};
loggia-client = self.callPackage ./client/default.nix {};
};
};
loggia-minimal = pkgs.stdenv.mkDerivation
{
name = "loggia-minimal";
buildCommand = ''
mkdir -p $out/bin
cp ${haskellPackages.loggia-common}/bin/loggia-common $out/bin/loggia-common
cp ${haskellPackages.loggia-client}/bin/loggia-client $out/bin/loggia-client
'';
};
docker-container = pkgs.dockerTools.buildImage
{
name = "docker-container";
config.Cmd = [ "${loggia-minimal}/bin/loggi-client" ];
};
};
};
pkgs = import src { inherit config; };
in
{
loggia-common = pkgs.haskellPackages.loggia-common;
loggia-client = pkgs.haskellPackages.loggia-client;
docker-container = pkgs.docker-container;
}