Commit graph

311552 commits

Author SHA1 Message Date
Maximilian Bosch 55ea29fd8c
lib/generators/toPretty: add evaluation-limit
When having e.g. recursive attr-set, it cannot be printed which is
solved by Nix itself like this:

    $ nix-instantiate --eval -E 'let a.b = 1; a.c = a; in builtins.trace a 1'
    trace: { b = 1; c = <CYCLE>; }
    1

However, `generators.toPretty` tries to evaluate something until it's
done which can result in a spurious `stack-overflow`-error:

    $ nix-instantiate --eval -E 'with import <nixpkgs/lib>; generators.toPretty {  } (mkOption { type = types.str; })'
    error: stack overflow (possible infinite recursion)

Those attr-sets are in fact rather common, one example is shown above, a
`types.<type>`-declaration is such an example. By adding an optional
`depthLimit`-argument, `toPretty` will stop evaluating as soon as the
limit is reached:

    $ nix-instantiate --eval -E 'with import ./Projects/nixpkgs-update-int/lib; generators.toPretty { depthLimit = 2; } (mkOption { type = types.str; })' |xargs -0 echo -e
    "{
      _type = \"option\";
      type = {
        _type = \"option-type\";
        check = <function>;
        deprecationMessage = null;
        description = \"string\";
        emptyValue = { };
        functor = {
          binOp = <unevaluated>;
          name = <unevaluated>;
          payload = <unevaluated>;
          type = <unevaluated>;
          wrapped = <unevaluated>;
        };
        getSubModules = null;
        getSubOptions = <function>;
        merge = <function>;
        name = \"str\";
        nestedTypes = { };
        substSubModules = <function>;
        typeMerge = <function>;
      };
    }"

Optionally, it's also possible to let `toPretty` throw an error if the
limit is exceeded.
2021-08-25 23:18:26 +02:00
Maximilian Bosch 81f586e8b8
Merge pull request #135624 from paperdigits/dateutils-0.4.9
dateutils: 0.4.8 -> 0.4.9
2021-08-25 22:14:32 +02:00
Robert Scott a7f71255b9
Merge pull request #135609 from jbedo/fastp
fastp: 0.20.1 -> 0.22.0
2021-08-25 21:06:44 +01:00
Martin Weinelt 304ed7c421 doc/python: explain bulk package set updates 2021-08-25 12:33:10 -07:00
Michele Guerini Rocco 296da7b2f8
Merge pull request #133303 from rnhmjoj/cursor
nixos/hidpi: scale X11 core cursor
2021-08-25 21:07:47 +02:00
Jaakko Luttinen 3f2c99d8a1 tvheadend: use ffmpeg_4 instead of ffmpeg_3 2021-08-25 20:20:56 +02:00
Ryan Mulligan 0930d35fc3
Merge pull request #135361 from r-ryantm/auto-update/step-ca
step-ca: 0.16.0 -> 0.16.2
2021-08-25 11:18:49 -07:00
Silvan Mosberger 1ad73dadd2
Merge pull request #132836 from Infinisil/populate-members
nixos/users: Populate group members option
2021-08-25 20:17:09 +02:00
Jonathan Ringer 4ffe91a29d qtile: restore derivation name 2021-08-25 10:00:35 -07:00
Robert Hensing b5f2c5f132
Merge pull request #135670 from NixOS/docker-tools-usr-bin-env
dockerTools.usrBinEnv: add
2021-08-25 18:19:45 +02:00
Graham Christensen 9ea7f443ec
Merge pull request #106574 from grahamc/amazon-image-zfs
nixos/amazonImageZfs: init
2021-08-25 12:08:33 -04:00
Martin Weinelt a90373118d
Merge pull request #135492 from mweinelt/octoprint
nixos/octoprint: allow access to serial devices
2021-08-25 18:07:12 +02:00
Ryan Mulligan ffaf078cdd
Merge pull request #135612 from r-ryantm/auto-update/adwaita-qt
adwaita-qt: 1.3.1 -> 1.4.0
2021-08-25 08:36:32 -07:00
Graham Christensen 71b3d18181 amazon images: extend the image-info.json to have a disks object
Having a disks object with a dictionary of all the disks and their
properties makes it easier to process multi-disk images.

Note the rename of `label` to `system_label` is because `$label`i
is something of a special token to jq.
2021-08-25 10:42:35 -04:00
Graham Christensen bd38b059ea NixOS/amazonImageZfs: init
Introduce an AWS EC2 AMI which supports aarch64 and x86_64 with a ZFS
root.

This uses `make-zfs-image` which implies two EBS volumes are needed
inside EC2, one for boot, one for root. It should not matter which
is identified `xvda` and which is `xvdb`, though I have always
uploaded `boot` as `xvda`.
2021-08-25 10:42:35 -04:00
Graham Christensen 076f6e2d94 nixos/make-zfs-image: init
This is a private interface for internal NixOS  use. It is similar
to `make-disk-image` except it is much more opinionated about what
kind of disk image it'll make.

Specifically, it will always create *two* disks:

1. a `boot` disk formatted with FAT in a hybrid GPT mode.
2. a `root` disk which is completely owned by a single zpool.

The partitioning and FAT decisions should make the resulting images
bootable under EFI or BIOS, with systemd-boot or grub.

The root disk's zpools options are highly customizable, including
fully customizable datasets and their options.

Because the boot disk and partition are highly opinionated, it is
expected that the `boot` disk will be mounted at `/boot`. It is
always labeled ESP even on BIOS boot systems.

In order for the datasets to be mounted properly, the `datasets`
passed in to `make-zfs-image` are turned in to NixOS configuration
stored at /etc/nixos/configuration.nix inside the VM.
NOTE: The function accepts a system configuration in the `config`
argument. The *caller* must manually configure the system
in `config` to have each specified `dataset` be represented
by a corresponding `fileSystems` entry.

One way to test the resulting images is with qemu:

```sh
boot=$(find ./result/ -name '*.boot.*');
root=$(find ./result/ -name '*.root.*');

echo '`Ctrl-a h` to get help on the monitor';
echo '`Ctrl-a x` to exit';

qemu-kvm \
    -nographic \
    -cpu max \
    -m 16G \
    -drive file=$boot,snapshot=on,index=0,media=disk \
    -drive file=$root,snapshot=on,index=1,media=disk \
    -boot c \
    -net user \
    -net nic \
    -msg timestamp=on
```
2021-08-25 10:42:35 -04:00
Florian Klink 14b61efa87 dockerTools.usrBinEnv: add
This provides a /usr/bin/env, for shell scripts using the
"/usr/bin/env executable" shebang.
2021-08-25 16:08:39 +02:00
Stig 6248814b68
Merge pull request #135664 from zakame/contrib/perl-File-lchown-fix-build-on-Darwin
perlPackages.Filelchown: fix build on Darwin
2021-08-25 15:24:49 +02:00
Ryan Mulligan 7f31e2cbca
Merge pull request #135503 from r-ryantm/auto-update/python3.8-google-cloud-access-context-manager
python38Packages.google-cloud-access-context-manager: 0.1.6 -> 0.1.7
2021-08-25 06:17:09 -07:00
Ryan Mulligan 0551481677
Merge pull request #135552 from r-ryantm/auto-update/quill
quill: 0.2.1 -> 0.2.4
2021-08-25 06:15:53 -07:00
Ryan Mulligan 47ca52f270
Merge pull request #135636 from r-ryantm/auto-update/kotlin
kotlin: 1.5.21 -> 1.5.30
2021-08-25 06:15:27 -07:00
Noé Tarbouriech b35a0c79f5
StarUML: 2.8.1 -> 4.0.1 (#135599)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2021-08-25 15:14:45 +02:00
Sandro 80a20c39d1
Merge pull request #130431 from fabaff/bump-pymemcache
python3Packages.pymemcache: 3.4.4 -> 3.5.0
2021-08-25 15:09:31 +02:00
Martin Weinelt 94b4287560
Merge pull request #135541 from mweinelt/esphome
esphome: 2021.8.0 -> 2021.8.2
2021-08-25 15:09:02 +02:00
Sandro 3209d79a98
Merge pull request #135632 from fabaff/bump-smbprotocol 2021-08-25 15:01:50 +02:00
R. RyanTM 9c8b5a8b7f headscale: 0.6.1 -> 0.7.0 2021-08-25 21:55:31 +09:00
Stig fab904ffa4
Merge pull request #135666 from thomasSDK/bump-perlPackages.Graph
perlPackages.Graph: 0.9712 -> 0.9722
2021-08-25 14:39:23 +02:00
Thomas Sean Dominic Kelly d16075b4c5 perlPackages.Graph: 0.9712 -> 0.9722 2021-08-25 13:24:45 +01:00
Stig 792eb07e54
Merge pull request #135653 from zakame/updates/perl-ExtUtils-CChecker-0.11
perlPackages.ExtUtilsCChecker: 0.10 -> 0.11
2021-08-25 14:20:09 +02:00
Martin Weinelt 7c9d049653 esphome: 2021.8.1 -> 2021.8.2 2021-08-25 14:17:36 +02:00
Zak B. Elep edca4b029f perlPackages.Filelchown: fix build on Darwin 2021-08-25 20:06:04 +08:00
lucasew 83514ae7a9 lib.formats.yaml: use well known YAML format
The way `(lib.formats.yaml {}).generate` generates YAML is compliant
because on YAML 1.2 spec JSON is a subset of YAML but it bugs people's
minds and can lead to problems with software that is not compatible with
YAML 1.2.

This commit also changes the test of the generation function. Data
validation/typing remains the same.

See #133802.

Signed-off-by: lucasew <lucas59356@gmail.com>
2021-08-25 14:02:59 +02:00
Sandro 346d5ce8a0
Merge pull request #135650 from ianmjones/snippetpixie-1.5.3
snippetpixie: 1.5.2 -> 1.5.3
2021-08-25 14:02:07 +02:00
Sandro e1e367ca31
Merge pull request #134347 from Stunkymonkey/emacs-elpa-package-phases 2021-08-25 14:01:54 +02:00
Sandro 0f0bce7c43
Merge pull request #134352 from astro/collectd 2021-08-25 13:57:24 +02:00
Sandro 8723b6b237
Merge pull request #135567 from r-ryantm/auto-update/python3.8-pex 2021-08-25 13:55:38 +02:00
Sandro 695ab32a72
Merge pull request #135631 from r-ryantm/auto-update/iotop-c
iotop-c: 1.17 -> 1.18
2021-08-25 13:55:08 +02:00
Sandro 4ddab9238e
Merge pull request #135197 from r-ryantm/auto-update/lsix
lsix: 1.7.4 -> 1.8
2021-08-25 13:54:52 +02:00
Sandro d79f428ec5
Merge pull request #135639 from r-ryantm/auto-update/kustomize
kustomize: 4.2.0 -> 4.3.0
2021-08-25 13:53:50 +02:00
Sandro ba2824d029
Merge pull request #135577 from r-ryantm/auto-update/vultr-cli
vultr-cli: 2.7.0 -> 2.8.0
2021-08-25 13:53:14 +02:00
Sandro 6c3207cd62
Merge pull request #135534 from bzizou/mpldatacursor
python39packages.mpldatacursor: init at 0.7.1
2021-08-25 13:37:31 +02:00
Sandro 9bd638fee1
Merge pull request #135635 from fabaff/bump-angr 2021-08-25 13:36:26 +02:00
Sandro a685e22709
Merge pull request #135644 from fabaff/bump-phonenumbers
python3Packages.phonenumbers: 8.12.30 -> 8.12.31
2021-08-25 13:35:34 +02:00
Sandro 5103e19ce4
Merge pull request #135637 from fabaff/bump-bitarray 2021-08-25 13:35:21 +02:00
Sandro eb4334e405
Merge pull request #135657 from Ma27/bump-jiq 2021-08-25 13:19:29 +02:00
Sandro 3382e6d411
Merge pull request #135625 from r-ryantm/auto-update/fioctl 2021-08-25 13:17:41 +02:00
Sandro abd617e851
Merge pull request #135649 from fabaff/bump-pyrad 2021-08-25 13:16:42 +02:00
Sandro f9d4579b0e
Merge pull request #135435 from SuperSandro2000/google 2021-08-25 13:15:39 +02:00
Sandro f5fd3649c4
Merge pull request #134745 from bcdarwin/update-omegaconf 2021-08-25 13:08:19 +02:00
Sandro 9f641bd256
Merge pull request #135640 from fabaff/bump-codecov 2021-08-25 12:55:50 +02:00