Skip to content

Commit

Permalink
feat(devShells): add rust development for tauri
Browse files Browse the repository at this point in the history
  • Loading branch information
r17x committed Oct 8, 2024
1 parent 4d41357 commit ad44d50
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions nix/devShells.nix
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,48 @@
];
};

rust-cap = pkgs.mkShell {
description = "Rust Development Environment";
# declared ENV variables when starting shell
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";

shellHook =
''
export PATH=$PATH:''${CARGO_HOME:-~/.cargo}/bin
''
+ lib.optionalString pkgs.stdenv.isDarwin ''
export NIX_LDFLAGS="-F${pkgs.darwin.apple_sdk.frameworks.CoreFoundation}/Library/Frameworks -framework CoreFoundation $NIX_LDFLAGS";
'';

nativeBuildInputs =
with pkgs;
[
rustup
rustc
cargo
rustfmt
clippy
ffmpeg
]
++ lib.optionals pkgs.stdenv.isDarwin (
with pkgs.darwin.apple_sdk;
[
pkgs.libiconv
pkgs.pkg-config
frameworks.Security
frameworks.SystemConfiguration
frameworks.CoreFoundation
frameworks.Cocoa
frameworks.CoreMedia
frameworks.Metal
frameworks.AVFoundation
frameworks.WebKit
pkgs.darwin.apple_sdk_12_3.frameworks.ScreenCaptureKit
]
);
};

#
#
# $ nix develop github:r17x/nixpkgs#bun
Expand Down

0 comments on commit ad44d50

Please sign in to comment.