Charlotte Meyer
a88a163273
insta doesn't support having a single check function with all the duplicated code. Acked-by: ElKowar Signed-off-by: Charlotte Meyer <dev@buffet.sh>
55 lines
1.1 KiB
Nix
55 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; [
|
|
toolchain
|
|
];
|
|
};
|
|
}
|
|
);
|
|
}
|