-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
41 lines (38 loc) · 1.16 KB
/
flake.nix
File metadata and controls
41 lines (38 loc) · 1.16 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
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
utils,
}:
utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in rec {
devShells.default = pkgs.mkShell {
buildInputs =
(with pkgs; [nodejs corepack])
++ packages.palachias.buildInputs
++ packages.palachias.nativeBuildInputs;
RUSTC_VERSION = "stable";
# https://github.com/rust-lang/rust-bindgen#environment-variables
shellHook = ''
export PATH=$PATH:''${CARGO_HOME:-~/.cargo}/bin
export PATH=$PATH:''${RUSTUP_HOME:-~/.rustup}/toolchains/$RUSTC_VERSION-x86_64-unknown-linux-gnu/bin/
'';
};
formatter = pkgs.alejandra;
packages = {
palachias = pkgs.rustPlatform.buildRustPackage {
pname = "palachias";
version = "0.1.0";
src = ./.;
cargoHash = "sha256-ZD/2JHZLKg37ka//Mz0d2hf9PktqR6DWOUwn4n05JuY=";
buildInputs = [pkgs.openssl];
nativeBuildInputs = [pkgs.pkg-config];
};
};
});
}