61 lines
1.6 KiB
Nix
61 lines
1.6 KiB
Nix
{
|
|
description = "libFenrir";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = flakes@{ self, nixpkgs, nixpkgs-unstable, rust-overlay, flake-utils, ... }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
overlays = [ (import rust-overlay) ];
|
|
pkgs = import nixpkgs {
|
|
inherit system overlays;
|
|
};
|
|
pkgs-unstable = import nixpkgs-unstable {
|
|
inherit system overlays;
|
|
};
|
|
RUST_VERSION="1.69.0";
|
|
in
|
|
{
|
|
devShells.default = pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
git
|
|
gnupg
|
|
openssh
|
|
openssl
|
|
pkg-config
|
|
exa
|
|
fd
|
|
#(rust-bin.stable.latest.default.override {
|
|
# go with nightly to have async fn in traits
|
|
#(rust-bin.nightly."2023-02-01".default.override {
|
|
# #extensions = [ "rust-src" ];
|
|
# #targets = [ "arm-unknown-linux-gnueabihf" ];
|
|
#})
|
|
clippy
|
|
cargo-watch
|
|
cargo-flamegraph
|
|
cargo-license
|
|
lld
|
|
rust-bin.stable.${RUST_VERSION}.default
|
|
rustfmt
|
|
rust-analyzer
|
|
# fenrir deps
|
|
hwloc
|
|
];
|
|
shellHook = ''
|
|
# use zsh or other custom shell
|
|
USER_SHELL="$(grep $USER /etc/passwd | cut -d ':' -f 7)"
|
|
if [ -n "$USER_SHELL" ]; then
|
|
exec $USER_SHELL
|
|
fi
|
|
'';
|
|
};
|
|
}
|
|
);
|
|
}
|