-
Notifications
You must be signed in to change notification settings - Fork 3
/
flake.nix
103 lines (93 loc) · 2.94 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
{
description = "Date phylogenetic trees with Mcmc";
inputs.dschrempf-nur.url = "github:dschrempf/nur-packages";
inputs.dschrempf-nur.inputs.flake-utils.follows = "flake-utils";
inputs.dschrempf-nur.inputs.nixpkgs.follows = "nixpkgs";
inputs.elynx.url = "github:dschrempf/elynx";
inputs.elynx.inputs.flake-utils.follows = "flake-utils";
inputs.elynx.inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.mcmc.url = "github:dschrempf/mcmc";
# inputs.mcmc.url = "path:/home/dominik/Shared/haskell/mcmc";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# inputs.nixpkgs.url = "path:/home/dominik/Nix/Nixpkgs";
outputs =
{ self
, dschrempf-nur
, elynx
, flake-utils
, mcmc
, nixpkgs
}:
let
theseHpkgNames = [
"mcmc-date"
];
thisGhcVersion = "ghc96";
hOverlay = selfn: supern: {
haskell = supern.haskell // {
packageOverrides = selfh: superh:
supern.haskell.packageOverrides selfh superh //
{
mcmc-date = selfh.callCabal2nix "mcmc-date" ./. { };
};
};
};
overlays = [
hOverlay
mcmc.overlays.default
elynx.overlays.default
];
perSystem = system:
let
pkgs = import nixpkgs {
inherit system;
inherit overlays;
};
hpkgs = pkgs.haskell.packages.${thisGhcVersion};
hlib = pkgs.haskell.lib;
theseHpkgs = nixpkgs.lib.genAttrs theseHpkgNames (n: hpkgs.${n});
theseHpkgsDev = builtins.mapAttrs (_: x: hlib.doBenchmark x) theseHpkgs;
dschrempf = dschrempf-nur.packages.${system};
in
{
packages = theseHpkgs // { default = theseHpkgs.mcmc-date; };
devShells.default = hpkgs.shellFor {
shellHook =
let
scripts = ./scripts;
in
''
export PATH="${scripts}:$PATH"
'';
packages = _: (builtins.attrValues theseHpkgsDev);
nativeBuildInputs = with pkgs; [
# Haskell toolchain.
hpkgs.cabal-fmt
hpkgs.cabal-install
hpkgs.haskell-language-server
# Analysis.
dschrempf.beast2
dschrempf.fasttree
dschrempf.figtree
dschrempf.iqtree2
dschrempf.phylobayes
dschrempf.tracer
# ELynx.
hpkgs.elynx
hpkgs.slynx
hpkgs.tlynx
gnuplot
# Profiling.
hpkgs.eventlog2html
];
buildInputs = with pkgs; [
];
doBenchmark = true;
# withHoogle = true;
};
};
in
{ overlays.default = nixpkgs.lib.composeManyExtensions overlays; }
// flake-utils.lib.eachDefaultSystem perSystem;
}