nix: update shell config

This commit is contained in:
Harsh Shandilya 2022-03-28 13:12:25 +05:30
parent 58809b1f74
commit 9ac2d098e2
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80
2 changed files with 9 additions and 6 deletions

View file

@ -1,11 +1,14 @@
with import <nixpkgs> { overlays = [ (import <rust-overlay>) ]; }; with import <nixpkgs> { overlays = [ (import <rust-overlay>) ]; };
mkShell { mkShell {
RUSTFLAGS = "";
buildInputs = [ buildInputs = [
(rust-bin.selectLatestNightlyWith (toolchain: (rust-bin.stable.latest.default.override {
toolchain.default.override { extensions = [ "rust-src" "rustfmt-preview" ];
extensions = [ "rust-src" "rustfmt-preview" ]; targets =
})) pkgs.lib.optionals pkgs.stdenv.isDarwin [ "aarch64-apple-darwin" ]
++ pkgs.lib.optionals pkgs.stdenv.isLinux
[ "x86_64-unknown-linux-musl" ];
})
xorg.libxcb xorg.libxcb
python39
]; ];
} }

View file

@ -80,7 +80,7 @@ fn get_config_path() -> Result<PathBuf> {
Ok(config_path) Ok(config_path)
} }
fn loop_clipboard(config: Replacements) { fn loop_clipboard(config: Replacements<'_>) {
let mut clipboard: ClipboardContext = let mut clipboard: ClipboardContext =
ClipboardProvider::new().expect("Failed to get clipboard"); ClipboardProvider::new().expect("Failed to get clipboard");
let mut clipboard_contents = get_clipboard_contents(&mut clipboard); let mut clipboard_contents = get_clipboard_contents(&mut clipboard);