fix flake
This commit is contained in:
parent
81ce855dae
commit
846c465ea0
1 changed files with 23 additions and 17 deletions
40
flake.nix
40
flake.nix
|
@ -23,34 +23,40 @@
|
||||||
toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
||||||
craneLib = (crane.mkLib pkgs).overrideToolchain(_: toolchain);
|
craneLib = (crane.mkLib pkgs).overrideToolchain(_: toolchain);
|
||||||
lib = pkgs.lib;
|
lib = pkgs.lib;
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
pkg-config
|
||||||
|
];
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
toolchain
|
||||||
|
openssl
|
||||||
|
nix
|
||||||
|
boost
|
||||||
|
];
|
||||||
|
env = {
|
||||||
|
# for cpp bindings to work
|
||||||
|
NIX_INCLUDE_PATH = "${lib.getDev pkgs.nix}/include";
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
nativeBuildInputs = with pkgs; [
|
inherit buildInputs;
|
||||||
pkg-config
|
inherit nativeBuildInputs;
|
||||||
];
|
packages = with pkgs; [
|
||||||
buildInputs = with pkgs; [
|
|
||||||
toolchain
|
|
||||||
openssl
|
|
||||||
nix
|
|
||||||
boost
|
|
||||||
tokio-console
|
tokio-console
|
||||||
cargo-udeps
|
cargo-udeps
|
||||||
];
|
];
|
||||||
NIX_INCLUDE_PATH = "${lib.getDev pkgs.nix}/include";
|
env = env // {
|
||||||
RUST_LOG = "nixcp=debug";
|
RUST_LOG = "nixcp=debug";
|
||||||
RUST_BACKGRACE = 1;
|
RUST_BACKGRACE = 1;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
packages.default = craneLib.buildPackage {
|
packages.default = craneLib.buildPackage {
|
||||||
|
inherit nativeBuildInputs;
|
||||||
|
inherit buildInputs;
|
||||||
|
inherit env;
|
||||||
src = craneLib.cleanCargoSource ./.;
|
src = craneLib.cleanCargoSource ./.;
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
nativeBuildInputs = with pkgs; [
|
|
||||||
pkg-config
|
|
||||||
];
|
|
||||||
buildInputs = with pkgs; [
|
|
||||||
openssl
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue