36 lines
933 B
Nix
36 lines
933 B
Nix
|
{
|
||
|
description = "Honbra API";
|
||
|
|
||
|
inputs = {
|
||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||
|
rust-overlay = {
|
||
|
url = "github:oxalica/rust-overlay";
|
||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||
|
};
|
||
|
flake-utils.url = "github:numtide/flake-utils";
|
||
|
};
|
||
|
|
||
|
outputs = { self, nixpkgs, rust-overlay, flake-utils, ... }:
|
||
|
flake-utils.lib.eachDefaultSystem (system:
|
||
|
let
|
||
|
overlays = [ (import rust-overlay) ];
|
||
|
pkgs = import nixpkgs {
|
||
|
inherit system overlays;
|
||
|
};
|
||
|
rust = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.default.override {
|
||
|
extensions = [ "rust-src" ];
|
||
|
});
|
||
|
in
|
||
|
with pkgs;
|
||
|
{
|
||
|
devShells.default = mkShell rec {
|
||
|
buildInputs = [ rust ] ++ [
|
||
|
rust-analyzer
|
||
|
pkg-config
|
||
|
];
|
||
|
LD_LIBRARY_PATH = "${lib.makeLibraryPath buildInputs}";
|
||
|
};
|
||
|
}
|
||
|
);
|
||
|
}
|