forked from arcnmx/serde-ini
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ci.nix
37 lines (36 loc) · 825 Bytes
/
ci.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ config, channels, pkgs, lib, ... }: with pkgs; with lib; let
impureCommand = name: command: ci.command {
inherit name command;
impure = true;
};
in {
config = {
name = "input-linux";
ci.gh-actions.enable = true;
cache.cachix.arc.enable = true;
channels = {
rust = "master";
};
environment = {
test = {
inherit (config.rustChannel.buildChannel) cargo;
};
};
tasks = {
build.inputs = [
(impureCommand "cargo-build" "cargo build")
(impureCommand "cargo-test" "cargo test")
];
};
};
options = {
rustChannel = mkOption {
type = types.unspecified;
default = channels.rust.stable;
};
shell = mkOption {
type = types.unspecified;
default = config.rustChannel.mkShell { };
};
};
}