|
|
|
@ -6,6 +6,13 @@
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
|
rust-overlay = {
|
|
|
|
|
url = "github:oxalica/rust-overlay";
|
|
|
|
|
inputs = {
|
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
outputs = {
|
|
|
|
@ -13,14 +20,17 @@
|
|
|
|
|
nixpkgs,
|
|
|
|
|
crane,
|
|
|
|
|
flake-utils,
|
|
|
|
|
rust-overlay,
|
|
|
|
|
...
|
|
|
|
|
}:
|
|
|
|
|
flake-utils.lib.eachDefaultSystem (system: let
|
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
|
inherit system;
|
|
|
|
|
overlays = [(import rust-overlay)];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
craneLib = crane.lib.${system};
|
|
|
|
|
rustTarget = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
|
|
|
|
craneLib = (crane.mkLib pkgs).overrideToolchain rustTarget;
|
|
|
|
|
git-view = craneLib.buildPackage {
|
|
|
|
|
src = craneLib.cleanCargoSource (craneLib.path ./.);
|
|
|
|
|
buildInputs = [] ++ pkgs.lib.optionals pkgs.stdenv.isDarwin [pkgs.libiconv];
|
|
|
|
|