parent
634884d483
commit
6e6217bd21
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -17,8 +17,8 @@ jobs:
|
|||||||
run: nix develop --command cargo fmt --all -- --check
|
run: nix develop --command cargo fmt --all -- --check
|
||||||
- name: Run clippy
|
- name: Run clippy
|
||||||
run: nix develop --command cargo clippy -- -D warnings
|
run: nix develop --command cargo clippy -- -D warnings
|
||||||
- name: Run tests
|
- name: Run alejandra
|
||||||
run: nix develop --command cargo test
|
run: nix develop --command alejandra --check flake.nix
|
||||||
|
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@ -13,5 +13,18 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"languages": {
|
||||||
|
"Nix": {
|
||||||
|
"formatter": {
|
||||||
|
"external": {
|
||||||
|
"command": "alejandra",
|
||||||
|
"arguments": [
|
||||||
|
"-q"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"format_on_save": "on"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
22
flake.nix
22
flake.nix
@ -11,9 +11,14 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { nixpkgs, flake-utils, fenix, crane, ... }:
|
outputs = {
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
nixpkgs,
|
||||||
let
|
flake-utils,
|
||||||
|
fenix,
|
||||||
|
crane,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
flake-utils.lib.eachDefaultSystem (system: let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
# Using stable toolchain as base
|
# Using stable toolchain as base
|
||||||
toolchain = with fenix.packages.${system};
|
toolchain = with fenix.packages.${system};
|
||||||
@ -59,8 +64,7 @@
|
|||||||
pkgsCross.mingwW64.windows.pthreads
|
pkgsCross.mingwW64.windows.pthreads
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
packages = {
|
packages = {
|
||||||
inherit timr;
|
inherit timr;
|
||||||
default = timr;
|
default = timr;
|
||||||
@ -68,18 +72,18 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Development shell with all necessary tools
|
# Development shell with all necessary tools
|
||||||
devShell = with nixpkgs.legacyPackages.${system}; mkShell {
|
devShell = with nixpkgs.legacyPackages.${system};
|
||||||
|
mkShell {
|
||||||
buildInputs = with fenix.packages.${system}.stable; [
|
buildInputs = with fenix.packages.${system}.stable; [
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
clippy
|
clippy
|
||||||
rustfmt
|
rustfmt
|
||||||
toolchain
|
toolchain
|
||||||
pkgs.just
|
pkgs.just
|
||||||
|
pkgs.nixd
|
||||||
|
pkgs.alejandra
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
inherit (commonArgs) src;
|
inherit (commonArgs) src;
|
||||||
RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library";
|
RUST_SRC_PATH = "${toolchain}/lib/rustlib/src/rust/library";
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user