fdidx/flake.nix

37 lines
1.1 KiB
Nix

{
inputs = {
nixpkgs.url = github:NixOS/nixpkgs;
cargo2nix.url = "github:cargo2nix/cargo2nix/master";
cargo2nix.inputs.nixpkgs.follows = "nixpkgs";
cargo2nix.inputs.flake-utils.follows = "flake-utils";
cargo2nix.inputs.rust-overlay.follows = "rust-overlay";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay.url = "github:oxalica/rust-overlay";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
rust-overlay.inputs.flake-utils.follows = "flake-utils";
};
outputs = { self, nixpkgs, cargo2nix, flake-utils, rust-overlay, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [
cargo2nix.overlay.${system}
rust-overlay.overlay
];
pkgs = import nixpkgs {
inherit system overlays;
};
rustPkgs = pkgs.rustBuilder.makePackageSet' {
packageFun = import ./Cargo.nix;
rustChannel = "1.58.1";
packageOverrides = pkgs: pkgs.rustBuilder.overrides.all;
};
in
rec {
devShell = rustPkgs.workspaceShell { };
packages = {
shell = devShell;
};
}
);
}