-
Notifications
You must be signed in to change notification settings - Fork 43
/
flake.nix
41 lines (41 loc) · 1.33 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
{
description = "A GUI library for writing native Haskell applications.";
inputs = {
flake-utils.url = "github:numtide/flake-utils/master";
nixpkgs.url = "github:nixos/nixpkgs/haskell-updates";
};
outputs = { self, nixpkgs, flake-utils }:
with flake-utils.lib;
eachSystem [ "x86_64-linux" ] (system:
let
version = with nixpkgs.lib;
"${substring 0 8 self.lastModifiedDate}.${self.shortRev or "dirty"}";
overlays = [
(import ./nix/monomer.nix { inherit system version flake-utils; })
(import ./nix/qemu.nix {
inherit system version flake-utils nixpkgs;
})
];
in with (import nixpkgs { inherit system overlays; }); rec {
packages = flattenTree (recurseIntoAttrs {
inherit (libraries) monomer;
inherit (qemu) nixos;
});
apps = executables // {
nixos = mkApp {
drv = qemu.nixos;
name = "run-nixos-vm";
};
};
defaultPackage = packages.monomer;
defaultApp = apps.tutorial;
devShell = haskellPackages.shellFor {
packages = p: [ packages.monomer ];
withHoogle = true;
buildInputs = with haskellPackages; [
haskell-language-server
cabal-install
];
};
});
}