build(nix): fix crane deprecated api
This commit is contained in:
parent
a2eda1a1c6
commit
642ae9acda
18
flake.nix
18
flake.nix
@ -15,23 +15,10 @@
|
|||||||
outputs = { self, nixpkgs, crane, flake-utils, ... }:
|
outputs = { self, nixpkgs, crane, flake-utils, ... }:
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs {
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
inherit system;
|
craneLib = crane.mkLib pkgs;
|
||||||
};
|
|
||||||
|
|
||||||
craneLib = crane.lib.${system};
|
|
||||||
my-crate = craneLib.buildPackage {
|
my-crate = craneLib.buildPackage {
|
||||||
src = craneLib.cleanCargoSource (craneLib.path ./.);
|
src = craneLib.cleanCargoSource (craneLib.path ./.);
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
# Add additional build inputs here
|
|
||||||
] ++ pkgs.lib.optionals pkgs.stdenv.isDarwin [
|
|
||||||
# Additional darwin specific inputs can be set here
|
|
||||||
pkgs.libiconv
|
|
||||||
];
|
|
||||||
|
|
||||||
# Additional environment variables can be set directly
|
|
||||||
# MY_CUSTOM_VAR = "some value";
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@ -50,7 +37,6 @@
|
|||||||
|
|
||||||
inputsFrom = builtins.attrValues self.checks.${system};
|
inputsFrom = builtins.attrValues self.checks.${system};
|
||||||
|
|
||||||
# Extra inputs can be added here
|
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
cargo
|
cargo
|
||||||
rustc
|
rustc
|
||||||
|
Loading…
Reference in New Issue
Block a user