Commit graph

424561 commits

Author SHA1 Message Date
AndersonTorres c5385d8717 universal-ctags: 5.9.20220814.0 -> 5.9.20221106.0 2022-11-06 13:40:52 -03:00
Fabian Affolter c06b9d95e6
Merge pull request #199712 from fabaff/sensor-state-data-bump
python310Packages.sensor-state-data: 2.10.1 -> 2.11.0
2022-11-06 17:40:49 +01:00
Fabian Affolter d2552d4b8f python310Packages.plugwise: 0.25.7 -> 0.26.0 2022-11-06 17:39:37 +01:00
R. Ryantm f3b9ad927b python310Packages.spidev: 3.5 -> 3.6 2022-11-06 16:30:58 +00:00
Sandro 8f9d1901d0
Merge pull request #198980 from SuperSandro2000/python310Packages.google-auth 2022-11-06 17:12:59 +01:00
Sandro 94ebb13203
Merge pull request #198977 from SuperSandro2000/python310Packages.google-resumable-media 2022-11-06 17:12:40 +01:00
Sandro 4c9e0e204f
Merge pull request #198978 from SuperSandro2000/python310Packages.google-crc32c 2022-11-06 17:12:19 +01:00
Alex Martens 8fa4d00505 svd2rust: 0.27.1 -> 0.27.2 2022-11-06 08:09:43 -08:00
Sebastian Sellmeier 3cbd455a2d android-tools: 31.0.3p1 -> 33.0.3 2022-11-06 10:56:30 -05:00
Vincent Laporte 76796543e4 ocamlPackages.eqaf: 0.8 → 0.9 2022-11-06 16:54:38 +01:00
Martin Weinelt 0cd89bba2b
python3Packages.dask-glm: disable failing tests
Some times require the `loop_in_thread` fixture that for some reason
isn't available anymore. There are indiciations that it can be imported
from another location after distributed>=2022.8.0, but the dask-glm
upstream is not very active anymore.
2022-11-06 16:38:40 +01:00
Yarny0 bafefd7ae2 samsung-unified-linux-driver (cups driver): patch all filters
ppd files in the `samsung-unified-linux-driver`
package invoke these filter commands:

* pstosecps
* pstospl
* rastertospl
* pstosplc

The paths to all of those commands excluding the last one got
patched with their absolute paths during the build process.
This commit adds the last one to
the list of commands to be patched.
2022-11-06 16:19:23 +01:00
Yarny0 bfe3271fc0 samsung-unified-linux-driver (cups driver): use patchPpdFilesHook
The `sed` script in the `installPhase` is removed.
Instead, the setup hook `patchPpdFilesHook` is
used to patch the path to the filter executables.

The result should essentially be the same.
Comparing the generated ppd files showed no difference,
short of the package's hash in the absolute paths and
added newline characters at the end of some ppd files.
Missing newline characters at the end of the last line are
apparently added by `awk`; this shouldn't affect functionality.
The new package also contains a `propagated-build-inputs`
file which propagates the package itself.
This ensures the package is available whenever
a ppd file is singled out by another package.
2022-11-06 16:19:23 +01:00
Yarny0 bf30b53817 cups-kyocera (cups driver): use patchPpdFilesHook
The `sed` script in the `installPhase` is removed.
Instead, the setup hook `patchPpdFilesHook`
is used to patch the path to `rastertokpsl`.

The result should essentially be the same.
Comparing the generated ppd files showed no difference
(short of the package's hash in the absolute paths).
The new package also contains a `propagated-build-inputs`
file which propagates the package itself.
This ensures the package is available whenever
a ppd file is singled out by another package.
2022-11-06 16:19:22 +01:00
Yarny0 ef8566f38b cups-drv-rastertosag-gdi (cups driver): patch ppd bin paths
The `cups-drv-rastertosag-gdi` CUPS printer driver
package provides a filter executable `rastertosag-gdi`
and two ppd files that reference the filter file.
The commit at hand uses `patchPpdFilesHook` to
replace calls to the filter executable with
absolute paths to increase package purity.
2022-11-06 16:19:22 +01:00
Yarny0 335a9083b0 patchPpdFilesHook: new setup hook for absolute executable paths
PostScript Printer Description (ppd) files
describe printer features and capabilities.
They are usually evaluated by CUPS to convert
print jobs into a format suitable for a printer.
The conversion is often accomplished by commands
or even short shell scripts inside the ppd files.

ppd files are included in many printer driver packages.
Their scripts sometimes refer to other executables;
some of them are more common (like `perl`),
others are more exotic (like `rastertohp`).
If an executable is called with its name alone,
the effects of the ppd file depend on whether
the executable is in the PATH of CUPS,
and on the executable's version.
If an executable is called with an absolut path
(like `/usr/bin/perl`), it won't work at all in NixOS.

The commit at hand adds a setup hook that uses
the `fixupPhase` to substitute certain executable's
invocations in pdd files with absolute paths.
To use it, add the hook to `nativeBuildInputs` and
provide a list of executable names in `ppdFileCommands`.
Each executable must be available in the
package that is being built, or in `buildInputs`.
The setup hook's script then looks for ppd files in
`share/cups/model` and `share/ppds` in each output,
and replaces executable names with their absolute paths.
If ppd files need to be patched in unorthodox locations or
the setup hook needs to be invoked manually for other reasons,
one may leave the list `ppdFileCommands` empty to
avoid automatic processing of ppd files, then call
the shell function `patchPpdFileCommands` directly.
Details are described in the file `patch-ppd-hook.sh`.

Notes on the motivation for this setup hook:

Most packages in nixpkgs that provide
ppd files do not patch those ppd files at all.
This is not fatal when the executables are just called
with their names since the user can add packages
with the executables to `services.printing.drivers`.
E.g. if the user adds `pkgs.perl`, then all ppd
files that invoke `perl` will work as expected.
Nevertheless, to make these ppd files independent of
their execution environment, command invocations should
be substituted with absolut paths into the nix store.
This is similar to patching shebang lines so scripts can be
called independently of having the interpreter in the PATH.

The hook script in this commit is meant to support new packages
`foomatic-db*` which will generate several thousands of
ppd files referencing a plethora of different executables.
During development of these packages, I realized that
it's quite hard to patch ppd files in a robust way.
While binary names like `rastertokpsl` seem to be sufficiently
unique to be patched with `sed`, names like `date` or `gs`
are hard to patch without producing "false positives",
i.e., coincidental occurences of the executable's name that do
*not* refer to the executable and should not be patched at all.
As this problem also affects other packages,
it seems reasonable to put a robust implementation
in its own setup hook so that other
packages can use it without much effort.

Notes on the implementation:

The ppd file format is far from trivial.
The basic structure are key-value pairs;
keys may occur multiple times.
Only a small subset of keys may contain
executable names or shell scripts in their values.
Some values may span multiple lines;
a linebreak might even occur in the middle of a token.
Some executable names also occur in other keys by accident
where they must not be substituted (e.g. `gs` or `date`).

It is necessary to provide the list of command
names that will be patched for two reasons:
ppd files often contain "tokens" that might look
like commands (e.g. "file" or "host") but aren't;
these would erroneously get patched.
Also, looking for everything that might be a command
would slow down the patching process considerably.

The implementation uses `awk` to detect
keys that might contain executable names;
only their values are treated for substitution.
This avoids most cases of "overzealous" substitutions.
Since values may span multiple lines,
`sed` alone (while faster than `awk`) cannot focus
its substitution capabilities on relevant keys.
An elaborate set of regular expressions further helps
to minimize the probability of "false positives".
Several tricks are employed to speed up `awk`.
Notably, relevant files are identified with
`grep` before `awk` is applied to those files only.
Note that the script probably cannot handle fancy command
names (like spaces or backslashes as part of the name).
Also, there are still edge cases that the script would
mistakenly skip, e.g. if a shell script contains a
line break in the middle of an executable's name;
although ppd files permit such constellations,
I have yet to see one.

ppd files may be gzipped.
The setup hook accepts gzipped ppd files:
It decompresses them, substitutes paths, then recompresses them.
However, Nix cannot detect substituted paths as
runtime dependencies in compressed ppd files.
To ensure substituted paths are propagated as
runtime dependencies, the script adds each substituted
path to the variable `propagatedBuildInputs`.
Since this might not be enough for multi-output packages,
those paths are also written directly to
`nix-support/propagated-build-inputs`.
See the comment in `patch-ppd-hook.sh` for details.

Finally, the setup hook comes with a small test that
probes some edge cases with an artificial ppd file.

References:

* https://www.cups.org/doc/spec-ppd.html
  * general ppd file specification
  * lists some keys that may contain
    executable names or shell scripts

* https://refspecs.linuxfoundation.org/LSB_4.0.0/LSB-Printing/LSB-Printing/ppdext.html
  * lists some keys that may contain
    executable names or shell scripts

* https://en.wikipedia.org/wiki/PostScript_Printer_Description#CUPS
  * lists the usual locations of ppd files
2022-11-06 16:19:22 +01:00
Yarny0 6f622e91c5 cups-drv-rastertosag-gdi (cups driver): gzip ppd files
ppd files are gzipped to save some space.
The `gzip` "-n" option prevents gzip from storing
a timestamp, thus facilitating reproducibility.
2022-11-06 16:19:22 +01:00
Yarny0 5222363936 cups-drv-rastertosag-gdi (cups driver): fix simple comment typo 2022-11-06 16:19:22 +01:00
Mario Rodas 7db2b740f8
Merge pull request #199840 from fabaff/zamg-bump
python310Packages.zamg: 0.1.1 -> 0.1.2
2022-11-06 09:56:47 -05:00
Mario Rodas 90c3550298
Merge pull request #199836 from r-ryantm/auto-update/s2n-tls
s2n-tls: 1.3.26 -> 1.3.27
2022-11-06 09:56:22 -05:00
Mario Rodas ea00abd6d5
Merge pull request #199152 from cpcloud/duckdb-build-cores
python3Packages.duckdb: build using `$NIX_BUILD_CORES`
2022-11-06 09:55:13 -05:00
Mario Rodas 4fb1df25be
Merge pull request #199793 from marsam/update-gurk
gurk-rs: 0.2.5 -> 0.3.0
2022-11-06 09:51:34 -05:00
Martin Weinelt 654375b618
python3Packages.distributed: 2022.9.1 -> 2022.10.2
https://github.com/dask/distributed/blob/2022.10.2/docs/source/changelog.rst
2022-11-06 15:40:57 +01:00
Martin Weinelt e28e2a76b7
python3Packages.threadpoolctl: disable failing tests
More tests are failing with mismatching thread count (64 != 80) on our
aarch64-linux builders.
2022-11-06 15:38:54 +01:00
Vincent Laporte 51e1e1ea47 ocamlPackages.base: 0.15.0 → 0.15.1 2022-11-06 15:38:05 +01:00
Bobby Rong fff7f37433
Merge pull request #199701 from devhell/bump-termusic
termusic: 0.7.3 -> 0.7.5
2022-11-06 22:37:05 +08:00
Martin Weinelt 462b6c2826
python3Packages.dask: 2022.9.1 -> 2022.10.2
https://github.com/dask/dask/blob/main/docs/source/changelog.rst#2022102
2022-11-06 15:28:22 +01:00
Devan Carpenter 4ad56caded cjdns: fix package and update
this was not building, though it wasn't marked as such. upstream now
requires Rust. python310 causes things to complain and fail, so we are
specifiying python39. nodejs, python and now rust to compile a mostly
C99 project. kids these days...
2022-11-06 08:25:58 -06:00
happysalada 6a36558f52 lighthouse: 3.1.2 -> 3.2.1 2022-11-06 09:03:20 -05:00
Martin Weinelt 18cc0e9df0
Merge pull request #199838 from fabaff/bluetooth-adapters-bump 2022-11-06 14:51:23 +01:00
Sandro Jäckel bc38a21a2e
python310Packages.stestr: 4.0.0 -> 4.0.1 2022-11-06 14:49:59 +01:00
Sandro 99d57d0056
Merge pull request #198975 from SuperSandro2000/python310Packages.hexbytes 2022-11-06 14:49:53 +01:00
Phillip Cloud 523030c5bc
python3Packages.duckdb: build using $NIX_BUILD_CORES 2022-11-06 08:39:13 -05:00
Weijia Wang f16bbb58e1 auto-multiple-choice: fix build on darwin 2022-11-06 14:01:33 +01:00
Sandro 2afef94930
Merge pull request #198987 from SuperSandro2000/python310Packages.cairocffi 2022-11-06 14:00:59 +01:00
devhell 98617d37ef termusic: 0.7.3 -> 0.7.5 2022-11-06 12:53:12 +00:00
Naïm Favier 0cc3d43a70
Merge pull request #191796 from hmenke/njs
nginxModules.njs: init at 0.7.8
2022-11-06 13:31:03 +01:00
Francesco Gazzetta 26d71e9385
Merge pull request #198011 from fgaz/hivelytracker/2022-08-20
hivelytracker: unstable-2020-08-19 -> 1.9
2022-11-06 12:28:21 +00:00
Fabian Affolter 5e8c2439cd python310Packages.plugwise: 0.25.6 -> 0.25.7 2022-11-06 13:25:01 +01:00
Sandro d54708eca2
Merge pull request #198986 from SuperSandro2000/python310Packages.djangorestframework 2022-11-06 13:17:06 +01:00
Francesco Gazzetta fc20c52aea
Merge pull request #199487 from fgaz/warzone2100/4.3.1
warzone2100: 4.2.7 -> 4.3.1
2022-11-06 12:15:32 +00:00
Fabian Affolter defa07d9de
Merge pull request #199690 from r-ryantm/auto-update/dnsmonster
dnsmonster: 0.9.5 -> 0.9.6
2022-11-06 13:14:35 +01:00
Fabian Affolter b3df5fbee5 python310Packages.cometblue-lite: 0.5.2 -> 0.5.3 2022-11-06 13:05:53 +01:00
Fabian Affolter 392d155d79 python310Packages.peaqevcore: 7.3.1 -> 7.3.2 2022-11-06 13:00:12 +01:00
Sandro f804318543
Merge pull request #198983 from SuperSandro2000/python310Packages.drf-spectacular-sidecar 2022-11-06 12:58:28 +01:00
Fabian Affolter 0c1324d049 python310Packages.pyoverkiz: 1.5.6 -> 1.6.0 2022-11-06 12:58:22 +01:00
Sandro b542ba925c
Merge pull request #196783 from r-ryantm/auto-update/python310Packages.django-oauth-toolkit 2022-11-06 12:53:49 +01:00
Maximilian Bosch 91d7b27cfb
Merge pull request #189756 from alyssais/mailman-virtualRoot
nixos/mailman: add serve.virtualRoot option
2022-11-06 12:42:48 +01:00
Franz Pletz c190f823d5
Merge pull request #199598 from avdv/mold-on-aarch64-linux
mold: Unbreak on aarch64-linux
2022-11-06 12:31:40 +01:00
Franz Pletz a95e6a731b
Merge pull request #199661 from fabaff/python-lsp-server-bump 2022-11-06 12:30:57 +01:00