monomer/flake.nix
Providence Salumu 3a9971d923
add support for Nix build with Flakes (#13)
* nix/flake: add support for x86_64-linux

* nix/flake: cleanup

* nix/flake: add qemu VM

* qemu: fix hostname

* qemu: cleanup

* nix: add default.nix (for non flakes users)

* qemu vm: enable X11 windowing system
2021-08-22 01:09:56 -03:00

34 lines
1.1 KiB
Nix

{
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;
});
}