-
Notifications
You must be signed in to change notification settings - Fork 8
/
flake.nix
39 lines (31 loc) · 1.02 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
{
description = "Unicode package devShell flake";
inputs = {
roc.url = "github:roc-lang/roc";
nixpkgs.follows = "roc/nixpkgs";
# to easily make configs for multiple architectures
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils, roc }:
let supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux" ];
in flake-utils.lib.eachSystem supportedSystems (system:
let
pkgs = import nixpkgs { inherit system; };
rocPkgs = roc.packages.${system};
linuxInputs = with pkgs;
lib.optionals stdenv.isLinux [
];
darwinInputs = with pkgs;
lib.optionals stdenv.isDarwin
(with pkgs.darwin.apple_sdk.frameworks; [
]);
sharedInputs = (with pkgs; [
rocPkgs.cli
]);
in {
devShell = pkgs.mkShell {
buildInputs = sharedInputs ++ darwinInputs ++ linuxInputs;
};
formatter = pkgs.nixpkgs-fmt;
});
}