57 lines
1.1 KiB
Nix
57 lines
1.1 KiB
Nix
|
{
|
||
|
description = "The world's your oyster!";
|
||
|
|
||
|
inputs = {
|
||
|
flake-utils.url = "github:numtide/flake-utils";
|
||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||
|
|
||
|
fenix = {
|
||
|
url = "github:nix-community/fenix";
|
||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||
|
};
|
||
|
|
||
|
naersk = {
|
||
|
url = "github:nix-community/naersk";
|
||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
outputs = {
|
||
|
self,
|
||
|
fenix,
|
||
|
flake-utils,
|
||
|
naersk,
|
||
|
nixpkgs,
|
||
|
}:
|
||
|
flake-utils.lib.eachDefaultSystem (
|
||
|
system: let
|
||
|
pkgs = (import nixpkgs) {
|
||
|
inherit system;
|
||
|
};
|
||
|
|
||
|
toolchain = with fenix.packages.${system};
|
||
|
combine [
|
||
|
stable.toolchain
|
||
|
targets.x86_64-unknown-linux-musl.stable.rust-std
|
||
|
];
|
||
|
|
||
|
naersk' = pkgs.callPackage naersk {
|
||
|
cargo = toolchain;
|
||
|
rustc = toolchain;
|
||
|
};
|
||
|
in {
|
||
|
defaultPackage = naersk'.buildPackage {
|
||
|
name = "oyster";
|
||
|
src = ./.;
|
||
|
};
|
||
|
|
||
|
devShell = pkgs.mkShell {
|
||
|
nativeBuildInputs = with pkgs; [
|
||
|
cargo-insta
|
||
|
toolchain
|
||
|
];
|
||
|
};
|
||
|
}
|
||
|
);
|
||
|
}
|