forked from TravisWhitaker/libglaswegian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
52 lines (51 loc) · 1.46 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
{
description = "libglaswegian";
inputs = {
haskellNix.url = "github:input-output-hk/haskell.nix";
nixpkgs.follows = "haskellNix/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, flake-utils, haskellNix, fenix, ... }:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
overlays = [ haskellNix.overlay
(final: prev: {
libglaswegian =
final.haskell-nix.project' {
src = ./.;
compiler-nix-name = "ghc8107";
shell.tools = {
cabal = "3.8.1.0";
hlint = "3.4.1";
haskell-language-server = "1.7.0.0";
};
};
})
fenix.overlay
];
pkgs = import nixpkgs {
inherit system overlays;
inherit (haskellNix) config;
};
rust = fenix.packages."${system}";
flake = pkgs.libglaswegian.flake {};
in flake // {
defaultPackage = flake.packages."libglaswegian:foreign-library:glaswegian";
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
rustPlatform.bindgenHook
rust.stable.toolchain
rust-analyzer-nightly
];
inputsFrom = [ ];
};
});
}