-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathflake.nix
53 lines (45 loc) · 1.71 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
53
{
description = "A very basic 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 = [ "aarch64-linux" "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
in
flake-utils.lib.eachSystem supportedSystems (system:
let
pkgs = import nixpkgs {
inherit system;
};
rocPkgs = roc.packages.${system};
linuxInputs = with pkgs;
lib.optionals stdenv.isLinux [
#valgrind # for debugging
#gdb # for debugging
];
in
{
devShell = pkgs.mkShell {
packages = with pkgs; [
rocPkgs.cli
rocPkgs.lang-server
expect # to test examples on CI
perl # for ci/update_basic_cli_url.sh
go # for GoPlatform example
dotnet-sdk_8 # for DotnetPlatform example
elmPackages.elm # for ElmWebApp example
] ++ linuxInputs;
# nix does not store libs in /usr/lib or /lib
# for libgcc_s.so.1
NIX_LIBGCC_S_PATH =
if pkgs.stdenv.isLinux then "${pkgs.stdenv.cc.cc.lib}/lib" else "";
# for crti.o, crtn.o, and Scrt1.o
NIX_GLIBC_PATH =
if pkgs.stdenv.isLinux then "${pkgs.glibc.out}/lib" else "";
};
});
}