NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.46k stars 13.66k forks source link

Build failure: Garage garage.settings.data_dir not accepting attribute set #342761

Open sabsare opened 3 days ago

sabsare commented 3 days ago

Steps To Reproduce

Steps to reproduce the behavior:

  1. nixos-rebuild test on
    package = pkgs.garage_1_0_0;
    settings.data_dir = [
                        { capacity = "128Gb"; path = "/mnt/garage0"; }
                #       { capacity = 32Gb; path = "/mnt/s30" }
    ];

    settings.data_dir = "/mnt/garage0"; resolves fine

    Build log

    https://gist.github.com/sabsare/f8b3d05dccb7af6d2658eeaf3c9550c7

    Additional context

Tested on nixos_24.05 but code of the module is unchanged in nixos_unstable. I'm using flakes as well

Notify maintainers

@srhb @mjm

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[root@juice1:/etc/nixos]# nix-shell -p nix-info --run "nix-info -m"
this path will be fetched (0.01 MiB download, 0.05 MiB unpacked):
  /nix/store/bc0as359y5y067dfp7afrq1f011m9ny3-stdenv-linux
copying path '/nix/store/bc0as359y5y067dfp7afrq1f011m9ny3-stdenv-linux' from 'https://cache.nixos.org'...
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.51, NixOS, 24.05 (Uakari), 24.05.20240914.8f7492c`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.5`
 - channels(root): `"nixos-24.05"`
 - nixpkgs: `/nix/store/s8pb2vy9zdjxlc5gr2iwkkm9y5gqr4ph-source`

sabsare commented 3 days ago

https://github.com/NixOS/nixpkgs/pull/312771

Looks like doesn't apply, maybe should tinker a bit on my own

mjm commented 2 days ago

It looks like the option type was adjusted, but not the other code in the module that checks that value. Shouldn't be too hard to fix.