with import <nixpkgs> {
overlays = map (uri: import (fetchTarball uri)) [
https://github.com/oxalica/rust-overlay/archive/master.tar.gz
];
};
stdenv.mkDerivation rec {
name = "nest-env";
buildInputs = [
rust-bin.stable.latest.default
openssl libsodium
zstd xxHash
sops
age
diesel-cli
cargo-edit
rustfmt
];
nativeBuildInputs = [
pkg-config bison flex
llvmPackages.libclang.lib
dbmate
];
LD_LIBRARY_PATH="${libsodium}/lib:${openssl.out}/lib";
DIESEL_DATABASE_URL="postgres://postgres@localhost/pijul?sslmode=disable";
LIBCLANG_PATH="${llvmPackages.libclang}/lib";
DATABASE_URL="postgres://postgres@localhost/pijul?sslmode=disable";
LOCAL_DATABASE_URL="postgres://postgres@/pijul-local?sslmode=disable&socket=/var/run/postgresql";
LOCAL_DATABASE_URL2="postgres://postgres@/pijul-local2?sslmode=disable&socket=/var/run/postgresql";
LOCAL_DATABASE_URL3="postgres://postgres@/pijul-local3?sslmode=disable&socket=/var/run/postgresql";
PROTOC="${protobuf}/bin/protoc";
ETCDCTL_API=3;
}