-
Notifications
You must be signed in to change notification settings - Fork 97
/
flake.nix
59 lines (55 loc) · 1.78 KB
/
flake.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
{
description = ''
This is an implementation of Cloud Haskell, as described in
/Towards Haskell in the Cloud/ by Jeff Epstein, Andrew Black,
and Simon Peyton Jones
(<http://research.microsoft.com/en-us/um/people/simonpj/papers/parallel/>),
although some of the details are different. The precise message
passing semantics are based on /A unified semantics for future Erlang/
by Hans Svensson, Lars-Åke Fredlund and Clara Benac Earle.
'';
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
rank1dynamic-src = {
flake = false;
url = "github:haskell-distributed/rank1dynamic/53c5453121592453177370daa06f098cb014c0d3";
};
};
outputs = {
self,
nixpkgs,
rank1dynamic-src
}: let
forAllSystems = function: nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system: function rec {
inherit system;
compilerVersion = "ghc945";
pkgs = nixpkgs.legacyPackages.${system};
hsPkgs = pkgs.haskell.packages.${compilerVersion}.override {
overrides = hfinal: hprev: {
# Internal Packages
distributed-process = hfinal.callCabal2nix "distributed-process" ./. {};
# External Packages
rank1dynamic = hfinal.callCabal2nix "rank1dynamic" rank1dynamic-src {};
};
};
});
in {
formatter = forAllSystems ({pkgs, ...}: pkgs.alejandra);
# nix develop
devShells = forAllSystems ({hsPkgs, pkgs, ...}: {
default = hsPkgs.shellFor {
name = "distributed-process";
packages = p: [
p.distributed-process
];
buildInputs = with pkgs;
[
hsPkgs.haskell-language-server
hsPkgs.cabal-install
cabal2nix
haskellPackages.ghcid
];
};
});
};
}