Created
February 27, 2019 07:13
-
-
Save stew/cd8106110b12ec39f7be9c8505566092 to your computer and use it in GitHub Desktop.
shell.nix for rust project
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with import <nixpkgs> { | |
overlays = map import [ ./nix/rust-overlay.nix ]; | |
}; | |
stdenv.mkDerivation rec { | |
name = "hatchway"; | |
buildInputs = [ | |
rustChannels.stable.rust | |
# rustChannels.nightly.rust | |
openssl | |
pkgconfig | |
rdkafka | |
zlib | |
(stdenv.lib.optional stdenv.isDarwin pkgs.darwin.Security) | |
(stdenv.lib.optional stdenv.isDarwin pkgs.darwin.apple_sdk.frameworks.CoreServices) | |
(stdenv.lib.optional stdenv.isDarwin pkgs.darwin.apple_sdk.frameworks.CoreFoundation) | |
]; | |
RUST_SRC_PATH= "${rustChannels.stable.rust-src}/lib/rustlib/src/rust/src"; | |
shellHook = '' | |
export PATH="$PWD/.cargo/bin:$PATH" | |
export NIX_LDFLAGS="-F${pkgs.darwin.apple_sdk.frameworks.CoreFoundation}/Library/Frameworks -framework CoreFoundation $NIX_LDFLAGS"; | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment