mirror of
https://gitlab.com/hagrid-keyserver/hagrid.git
synced 2023-02-13 20:55:02 -05:00
add shell.nix and .envrc for development under nix
This commit is contained in:
parent
4e06734a1d
commit
2e1956fcfa
2 changed files with 33 additions and 0 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
eval "$(lorri direnv)"
|
32
shell.nix
Normal file
32
shell.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
with import <nixpkgs> {};
|
||||
let
|
||||
src = fetchFromGitHub {
|
||||
owner = "mozilla";
|
||||
repo = "nixpkgs-mozilla";
|
||||
# commit from: 2019-05-15
|
||||
rev = "c482bfd3dab1bde9590b03e712d73ced15385be4";
|
||||
sha256 = "18sxl0fxhbdnrfmkbmgxwsn12qy8dbv6ccb3imyyqbjqb76j8dpi";
|
||||
};
|
||||
in
|
||||
with import "${src.out}/rust-overlay.nix" pkgs pkgs;
|
||||
stdenv.mkDerivation {
|
||||
name = "rust-env";
|
||||
buildInputs = [
|
||||
(rustChannelOf { rustToolchain = ./rust-toolchain; }).rust
|
||||
# latest.rustChannels.nightly.rust
|
||||
# latest.rustChannels.stable.rust
|
||||
|
||||
clang
|
||||
gettext
|
||||
nettle
|
||||
pkgconfig
|
||||
];
|
||||
|
||||
# Set Environment Variables
|
||||
RUST_BACKTRACE = 1;
|
||||
|
||||
# compilation of -sys packages requires manually setting this :(
|
||||
shellHook = ''
|
||||
export LIBCLANG_PATH="${pkgs.llvmPackages.libclang}/lib";
|
||||
'';
|
||||
}
|
Loading…
Reference in a new issue