2023-02-02 17:33:56 +00:00
|
|
|
{
|
|
|
|
description = "libFenrir";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
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
|
|
|
|
(rust-bin.nightly."2023-02-01".default.override {
|
2023-02-02 17:33:56 +00:00
|
|
|
#extensions = [ "rust-src" ];
|
|
|
|
#targets = [ "arm-unknown-linux-gnueabihf" ];
|
|
|
|
})
|
2023-02-03 18:18:34 +00:00
|
|
|
clippy
|
|
|
|
lld
|
|
|
|
cargo-watch
|
|
|
|
rustfmt
|
2023-02-15 10:14:13 +00:00
|
|
|
cargo-license
|
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)"
|
|
|
|
if [ -n "$USER_SHELL" ] && [ "$USER_SHELL" != "$SHELL" ]; then
|
|
|
|
exec $USER_SHELL
|
|
|
|
fi
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
}
|