-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
48 lines (48 loc) · 1.4 KB
/
flake.nix
File metadata and controls
48 lines (48 loc) · 1.4 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
{
description = "a flake to build logone for libnix cargo";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
fenix.url = "github:nix-community/fenix";
cargo-libnix.url = "github:nixcloud/cargo";
};
outputs =
{ self, nixpkgs, flake-utils, fenix, cargo-libnix } @ inputs:
flake-utils.lib.eachDefaultSystem
(system:
let
project_root = ./.;
pkgs = import nixpkgs {
inherit system;
overlays = [
fenix.overlay
];
};
lib = pkgs.lib;
in
with pkgs;
rec {
packages = { inherit cargo-libnix; };
devShells = {
default = mkShell {
buildInputs = [
# to build cargo with 'cargo build'
openssl
pkg-config
# git helper
tig
# the toolchain used
fenix.packages.${system}.stable.rustc
#fenix.packages.${system}.stable.cargo
cargo-libnix.packages.${system}.cargo-libnix
fenix.packages.${system}.stable.rust-src
fenix.packages.${system}.stable.rustfmt
fenix.packages.${system}.stable.clippy
];
shellHook = ''
export CARGO_BACKEND=nix
'';
};
};
}
);
}