Skip to content

Commit

Permalink
drop use of flake-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
ralexstokes committed Oct 24, 2023
1 parent a74ac6e commit 3a76c29
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 22 deletions.
36 changes: 33 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 23 additions & 19 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "flake-utils";
};
inputs.nixpkgs.follows = "nixpkgs";
};
crane = {
url = "github:ipetkov/crane";
Expand All @@ -18,23 +14,31 @@
};

outputs = { self, flake-utils, nixpkgs, rust-overlay, crane }:
{
overlays.default = final: prev: {
inherit (self.packages.${final.system}) mev-rs;
};
nixosModules.default = import ./nix/module.nix;
} //
flake-utils.lib.eachDefaultSystem
(system:
let
overlays = [ (import rust-overlay) ];
mev-rs = system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs { inherit system overlays; };
rustToolchain = pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
craneLib = (crane.mkLib pkgs).overrideToolchain rustToolchain;
mev-rs = pkgs.callPackage ./nix/mev-rs.nix { inherit pkgs; crane = craneLib; };
in
{
packages = { inherit mev-rs; };
devShells.default = import ./shell.nix { inherit pkgs; };
});
pkgs.callPackage ./nix/mev-rs.nix { inherit pkgs; crane = craneLib; };
in
{
nixosModules.mev-rs = import ./nix/module.nix;
nixosModules.default = self.nixosModules.mev-rs;

overlays.default = _:_: {
inherit mev-rs;
};

packages.x86_64-darwin.mev-rs = mev-rs "x86_64-darwin";
packages.x86_64-darwin.default = self.packages.x86_64-darwin.mev-rs;

packages.aarch64-darwin.mev-rs = mev-rs "aarch64-darwin";
packages.aarch64-darwin.default = self.packages.aarch64-darwin.mev-rs;

packages.x86_64-linux.mev-rs = mev-rs "x86_64-linux";
packages.x86_64-linux.default = self.packages.x86_64-linux.mev-rs;
};
}

0 comments on commit 3a76c29

Please sign in to comment.