2023-02-02 17:33:56 +00:00
|
|
|
{
|
|
|
|
description = "libFenrir";
|
|
|
|
|
|
|
|
inputs = {
|
2023-05-24 20:32:41 +00:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
2023-02-02 17:33:56 +00:00
|
|
|
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;
|
|
|
|
};
|
2023-05-11 09:28:30 +00:00
|
|
|
pkgs-unstable = import nixpkgs-unstable {
|
|
|
|
inherit system overlays;
|
|
|
|
};
|
2023-02-02 17:33:56 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
git
|
|
|
|
gnupg
|
|
|
|
openssh
|
|
|
|
openssl
|
|
|
|
pkg-config
|
|
|
|
exa
|
|
|
|
fd
|
2023-02-03 18:18:34 +00:00
|
|
|
#(rust-bin.stable.latest.default.override {
|
|
|
|
# go with nightly to have async fn in traits
|
2023-02-21 21:06:17 +00:00
|
|
|
#(rust-bin.nightly."2023-02-01".default.override {
|
|
|
|
# #extensions = [ "rust-src" ];
|
|
|
|
# #targets = [ "arm-unknown-linux-gnueabihf" ];
|
|
|
|
#})
|
2023-02-03 18:18:34 +00:00
|
|
|
clippy
|
|
|
|
cargo-watch
|
2023-05-27 08:57:15 +00:00
|
|
|
cargo-flamegraph
|
2023-02-15 10:14:13 +00:00
|
|
|
cargo-license
|
2023-02-21 21:06:17 +00:00
|
|
|
lld
|
2023-05-11 09:28:30 +00:00
|
|
|
rust-bin.stable."1.69.0".default
|
2023-02-21 21:06:17 +00:00
|
|
|
rustfmt
|
|
|
|
rust-analyzer
|
2023-06-09 12:55:49 +00:00
|
|
|
# fenrir deps
|
|
|
|
hwloc
|
2023-02-02 17:33:56 +00:00
|
|
|
];
|
|
|
|
shellHook = ''
|
|
|
|
# use zsh or other custom shell
|
|
|
|
USER_SHELL="$(grep $USER /etc/passwd | cut -d ':' -f 7)"
|
2023-05-24 20:32:41 +00:00
|
|
|
if [ -n "$USER_SHELL" ]; then
|
2023-02-02 17:33:56 +00:00
|
|
|
exec $USER_SHELL
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|