-
Notifications
You must be signed in to change notification settings - Fork 4
/
flake.nix
45 lines (43 loc) · 1.21 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
{
description = "Development environment flake for geo-svg";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/23.11";
flake-utils.url = "github:numtide/flake-utils";
flake-parts.url = "github:hercules-ci/flake-parts";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ { flake-parts, flake-utils, fenix, ... }:
flake-parts.lib.mkFlake
{
inherit inputs;
}
{
systems = flake-utils.lib.defaultSystems;
perSystem = { pkgs, lib, system, ... }:
let
fnx = fenix.packages.${system};
rust-fenix = fnx.combine [
fnx.stable.cargo
fnx.stable.rustc
fnx.stable.rust-src
fnx.stable.rust-analyzer
fnx.stable.clippy
fnx.complete.rustfmt
];
in
{
devShells.default = pkgs.mkShell rec {
buildInputs = [
rust-fenix
pkgs.clang
pkgs.openssl
pkgs.pkg-config
];
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
};
};
};
}