From 34c9e3558fdb7ad68a7ea5b5649e6013653528a7 Mon Sep 17 00:00:00 2001 From: Jonni Liljamo Date: Wed, 1 Mar 2023 11:05:55 +0200 Subject: [PATCH] feat: nix shell --- shell.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 shell.nix diff --git a/shell.nix b/shell.nix new file mode 100644 index 0000000..cec534d --- /dev/null +++ b/shell.nix @@ -0,0 +1,28 @@ +let + rust_overlay = import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"); + pkgs = import { overlays = [ rust_overlay ]; }; + lib = pkgs.lib; + rustVersion = "1.67.1"; + rust = pkgs.rust-bin.stable.${rustVersion}.default.override { + extensions = [ + "rust-src" + ]; + }; +in +pkgs.mkShell { + buildInputs = [ + rust + ] ++ (with pkgs; [ + rust-analyzer + pkg-config + + clang + mold + + postgresql_15.lib + ]); + shellHook = '' + export LD_LIBRARY_PATH="${lib.makeLibraryPath [ pkgs.postgresql_15.lib ]}"; + ''; + #RUST_BACKTRACE = 1; +} -- 2.44.1