1
0
Fork 0
mirror of https://codeberg.org/icewind/vbsp.git synced 2026-06-04 02:54:08 +02:00
This commit is contained in:
Robin Appelman 2023-06-08 19:29:41 +02:00
commit 0850bb8dbd
13 changed files with 946 additions and 55 deletions

View file

@ -1,21 +1,48 @@
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.05";
utils.url = "github:numtide/flake-utils";
nixpkgs.url = "nixpkgs/release-22.11";
naersk.url = "github:icewind1991/naersk?rev=6d245a3bbb2ee31ec726bb57b9a8b206302e7110";
naersk.inputs.nixpkgs.follows = "nixpkgs";
rust-overlay.url = "github:oxalica/rust-overlay";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
rust-overlay.inputs.flake-utils.follows = "utils";
};
outputs = {
self,
nixpkgs,
utils,
naersk,
rust-overlay,
}:
utils.lib.eachDefaultSystem (system: let
overlays = [ (import rust-overlay) ];
pkgs = (import nixpkgs) {
inherit system;
inherit system overlays;
};
lib = pkgs.lib;
naersk' = pkgs.callPackage naersk {};
src = lib.sources.sourceByRegex (lib.cleanSource ./.) ["Cargo.*" "(src|derive|benches|tests|examples|koth_bagel.*)(/.*)?"];
nearskOpt = {
pname = "vbsp";
root = src;
};
in rec {
# `nix develop`
devShell = pkgs.mkShell {
packages = {
check = naersk'.buildPackage (nearskOpt // {
mode = "check";
});
clippy = naersk'.buildPackage (nearskOpt // {
mode = "clippy";
});
test = naersk'.buildPackage (nearskOpt // {
release = false;
mode = "test";
});
};
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [rustc cargo bacon cargo-edit cargo-outdated clippy cargo-audit cargo-msrv cargo-fuzz];
};
});