Skip to content

Commit 15071f1

Browse files
committed
chore: add nix flake
1 parent 4ee352a commit 15071f1

File tree

2 files changed

+110
-0
lines changed

2 files changed

+110
-0
lines changed

flake.lock

+82
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
inputs = {
3+
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
4+
utils.url = "github:numtide/flake-utils";
5+
fenix = {
6+
url = "github:nix-community/fenix";
7+
inputs.nixpkgs.follows = "nixpkgs";
8+
};
9+
};
10+
11+
outputs = { self, utils, nixpkgs, fenix, }: utils.lib.eachDefaultSystem (system: let
12+
pkgs = nixpkgs.legacyPackages.${system};
13+
rust = fenix.packages.${system};
14+
lib = pkgs.lib;
15+
in {
16+
devShell = pkgs.mkShell {
17+
buildInputs = with pkgs; with llvmPackages; [
18+
# For building.
19+
clang rust.latest.toolchain pkg-config openssl libsodium libclang.lib
20+
];
21+
22+
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
23+
RUST_BACKTRACE = 1;
24+
# RUST_LOG = "info,sqlx::query=warn";
25+
RUSTFLAGS = "-C target-cpu=native";
26+
};
27+
});
28+
}

0 commit comments

Comments
 (0)