oysh/flake.nix

57 lines
1.1 KiB
Nix
Raw Permalink Normal View History

2022-09-15 18:12:42 +00:00
{
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-deny
2022-09-15 18:12:42 +00:00
toolchain
];
};
}
);
}