Commit graph

1203 commits

Author SHA1 Message Date
Minijackson 78eb4d64e7 netbox_3_3: init
reintroduce previous version, use in NixOS module if stateVersion < 23.05
2023-04-04 11:45:31 +02:00
Bobby Rong 28031f7579
Merge pull request #216737 from FedericoSchonborn/budgie
Budgie Desktop
2023-04-03 10:57:32 +08:00
Federico Damián Schonborn c0dcb5c24a
nixos/tests/budgie: init
Signed-off-by: Federico Damián Schonborn <fdschonborn@gmail.com>
2023-04-02 21:52:36 -03:00
Sandro c2ae278eb8
Merge pull request #221851 from Ma27/postgresql-jit-support
postgresql: implement opt-in JIT support
2023-03-29 13:29:30 +02:00
Maximilian Bosch 2282fa73a1
postgresql: implement opt-in JIT support
Closes #150801

Note: I decided against resuming directly on #150801 because the
conflict was too big (and resolving it seemed too error-prone to me).
Also the `this`-refactoring could be done in an easier manner, i.e. by
exposing JIT attributes with the correct configuration. More on that
below.

This patch creates variants of the `postgresql*`-packages with JIT[1]
support. Please note that a lot of the work was derived from previous
patches filed by other contributors, namely dasJ, andir and abbradar,
hence the co-authored-by tags below.

Effectively, the following things have changed:

* For JIT variants an LLVM-backed stdenv with clang is now used as
  suggested by dasJ[2]. We need LLVM and CLang[3] anyways to build the
  JIT-part, so no need to mix this up with GCC's stdenv. Also, using the
  `dev`-output of LLVM and clang's stdenv for building (and adding llvm
  libs as build-inputs) seems more cross friendly to me (which will
  become useful when cross-building for JIT-variants will actually be
  supported).

* Plugins inherit the build flags from the Makefiles in
  `$out/lib/pgxs/src` (e.g. `-Werror=unguarded-availability-new`). Since
  some of the flags are clang-specific (and stem from the use of the
  CLang stdenv) and don't work on gcc, the stdenv of `pkgs.postgresql`
  is passed to the plugins. I.e., plugins for non-JIT variants are built
  with a gcc stdenv on Linux and plugins for JIT variants with a clang
  stdenv.

  Since `plv8` hard-codes `gcc` as `$CC` in its Makefile[4], I marked it
  as broken for JIT-variants of postgresql only.

* Added a test-matrix to confirm that JIT works fine on each
  `pkgs.postgresql_*_jit` (thanks Andi for the original test in
  #124804!).

* For each postgresql version, a new attribute
  `postgresql_<version>_jit` (and a corresponding
  `postgresqlPackages<version>JitPackages`) are now exposed for better
  discoverability and prebuilt artifacts in the binary cache.

* In #150801 the `this`-argument was replaced by an internal recursion.
  I decided against this approach because it'd blow up the diff even
  more which makes the readability way harder and also harder to revert
  this if necessary.

  Instead, it is made sure that `this` always points to the correct
  variant of `postgresql` and re-using that in an additional
  `.override {}`-expression is trivial because the JIT-variant is
  exposed in `all-packages.nix`.

* I think the changes are sufficiently big to actually add myself as
  maintainer here.

* Added `libxcrypt` to `buildInputs` for versions <v13. While
  building things with an LLVM stdenv, these versions complained that
  the extern `crypt()` symbol can't be found. Not sure what this is
  exactly about, but since we want to switch to libxcrypt for `crypt()`
  usage anyways[5] I decided to add it. For >=13 it's not relevant
  anymore anyways[6].

* JIT support doesn't work with cross-compilation. It is attempted to
  build LLVM-bytecode (`%.bc` is the corresponding `make(1)`-rule) for
  each sub-directory in `backend/` for the JIT apparently, but with a
  $(CLANG) that can produce binaries for the build, not the host-platform.

  I managed to get a cross-build with JIT support working with
  `depsBuildBuild = [ llvmPackages.clang ] ++ buildInputs`, but
  considering that the resulting LLVM IR isn't platform-independent this
  doesn't give you much. In fact, I tried to test the result in a VM-test,
  but as soon as JIT was used to optimize a query, postgres would
  coredump with `Illegal instruction`.

A common concern of the original approach - with llvm as build input -
was the massive increase of closure size. With the new approach of using
the LLVM stdenv directly and patching out references to the clang drv in
`$out` the effective closure size changes are:

    $ nix path-info -Sh $(nix-build -A postgresql_14)
    /nix/store/kssxxqycwa3c7kmwmykwxqvspxxa6r1w-postgresql-14.7	306.4M
    $ nix path-info -Sh $(nix-build -A postgresql_14_jit)
    /nix/store/xc7qmgqrn4h5yr4vmdwy56gs4bmja9ym-postgresql-14.7	689.2M

Most of the increase in closure-size stems from the `lib`-output of
LLVM

    $ nix path-info -Sh /nix/store/5r97sbs5j6mw7qnbg8nhnq1gad9973ap-llvm-11.1.0-lib
    /nix/store/5r97sbs5j6mw7qnbg8nhnq1gad9973ap-llvm-11.1.0-lib	349.8M

which is why this shouldn't be enabled by default.

While this is quite much because of LLVM, it's still a massive
improvement over the simple approach of adding llvm/clang as
build-inputs and building with `--with-llvm`:

    $ nix path-info -Sh $(nix-build -E '
	with import ./. {};
	postgresql.overrideAttrs ({ configureFlags ? [], buildInputs ? [], ... }: {
	  configureFlags = configureFlags ++ [ "--with-llvm" ];
	  buildInputs = buildInputs ++ [ llvm clang ];
	})' -j0)
    /nix/store/i3bd2r21c6c3428xb4gavjnplfqxn27p-postgresql-14.7	  1.6G

Co-authored-by: Andreas Rammhold <andreas@rammhold.de>
Co-authored-by: Janne Heß <janne@hess.ooo>
Co-authored-by: Nikolay Amiantov <ab@fmap.me>

[1] https://www.postgresql.org/docs/current/jit-reason.html
[2] https://github.com/NixOS/nixpkgs/pull/124804#issuecomment-864616931
    & https://github.com/NixOS/nixpkgs/pull/150801#issuecomment-1467868321
[3] This fails with the following error otherwise:
    ```
    configure: error: clang not found, but required when compiling --with-llvm, specify with CLANG=
    ```
[4] https://github.com/plv8/plv8/blob/v3.1.5/Makefile#L14
[5] https://github.com/NixOS/nixpkgs/pull/181764
[6] c45643d618
2023-03-29 08:39:46 +02:00
Nick Cao 851cd65a21
Merge pull request #220776 from Vonfry/deprecated/fcitx4
fcitx: remove version 4
2023-03-25 10:23:06 +08:00
06kellyjac 818e73fc43 nixos/authelia: init tests 2023-03-24 21:23:41 -03:00
Martin Weinelt e56ea3c325
Merge pull request #222701 from jopejoe1/firefox
firefox-{beta,devedition}-unwrapped: init at 112.0b6
2023-03-24 21:34:31 +01:00
jopejoe1 8a5a08373f firefox-beta-unwrapped: init at 112.0b6 2023-03-24 14:18:26 +01:00
jopejoe1 80168addbe firefox-devedition-unwrapped: init at 112.0b6 2023-03-24 14:16:22 +01:00
Will Fancher 5a9b9e620d
Merge pull request #176828 from therishidesai/luks-multi-key-files
nixos/luksroot: add tryEmptyPassphrase option
2023-03-24 03:02:20 -04:00
Nick Cao 72a8c49415
Merge pull request #222311 from NickCao/qt6-vf
qt6.qtbase: add patch to fix handling of variable fonts
2023-03-23 13:33:22 +08:00
Rishi Desai cccc3f8a8e nixos/luksroot: add tryEmptyPassphrase option 2023-03-22 09:17:23 -05:00
woojiq 296e7f92cd keyd: add keyd service and test
The keyd package already exists, but without a systemd service.

Keyd requires write access to /var/run to create its socket. Currently
the directory it uses can be changed with an environment variable, but
the keyd repo state suggests that this may turn into a compile-time
option. with that set, and some supplementary groups added, we can run
the service under DynamicUser.

Co-authored-by: pennae <82953136+pennae@users.noreply.github.com>
2023-03-22 15:12:29 +01:00
oxalica f4385d6010
nixosTests.noto-fonts-cjk-qt-default-weight: init 2023-03-22 16:26:30 +08:00
Francesco Gazzetta 0995aea49b
Merge pull request #202995 from tomfitzhenry/sgtpuzzles-test
nixos/tests/sgtpuzzles: init
2023-03-19 14:11:29 +00:00
Atemu bd7309c5a3
Merge pull request #221469 from wegank/solr-drop
solr: drop
2023-03-18 10:17:43 +01:00
Aidan Gauland 7fb4aae81f
nixos/peroxide: add module for peroxide service 2023-03-18 07:43:59 +13:00
Weijia Wang c24a8ccc98 solr: drop 2023-03-16 16:17:04 +02:00
Vonfry f95c20d77d
nixos/fcitx5: init tests 2023-03-13 18:50:05 +08:00
Vonfry 051b74fe7d
nixos/fcitx: deprecated, and suggestions to use fcitx5 instead 2023-03-13 18:47:05 +08:00
Vladimír Čunát 2d51a0e8ad
Merge branch 'master' into staging-next 2023-03-13 08:25:10 +01:00
Elis Hirwing ce76a6838c
Merge pull request #203487 from jocelynthode/init-readarr
readarr: init at 0.1.4.1596
2023-03-13 06:56:35 +01:00
Lassulus 47233b27c9
Merge pull request #167319 from schnusch/cgit 2023-03-13 09:51:08 +07:00
Martin Weinelt d03d74aa67
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
- pkgs/development/python-modules/aiopulse/default.nix
- pkgs/development/python-modules/identify/default.nix
- pkgs/development/python-modules/spur/default.nix
2023-03-12 23:28:23 +01:00
Jocelyn Thode e7f54823b1
readarr: init at 0.1.4.1596 2023-03-12 20:54:23 +01:00
Guillaume Girol db901673ea
Merge pull request #209156 from pwaller/issue-114594
nixos/grub: Name initrd-secrets by system, not by initrd
2023-03-12 18:50:33 +00:00
github-actions[bot] feb117e32c
Merge master into staging-next 2023-03-11 18:01:19 +00:00
Jonas Heinrich 161a1ca129
Merge pull request #191974 from tu-maurice/btrbk-doas
btrbk: Use sudo or doas based on configuration
2023-03-11 16:10:50 +01:00
github-actions[bot] 140a35879a
Merge master into staging-next 2023-03-11 12:01:11 +00:00
Mario Rodas dae678ad8f
Merge pull request #186276 from typetetris/feature/add-timescaledb-toolkit
timescaledb_toolkit: init at 1.14.0
2023-03-11 06:50:54 -05:00
Martin Weinelt ef91384e6f Merge remote-tracking branch 'origin/master' into staging-next 2023-03-10 13:09:25 +01:00
Stanisław Pitucha 5496585eb8
Merge pull request #186076 from viraptor/gemstash-service
nixos/gemstash: init module
2023-03-10 14:21:53 +11:00
github-actions[bot] 39f6788067
Merge master into staging-next 2023-03-09 12:01:27 +00:00
Domen Kožar 6a231a6eb7
Merge pull request #197613 from shyim/add-coder
coder: fix web frontend building
2023-03-09 12:04:16 +04:00
Stanisław Pitucha 70073985ae nixos/gemstash: init module 2023-03-07 15:56:56 +11:00
Martin Weinelt 86eedea2fe Merge remote-tracking branch 'origin/master' into staging-next 2023-03-06 17:38:35 +00:00
Ilan Joselevich edff57cff4
Merge pull request #218455 from veehaitch/gh-runner-builddotnet
github-runner: switch to `buildDotnetModule`
2023-03-06 19:11:06 +02:00
Frederik Rietdijk 8cf8d77121 Merge master into staging-next 2023-03-04 09:38:25 +01:00
K900 84f3520c8f nixos/tests/nat: remove conntrack helpers test
Removed upstream
2023-03-04 10:53:48 +03:00
Tom Fitzhenry f86e1e9a79 nixos/tests/sgtpuzzles: init 2023-03-04 00:52:21 +11:00
Vincent Haupert e8df83d417 nixos/tests/github-runner: init 2023-02-26 15:39:19 +01:00
Jan Tojnar 9bb986284f Merge branch 'staging-next' into staging
# Conflicts:
#	pkgs/development/python-modules/mdp/default.nix
#	pkgs/top-level/python-aliases.nix
2023-02-26 01:13:37 +01:00
IndeedNotJames 1b304e1dbc
forgejo: use existing nixos/tests/gitea as test
forgejo is a soft-fork of gitea and gitea's existing tests work great
with forgejo.
At least for now, as this could change, though somewhat unlikely.
2023-02-24 02:59:30 +01:00
IndeedNotJames 7d05a6a910
nixos/tests/gitea: make gitea package configurable
This allows the same tests to be used for forgejo, a soft-fork of
gitea, which currently does not have any tests.
2023-02-24 02:59:30 +01:00
github-actions[bot] fc3641aa1e
Merge staging-next into staging 2023-02-21 00:03:04 +00:00
Will Fancher bb7cd63150
Merge pull request #215381 from lilyinstarlight/fix/make-initrd-ng-wrapped-executables
make-initrd-ng: support wrapped executables
2023-02-20 14:11:48 -05:00
Florian Klink d7c89bf807
Merge pull request #217254 from hesiod/nixos-test-systemd-credentials-master
nixos/tests/systemd-credentials-tpm2: Add tests for systemd credentials
2023-02-20 20:04:26 +01:00
Tobias Markus e83babd493 nixos/tests/systemd-credentials-tpm2: Add tests for systemd credentials
Add a test that checks whether systemd can access the TPM in order
access credentials requested via Load/SetCredentialEncrypted.
2023-02-20 13:54:49 +01:00
github-actions[bot] 0a547ad8b7
Merge staging-next into staging 2023-02-20 12:02:08 +00:00