45 lines
1.2 KiB
Nix
45 lines
1.2 KiB
Nix
|
{
|
||
|
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
|
||
|
(rust-bin.stable.latest.default.override {
|
||
|
#extensions = [ "rust-src" ];
|
||
|
#targets = [ "arm-unknown-linux-gnueabihf" ];
|
||
|
})
|
||
|
];
|
||
|
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
|
||
|
'';
|
||
|
};
|
||
|
}
|
||
|
);
|
||
|
}
|