feat: got a better locked down version of rust
This commit is contained in:
parent
d0d25b77e8
commit
a2341c9d9d
3 changed files with 25 additions and 16 deletions
13
flake.nix
13
flake.nix
|
@ -2,7 +2,7 @@
|
|||
description = "Skynet LDAP backend";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-23.05";
|
||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
naersk.url = "github:nix-community/naersk";
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
@ -14,6 +14,7 @@
|
|||
|
||||
outputs = { self, nixpkgs, utils, naersk }: utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
overrides = (builtins.fromTOML (builtins.readFile ./rust-toolchain.toml));
|
||||
pkgs = nixpkgs.legacyPackages."${system}";
|
||||
naersk-lib = naersk.lib."${system}";
|
||||
package_name = "skynet_ldap_backend";
|
||||
|
@ -43,7 +44,15 @@
|
|||
|
||||
# `nix develop`
|
||||
devShell = pkgs.mkShell {
|
||||
nativeBuildInputs = with pkgs; [ rustc cargo pkg-config openssl];
|
||||
nativeBuildInputs = with pkgs; [rustup rustPlatform.bindgenHook pkg-config openssl];
|
||||
# libraries here
|
||||
buildInputs = [ ];
|
||||
RUSTC_VERSION = overrides.toolchain.channel;
|
||||
# https://github.com/rust-lang/rust-bindgen#environment-variables
|
||||
shellHook = ''
|
||||
export PATH="''${CARGO_HOME:-~/.cargo}/bin":"$PATH"
|
||||
export PATH="''${RUSTUP_HOME:-~/.rustup}/toolchains/$RUSTC_VERSION-${pkgs.stdenv.hostPlatform.rust.rustcTarget}/bin":"$PATH"
|
||||
'';
|
||||
};
|
||||
|
||||
nixosModule = { lib, pkgs, config, ... }:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue