-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
52 lines (50 loc) · 1.34 KB
/
flake.nix
File metadata and controls
52 lines (50 loc) · 1.34 KB
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
{
inputs = {
raw-oura.url = "github:Renegatto/oura?rev=bfcac25065719f9e3405acbbdf5fe782846ddf32";
flake-utils.follows = "raw-oura/flake-utils";
rust-overlay.follows = "raw-oura/rust-overlay";
nixpkgs.follows = "raw-oura/nixpkgs";
crane = {
url = "github:ipetkov/crane";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
raw-oura,
crane,
flake-utils,
rust-overlay,
nixpkgs,
...
}: let
supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux"];
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit overlays;
system = "x86_64-linux";
};
# oura: Derivation
oura =
let
# oura.nix:
# {inputs: {crane: NixInput, oura: NixInput}} ->
# { perSystem: {pkgs: any} ->
# { packages: { oura-${string}: Package } }
# }
make-oura = import ./oura.nix {inputs = {inherit crane; oura = raw-oura;};};
in builtins.head (builtins.attrValues (make-oura.perSystem {inherit pkgs;}).packages);
in flake-utils.lib.eachSystem supportedSystems
(
system: {
devShells = {
default =
pkgs.mkShell {
nativeBuildInputs = [
oura
pkgs.haskellPackages.fourmolu
];
};
};
});
}