mirror of
https://github.com/kanidm/kanidm.git
synced 2025-04-22 18:25:40 +02:00
The existing shell.nix uses whatever versions of rustc and cargo are in the system nixpkgs. In the current stable nixpkgs version (24.11), this is rustc 1.82.0. Unfortunately, we depend on the `strict_provenance` feature, which was unstable before 1.84.0. (See: kanidm/concread#132) This patch makes minimal changes to shell.nix to overlay nixpkgs with the rustc version defined in rust-toolchain.toml, enabling Kanidm to build locally on stable versions of NixOS. Co-authored-by: Firstyear <william@blackhats.net.au>
24 lines
605 B
Nix
24 lines
605 B
Nix
let
|
|
rust-overlay = (import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"));
|
|
in
|
|
{ pkgs ? import <nixpkgs> { overlays = [ rust-overlay ]; } }:
|
|
pkgs.mkShellNoCC {
|
|
# Kanidm dependencies
|
|
buildInputs = with pkgs; [
|
|
pkg-config
|
|
|
|
(rust-bin.fromRustupToolchainFile ./rust-toolchain.toml)
|
|
|
|
clang
|
|
llvmPackages.bintools
|
|
|
|
openssl
|
|
] ++ pkgs.lib.optionals (pkgs.stdenv.isLinux) [
|
|
systemd
|
|
linux-pam
|
|
];
|
|
|
|
# https://github.com/rust-lang/rust-bindgen#environment-variables
|
|
LIBCLANG_PATH = pkgs.lib.makeLibraryPath [ pkgs.llvmPackages_latest.libclang.lib ];
|
|
}
|