DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

34c9e3558fdb7ad68a7ea5b5649e6013653528a7 — Jonni Liljamo 1 year, 9 months ago dbf17ad
feat: nix shell
1 files changed, 28 insertions(+), 0 deletions(-)

A shell.nix
A shell.nix => shell.nix +28 -0
@@ 0,0 1,28 @@
let
  rust_overlay = import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz");
  pkgs = import <nixpkgs> { 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;
}