Skip to content

Commit

Permalink
Rename --build-systems to --systems for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Mar 25, 2024
1 parent 0172ab1 commit a53dedb
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: nixci
run: nixci build --build-systems "github:nix-systems/${{ matrix.system }}"
run: nixci build --systems "github:nix-systems/${{ matrix.system }}"
# FIXME: This should run only darwin
- name: Integration Test
run: nix develop -c cargo test -F integration_test
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

- New features
- Add new config `nixci.*.*.systems` acting as a whitelist of systems to build that subflake.
- Add `--build-systems` option to build on an arbitrary systems (\#39)
- Add `nixci build --systems` option to build on an arbitrary systems (\#39)
- Allow selecting sub-flake to build, e.g.: `nixci .#default.myflake` (\#45)
- Add subcommand to generate Github Actions matrix (\#50)
- Consequently, you must run `nixci build` instead of `nixci` now.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
fail-fast: false
steps:
- uses: actions/checkout@v4
- run: nixci build --build-systems "github:nix-systems/${{ matrix.system }}" .#default.${{ matrix.subflake}}
- run: nixci build --systems "github:nix-systems/${{ matrix.system }}" .#default.${{ matrix.subflake}}
```
## Configuring
Expand Down
6 changes: 3 additions & 3 deletions src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub struct BuildConfig {
/// of systems. You may use one of the lists from
/// https://github.com/nix-systems.
#[arg(long, default_value = "github:nix-systems/empty")]
pub build_systems: SystemsListFlakeRef,
pub systems: SystemsListFlakeRef,

/// Flake URL or github URL
///
Expand All @@ -125,8 +125,8 @@ pub struct BuildConfig {
}

impl BuildConfig {
pub async fn get_build_systems(&self) -> Result<Vec<System>> {
let systems = SystemsList::from_flake(&self.build_systems).await?.0;
pub async fn get_systems(&self) -> Result<Vec<System>> {
let systems = SystemsList::from_flake(&self.systems).await?.0;
if systems.is_empty() {
let current_system = get_current_system().await?;
Ok(vec![current_system])
Expand Down
2 changes: 1 addition & 1 deletion src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl SubFlakish {
.chain([
"--override-input".to_string(),
"systems".to_string(),
build_cfg.build_systems.0 .0.clone(),
build_cfg.systems.0 .0.clone(),
])
.chain(build_cfg.extra_nix_build_args.iter().cloned())
.collect()
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async fn nixci_build(
) -> anyhow::Result<Vec<DrvOut>> {
let mut all_outs = HashSet::new();

let systems = build_cfg.get_build_systems().await?;
let systems = build_cfg.get_systems().await?;

for (subflake_name, subflake) in &cfg.subflakes.0 {
let name = format!("{}.{}", cfg.name, subflake_name).italic();
Expand Down

0 comments on commit a53dedb

Please sign in to comment.