From 3284f4fa19597828c778b1cc0b79cc1f6d06fef9 Mon Sep 17 00:00:00 2001 From: Janne Heß Date: Thu, 21 Apr 2022 19:54:50 +0200 Subject: nixos/systemd-oomd: Add a new module + test --- .../from_md/release-notes/rl-2211.section.xml | 15 ++++++ nixos/doc/manual/release-notes/rl-2211.section.md | 9 ++++ nixos/modules/module-list.nix | 1 + nixos/modules/system/boot/systemd/oomd.nix | 57 ++++++++++++++++++++++ nixos/tests/all-tests.nix | 1 + nixos/tests/systemd-oomd.nix | 37 ++++++++++++++ 6 files changed, 120 insertions(+) create mode 100644 nixos/modules/system/boot/systemd/oomd.nix create mode 100644 nixos/tests/systemd-oomd.nix diff --git a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml index cd2ad54db20..2d0129d3601 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2211.section.xml @@ -539,6 +539,21 @@ Add udev rules for the Teensy family of microcontrollers. + + + systemd-oomd is enabled by default. Depending on which systemd + units have ManagedOOMSwap=kill or + ManagedOOMMemoryPressure=kill, systemd-oomd + will SIGKILL all the processes under the appropriate + descendant cgroups when the configured limits are exceeded. + NixOS does currently not configure cgroups with oomd by + default, this can be enabled using + systemd.oomd.enableRootSlice, + systemd.oomd.enableSystemSlice, + and + systemd.oomd.enableUserServices. + + The pass-secret-service package now diff --git a/nixos/doc/manual/release-notes/rl-2211.section.md b/nixos/doc/manual/release-notes/rl-2211.section.md index 119cd12492a..640a15cb242 100644 --- a/nixos/doc/manual/release-notes/rl-2211.section.md +++ b/nixos/doc/manual/release-notes/rl-2211.section.md @@ -182,6 +182,15 @@ Use `configure.packages` instead. - Add udev rules for the Teensy family of microcontrollers. +- systemd-oomd is enabled by default. Depending on which systemd units have + `ManagedOOMSwap=kill` or `ManagedOOMMemoryPressure=kill`, systemd-oomd will + SIGKILL all the processes under the appropriate descendant cgroups when the + configured limits are exceeded. NixOS does currently not configure cgroups + with oomd by default, this can be enabled using + [systemd.oomd.enableRootSlice](options.html#opt-systemd.oomd.enableRootSlice), + [systemd.oomd.enableSystemSlice](options.html#opt-systemd.oomd.enableSystemSlice), + and [systemd.oomd.enableUserServices](options.html#opt-systemd.oomd.enableUserServices). + - The `pass-secret-service` package now includes systemd units from upstream, so adding it to the NixOS `services.dbus.packages` option will make it start automatically as a systemd user service when an application tries to talk to the libsecret D-Bus API. - There is a new module for AMD SEV CPU functionality, which grants access to the hardware. diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index cb3599589cf..f7ceddeb903 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -1229,6 +1229,7 @@ ./system/boot/systemd/journald.nix ./system/boot/systemd/logind.nix ./system/boot/systemd/nspawn.nix + ./system/boot/systemd/oomd.nix ./system/boot/systemd/shutdown.nix ./system/boot/systemd/tmpfiles.nix ./system/boot/systemd/user.nix diff --git a/nixos/modules/system/boot/systemd/oomd.nix b/nixos/modules/system/boot/systemd/oomd.nix new file mode 100644 index 00000000000..a2afc4d7ce2 --- /dev/null +++ b/nixos/modules/system/boot/systemd/oomd.nix @@ -0,0 +1,57 @@ +{ config, lib, ... }: let + + cfg = config.systemd.oomd; + +in { + options.systemd.oomd = { + enable = lib.mkEnableOption "the systemd-oomd OOM killer" // { default = true; }; + + # Fedora enables the first and third option by default. See the 10-oomd-* files here: + # https://src.fedoraproject.org/rpms/systemd/tree/acb90c49c42276b06375a66c73673ac351025597 + enableRootSlice = lib.mkEnableOption "oomd on the root slice (-.slice)"; + enableSystemSlice = lib.mkEnableOption "oomd on the system slice (system.slice)"; + enableUserServices = lib.mkEnableOption "oomd on all user services (user@.service)"; + + extraConfig = lib.mkOption { + type = with lib.types; attrsOf (oneOf [ str int bool ]); + default = {}; + example = lib.literalExpression ''{ DefaultMemoryPressureDurationSec = "20s"; }''; + description = '' + Extra config options for systemd-oomd. See man oomd.conf + for available options. + ''; + }; + }; + + config = lib.mkIf cfg.enable { + systemd.additionalUpstreamSystemUnits = [ + "systemd-oomd.service" + "systemd-oomd.socket" + ]; + systemd.services.systemd-oomd.wantedBy = [ "multi-user.target" ]; + + environment.etc."systemd/oomd.conf".text = lib.generators.toINI {} { + OOM = cfg.extraConfig; + }; + + systemd.oomd.extraConfig.DefaultMemoryPressureDurationSec = lib.mkDefault "20s"; # Fedora default + + users.users.systemd-oom = { + description = "systemd-oomd service user"; + group = "systemd-oom"; + isSystemUser = true; + }; + users.groups.systemd-oom = { }; + + systemd.slices."-".sliceConfig = lib.mkIf cfg.enableRootSlice { + ManagedOOMSwap = "kill"; + }; + systemd.slices."system".sliceConfig = lib.mkIf cfg.enableSystemSlice { + ManagedOOMSwap = "kill"; + }; + systemd.services."user@".serviceConfig = lib.mkIf cfg.enableUserServices { + ManagedOOMMemoryPressure = "kill"; + ManagedOOMMemoryPressureLimit = "50%"; + }; + }; +} diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 1cf310cb332..0acce5ef799 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -561,6 +561,7 @@ in { systemd-networkd-ipv6-prefix-delegation = handleTest ./systemd-networkd-ipv6-prefix-delegation.nix {}; systemd-networkd-vrf = handleTest ./systemd-networkd-vrf.nix {}; systemd-nspawn = handleTest ./systemd-nspawn.nix {}; + systemd-oomd = handleTest ./systemd-oomd.nix {}; systemd-shutdown = handleTest ./systemd-shutdown.nix {}; systemd-timesyncd = handleTest ./systemd-timesyncd.nix {}; systemd-misc = handleTest ./systemd-misc.nix {}; diff --git a/nixos/tests/systemd-oomd.nix b/nixos/tests/systemd-oomd.nix new file mode 100644 index 00000000000..f0b5a5f8e01 --- /dev/null +++ b/nixos/tests/systemd-oomd.nix @@ -0,0 +1,37 @@ +import ./make-test-python.nix ({ pkgs, ... }: + +{ + name = "systemd-oomd"; + + nodes.machine = { pkgs, ... }: { + systemd.oomd.extraConfig.DefaultMemoryPressureDurationSec = "1s"; # makes the test faster + # Kill cgroups when more than 1% pressure is encountered + systemd.slices."-".sliceConfig = { + ManagedOOMMemoryPressure = "kill"; + ManagedOOMMemoryPressureLimit = "1%"; + }; + # A service to bring the system under memory pressure + systemd.services.testservice = { + serviceConfig.ExecStart = "${pkgs.coreutils}/bin/tail /dev/zero"; + }; + # Do not kill the backdoor + systemd.services.backdoor.serviceConfig.ManagedOOMMemoryPressure = "auto"; + + virtualisation.memorySize = 1024; + }; + + testScript = '' + # Start the system + machine.wait_for_unit("multi-user.target") + machine.succeed("oomctl") + + # Bring the system into memory pressure + machine.succeed("echo 0 > /proc/sys/vm/panic_on_oom") # NixOS tests kill the VM when the OOM killer is invoked - override this + machine.succeed("systemctl start testservice") + + # Wait for oomd to kill something + # Matches these lines: + # systemd-oomd[508]: Killed /system.slice/systemd-udevd.service due to memory pressure for / being 3.26% > 1.00% for > 1s with reclaim activity + machine.wait_until_succeeds("journalctl -b | grep -q 'due to memory pressure for'") + ''; +}) -- cgit 1.4.1 From fce8b018f06431e7684b725a520416ff3862db9f Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 25 Jun 2022 13:53:02 +0200 Subject: lib: Add lazyDerivation --- lib/default.nix | 2 ++ lib/derivations.nix | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++ lib/tests/misc.nix | 53 +++++++++++++++++++++++++++ 3 files changed, 156 insertions(+) create mode 100644 lib/derivations.nix diff --git a/lib/default.nix b/lib/default.nix index e2a93e63ac1..0c0e2d5e102 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -23,6 +23,7 @@ let # packaging customisation = callLibs ./customisation.nix; + derivations = callLibs ./derivations.nix; maintainers = import ../maintainers/maintainer-list.nix; teams = callLibs ../maintainers/team-list.nix; meta = callLibs ./meta.nix; @@ -108,6 +109,7 @@ let inherit (self.customisation) overrideDerivation makeOverridable callPackageWith callPackagesWith extendDerivation hydraJob makeScope makeScopeWithSplicing; + inherit (self.derivations) lazyDerivation; inherit (self.meta) addMetaAttrs dontDistribute setName updateName appendToName mapDerivationAttrset setPrio lowPrio lowPrioSet hiPrio hiPrioSet getLicenseFromSpdxId getExe; diff --git a/lib/derivations.nix b/lib/derivations.nix new file mode 100644 index 00000000000..9a88087f2e3 --- /dev/null +++ b/lib/derivations.nix @@ -0,0 +1,101 @@ +{ lib }: + +let + inherit (lib) throwIfNot; +in +{ + /* + Restrict a derivation to a predictable set of attribute names, so + that the returned attrset is not strict in the actual derivation, + saving a lot of computation when the derivation is non-trivial. + + This is useful in situations where a derivation might only be used for its + passthru attributes, improving evaluation performance. + + The returned attribute set is lazy in `derivation`. Specifically, this + means that the derivation will not be evaluated in at least the + situations below. + + For illustration and/or testing, we define derivation such that its + evaluation is very noticable. + + let derivation = throw "This won't be evaluated."; + + In the following expressions, `derivation` will _not_ be evaluated: + + (lazyDerivation { inherit derivation; }).type + + attrNames (lazyDerivation { inherit derivation; }) + + (lazyDerivation { inherit derivation; } // { foo = true; }).foo + + (lazyDerivation { inherit derivation; meta.foo = true; }).meta + + In these expressions, it `derivation` _will_ be evaluated: + + "${lazyDerivation { inherit derivation }}" + + (lazyDerivation { inherit derivation }).outPath + + (lazyDerivation { inherit derivation }).meta + + And the following expressions are not valid, because the refer to + implementation details and/or attributes that may not be present on + some derivations: + + (lazyDerivation { inherit derivation }).buildInputs + + (lazyDerivation { inherit derivation }).passthru + + (lazyDerivation { inherit derivation }).pythonPath + + */ + lazyDerivation = + args@{ + # The derivation to be wrapped. + derivation + , # Optional meta attribute. + # + # While this function is primarily about derivations, it can improve + # the `meta` package attribute, which is usually specified through + # `mkDerivation`. + meta ? null + , # Optional extra values to add to the returned attrset. + # + # This can be used for adding package attributes, such as `tests`. + passthru ? { } + }: + let + # These checks are strict in `drv` and some `drv` attributes, but the + # attrset spine returned by lazyDerivation does not depend on it. + # Instead, the individual derivation attributes do depend on it. + checked = + throwIfNot (derivation.type or null == "derivation") + "lazySimpleDerivation: input must be a derivation." + throwIfNot + (derivation.outputs == [ "out" ]) + # Supporting multiple outputs should be a matter of inheriting more attrs. + "The derivation ${derivation.name or ""} has multiple outputs. This is not supported by lazySimpleDerivation yet. Support could be added, and be useful as long as the set of outputs is known in advance, without evaluating the actual derivation." + derivation; + in + { + # Hardcoded `type` + # + # `lazyDerivation` requires its `derivation` argument to be a derivation, + # so if it is not, that is a programming error by the caller and not + # something that `lazyDerivation` consumers should be able to correct + # for after the fact. + # So, to improve laziness, we assume correctness here and check it only + # when actual derivation values are accessed later. + type = "derivation"; + + # A fixed set of derivation values, so that `lazyDerivation` can return + # its attrset before evaluating `derivation`. + # This must only list attributes that are available on _all_ derivations. + inherit (checked) outputs out outPath outputName drvPath name system; + + # The meta attribute can either be taken from the derivation, or if the + # `lazyDerivation` caller knew a shortcut, be taken from there. + meta = args.meta or checked.meta; + } // passthru; +} diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index 9b1397a7915..74020bc7c8e 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -1207,6 +1207,59 @@ runTests { expected = true; }; + # lazyDerivation + + testLazyDerivationIsLazyInDerivationForAttrNames = { + expr = attrNames (lazyDerivation { + derivation = throw "not lazy enough"; + }); + # It's ok to add attribute names here when lazyDerivation is improved + # in accordance with its inline comments. + expected = [ "drvPath" "meta" "name" "out" "outPath" "outputName" "outputs" "system" "type" ]; + }; + + testLazyDerivationIsLazyInDerivationForPassthruAttr = { + expr = (lazyDerivation { + derivation = throw "not lazy enough"; + passthru.tests = "whatever is in tests"; + }).tests; + expected = "whatever is in tests"; + }; + + testLazyDerivationIsLazyInDerivationForPassthruAttr2 = { + # passthru.tests is not a special case. It works for any attr. + expr = (lazyDerivation { + derivation = throw "not lazy enough"; + passthru.foo = "whatever is in foo"; + }).foo; + expected = "whatever is in foo"; + }; + + testLazyDerivationIsLazyInDerivationForMeta = { + expr = (lazyDerivation { + derivation = throw "not lazy enough"; + meta = "whatever is in meta"; + }).meta; + expected = "whatever is in meta"; + }; + + testLazyDerivationReturnsDerivationAttrs = let + derivation = { + type = "derivation"; + outputs = ["out"]; + out = "test out"; + outPath = "test outPath"; + outputName = "out"; + drvPath = "test drvPath"; + name = "test name"; + system = "test system"; + meta = "test meta"; + }; + in { + expr = lazyDerivation { inherit derivation; }; + expected = derivation; + }; + testTypeDescriptionInt = { expr = (with types; int).description; expected = "signed integer"; -- cgit 1.4.1 From 1ffa30b0559a05e810a3db663da5066953d4f05a Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 6 Jun 2022 16:05:21 +0200 Subject: lib/modules: Fix meta duplication in shorthand syntax --- lib/modules.nix | 3 ++- lib/tests/modules.sh | 3 +++ lib/tests/modules/shorthand-meta.nix | 19 +++++++++++++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 lib/tests/modules/shorthand-meta.nix diff --git a/lib/modules.nix b/lib/modules.nix index d3a7fac82c4..28c8da9e923 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -440,13 +440,14 @@ rec { config = addFreeformType (addMeta (m.config or {})); } else + # shorthand syntax lib.throwIfNot (isAttrs m) "module ${file} (${key}) does not look like a module." { _file = toString m._file or file; key = toString m.key or key; disabledModules = m.disabledModules or []; imports = m.require or [] ++ m.imports or []; options = {}; - config = addFreeformType (addMeta (removeAttrs m ["_file" "key" "disabledModules" "require" "imports" "freeformType"])); + config = addFreeformType (removeAttrs m ["_file" "key" "disabledModules" "require" "imports" "freeformType"]); }; applyModuleArgsIfFunction = key: f: args@{ config, options, lib, ... }: if isFunction f then diff --git a/lib/tests/modules.sh b/lib/tests/modules.sh index 2ef7c480659..57d3b5a76ce 100755 --- a/lib/tests/modules.sh +++ b/lib/tests/modules.sh @@ -58,6 +58,9 @@ checkConfigError() { fi } +# Shorthand meta attribute does not duplicate the config +checkConfigOutput '^"one two"$' config.result ./shorthand-meta.nix + # Check boolean option. checkConfigOutput '^false$' config.enable ./declare-enable.nix checkConfigError 'The option .* does not exist. Definition values:\n\s*- In .*: true' config.enable ./define-enable.nix diff --git a/lib/tests/modules/shorthand-meta.nix b/lib/tests/modules/shorthand-meta.nix new file mode 100644 index 00000000000..8c9619e18a2 --- /dev/null +++ b/lib/tests/modules/shorthand-meta.nix @@ -0,0 +1,19 @@ +{ lib, ... }: +let + inherit (lib) types mkOption; +in +{ + imports = [ + ({ config, ... }: { + options = { + meta.foo = mkOption { + type = types.listOf types.str; + }; + result = mkOption { default = lib.concatStringsSep " " config.meta.foo; }; + }; + }) + { + meta.foo = [ "one" "two" ]; + } + ]; +} -- cgit 1.4.1 From b3de22483cfd40e52dbe6fe7317b0f4901bd957d Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 6 Jun 2022 13:29:04 +0200 Subject: nixos/testing-python.nix: Add evalTest This is a decomposition of the testing-python.nix and build-vms.nix files into modules. By refactoring the glue, we accomplish the following: - NixOS tests can now use `imports` and other module system features. - Network-wide test setup can now be reusable; example: - A setup with all VMs configured to use a DNS server - Split long, slow tests into multiple tests that import a common module that has most of the setup. - Type checking for the test arguments - (TBD) "generated" options reference docs - Aspects that had to be wired through all the glue are now in their own files. - Chief example: interactive.nix. - Also: network.nix In rewriting this, I've generally stuck as close as possible to the existing code; copying pieces of logic and rewiring them, without changing the logic itself. I've made two exceptions to this rule - Introduction of `extraDriverArgs` instead of hardcoded interactivity logic. - Incorporation of https://github.com/NixOS/nixpkgs/pull/144110 in testScript.nix. I might revert the latter and split it into a new commit. --- nixos/lib/testing-python.nix | 20 +++++ nixos/lib/testing/call-test.nix | 16 ++++ nixos/lib/testing/driver.nix | 177 ++++++++++++++++++++++++++++++++++++++ nixos/lib/testing/interactive.nix | 18 ++++ nixos/lib/testing/legacy.nix | 25 ++++++ nixos/lib/testing/meta.nix | 12 +++ nixos/lib/testing/name.nix | 7 ++ nixos/lib/testing/network.nix | 75 ++++++++++++++++ nixos/lib/testing/nodes.nix | 91 ++++++++++++++++++++ nixos/lib/testing/run.nix | 51 +++++++++++ nixos/lib/testing/testScript.nix | 78 +++++++++++++++++ 11 files changed, 570 insertions(+) create mode 100644 nixos/lib/testing/call-test.nix create mode 100644 nixos/lib/testing/driver.nix create mode 100644 nixos/lib/testing/interactive.nix create mode 100644 nixos/lib/testing/legacy.nix create mode 100644 nixos/lib/testing/meta.nix create mode 100644 nixos/lib/testing/name.nix create mode 100644 nixos/lib/testing/network.nix create mode 100644 nixos/lib/testing/nodes.nix create mode 100644 nixos/lib/testing/run.nix create mode 100644 nixos/lib/testing/testScript.nix diff --git a/nixos/lib/testing-python.nix b/nixos/lib/testing-python.nix index 4bb1689ffd7..ab509c098d2 100644 --- a/nixos/lib/testing-python.nix +++ b/nixos/lib/testing-python.nix @@ -166,6 +166,26 @@ rec { ${lib.optionalString (interactive) "--add-flags --interactive"} ''); + evalTest = module: lib.evalModules { modules = testModules ++ [ module ]; }; + runTest = module: (evalTest module).config.run; + + testModules = [ + ./testing/driver.nix + ./testing/interactive.nix + ./testing/legacy.nix + ./testing/meta.nix + ./testing/name.nix + ./testing/network.nix + ./testing/nodes.nix + ./testing/run.nix + ./testing/testScript.nix + { + config = { + hostPkgs = pkgs; + }; + } + ]; + # Make a full-blown test makeTest = { machine ? null diff --git a/nixos/lib/testing/call-test.nix b/nixos/lib/testing/call-test.nix new file mode 100644 index 00000000000..3e137e78cd4 --- /dev/null +++ b/nixos/lib/testing/call-test.nix @@ -0,0 +1,16 @@ +{ config, lib, ... }: +let + inherit (lib) mkOption types; +in +{ + options = { + callTest = mkOption { + internal = true; + type = types.functionTo types.raw; + }; + result = mkOption { + internal = true; + default = config; + }; + }; +} diff --git a/nixos/lib/testing/driver.nix b/nixos/lib/testing/driver.nix new file mode 100644 index 00000000000..9473d888cbb --- /dev/null +++ b/nixos/lib/testing/driver.nix @@ -0,0 +1,177 @@ +{ config, lib, hostPkgs, ... }: +let + inherit (lib) mkOption types; + + # Reifies and correctly wraps the python test driver for + # the respective qemu version and with or without ocr support + testDriver = hostPkgs.callPackage ../test-driver { + inherit (config) enableOCR extraPythonPackages; + qemu_pkg = config.qemu.package; + imagemagick_light = hostPkgs.imagemagick_light.override { inherit (hostPkgs) libtiff; }; + tesseract4 = hostPkgs.tesseract4.override { enableLanguages = [ "eng" ]; }; + }; + + + vlans = map (m: m.virtualisation.vlans) (lib.attrValues config.nodes); + vms = map (m: m.system.build.vm) (lib.attrValues config.nodes); + + nodeHostNames = + let + nodesList = map (c: c.system.name) (lib.attrValues config.nodes); + in + nodesList ++ lib.optional (lib.length nodesList == 1 && !lib.elem "machine" nodesList) "machine"; + + # TODO: This is an implementation error and needs fixing + # the testing famework cannot legitimately restrict hostnames further + # beyond RFC1035 + invalidNodeNames = lib.filter + (node: builtins.match "^[A-z_]([A-z0-9_]+)?$" node == null) + nodeHostNames; + + uniqueVlans = lib.unique (builtins.concatLists vlans); + vlanNames = map (i: "vlan${toString i}: VLan;") uniqueVlans; + machineNames = map (name: "${name}: Machine;") nodeHostNames; + + withChecks = + if lib.length invalidNodeNames > 0 then + throw '' + Cannot create machines out of (${lib.concatStringsSep ", " invalidNodeNames})! + All machines are referenced as python variables in the testing framework which will break the + script when special characters are used. + + This is an IMPLEMENTATION ERROR and needs to be fixed. Meanwhile, + please stick to alphanumeric chars and underscores as separation. + '' + else + lib.warnIf config.skipLint "Linting is disabled"; + + driver = + hostPkgs.runCommand "nixos-test-driver-${config.name}" + { + # inherit testName; TODO (roberth): need this? + nativeBuildInputs = [ + hostPkgs.makeWrapper + ] ++ lib.optionals (!config.skipTypeCheck) [ hostPkgs.mypy ]; + testScript = config.testScriptString; + preferLocalBuild = true; + passthru = config.passthru; + meta = config.meta // { + mainProgram = "nixos-test-driver"; + }; + } + '' + mkdir -p $out/bin + + vmStartScripts=($(for i in ${toString vms}; do echo $i/bin/run-*-vm; done)) + + ${lib.optionalString (!config.skipTypeCheck) '' + # prepend type hints so the test script can be type checked with mypy + cat "${../test-script-prepend.py}" >> testScriptWithTypes + echo "${builtins.toString machineNames}" >> testScriptWithTypes + echo "${builtins.toString vlanNames}" >> testScriptWithTypes + echo -n "$testScript" >> testScriptWithTypes + + cat -n testScriptWithTypes + + # set pythonpath so mypy knows where to find the imports. this requires the py.typed file. + export PYTHONPATH='${../test-driver}' + mypy --no-implicit-optional \ + --pretty \ + --no-color-output \ + testScriptWithTypes + unset PYTHONPATH + ''} + + echo -n "$testScript" >> $out/test-script + + ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-test-driver + + ${testDriver}/bin/generate-driver-symbols + ${lib.optionalString (!config.skipLint) '' + PYFLAKES_BUILTINS="$( + echo -n ${lib.escapeShellArg (lib.concatStringsSep "," nodeHostNames)}, + < ${lib.escapeShellArg "driver-symbols"} + )" ${hostPkgs.python3Packages.pyflakes}/bin/pyflakes $out/test-script + ''} + + # set defaults through environment + # see: ./test-driver/test-driver.py argparse implementation + wrapProgram $out/bin/nixos-test-driver \ + --set startScripts "''${vmStartScripts[*]}" \ + --set testScript "$out/test-script" \ + --set vlans '${toString vlans}' \ + ${lib.escapeShellArgs (lib.concatMap (arg: ["--add-flags" arg]) config.extraDriverArgs)} + ''; + +in +{ + options = { + + driver = mkOption { + description = "Script that runs the test."; + type = types.package; + defaultText = lib.literalDocBook "set by the test framework"; + }; + + hostPkgs = mkOption { + description = "Nixpkgs attrset used outside the nodes."; + type = types.raw; + example = lib.literalExpression '' + import nixpkgs { inherit system config overlays; } + ''; + }; + + qemu.package = mkOption { + description = "Which qemu package to use."; + type = types.package; + default = hostPkgs.qemu_test; + defaultText = "hostPkgs.qemu_test"; + }; + + enableOCR = mkOption { + description = '' + Whether to enable Optical Character Recognition functionality for + testing graphical programs. + ''; + type = types.bool; + default = false; + }; + + extraPythonPackages = mkOption { + description = '' + Python packages to add to the test driver. + + The argument is a Python package set, similar to `pkgs.pythonPackages`. + ''; + type = types.functionTo (types.listOf types.package); + default = ps: [ ]; + }; + + extraDriverArgs = mkOption { + description = '' + Extra arguments to pass to the test driver. + ''; + type = types.listOf types.str; + default = []; + }; + + skipLint = mkOption { + type = types.bool; + default = false; + }; + + skipTypeCheck = mkOption { + type = types.bool; + default = false; + }; + }; + + config = { + _module.args.hostPkgs = config.hostPkgs; + + driver = withChecks driver; + + # make available on the test runner + passthru.driver = config.driver; + }; +} diff --git a/nixos/lib/testing/interactive.nix b/nixos/lib/testing/interactive.nix new file mode 100644 index 00000000000..fd4d481a3f8 --- /dev/null +++ b/nixos/lib/testing/interactive.nix @@ -0,0 +1,18 @@ +{ config, lib, moduleType, hostPkgs, ... }: +let + inherit (lib) mkOption types; +in +{ + options = { + interactive = mkOption { + description = "All the same options, but configured for interactive use."; + type = moduleType; + }; + }; + + config = { + interactive.qemu.package = hostPkgs.qemu; + interactive.extraDriverArgs = [ "--interactive" ]; + passthru.driverInteractive = config.interactive.driver; + }; +} diff --git a/nixos/lib/testing/legacy.nix b/nixos/lib/testing/legacy.nix new file mode 100644 index 00000000000..868b8b65b17 --- /dev/null +++ b/nixos/lib/testing/legacy.nix @@ -0,0 +1,25 @@ +{ config, options, lib, ... }: +let + inherit (lib) mkIf mkOption types; +in +{ + # This needs options.warnings, which we don't have (yet?). + # imports = [ + # (lib.mkRenamedOptionModule [ "machine" ] [ "nodes" "machine" ]) + # ]; + + options = { + machine = mkOption { + internal = true; + type = types.raw; + }; + }; + + config = { + nodes = mkIf options.machine.isDefined ( + lib.warn + "In test `${config.name}': The `machine' attribute in NixOS tests (pkgs.nixosTest / make-test-python.nix / testing-python.nix / makeTest) is deprecated. Please set the equivalent `nodes.machine'." + { inherit (config) machine; } + ); + }; +} diff --git a/nixos/lib/testing/meta.nix b/nixos/lib/testing/meta.nix new file mode 100644 index 00000000000..1312d6a986e --- /dev/null +++ b/nixos/lib/testing/meta.nix @@ -0,0 +1,12 @@ +{ lib, ... }: +let + inherit (lib) types mkOption; +in +{ + options = { + meta.maintainers = lib.mkOption { + type = types.listOf types.raw; + default = []; + }; + }; +} diff --git a/nixos/lib/testing/name.nix b/nixos/lib/testing/name.nix new file mode 100644 index 00000000000..f9fa488511c --- /dev/null +++ b/nixos/lib/testing/name.nix @@ -0,0 +1,7 @@ +{ lib, ... }: +{ + options.name = lib.mkOption { + description = "The name of the test."; + type = lib.types.str; + }; +} diff --git a/nixos/lib/testing/network.nix b/nixos/lib/testing/network.nix new file mode 100644 index 00000000000..e0446846fb0 --- /dev/null +++ b/nixos/lib/testing/network.nix @@ -0,0 +1,75 @@ +{ lib, nodes, ... }: + +with lib; + + +let + machines = attrNames nodes; + + machinesNumbered = zipLists machines (range 1 254); + + nodes_ = forEach machinesNumbered (m: nameValuePair m.fst + [ + ({ config, nodes, pkgs, ... }: + let + interfacesNumbered = zipLists config.virtualisation.vlans (range 1 255); + interfaces = forEach interfacesNumbered ({ fst, snd }: + nameValuePair "eth${toString snd}" { + ipv4.addresses = + [{ + address = "192.168.${toString fst}.${toString m.snd}"; + prefixLength = 24; + }]; + }); + + networkConfig = + { + networking.hostName = mkDefault m.fst; + + networking.interfaces = listToAttrs interfaces; + + networking.primaryIPAddress = + optionalString (interfaces != [ ]) (head (head interfaces).value.ipv4.addresses).address; + + # Put the IP addresses of all VMs in this machine's + # /etc/hosts file. If a machine has multiple + # interfaces, use the IP address corresponding to + # the first interface (i.e. the first network in its + # virtualisation.vlans option). + networking.extraHosts = flip concatMapStrings machines + (m': + let config = (getAttr m' nodes).config; in + optionalString (config.networking.primaryIPAddress != "") + ("${config.networking.primaryIPAddress} " + + optionalString (config.networking.domain != null) + "${config.networking.hostName}.${config.networking.domain} " + + "${config.networking.hostName}\n")); + + virtualisation.qemu.options = + let qemu-common = import ../qemu-common.nix { inherit lib pkgs; }; + in + flip concatMap interfacesNumbered + ({ fst, snd }: qemu-common.qemuNICFlags snd fst m.snd); + }; + + in + { + key = "ip-address"; + config = networkConfig // { + # Expose the networkConfig items for tests like nixops + # that need to recreate the network config. + system.build.networkConfig = networkConfig; + }; + } + ) + ]); + + extraNodeConfigs = lib.listToAttrs nodes_; +in +{ + config = { + defaults = { config, name, ... }: { + imports = extraNodeConfigs.${name}; + }; + }; +} diff --git a/nixos/lib/testing/nodes.nix b/nixos/lib/testing/nodes.nix new file mode 100644 index 00000000000..98580d5dc4f --- /dev/null +++ b/nixos/lib/testing/nodes.nix @@ -0,0 +1,91 @@ +testModuleArgs@{ config, lib, hostPkgs, nodes, ... }: + +let + inherit (lib) mkOption mkForce optional types mapAttrs mkDefault; + + system = hostPkgs.stdenv.hostPlatform.system; + + baseOS = + import ../eval-config.nix { + inherit system; + inherit (config.node) specialArgs; + modules = [ config.defaults ]; + baseModules = (import ../../modules/module-list.nix) ++ + [ + ../../modules/virtualisation/qemu-vm.nix + ../../modules/testing/test-instrumentation.nix # !!! should only get added for automated test runs + { key = "no-manual"; documentation.nixos.enable = false; } + { + key = "no-revision"; + # Make the revision metadata constant, in order to avoid needless retesting. + # The human version (e.g. 21.05-pre) is left as is, because it is useful + # for external modules that test with e.g. testers.nixosTest and rely on that + # version number. + config.system.nixos.revision = mkForce "constant-nixos-revision"; + } + { key = "nodes"; _module.args.nodes = nodes; } + + ({ config, ... }: + { + virtualisation.qemu.package = testModuleArgs.config.qemu.package; + + # Ensure we do not use aliases. Ideally this is only set + # when the test framework is used by Nixpkgs NixOS tests. + nixpkgs.config.allowAliases = false; + }) + ] ++ optional config.minimal ../../modules/testing/minimal-kernel.nix; + }; + + +in + +{ + + options = { + node.type = mkOption { + type = types.raw; + default = baseOS.type; + internal = true; + }; + + nodes = mkOption { + type = types.lazyAttrsOf config.node.type; + }; + + defaults = mkOption { + description = '' + NixOS configuration that is applied to all {option}`nodes`. + ''; + type = types.deferredModule; + default = { }; + }; + + node.specialArgs = mkOption { + type = types.lazyAttrsOf types.raw; + default = { }; + }; + + minimal = mkOption { + type = types.bool; + default = false; + }; + + nodesCompat = mkOption { + internal = true; + }; + }; + + config = { + _module.args.nodes = config.nodesCompat; + nodesCompat = + mapAttrs + (name: config: config // { + config = lib.warn + "Module argument `nodes.${name}.config` is deprecated. Use `nodes.${name}` instead." + config; + }) + config.nodes; + + passthru.nodes = config.nodesCompat; + }; +} diff --git a/nixos/lib/testing/run.nix b/nixos/lib/testing/run.nix new file mode 100644 index 00000000000..65bcbe720bf --- /dev/null +++ b/nixos/lib/testing/run.nix @@ -0,0 +1,51 @@ +{ config, hostPkgs, lib, ... }: +let + inherit (lib) types mkOption; +in +{ + options = { + passthru = mkOption { + type = types.lazyAttrsOf types.raw; + description = '' + Attributes to add to the returned derivations, + which are not necessarily part of the build. + + This is a bit like doing `drv // { myAttr = true; }` (which would be lost by `overrideAttrs`). + It does not change the actual derivation, but adds the attribute nonetheless, so that + consumers of what would be `drv` have more information. + ''; + }; + + run = mkOption { + type = types.package; + description = '' + Derivation that runs the test. + ''; + }; + }; + + config = { + run = hostPkgs.stdenv.mkDerivation { + name = "vm-test-run-${config.name}"; + + requiredSystemFeatures = [ "kvm" "nixos-test" ]; + + buildCommand = + '' + mkdir -p $out + + # effectively mute the XMLLogger + export LOGFILE=/dev/null + + ${config.driver}/bin/nixos-test-driver -o $out + ''; + + passthru = config.passthru; + + meta = config.meta; + }; + + # useful for inspection (debugging / exploration) + passthru.config = config; + }; +} diff --git a/nixos/lib/testing/testScript.nix b/nixos/lib/testing/testScript.nix new file mode 100644 index 00000000000..08e87b626b3 --- /dev/null +++ b/nixos/lib/testing/testScript.nix @@ -0,0 +1,78 @@ +testModuleArgs@{ config, lib, hostPkgs, nodes, moduleType, ... }: +let + inherit (lib) mkOption types; + inherit (types) either str functionTo; +in +{ + options = { + testScript = mkOption { + type = either str (functionTo str); + }; + testScriptString = mkOption { + type = str; + readOnly = true; + internal = true; + }; + + includeTestScriptReferences = mkOption { + type = types.bool; + default = true; + internal = true; + }; + withoutTestScriptReferences = mkOption { + type = moduleType; + description = '' + A parallel universe where the testScript is invalid and has no references. + ''; + }; + }; + config = { + withoutTestScriptReferences.includeTestScriptReferences = false; + withoutTestScriptReferences.testScript = lib.mkForce "testscript omitted"; + + testScriptString = + if lib.isFunction config.testScript + then + config.testScript + { + nodes = + lib.mapAttrs + (k: v: + if v.virtualisation.useNixStoreImage + then + # prevent infinite recursion when testScript would + # reference v's toplevel + config.withoutTestScriptReferences.nodesCompat.${k} + else + # reuse memoized config + v + ) + config.nodesCompat; + } + else config.testScript; + + defaults = { config, name, ... }: { + # Make sure all derivations referenced by the test + # script are available on the nodes. When the store is + # accessed through 9p, this isn't important, since + # everything in the store is available to the guest, + # but when building a root image it is, as all paths + # that should be available to the guest has to be + # copied to the image. + virtualisation.additionalPaths = + lib.optional + # A testScript may evaluate nodes, which has caused + # infinite recursions. The demand cycle involves: + # testScript --> + # nodes --> + # toplevel --> + # additionalPaths --> + # hasContext testScript' --> + # testScript (ad infinitum) + # If we don't need to build an image, we can break this + # cycle by short-circuiting when useNixStoreImage is false. + (config.virtualisation.useNixStoreImage && builtins.hasContext testModuleArgs.config.testScriptString && testModuleArgs.config.includeTestScriptReferences) + (hostPkgs.writeStringReferencesToFile testModuleArgs.config.testScriptString); + }; + }; +} -- cgit 1.4.1 From 3c09cb23639c185f3b168b56bfc83ab3768dd1e0 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 6 Jun 2022 20:19:59 +0200 Subject: nixos/all-tests.nix: Improve runTest for release.nix ... and add runTestOn. --- nixos/tests/all-tests.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index e0121fe6b6b..eb13e33bd9a 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -27,6 +27,22 @@ let }; evalMinimalConfig = module: nixosLib.evalModules { modules = [ module ]; }; + inherit + (rec { + doRunTest = (import ../lib/testing-python.nix { inherit system pkgs; }).runTest; + findTests = tree: + if tree?recurseForDerivations && tree.recurseForDerivations + then mapAttrs (k: findTests) (builtins.removeAttrs tree ["recurseForDerivations"]) + else callTest ({ test = tree; }); + runTest = arg: let r = doRunTest arg; in findTests r; + runTestOn = systems: arg: + if elem system systems then runTest arg + else {}; + }) + runTest + runTestOn + ; + in { _3proxy = handleTest ./3proxy.nix {}; acme = handleTest ./acme.nix {}; -- cgit 1.4.1 From 124b0c4abcd4ee093c7cee95f36f576bc6abffa5 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 6 Jun 2022 20:30:17 +0200 Subject: nixos/testing/network.nix: Avoid deprecated .config --- nixos/lib/testing/network.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/lib/testing/network.nix b/nixos/lib/testing/network.nix index e0446846fb0..dfdd9b8314a 100644 --- a/nixos/lib/testing/network.nix +++ b/nixos/lib/testing/network.nix @@ -38,7 +38,7 @@ let # virtualisation.vlans option). networking.extraHosts = flip concatMapStrings machines (m': - let config = (getAttr m' nodes).config; in + let config = getAttr m' nodes; in optionalString (config.networking.primaryIPAddress != "") ("${config.networking.primaryIPAddress} " + optionalString (config.networking.domain != null) -- cgit 1.4.1 From a958a4aa009e371d38936ef86a327cb9e6fb154a Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 6 Jun 2022 21:19:22 +0200 Subject: nixos/testing: Add pkgs parameter This parameter is for packages to use in VMs, unlike hostPkgs. --- nixos/lib/testing-python.nix | 1 + nixos/lib/testing/pkgs.nix | 11 +++++++++++ nixos/tests/3proxy.nix | 4 ++-- nixos/tests/all-tests.nix | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 nixos/lib/testing/pkgs.nix diff --git a/nixos/lib/testing-python.nix b/nixos/lib/testing-python.nix index ab509c098d2..1c331a3c516 100644 --- a/nixos/lib/testing-python.nix +++ b/nixos/lib/testing-python.nix @@ -177,6 +177,7 @@ rec { ./testing/name.nix ./testing/network.nix ./testing/nodes.nix + ./testing/pkgs.nix ./testing/run.nix ./testing/testScript.nix { diff --git a/nixos/lib/testing/pkgs.nix b/nixos/lib/testing/pkgs.nix new file mode 100644 index 00000000000..22dd586868e --- /dev/null +++ b/nixos/lib/testing/pkgs.nix @@ -0,0 +1,11 @@ +{ config, lib, hostPkgs, ... }: +{ + config = { + # default pkgs for use in VMs + _module.args.pkgs = hostPkgs; + + defaults = { + # TODO: a module to set a shared pkgs, if options.nixpkgs.* is untouched by user (highestPrio) */ + }; + }; +} diff --git a/nixos/tests/3proxy.nix b/nixos/tests/3proxy.nix index 8127438fabd..d367295e538 100644 --- a/nixos/tests/3proxy.nix +++ b/nixos/tests/3proxy.nix @@ -1,4 +1,4 @@ -import ./make-test-python.nix ({ pkgs, ...} : { +{ lib, pkgs, ... }: { name = "3proxy"; meta = with pkgs.lib.maintainers; { maintainers = [ misuzu ]; @@ -186,4 +186,4 @@ import ./make-test-python.nix ({ pkgs, ...} : { "${pkgs.wget}/bin/wget -e use_proxy=yes -e http_proxy=http://192.168.0.4:3128 -S -O /dev/null http://127.0.0.1:9999" ) ''; -}) +} diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index eb13e33bd9a..b4f77557a40 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -44,7 +44,7 @@ let ; in { - _3proxy = handleTest ./3proxy.nix {}; + _3proxy = runTest ./3proxy.nix; acme = handleTest ./acme.nix {}; adguardhome = handleTest ./adguardhome.nix {}; aesmd = handleTest ./aesmd.nix {}; -- cgit 1.4.1 From 0691b450b1d1c5e2846e23fd145e7c08d242c0e1 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 6 Jun 2022 21:05:41 +0200 Subject: nixosTests._3proxy: Use module system based runner --- nixos/tests/3proxy.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/tests/3proxy.nix b/nixos/tests/3proxy.nix index d367295e538..647d9d57c7f 100644 --- a/nixos/tests/3proxy.nix +++ b/nixos/tests/3proxy.nix @@ -1,6 +1,6 @@ { lib, pkgs, ... }: { name = "3proxy"; - meta = with pkgs.lib.maintainers; { + meta = with lib.maintainers; { maintainers = [ misuzu ]; }; @@ -92,7 +92,7 @@ networking.firewall.allowedTCPPorts = [ 3128 9999 ]; }; - peer3 = { lib, ... }: { + peer3 = { lib, pkgs, ... }: { networking.useDHCP = false; networking.interfaces.eth1 = { ipv4.addresses = [ -- cgit 1.4.1 From 9e4277b970d96ddc1c2bbe4686757ae761baa18a Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 6 Jun 2022 23:46:39 +0200 Subject: nixos/testing/network.nix: Fix for specialisations and specialArgs.name Before this, it relied on being able to `imports` from the `name` module argument, which wasn't really necessary and required a potentially quite breaking change. We can revert that now. --- nixos/lib/testing/network.nix | 149 ++++++++++++++++++++++++++---------------- 1 file changed, 93 insertions(+), 56 deletions(-) diff --git a/nixos/lib/testing/network.nix b/nixos/lib/testing/network.nix index dfdd9b8314a..c87abee30c9 100644 --- a/nixos/lib/testing/network.nix +++ b/nixos/lib/testing/network.nix @@ -1,75 +1,112 @@ { lib, nodes, ... }: -with lib; +let + inherit (lib) + attrNames concatMap concatMapStrings flip forEach head + listToAttrs mkDefault mkOption nameValuePair optionalString + range types zipListsWith zipLists + ; + nodeNumbers = + listToAttrs + (zipListsWith + nameValuePair + (attrNames nodes) + (range 1 254) + ); -let - machines = attrNames nodes; + networkModule = { config, nodes, pkgs, ... }: + let + interfacesNumbered = zipLists config.virtualisation.vlans (range 1 255); + interfaces = forEach interfacesNumbered ({ fst, snd }: + nameValuePair "eth${toString snd}" { + ipv4.addresses = + [{ + address = "192.168.${toString fst}.${toString config.virtualisation.test.nodeNumber}"; + prefixLength = 24; + }]; + }); - machinesNumbered = zipLists machines (range 1 254); + networkConfig = + { + networking.hostName = mkDefault config.virtualisation.test.nodeName; - nodes_ = forEach machinesNumbered (m: nameValuePair m.fst - [ - ({ config, nodes, pkgs, ... }: - let - interfacesNumbered = zipLists config.virtualisation.vlans (range 1 255); - interfaces = forEach interfacesNumbered ({ fst, snd }: - nameValuePair "eth${toString snd}" { - ipv4.addresses = - [{ - address = "192.168.${toString fst}.${toString m.snd}"; - prefixLength = 24; - }]; - }); + networking.interfaces = listToAttrs interfaces; - networkConfig = - { - networking.hostName = mkDefault m.fst; + networking.primaryIPAddress = + optionalString (interfaces != [ ]) (head (head interfaces).value.ipv4.addresses).address; - networking.interfaces = listToAttrs interfaces; + # Put the IP addresses of all VMs in this machine's + # /etc/hosts file. If a machine has multiple + # interfaces, use the IP address corresponding to + # the first interface (i.e. the first network in its + # virtualisation.vlans option). + networking.extraHosts = flip concatMapStrings (attrNames nodes) + (m': + let config = nodes.${m'}; in + optionalString (config.networking.primaryIPAddress != "") + ("${config.networking.primaryIPAddress} " + + optionalString (config.networking.domain != null) + "${config.networking.hostName}.${config.networking.domain} " + + "${config.networking.hostName}\n")); - networking.primaryIPAddress = - optionalString (interfaces != [ ]) (head (head interfaces).value.ipv4.addresses).address; + virtualisation.qemu.options = + let qemu-common = import ../qemu-common.nix { inherit lib pkgs; }; + in + flip concatMap interfacesNumbered + ({ fst, snd }: qemu-common.qemuNICFlags snd fst config.virtualisation.test.nodeNumber); + }; - # Put the IP addresses of all VMs in this machine's - # /etc/hosts file. If a machine has multiple - # interfaces, use the IP address corresponding to - # the first interface (i.e. the first network in its - # virtualisation.vlans option). - networking.extraHosts = flip concatMapStrings machines - (m': - let config = getAttr m' nodes; in - optionalString (config.networking.primaryIPAddress != "") - ("${config.networking.primaryIPAddress} " + - optionalString (config.networking.domain != null) - "${config.networking.hostName}.${config.networking.domain} " + - "${config.networking.hostName}\n")); + in + { + key = "ip-address"; + config = networkConfig // { + # Expose the networkConfig items for tests like nixops + # that need to recreate the network config. + system.build.networkConfig = networkConfig; + }; + }; - virtualisation.qemu.options = - let qemu-common = import ../qemu-common.nix { inherit lib pkgs; }; - in - flip concatMap interfacesNumbered - ({ fst, snd }: qemu-common.qemuNICFlags snd fst m.snd); - }; + nodeNumberModule = (regular@{ config, name, ... }: { + options = { + virtualisation.test.nodeName = mkOption { + internal = true; + default = name; + # We need to force this in specilisations, otherwise it'd be + # readOnly = true; + description = '' + The `name` in `nodes.`; stable across `specialisations`. + ''; + }; + virtualisation.test.nodeNumber = mkOption { + internal = true; + type = types.int; + readOnly = true; + default = nodeNumbers.${config.virtualisation.test.nodeName}; + description = '' + A unique number assigned for each node in `nodes`. + ''; + }; - in - { - key = "ip-address"; - config = networkConfig // { - # Expose the networkConfig items for tests like nixops - # that need to recreate the network config. - system.build.networkConfig = networkConfig; + # specialisations override the `name` module argument, + # so we push the real `virtualisation.test.nodeName`. + specialisation = mkOption { + type = types.attrsOf (types.submodule { + options.configuration = mkOption { + type = types.submodule ({ + config.virtualisation.test.nodeName = + # assert regular.config.virtualisation.test.nodeName != "configuration"; + regular.config.virtualisation.test.nodeName; + }); }; - } - ) - ]); + }); + }; + }; + }); - extraNodeConfigs = lib.listToAttrs nodes_; in { config = { - defaults = { config, name, ... }: { - imports = extraNodeConfigs.${name}; - }; + defaults = { imports = [ networkModule nodeNumberModule ]; }; }; } -- cgit 1.4.1 From b7ffe4446903a014ad37b26b6a206217c27da7fd Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 6 Jun 2022 23:49:59 +0200 Subject: nixosTests.acme: Use module system based runner --- nixos/tests/acme.nix | 14 +++++++------- nixos/tests/all-tests.nix | 2 +- nixos/tests/common/acme/client/default.nix | 4 ++-- nixos/tests/common/acme/server/default.nix | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/nixos/tests/acme.nix b/nixos/tests/acme.nix index c07f99c5db3..d3a436080eb 100644 --- a/nixos/tests/acme.nix +++ b/nixos/tests/acme.nix @@ -1,7 +1,7 @@ -import ./make-test-python.nix ({ pkgs, lib, ... }: let +{ pkgs, lib, ... }: let commonConfig = ./common/acme/client; - dnsServerIP = nodes: nodes.dnsserver.config.networking.primaryIPAddress; + dnsServerIP = nodes: nodes.dnsserver.networking.primaryIPAddress; dnsScript = nodes: let dnsAddress = dnsServerIP nodes; @@ -153,7 +153,7 @@ in { description = "Pebble ACME challenge test server"; wantedBy = [ "network.target" ]; serviceConfig = { - ExecStart = "${pkgs.pebble}/bin/pebble-challtestsrv -dns01 ':53' -defaultIPv6 '' -defaultIPv4 '${nodes.webserver.config.networking.primaryIPAddress}'"; + ExecStart = "${pkgs.pebble}/bin/pebble-challtestsrv -dns01 ':53' -defaultIPv6 '' -defaultIPv4 '${nodes.webserver.networking.primaryIPAddress}'"; # Required to bind on privileged ports. AmbientCapabilities = [ "CAP_NET_BIND_SERVICE" ]; }; @@ -175,7 +175,7 @@ in { specialisation = { # First derivation used to test general ACME features general.configuration = { ... }: let - caDomain = nodes.acme.config.test-support.acme.caDomain; + caDomain = nodes.acme.test-support.acme.caDomain; email = config.security.acme.defaults.email; # Exit 99 to make it easier to track if this is the reason a renew failed accountCreateTester = '' @@ -316,7 +316,7 @@ in { testScript = { nodes, ... }: let - caDomain = nodes.acme.config.test-support.acme.caDomain; + caDomain = nodes.acme.test-support.acme.caDomain; newServerSystem = nodes.webserver.config.system.build.toplevel; switchToNewServer = "${newServerSystem}/bin/switch-to-configuration test"; in @@ -438,7 +438,7 @@ in { client.wait_for_unit("default.target") client.succeed( - 'curl --data \'{"host": "${caDomain}", "addresses": ["${nodes.acme.config.networking.primaryIPAddress}"]}\' http://${dnsServerIP nodes}:8055/add-a' + 'curl --data \'{"host": "${caDomain}", "addresses": ["${nodes.acme.networking.primaryIPAddress}"]}\' http://${dnsServerIP nodes}:8055/add-a' ) acme.wait_for_unit("network-online.target") @@ -594,4 +594,4 @@ in { wait_for_server() check_connection_key_bits(client, test_domain, "384") ''; -}) +} diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index b4f77557a40..463bab49e1b 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -45,7 +45,7 @@ let in { _3proxy = runTest ./3proxy.nix; - acme = handleTest ./acme.nix {}; + acme = runTest ./acme.nix; adguardhome = handleTest ./adguardhome.nix {}; aesmd = handleTest ./aesmd.nix {}; agate = handleTest ./web-servers/agate.nix {}; diff --git a/nixos/tests/common/acme/client/default.nix b/nixos/tests/common/acme/client/default.nix index 9dbe345e7a0..503e610d1ac 100644 --- a/nixos/tests/common/acme/client/default.nix +++ b/nixos/tests/common/acme/client/default.nix @@ -1,7 +1,7 @@ { lib, nodes, pkgs, ... }: let - caCert = nodes.acme.config.test-support.acme.caCert; - caDomain = nodes.acme.config.test-support.acme.caDomain; + caCert = nodes.acme.test-support.acme.caCert; + caDomain = nodes.acme.test-support.acme.caDomain; in { security.acme = { diff --git a/nixos/tests/common/acme/server/default.nix b/nixos/tests/common/acme/server/default.nix index fa1b9b545d0..b81f860125c 100644 --- a/nixos/tests/common/acme/server/default.nix +++ b/nixos/tests/common/acme/server/default.nix @@ -18,10 +18,10 @@ # # example = { nodes, ... }: { # networking.nameservers = [ -# nodes.acme.config.networking.primaryIPAddress +# nodes.acme.networking.primaryIPAddress # ]; # security.pki.certificateFiles = [ -# nodes.acme.config.test-support.acme.caCert +# nodes.acme.test-support.acme.caCert # ]; # }; # } @@ -36,7 +36,7 @@ # acme = { nodes, lib, ... }: { # imports = [ ./common/acme/server ]; # networking.nameservers = lib.mkForce [ -# nodes.myresolver.config.networking.primaryIPAddress +# nodes.myresolver.networking.primaryIPAddress # ]; # }; # -- cgit 1.4.1 From edf8be37af44fa214811c9165c4f45eef0fadd1c Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Thu, 9 Jun 2022 17:43:22 +0200 Subject: nixosTests.adguardhome: Use module based runner --- nixos/tests/adguardhome.nix | 2 +- nixos/tests/all-tests.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/tests/adguardhome.nix b/nixos/tests/adguardhome.nix index ddbe8ff9c11..1a220f99699 100644 --- a/nixos/tests/adguardhome.nix +++ b/nixos/tests/adguardhome.nix @@ -1,4 +1,4 @@ -import ./make-test-python.nix { +{ name = "adguardhome"; nodes = { diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 463bab49e1b..229886370cb 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -46,7 +46,7 @@ let in { _3proxy = runTest ./3proxy.nix; acme = runTest ./acme.nix; - adguardhome = handleTest ./adguardhome.nix {}; + adguardhome = runTest ./adguardhome.nix; aesmd = handleTest ./aesmd.nix {}; agate = handleTest ./web-servers/agate.nix {}; agda = handleTest ./agda.nix {}; -- cgit 1.4.1 From 15dcbc2514f019276f9cd73c804deab76fa1031f Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Thu, 9 Jun 2022 17:45:02 +0200 Subject: nixosTests.aesmd: Use module based runner --- nixos/tests/aesmd.nix | 4 ++-- nixos/tests/all-tests.nix | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/tests/aesmd.nix b/nixos/tests/aesmd.nix index 9f07426be8d..5da661afd54 100644 --- a/nixos/tests/aesmd.nix +++ b/nixos/tests/aesmd.nix @@ -1,4 +1,4 @@ -import ./make-test-python.nix ({ pkgs, lib, ... }: { +{ pkgs, lib, ... }: { name = "aesmd"; meta = { maintainers = with lib.maintainers; [ veehaitch ]; @@ -59,4 +59,4 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: { assert aesmd_config == "whitelist url = http://nixos.org\nproxy type = direct\ndefault quoting type = ecdsa_256\n", "aesmd.conf differs" ''; -}) +} diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 229886370cb..877efb00189 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -47,7 +47,7 @@ in { _3proxy = runTest ./3proxy.nix; acme = runTest ./acme.nix; adguardhome = runTest ./adguardhome.nix; - aesmd = handleTest ./aesmd.nix {}; + aesmd = runTest ./aesmd.nix; agate = handleTest ./web-servers/agate.nix {}; agda = handleTest ./agda.nix {}; airsonic = handleTest ./airsonic.nix {}; -- cgit 1.4.1 From 5727fd3e6f17684eb8bace334564cda302077524 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Thu, 9 Jun 2022 17:46:51 +0200 Subject: nixosTests.agate: Use module based runner --- nixos/tests/all-tests.nix | 2 +- nixos/tests/web-servers/agate.nix | 46 +++++++++++++++++++-------------------- 2 files changed, 23 insertions(+), 25 deletions(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 877efb00189..5cd58cb5c3f 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -48,7 +48,7 @@ in { acme = runTest ./acme.nix; adguardhome = runTest ./adguardhome.nix; aesmd = runTest ./aesmd.nix; - agate = handleTest ./web-servers/agate.nix {}; + agate = runTest ./web-servers/agate.nix; agda = handleTest ./agda.nix {}; airsonic = handleTest ./airsonic.nix {}; allTerminfo = handleTest ./all-terminfo.nix {}; diff --git a/nixos/tests/web-servers/agate.nix b/nixos/tests/web-servers/agate.nix index e364e134cfd..e8d789a9ca4 100644 --- a/nixos/tests/web-servers/agate.nix +++ b/nixos/tests/web-servers/agate.nix @@ -1,29 +1,27 @@ -import ../make-test-python.nix ( - { pkgs, lib, ... }: - { - name = "agate"; - meta = with lib.maintainers; { maintainers = [ jk ]; }; +{ pkgs, lib, ... }: +{ + name = "agate"; + meta = with lib.maintainers; { maintainers = [ jk ]; }; - nodes = { - geminiserver = { pkgs, ... }: { - services.agate = { - enable = true; - hostnames = [ "localhost" ]; - contentDir = pkgs.writeTextDir "index.gmi" '' - # Hello NixOS! - ''; - }; + nodes = { + geminiserver = { pkgs, ... }: { + services.agate = { + enable = true; + hostnames = [ "localhost" ]; + contentDir = pkgs.writeTextDir "index.gmi" '' + # Hello NixOS! + ''; }; }; + }; - testScript = { nodes, ... }: '' - geminiserver.wait_for_unit("agate") - geminiserver.wait_for_open_port(1965) + testScript = { nodes, ... }: '' + geminiserver.wait_for_unit("agate") + geminiserver.wait_for_open_port(1965) - with subtest("check is serving over gemini"): - response = geminiserver.succeed("${pkgs.gmni}/bin/gmni -j once -i -N gemini://localhost:1965") - print(response) - assert "Hello NixOS!" in response - ''; - } -) + with subtest("check is serving over gemini"): + response = geminiserver.succeed("${pkgs.gmni}/bin/gmni -j once -i -N gemini://localhost:1965") + print(response) + assert "Hello NixOS!" in response + ''; +} -- cgit 1.4.1 From 5603d7f832342a635afed0cabcb1fe0343fa00cb Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 21 Sep 2022 16:45:56 +0200 Subject: python3Packages.tesserocr: enable tests, cleanup --- .../python-modules/tesserocr/default.nix | 51 ++++++++++++++++------ 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/pkgs/development/python-modules/tesserocr/default.nix b/pkgs/development/python-modules/tesserocr/default.nix index 0b21e17f96b..c8e1d2e64f9 100644 --- a/pkgs/development/python-modules/tesserocr/default.nix +++ b/pkgs/development/python-modules/tesserocr/default.nix @@ -1,14 +1,18 @@ -{ - buildPythonPackage, - fetchPypi, - lib, - # build dependencies - cython, - leptonica, - pkg-config, - tesseract, - # extra python packages - pillow +{ buildPythonPackage +, fetchPypi +, lib + +# build dependencies +, cython +, leptonica +, pkg-config +, tesseract + +# propagates +, pillow + +# tests +, unittestCheckHook }: buildPythonPackage rec { @@ -20,11 +24,30 @@ buildPythonPackage rec { sha256 = "1bmj76gi8401lcqdaaznfmz9yf11myy1bzivqwwq08z3dwzxswck"; }; - nativeBuildInputs = [ cython pkg-config ]; - buildInputs = [ leptonica tesseract ]; - propagatedBuildInputs = [ pillow ]; + nativeBuildInputs = [ + cython + pkg-config + ]; + + buildInputs = [ + leptonica + tesseract + ]; + + propagatedBuildInputs = [ + pillow + ]; + + pythonImportsCheck = [ + "tesserocr" + ]; + + checkInputs = [ + unittestCheckHook + ]; meta = with lib; { + changelog = "https://github.com/sirfz/tesserocr/releases/tag/v${version}"; description = "A simple, Pillow-friendly, wrapper around the tesseract-ocr API for Optical Character Recognition (OCR)"; homepage = "https://github.com/sirfz/tesserocr"; license = licenses.mit; -- cgit 1.4.1 From 849c40b5f5071617db0c7bbaa1d3438dd616420d Mon Sep 17 00:00:00 2001 From: cab Date: Thu, 25 Aug 2022 11:19:18 +0400 Subject: klipper: additional options This allows for easier interop with Moonraker, as well as giving an ability to store klipper configuration files in /var/lib/klipper, thus not littering /etc with all the backups SAVE_CONFIG does. - Added `configFile` as an alternative way to specify configuration - Added `isMutableConfig` and `mutableConfigPath` Co-authored-by: @lovesegfault Co-authored-by: Sandro Co-authored-by: Bernardo Meurer --- nixos/modules/services/misc/klipper.nix | 78 ++++++++++++++++++++++++++++----- 1 file changed, 68 insertions(+), 10 deletions(-) diff --git a/nixos/modules/services/misc/klipper.nix b/nixos/modules/services/misc/klipper.nix index 9b2f585d3ff..a2158e9461b 100644 --- a/nixos/modules/services/misc/klipper.nix +++ b/nixos/modules/services/misc/klipper.nix @@ -35,6 +35,30 @@ in description = lib.mdDoc "Path of the API socket to create."; }; + mutableConfig = mkOption { + type = types.bool; + default = false; + example = true; + description = lib.mdDoc '' + Whether to copy the config to a mutable directory instead of using the one directly from the nix store. + This will only copy the config if the file at `services.klipper.mutableConfigPath` doesn't exist. + ''; + }; + + mutableConfigFolder = mkOption { + type = types.path; + default = "/var/lib/klipper"; + description = lib.mdDoc "Path to mutable Klipper config file."; + }; + + configFile = mkOption { + type = types.nullOr types.path; + default = null; + description = lib.mdDoc '' + Path to default Klipper config. + ''; + }; + octoprintIntegration = mkOption { type = types.bool; default = false; @@ -62,8 +86,8 @@ in }; settings = mkOption { - type = format.type; - default = { }; + type = types.nullOr format.type; + default = null; description = lib.mdDoc '' Configuration for Klipper. See the [documentation](https://www.klipper3d.org/Overview.html#configuration-and-tuning-guides) for supported values. @@ -80,6 +104,10 @@ in building of firmware and addition of klipper-flash tools for manual flashing. This will add `klipper-flash-$mcu` scripts to your environment which can be called to flash the firmware. ''); + serial = mkOption { + type = types.nullOr path; + description = lib.mdDoc "Path to serial port this printer is connected to. Leave `null` to derive it from `service.klipper.settings`."; + }; configFile = mkOption { type = path; description = lib.mdDoc "Path to firmware config which is generated using `klipper-genconf`"; @@ -95,19 +123,25 @@ in assertions = [ { assertion = cfg.octoprintIntegration -> config.services.octoprint.enable; - message = "Option klipper.octoprintIntegration requires Octoprint to be enabled on this system. Please enable services.octoprint to use it."; + message = "Option services.klipper.octoprintIntegration requires Octoprint to be enabled on this system. Please enable services.octoprint to use it."; } { assertion = cfg.user != null -> cfg.group != null; - message = "Option klipper.group is not set when a user is specified."; + message = "Option services.klipper.group is not set when services.klipper.user is specified."; + } + { + assertion = cfg.settings != null -> foldl (a: b: a && b) true (mapAttrsToList (mcu: _: mcu != null -> (hasAttrByPath [ "${mcu}" "serial" ] cfg.settings)) cfg.firmwares); + message = "Option services.klipper.settings.$mcu.serial must be set when settings.klipper.firmware.$mcu is specified"; } { - assertion = foldl (a: b: a && b) true (mapAttrsToList (mcu: _: mcu != null -> (hasAttrByPath [ "${mcu}" "serial" ] cfg.settings)) cfg.firmwares); - message = "Option klipper.settings.$mcu.serial must be set when klipper.firmware.$mcu is specified"; + assertion = (cfg.configFile != null) != (cfg.settings != null); + message = "You need to either specify services.klipper.settings or services.klipper.defaultConfig."; } ]; - environment.etc."klipper.cfg".source = format.generate "klipper.cfg" cfg.settings; + environment.etc = mkIf (!cfg.mutableConfig) { + "klipper.cfg".source = if cfg.settings != null then format.generate "klipper.cfg" cfg.settings else cfg.configFile; + }; services.klipper = mkIf cfg.octoprintIntegration { user = config.services.octoprint.user; @@ -118,15 +152,34 @@ in let klippyArgs = "--input-tty=${cfg.inputTTY}" + optionalString (cfg.apiSocket != null) " --api-server=${cfg.apiSocket}"; + printerConfigPath = + if cfg.mutableConfig + then cfg.mutableConfigFolder + "/printer.cfg" + else "/etc/klipper.cfg"; + printerConfigFile = + if cfg.settings != null + then format.generate "klipper.cfg" cfg.settings + else cfg.configFile; in { description = "Klipper 3D Printer Firmware"; wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; + preStart = '' + mkdir -p ${cfg.mutableConfigFolder} + ${lib.optionalString (cfg.mutableConfig) '' + [ -e ${printerConfigPath} ] || { + cp ${printerConfigFile} ${printerConfigPath} + chmod +w ${printerConfigPath} + } + ''} + mkdir -p ${cfg.mutableConfigFolder}/gcodes + ''; serviceConfig = { - ExecStart = "${cfg.package}/lib/klipper/klippy.py ${klippyArgs} /etc/klipper.cfg"; + ExecStart = "${cfg.package}/lib/klipper/klippy.py ${klippyArgs} ${printerConfigPath}"; RuntimeDirectory = "klipper"; + StateDirectory = "klipper"; SupplementaryGroups = [ "dialout" ]; WorkingDirectory = "${cfg.package}/lib"; OOMScoreAdjust = "-999"; @@ -134,6 +187,7 @@ in CPUSchedulingPriority = 99; IOSchedulingClass = "realtime"; IOSchedulingPriority = 0; + UMask = "0002"; } // (if cfg.user != null then { Group = cfg.group; User = cfg.user; @@ -146,8 +200,9 @@ in environment.systemPackages = with pkgs; let + default = a: b: if a != null then a else b; firmwares = filterAttrs (n: v: v!= null) (mapAttrs - (mcu: { enable, configFile }: if enable then pkgs.klipper-firmware.override { + (mcu: { enable, configFile, serial }: if enable then pkgs.klipper-firmware.override { mcu = lib.strings.sanitizeDerivationName mcu; firmwareConfig = configFile; } else null) @@ -156,11 +211,14 @@ in (mcu: firmware: pkgs.klipper-flash.override { mcu = lib.strings.sanitizeDerivationName mcu; klipper-firmware = firmware; - flashDevice = cfg.settings."${mcu}".serial; + flashDevice = default cfg.firmwares."${mcu}".serial cfg.settings."${mcu}".serial; firmwareConfig = cfg.firmwares."${mcu}".configFile; }) firmwares; in [ klipper-genconf ] ++ firmwareFlasher ++ attrValues firmwares; }; + meta.maintainers = [ + maintainers.cab404 + ]; } -- cgit 1.4.1 From 2864ef44e391283ccedd0865778725d06cf94397 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 21 Sep 2022 17:41:32 +0200 Subject: unpaper: 6.1 -> 7.0.0 Migrates the build to meson and ninja and adds support for ffmpeg 5. The package now creates a man page that we divert into a dedicated man output. Adds the paperless test into passthru.tests for good measure. --- pkgs/tools/graphics/unpaper/default.nix | 46 +++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/graphics/unpaper/default.nix b/pkgs/tools/graphics/unpaper/default.nix index 9b8542a86bb..72c63d6cfd2 100644 --- a/pkgs/tools/graphics/unpaper/default.nix +++ b/pkgs/tools/graphics/unpaper/default.nix @@ -1,16 +1,52 @@ -{ lib, stdenv, fetchurl, buildPackages, pkg-config, ffmpeg_4 }: +{ lib +, stdenv +, fetchurl + +# build +, meson +, ninja +, pkg-config + +# docs +, sphinx + +# runtime +, buildPackages +, ffmpeg_5 + +# tests +, nixosTests +}: stdenv.mkDerivation rec { pname = "unpaper"; - version = "6.1"; + version = "7.0.0"; src = fetchurl { url = "https://www.flameeyes.eu/files/${pname}-${version}.tar.xz"; - sha256 = "0c5rbkxbmy9k8vxjh4cv0bgnqd3wqc99yzw215vkyjslvbsq8z13"; + hash = "sha256-JXX7vybCJxnRy4grWWAsmQDH90cRisEwiD9jQZvkaoA="; }; - nativeBuildInputs = [ pkg-config buildPackages.libxslt.bin ]; - buildInputs = [ ffmpeg_4 ]; + outputs = [ + "out" + "man" + ]; + + nativeBuildInputs = [ + buildPackages.libxslt.bin + meson + ninja + pkg-config + sphinx + ]; + + buildInputs = [ + ffmpeg_5 + ]; + + passthru.tests = { + inherit (nixosTests) paperless; + }; meta = with lib; { homepage = "https://www.flameeyes.eu/projects/unpaper"; -- cgit 1.4.1 From 5b1a4ed0bff8d2facae2a20e5e0f7e89ffbf90bd Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 21 Sep 2022 15:34:42 +0200 Subject: paperless-ngx: Upgrade to tesseract5 The documentation of paperless-ngx mentions it supports versions greater than or equal 4.0. --- pkgs/applications/office/paperless-ngx/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/office/paperless-ngx/default.nix b/pkgs/applications/office/paperless-ngx/default.nix index e85f13b892f..279a4198f94 100644 --- a/pkgs/applications/office/paperless-ngx/default.nix +++ b/pkgs/applications/office/paperless-ngx/default.nix @@ -8,7 +8,7 @@ , optipng , pngquant , qpdf -, tesseract4 +, tesseract5 , unpaper , liberation_ttf , fetchFromGitHub @@ -56,7 +56,7 @@ let optipng pngquant qpdf - tesseract4 + tesseract5 unpaper ]; in -- cgit 1.4.1 From d61d1ec883fac68c35c92ea14946edd4b3c47dab Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Wed, 21 Sep 2022 16:34:47 +0200 Subject: python3Packages.ocrmypdf: Upgrade to tesseract5 --- pkgs/development/python-modules/ocrmypdf/default.nix | 4 ++-- pkgs/top-level/python-packages.nix | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/ocrmypdf/default.nix b/pkgs/development/python-modules/ocrmypdf/default.nix index 0acaf784206..77dee64bb45 100644 --- a/pkgs/development/python-modules/ocrmypdf/default.nix +++ b/pkgs/development/python-modules/ocrmypdf/default.nix @@ -19,7 +19,7 @@ , setuptools-scm , setuptools-scm-git-archive , substituteAll -, tesseract4 +, tesseract , tqdm , unpaper , installShellFiles @@ -50,7 +50,7 @@ buildPythonPackage rec { gs = "${lib.getBin ghostscript}/bin/gs"; jbig2 = "${lib.getBin jbig2enc}/bin/jbig2"; pngquant = "${lib.getBin pngquant}/bin/pngquant"; - tesseract = "${lib.getBin tesseract4}/bin/tesseract"; + tesseract = "${lib.getBin tesseract}/bin/tesseract"; unpaper = "${lib.getBin unpaper}/bin/unpaper"; }) ]; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index eb4600bcaae..9c31f185e23 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6328,7 +6328,9 @@ in { ocifs = callPackage ../development/python-modules/ocifs { }; - ocrmypdf = callPackage ../development/python-modules/ocrmypdf { }; + ocrmypdf = callPackage ../development/python-modules/ocrmypdf { + tesseract = pkgs.tesseract5; + }; od = callPackage ../development/python-modules/od { }; -- cgit 1.4.1 From b0c781cc4136e4678db1864875750c916b78ad33 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 15 Jun 2022 16:59:21 +0200 Subject: nixos/testing: Move entrypoint to nixos/lib + doc --- .../development/writing-nixos-tests.section.md | 73 ++++++- .../development/writing-nixos-tests.section.xml | 217 ++++++++++++++------- nixos/lib/default.nix | 8 + nixos/lib/testing-python.nix | 33 ++-- nixos/lib/testing/default.nix | 24 +++ 5 files changed, 257 insertions(+), 98 deletions(-) create mode 100644 nixos/lib/testing/default.nix diff --git a/nixos/doc/manual/development/writing-nixos-tests.section.md b/nixos/doc/manual/development/writing-nixos-tests.section.md index 6934bb0face..8dd3e6fb759 100644 --- a/nixos/doc/manual/development/writing-nixos-tests.section.md +++ b/nixos/doc/manual/development/writing-nixos-tests.section.md @@ -1,9 +1,9 @@ # Writing Tests {#sec-writing-nixos-tests} -A NixOS test is a Nix expression that has the following structure: +A NixOS test is a module that has the following structure: ```nix -import ./make-test-python.nix { +{ # One or more machines: nodes = @@ -21,7 +21,10 @@ import ./make-test-python.nix { } ``` -The attribute `testScript` is a bit of Python code that executes the +We refer to the whole test above as a test module, whereas the values +in `nodes.` are NixOS modules. (A NixOS configuration is a module.) + +The option `testScript` is a bit of Python code that executes the test (described below). During the test, it will start one or more virtual machines, the configuration of which is described by the attribute `nodes`. @@ -34,7 +37,64 @@ when switching between consoles, and so on. An interesting multi-node test is [`nfs/simple.nix`](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/nfs/simple.nix). It uses two client nodes to test correct locking across server crashes. -There are a few special NixOS configuration options for test VMs: +## Calling a test {#sec-calling-nixos-tests} + +Tests are invoked a bit differently depending on whether the test lives in NixOS or in another project. + +### Testing within NixOS {#sec-call-nixos-test-in-nixos} + +Test modules can be instantiated into derivations in multiple ways. + +Tests that are part of NixOS are added to [`nixos/tests/all-tests.nix`](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/all-tests.nix). + +```nix + hostname = runTest ./hostname.nix; +``` + +Overrides can be added by defining an anonymous module in `all-tests.nix`. +For the purpose of constructing a test matrix, use the `matrix` options instead. + +```nix + hostname = runTest { imports = [ ./hostname.nix ]; defaults.networking.firewall.enable = false; }; +``` + +You can run a test with attribute name `mytest` in `all-tests.nix` by invoking: + +```shell +nix-build -A nixosTests.mytest +``` + +### Testing outside the NixOS project {#sec-call-nixos-test-outside-nixos} + +Outside the `nixpkgs` repository, you can instantiate the test by first acquiring the NixOS library, + +```nix +# regular nix +let nixos-lib = import (nixpkgs + "/nixos/lib") { }; +in +``` + +```nix +# flake +let nixos-lib = nixpkgs.lib.nixos; +in +``` + +... and then invoking `runTest`, for example: + +```nix +nixos-lib.runTest { + imports = [ ./test.nix ]; + hostPkgs = pkgs; # the Nixpkgs package set used outside the VMs + defaults.services.foo.package = mypkg; +} +``` + +`runTest` returns a derivation that runs the test. + +## Configuring the nodes {#sec-nixos-test-nodes} + +There are a few special NixOS options for test VMs: `virtualisation.memorySize` @@ -304,7 +364,7 @@ For faster dev cycles it\'s also possible to disable the code-linters (this shouldn\'t be commited though): ```nix -import ./make-test-python.nix { +{ skipLint = true; nodes.machine = { config, pkgs, ... }: @@ -336,7 +396,7 @@ Similarly, the type checking of test scripts can be disabled in the following way: ```nix -import ./make-test-python.nix { +{ skipTypeCheck = true; nodes.machine = { config, pkgs, ... }: @@ -400,7 +460,6 @@ added using the parameter `extraPythonPackages`. For example, you could add `numpy` like this: ```nix -import ./make-test-python.nix { extraPythonPackages = p: [ p.numpy ]; diff --git a/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml b/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml index d6f4f61c064..6d0465e4230 100644 --- a/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml +++ b/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml @@ -1,10 +1,10 @@
Writing Tests - A NixOS test is a Nix expression that has the following structure: + A NixOS test is a module that has the following structure: -import ./make-test-python.nix { +{ # One or more machines: nodes = @@ -22,7 +22,12 @@ import ./make-test-python.nix { } - The attribute testScript is a bit of Python code + We refer to the whole test above as a test module, whereas the + values in nodes.<name> are NixOS modules. + (A NixOS configuration is a module.) + + + The option testScript is a bit of Python code that executes the test (described below). During the test, it will start one or more virtual machines, the configuration of which is described by the attribute nodes. @@ -38,78 +43,149 @@ import ./make-test-python.nix { It uses two client nodes to test correct locking across server crashes. - - There are a few special NixOS configuration options for test VMs: - - - - - virtualisation.memorySize - - - - The memory of the VM in megabytes. - - - - - - virtualisation.vlans - - - - The virtual networks to which the VM is connected. See - nat.nix - for an example. - - - - - - virtualisation.writableStore - - - - By default, the Nix store in the VM is not writable. If you - enable this option, a writable union file system is mounted on - top of the Nix store to make it appear writable. This is - necessary for tests that run Nix operations that modify the - store. - - - - - - For more options, see the module - qemu-vm.nix. - - - The test script is a sequence of Python statements that perform - various actions, such as starting VMs, executing commands in the - VMs, and so on. Each virtual machine is represented as an object - stored in the variable name if this is also the - identifier of the machine in the declarative config. If you - specified a node nodes.machine, the following - example starts the machine, waits until it has finished booting, - then executes a command and checks that the output is more-or-less - correct: - - +
+ Calling a test + + Tests are invoked a bit differently depending on whether the test + lives in NixOS or in another project. + +
+ Testing within NixOS + + Test modules can be instantiated into derivations in multiple + ways. + + + Tests that are part of NixOS are added to + nixos/tests/all-tests.nix. + + + hostname = runTest ./hostname.nix; + + + Overrides can be added by defining an anonymous module in + all-tests.nix. For the purpose of + constructing a test matrix, use the matrix + options instead. + + + hostname = runTest { imports = [ ./hostname.nix ]; defaults.networking.firewall.enable = false; }; + + + You can run a test with attribute name mytest + in all-tests.nix by invoking: + + +nix-build -A nixosTests.mytest + +
+
+ Testing outside the NixOS project + + Outside the nixpkgs repository, you can + instantiate the test by first acquiring the NixOS library, + + +# regular nix +let nixos-lib = import (nixpkgs + "/nixos/lib") { }; +in + + +# flake +let nixos-lib = nixpkgs.lib.nixos; +in + + + … and then invoking runTest, for example: + + +nixos-lib.runTest { + imports = [ ./test.nix ]; + hostPkgs = pkgs; # the Nixpkgs package set used outside the VMs + defaults.services.foo.package = mypkg; +} + + + runTest returns a derivation that runs the + test. + +
+
+
+ Configuring the nodes + + There are a few special NixOS options for test VMs: + + + + + virtualisation.memorySize + + + + The memory of the VM in megabytes. + + + + + + virtualisation.vlans + + + + The virtual networks to which the VM is connected. See + nat.nix + for an example. + + + + + + virtualisation.writableStore + + + + By default, the Nix store in the VM is not writable. If you + enable this option, a writable union file system is mounted + on top of the Nix store to make it appear writable. This is + necessary for tests that run Nix operations that modify the + store. + + + + + + For more options, see the module + qemu-vm.nix. + + + The test script is a sequence of Python statements that perform + various actions, such as starting VMs, executing commands in the + VMs, and so on. Each virtual machine is represented as an object + stored in the variable name if this is also the + identifier of the machine in the declarative config. If you + specified a node nodes.machine, the following + example starts the machine, waits until it has finished booting, + then executes a command and checks that the output is more-or-less + correct: + + machine.start() machine.wait_for_unit("default.target") if not "Linux" in machine.succeed("uname"): raise Exception("Wrong OS") - - The first line is technically unnecessary; machines are implicitly - started when you first execute an action on them (such as - wait_for_unit or succeed). If - you have multiple machines, you can speed up the test by starting - them in parallel: - - + + The first line is technically unnecessary; machines are implicitly + started when you first execute an action on them (such as + wait_for_unit or succeed). + If you have multiple machines, you can speed up the test by + starting them in parallel: + + start_all() +
Machine objects @@ -563,7 +639,7 @@ machine.wait_for_unit("xautolock.service", "x-session-user") code-linters (this shouldn't be commited though): -import ./make-test-python.nix { +{ skipLint = true; nodes.machine = { config, pkgs, ... }: @@ -595,7 +671,7 @@ import ./make-test-python.nix { the following way: -import ./make-test-python.nix { +{ skipTypeCheck = true; nodes.machine = { config, pkgs, ... }: @@ -669,7 +745,6 @@ def foo_running(): numpy like this: -import ./make-test-python.nix { extraPythonPackages = p: [ p.numpy ]; diff --git a/nixos/lib/default.nix b/nixos/lib/default.nix index 2b3056e0145..65d91342d4d 100644 --- a/nixos/lib/default.nix +++ b/nixos/lib/default.nix @@ -21,6 +21,8 @@ let seqAttrsIf = cond: a: lib.mapAttrs (_: v: seqIf cond a v); eval-config-minimal = import ./eval-config-minimal.nix { inherit lib; }; + + testing-lib = import ./testing/default.nix { inherit lib; }; in /* This attribute set appears as lib.nixos in the flake, or can be imported @@ -30,4 +32,10 @@ in inherit (seqAttrsIf (!featureFlags?minimalModules) minimalModulesWarning eval-config-minimal) evalModules ; + + inherit (testing-lib) + evalTest + runTest + ; + } diff --git a/nixos/lib/testing-python.nix b/nixos/lib/testing-python.nix index 1c331a3c516..e72e5d476bf 100644 --- a/nixos/lib/testing-python.nix +++ b/nixos/lib/testing-python.nix @@ -12,6 +12,10 @@ with pkgs; +let + nixos-lib = import ./default.nix { inherit (pkgs) lib; }; +in + rec { inherit pkgs; @@ -166,26 +170,15 @@ rec { ${lib.optionalString (interactive) "--add-flags --interactive"} ''); - evalTest = module: lib.evalModules { modules = testModules ++ [ module ]; }; - runTest = module: (evalTest module).config.run; - - testModules = [ - ./testing/driver.nix - ./testing/interactive.nix - ./testing/legacy.nix - ./testing/meta.nix - ./testing/name.nix - ./testing/network.nix - ./testing/nodes.nix - ./testing/pkgs.nix - ./testing/run.nix - ./testing/testScript.nix - { - config = { - hostPkgs = pkgs; - }; - } - ]; + evalTest = module: nixos-lib.evalTest { imports = [ extraTestModule module ]; }; + runTest = module: nixos-lib.runTest { imports = [ extraTestModule module ]; }; + + extraTestModule = { + config = { + hostPkgs = pkgs; + minimalResult = hydra; + }; + }; # Make a full-blown test makeTest = diff --git a/nixos/lib/testing/default.nix b/nixos/lib/testing/default.nix new file mode 100644 index 00000000000..676d52f5c3f --- /dev/null +++ b/nixos/lib/testing/default.nix @@ -0,0 +1,24 @@ +{ lib }: +let + + evalTest = module: lib.evalModules { modules = testModules ++ [ module ]; }; + runTest = module: (evalTest module).config.result; + + testModules = [ + ./call-test.nix + ./driver.nix + ./interactive.nix + ./legacy.nix + ./meta.nix + ./name.nix + ./network.nix + ./nodes.nix + ./pkgs.nix + ./run.nix + ./testScript.nix + ]; + +in +{ + inherit evalTest runTest testModules; +} -- cgit 1.4.1 From 6e2f7539893ebabc92ccb1421a84fccf09b2052b Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 15 Jun 2022 18:04:41 +0200 Subject: nixos/doc/running-nixos-tests-interactively: Describe interactive option --- .../running-nixos-tests-interactively.section.md | 8 ++++++ .../running-nixos-tests-interactively.section.xml | 32 ++++++++++++++++------ 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/nixos/doc/manual/development/running-nixos-tests-interactively.section.md b/nixos/doc/manual/development/running-nixos-tests-interactively.section.md index a1431859ff5..6170057442d 100644 --- a/nixos/doc/manual/development/running-nixos-tests-interactively.section.md +++ b/nixos/doc/manual/development/running-nixos-tests-interactively.section.md @@ -24,6 +24,8 @@ back into the test driver command line upon its completion. This allows you to inspect the state of the VMs after the test (e.g. to debug the test script). +## Reuse VM state {#sec-nixos-test-reuse-vm-state} + You can re-use the VM states coming from a previous run by setting the `--keep-vm-state` flag. @@ -33,3 +35,9 @@ $ ./result/bin/nixos-test-driver --keep-vm-state The machine state is stored in the `$TMPDIR/vm-state-machinename` directory. + +## Interactive-only test configuration {#sec-nixos-test-interactive-configuration} + +You can add configuration that is specific to the interactive test driver, by adding to the `interactive` option. +`interactive` is a copy of the regular test options namespace, and is used by the interactive test driver. +It can be helpful for troubleshooting changes that you don't want to apply to regular test runs. diff --git a/nixos/doc/manual/from_md/development/running-nixos-tests-interactively.section.xml b/nixos/doc/manual/from_md/development/running-nixos-tests-interactively.section.xml index 0e47350a0d2..edd3c33ff40 100644 --- a/nixos/doc/manual/from_md/development/running-nixos-tests-interactively.section.xml +++ b/nixos/doc/manual/from_md/development/running-nixos-tests-interactively.section.xml @@ -25,15 +25,29 @@ $ ./result/bin/nixos-test-driver completion. This allows you to inspect the state of the VMs after the test (e.g. to debug the test script). - - You can re-use the VM states coming from a previous run by setting - the --keep-vm-state flag. - - +
+ Reuse VM state + + You can re-use the VM states coming from a previous run by setting + the --keep-vm-state flag. + + $ ./result/bin/nixos-test-driver --keep-vm-state - - The machine state is stored in the - $TMPDIR/vm-state-machinename directory. - + + The machine state is stored in the + $TMPDIR/vm-state-machinename directory. + +
+
+ Interactive-only test configuration + + You can add configuration that is specific to the interactive test + driver, by adding to the interactive option. + interactive is a copy of the regular test + options namespace, and is used by the interactive test driver. It + can be helpful for troubleshooting changes that you don’t want to + apply to regular test runs. + +
-- cgit 1.4.1 From 537f45637367352b33d2979095765a0bdd2b0d00 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 15 Jun 2022 18:05:48 +0200 Subject: nixos/doc/running-nixos-tests: Simplify running instructions with nixosTests --- .../manual/development/running-nixos-tests.section.md | 17 +++-------------- .../from_md/development/running-nixos-tests.section.xml | 17 +++-------------- 2 files changed, 6 insertions(+), 28 deletions(-) diff --git a/nixos/doc/manual/development/running-nixos-tests.section.md b/nixos/doc/manual/development/running-nixos-tests.section.md index 1bec023b613..33076f5dc2a 100644 --- a/nixos/doc/manual/development/running-nixos-tests.section.md +++ b/nixos/doc/manual/development/running-nixos-tests.section.md @@ -2,22 +2,11 @@ You can run tests using `nix-build`. For example, to run the test [`login.nix`](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/login.nix), -you just do: +you do: ```ShellSession -$ nix-build '' -``` - -or, if you don't want to rely on `NIX_PATH`: - -```ShellSession -$ cd /my/nixpkgs/nixos/tests -$ nix-build login.nix -… -running the VM test script -machine: QEMU running (pid 8841) -… -6 out of 6 tests succeeded +$ cd /my/git/clone/of/nixpkgs +$ nix-build -A nixosTests.login ``` After building/downloading all required dependencies, this will perform diff --git a/nixos/doc/manual/from_md/development/running-nixos-tests.section.xml b/nixos/doc/manual/from_md/development/running-nixos-tests.section.xml index da2e5076c95..23abb546899 100644 --- a/nixos/doc/manual/from_md/development/running-nixos-tests.section.xml +++ b/nixos/doc/manual/from_md/development/running-nixos-tests.section.xml @@ -4,22 +4,11 @@ You can run tests using nix-build. For example, to run the test login.nix, - you just do: + you do: -$ nix-build '<nixpkgs/nixos/tests/login.nix>' - - - or, if you don’t want to rely on NIX_PATH: - - -$ cd /my/nixpkgs/nixos/tests -$ nix-build login.nix -… -running the VM test script -machine: QEMU running (pid 8841) -… -6 out of 6 tests succeeded +$ cd /my/git/clone/of/nixpkgs +$ nix-build -A nixosTests.login After building/downloading all required dependencies, this will -- cgit 1.4.1 From 38fb09e4278ca3e836da2c175dbff815c06b0632 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 22 Jun 2022 00:41:12 +0200 Subject: testing-python.nix: Replace makeTest implementation --- nixos/lib/testing-python.nix | 242 +-------------------- .../installer/tools/nixos-build-vms/build-vms.nix | 2 +- 2 files changed, 11 insertions(+), 233 deletions(-) diff --git a/nixos/lib/testing-python.nix b/nixos/lib/testing-python.nix index e72e5d476bf..cdaed5fa514 100644 --- a/nixos/lib/testing-python.nix +++ b/nixos/lib/testing-python.nix @@ -20,156 +20,6 @@ rec { inherit pkgs; - # Run an automated test suite in the given virtual network. - runTests = { driver, driverInteractive, pos }: - stdenv.mkDerivation { - name = "vm-test-run-${driver.testName}"; - - requiredSystemFeatures = [ "kvm" "nixos-test" ]; - - buildCommand = - '' - mkdir -p $out - - # effectively mute the XMLLogger - export LOGFILE=/dev/null - - ${driver}/bin/nixos-test-driver -o $out - ''; - - passthru = driver.passthru // { - inherit driver driverInteractive; - }; - - inherit pos; # for better debugging - }; - - # Generate convenience wrappers for running the test driver - # has vlans, vms and test script defaulted through env variables - # also instantiates test script with nodes, if it's a function (contract) - setupDriverForTest = { - testScript - , testName - , nodes - , qemu_pkg ? pkgs.qemu_test - , enableOCR ? false - , skipLint ? false - , skipTypeCheck ? false - , passthru ? {} - , interactive ? false - , extraPythonPackages ? (_ :[]) - }: - let - # Reifies and correctly wraps the python test driver for - # the respective qemu version and with or without ocr support - testDriver = pkgs.callPackage ./test-driver { - inherit enableOCR extraPythonPackages; - qemu_pkg = qemu_test; - imagemagick_light = imagemagick_light.override { inherit libtiff; }; - tesseract4 = tesseract4.override { enableLanguages = [ "eng" ]; }; - }; - - - testDriverName = - let - # A standard store path to the vm monitor is built like this: - # /tmp/nix-build-vm-test-run-$name.drv-0/vm-state-machine/monitor - # The max filename length of a unix domain socket is 108 bytes. - # This means $name can at most be 50 bytes long. - maxTestNameLen = 50; - testNameLen = builtins.stringLength testName; - in with builtins; - if testNameLen > maxTestNameLen then - abort - ("The name of the test '${testName}' must not be longer than ${toString maxTestNameLen} " + - "it's currently ${toString testNameLen} characters long.") - else - "nixos-test-driver-${testName}"; - - vlans = map (m: m.config.virtualisation.vlans) (lib.attrValues nodes); - vms = map (m: m.config.system.build.vm) (lib.attrValues nodes); - - nodeHostNames = let - nodesList = map (c: c.config.system.name) (lib.attrValues nodes); - in nodesList ++ lib.optional (lib.length nodesList == 1 && !lib.elem "machine" nodesList) "machine"; - - # TODO: This is an implementation error and needs fixing - # the testing famework cannot legitimately restrict hostnames further - # beyond RFC1035 - invalidNodeNames = lib.filter - (node: builtins.match "^[A-z_]([A-z0-9_]+)?$" node == null) - nodeHostNames; - - testScript' = - # Call the test script with the computed nodes. - if lib.isFunction testScript - then testScript { inherit nodes; } - else testScript; - - uniqueVlans = lib.unique (builtins.concatLists vlans); - vlanNames = map (i: "vlan${toString i}: VLan;") uniqueVlans; - machineNames = map (name: "${name}: Machine;") nodeHostNames; - in - if lib.length invalidNodeNames > 0 then - throw '' - Cannot create machines out of (${lib.concatStringsSep ", " invalidNodeNames})! - All machines are referenced as python variables in the testing framework which will break the - script when special characters are used. - - This is an IMPLEMENTATION ERROR and needs to be fixed. Meanwhile, - please stick to alphanumeric chars and underscores as separation. - '' - else lib.warnIf skipLint "Linting is disabled" (runCommand testDriverName - { - inherit testName; - nativeBuildInputs = [ makeWrapper mypy ]; - buildInputs = [ testDriver ]; - testScript = testScript'; - preferLocalBuild = true; - passthru = passthru // { - inherit nodes; - }; - meta.mainProgram = "nixos-test-driver"; - } - '' - mkdir -p $out/bin - - vmStartScripts=($(for i in ${toString vms}; do echo $i/bin/run-*-vm; done)) - - ${lib.optionalString (!skipTypeCheck) '' - # prepend type hints so the test script can be type checked with mypy - cat "${./test-script-prepend.py}" >> testScriptWithTypes - echo "${builtins.toString machineNames}" >> testScriptWithTypes - echo "${builtins.toString vlanNames}" >> testScriptWithTypes - echo -n "$testScript" >> testScriptWithTypes - - mypy --no-implicit-optional \ - --pretty \ - --no-color-output \ - testScriptWithTypes - ''} - - echo -n "$testScript" >> $out/test-script - - ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-test-driver - - ${testDriver}/bin/generate-driver-symbols - ${lib.optionalString (!skipLint) '' - PYFLAKES_BUILTINS="$( - echo -n ${lib.escapeShellArg (lib.concatStringsSep "," nodeHostNames)}, - < ${lib.escapeShellArg "driver-symbols"} - )" ${python3Packages.pyflakes}/bin/pyflakes $out/test-script - ''} - - # set defaults through environment - # see: ./test-driver/test-driver.py argparse implementation - wrapProgram $out/bin/nixos-test-driver \ - --set startScripts "''${vmStartScripts[*]}" \ - --set testScript "$out/test-script" \ - --set vlans '${toString vlans}' \ - ${lib.optionalString (interactive) "--add-flags --interactive"} - ''); - evalTest = module: nixos-lib.evalTest { imports = [ extraTestModule module ]; }; runTest = module: nixos-lib.runTest { imports = [ extraTestModule module ]; }; @@ -199,90 +49,18 @@ rec { else builtins.unsafeGetAttrPos "testScript" t) , extraPythonPackages ? (_ : []) } @ t: - let - mkNodes = qemu_pkg: - let - testScript' = - # Call the test script with the computed nodes. - if lib.isFunction testScript - then testScript { nodes = mkNodes qemu_pkg; } - else testScript; - - build-vms = import ./build-vms.nix { - inherit system lib pkgs minimal specialArgs; - extraConfigurations = extraConfigurations ++ [( - { config, ... }: - { - virtualisation.qemu.package = qemu_pkg; - - # Make sure all derivations referenced by the test - # script are available on the nodes. When the store is - # accessed through 9p, this isn't important, since - # everything in the store is available to the guest, - # but when building a root image it is, as all paths - # that should be available to the guest has to be - # copied to the image. - virtualisation.additionalPaths = - lib.optional - # A testScript may evaluate nodes, which has caused - # infinite recursions. The demand cycle involves: - # testScript --> - # nodes --> - # toplevel --> - # additionalPaths --> - # hasContext testScript' --> - # testScript (ad infinitum) - # If we don't need to build an image, we can break this - # cycle by short-circuiting when useNixStoreImage is false. - (config.virtualisation.useNixStoreImage && builtins.hasContext testScript') - (pkgs.writeStringReferencesToFile testScript'); - - # Ensure we do not use aliases. Ideally this is only set - # when the test framework is used by Nixpkgs NixOS tests. - nixpkgs.config.allowAliases = false; - } - )]; - }; - in - lib.warnIf (t?machine) "In test `${name}': The `machine' attribute in NixOS tests (pkgs.nixosTest / make-test-python.nix / testing-python.nix / makeTest) is deprecated. Please use the equivalent `nodes.machine'." - build-vms.buildVirtualNetwork ( - nodes // lib.optionalAttrs (machine != null) { inherit machine; } - ); - - driver = setupDriverForTest { - inherit testScript enableOCR skipTypeCheck skipLint passthru extraPythonPackages; - testName = name; - qemu_pkg = pkgs.qemu_test; - nodes = mkNodes pkgs.qemu_test; - }; - driverInteractive = setupDriverForTest { - inherit testScript enableOCR skipTypeCheck skipLint passthru extraPythonPackages; - testName = name; - qemu_pkg = pkgs.qemu; - nodes = mkNodes pkgs.qemu; - interactive = true; - }; - - test = lib.addMetaAttrs meta (runTests { inherit driver pos driverInteractive; }); - - in - test // { - inherit test driver driverInteractive; - inherit (driver) nodes; + runTest { + imports = [ + { _file = "makeTest parameters"; config = t; } + { + defaults = { + _file = "makeTest: extraConfigurations"; + imports = extraConfigurations; + }; + } + ]; }; - abortForFunction = functionName: abort ''The ${functionName} function was - removed because it is not an essential part of the NixOS testing - infrastructure. It had no usage in NixOS or Nixpkgs and it had no designated - maintainer. You are free to reintroduce it by documenting it in the manual - and adding yourself as maintainer. It was removed in - https://github.com/NixOS/nixpkgs/pull/137013 - ''; - - runInMachine = abortForFunction "runInMachine"; - - runInMachineWithX = abortForFunction "runInMachineWithX"; - simpleTest = as: (makeTest as).test; } diff --git a/nixos/modules/installer/tools/nixos-build-vms/build-vms.nix b/nixos/modules/installer/tools/nixos-build-vms/build-vms.nix index b4a94f62ad9..ced344bce23 100644 --- a/nixos/modules/installer/tools/nixos-build-vms/build-vms.nix +++ b/nixos/modules/installer/tools/nixos-build-vms/build-vms.nix @@ -15,7 +15,7 @@ let inherit system pkgs; }; - interactiveDriver = (testing.makeTest { inherit nodes; testScript = "start_all(); join_all();"; }).driverInteractive; + interactiveDriver = (testing.makeTest { inherit nodes; name = "network"; testScript = "start_all(); join_all();"; }).driverInteractive; in -- cgit 1.4.1 From 24d1d74e4e61e53326b7ed059528693afd17cc50 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 22 Jun 2022 01:12:01 +0200 Subject: nixos/testing: Extract nixos-test-base.nix NixOS module --- nixos/lib/testing/nixos-test-base.nix | 23 +++++++++++++++++++++++ nixos/lib/testing/nodes.nix | 13 +------------ 2 files changed, 24 insertions(+), 12 deletions(-) create mode 100644 nixos/lib/testing/nixos-test-base.nix diff --git a/nixos/lib/testing/nixos-test-base.nix b/nixos/lib/testing/nixos-test-base.nix new file mode 100644 index 00000000000..59e6e384336 --- /dev/null +++ b/nixos/lib/testing/nixos-test-base.nix @@ -0,0 +1,23 @@ +# A module containing the base imports and overrides that +# are always applied in NixOS VM tests, unconditionally, +# even in `inheritParentConfig = false` specialisations. +{ lib, ... }: +let + inherit (lib) mkForce; +in +{ + imports = [ + ../../modules/virtualisation/qemu-vm.nix + ../../modules/testing/test-instrumentation.nix # !!! should only get added for automated test runs + { key = "no-manual"; documentation.nixos.enable = false; } + { + key = "no-revision"; + # Make the revision metadata constant, in order to avoid needless retesting. + # The human version (e.g. 21.05-pre) is left as is, because it is useful + # for external modules that test with e.g. testers.nixosTest and rely on that + # version number. + config.system.nixos.revision = mkForce "constant-nixos-revision"; + } + + ]; +} diff --git a/nixos/lib/testing/nodes.nix b/nixos/lib/testing/nodes.nix index 98580d5dc4f..a83c2a52d3a 100644 --- a/nixos/lib/testing/nodes.nix +++ b/nixos/lib/testing/nodes.nix @@ -12,19 +12,8 @@ let modules = [ config.defaults ]; baseModules = (import ../../modules/module-list.nix) ++ [ - ../../modules/virtualisation/qemu-vm.nix - ../../modules/testing/test-instrumentation.nix # !!! should only get added for automated test runs - { key = "no-manual"; documentation.nixos.enable = false; } - { - key = "no-revision"; - # Make the revision metadata constant, in order to avoid needless retesting. - # The human version (e.g. 21.05-pre) is left as is, because it is useful - # for external modules that test with e.g. testers.nixosTest and rely on that - # version number. - config.system.nixos.revision = mkForce "constant-nixos-revision"; - } + ./nixos-test-base.nix { key = "nodes"; _module.args.nodes = nodes; } - ({ config, ... }: { virtualisation.qemu.package = testModuleArgs.config.qemu.package; -- cgit 1.4.1 From 57ac9dd3aeae93b9c4fa6e4a58792b7981535180 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 22 Jun 2022 00:50:53 +0200 Subject: nixos/lib/build-vms.nix: Remove It has been replaced by the modular test framework in nixos/lib/testing. If you are looking for a way to produce a VM-test-like configuration outside of the test framework, use the nixos/lib/testing/nixos-test-base.nix NixOS module, possibly in combination with { _module.args.nodes = .....; }. --- nixos/lib/build-vms.nix | 113 ------------------------------------------------ 1 file changed, 113 deletions(-) delete mode 100644 nixos/lib/build-vms.nix diff --git a/nixos/lib/build-vms.nix b/nixos/lib/build-vms.nix deleted file mode 100644 index 18af49db177..00000000000 --- a/nixos/lib/build-vms.nix +++ /dev/null @@ -1,113 +0,0 @@ -{ system -, # Use a minimal kernel? - minimal ? false -, # Ignored - config ? null -, # Nixpkgs, for qemu, lib and more - pkgs, lib -, # !!! See comment about args in lib/modules.nix - specialArgs ? {} -, # NixOS configuration to add to the VMs - extraConfigurations ? [] -}: - -with lib; - -rec { - - inherit pkgs; - - # Build a virtual network from an attribute set `{ machine1 = - # config1; ... machineN = configN; }', where `machineX' is the - # hostname and `configX' is a NixOS system configuration. Each - # machine is given an arbitrary IP address in the virtual network. - buildVirtualNetwork = - nodes: let nodesOut = mapAttrs (n: buildVM nodesOut) (assignIPAddresses nodes); in nodesOut; - - - buildVM = - nodes: configurations: - - import ./eval-config.nix { - inherit system specialArgs; - modules = configurations ++ extraConfigurations; - baseModules = (import ../modules/module-list.nix) ++ - [ ../modules/virtualisation/qemu-vm.nix - ../modules/testing/test-instrumentation.nix # !!! should only get added for automated test runs - { key = "no-manual"; documentation.nixos.enable = false; } - { key = "no-revision"; - # Make the revision metadata constant, in order to avoid needless retesting. - # The human version (e.g. 21.05-pre) is left as is, because it is useful - # for external modules that test with e.g. testers.nixosTest and rely on that - # version number. - config.system.nixos.revision = mkForce "constant-nixos-revision"; - } - { key = "nodes"; _module.args.nodes = nodes; } - ] ++ optional minimal ../modules/testing/minimal-kernel.nix; - }; - - - # Given an attribute set { machine1 = config1; ... machineN = - # configN; }, sequentially assign IP addresses in the 192.168.1.0/24 - # range to each machine, and set the hostname to the attribute name. - assignIPAddresses = nodes: - - let - - machines = attrNames nodes; - - machinesNumbered = zipLists machines (range 1 254); - - nodes_ = forEach machinesNumbered (m: nameValuePair m.fst - [ ( { config, nodes, ... }: - let - interfacesNumbered = zipLists config.virtualisation.vlans (range 1 255); - interfaces = forEach interfacesNumbered ({ fst, snd }: - nameValuePair "eth${toString snd}" { ipv4.addresses = - [ { address = "192.168.${toString fst}.${toString m.snd}"; - prefixLength = 24; - } ]; - }); - - networkConfig = - { networking.hostName = mkDefault m.fst; - - networking.interfaces = listToAttrs interfaces; - - networking.primaryIPAddress = - optionalString (interfaces != []) (head (head interfaces).value.ipv4.addresses).address; - - # Put the IP addresses of all VMs in this machine's - # /etc/hosts file. If a machine has multiple - # interfaces, use the IP address corresponding to - # the first interface (i.e. the first network in its - # virtualisation.vlans option). - networking.extraHosts = flip concatMapStrings machines - (m': let config = (getAttr m' nodes).config; in - optionalString (config.networking.primaryIPAddress != "") - ("${config.networking.primaryIPAddress} " + - optionalString (config.networking.domain != null) - "${config.networking.hostName}.${config.networking.domain} " + - "${config.networking.hostName}\n")); - - virtualisation.qemu.options = - let qemu-common = import ../lib/qemu-common.nix { inherit lib pkgs; }; - in flip concatMap interfacesNumbered - ({ fst, snd }: qemu-common.qemuNICFlags snd fst m.snd); - }; - - in - { key = "ip-address"; - config = networkConfig // { - # Expose the networkConfig items for tests like nixops - # that need to recreate the network config. - system.build.networkConfig = networkConfig; - }; - } - ) - (getAttr m.fst nodes) - ] ); - - in listToAttrs nodes_; - -} -- cgit 1.4.1 From 5297d584bcc5f95c8e87c631813b4e2ab7f19ecc Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 22 Jun 2022 01:01:34 +0200 Subject: nixos/lib/eval-config: Document the use of baseModules --- nixos/lib/eval-config.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/lib/eval-config.nix b/nixos/lib/eval-config.nix index 791a03a3ba3..1e086271e52 100644 --- a/nixos/lib/eval-config.nix +++ b/nixos/lib/eval-config.nix @@ -17,6 +17,8 @@ evalConfigArgs@ # be set modularly anyway. pkgs ? null , # !!! what do we gain by making this configurable? + # we can add modules that are included in specialisations, regardless + # of inheritParentConfig. baseModules ? import ../modules/module-list.nix , # !!! See comment about args in lib/modules.nix extraArgs ? {} -- cgit 1.4.1 From 9886db059a822f9bc1f8fbdacfd1ca1938fe9ebf Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 25 Jun 2022 12:47:50 +0200 Subject: nixos/testing: Embrace callTest My conception of its input was wrong. It is quite a useful construct, even if its name is a bit weird. --- nixos/lib/testing-python.nix | 1 - nixos/lib/testing/run.nix | 20 +++++++++++--------- nixos/release.nix | 8 ++++---- nixos/tests/all-tests.nix | 21 +++++++++++++++++---- pkgs/top-level/all-packages.nix | 4 ++-- 5 files changed, 34 insertions(+), 20 deletions(-) diff --git a/nixos/lib/testing-python.nix b/nixos/lib/testing-python.nix index cdaed5fa514..fd34fe23d76 100644 --- a/nixos/lib/testing-python.nix +++ b/nixos/lib/testing-python.nix @@ -26,7 +26,6 @@ rec { extraTestModule = { config = { hostPkgs = pkgs; - minimalResult = hydra; }; }; diff --git a/nixos/lib/testing/run.nix b/nixos/lib/testing/run.nix index 65bcbe720bf..cc31914f745 100644 --- a/nixos/lib/testing/run.nix +++ b/nixos/lib/testing/run.nix @@ -16,22 +16,22 @@ in ''; }; - run = mkOption { + test = mkOption { type = types.package; description = '' - Derivation that runs the test. + Derivation that runs the test as its "build" process. ''; }; }; config = { - run = hostPkgs.stdenv.mkDerivation { - name = "vm-test-run-${config.name}"; + test = lib.lazyDerivation { # lazyDerivation improves performance when only passthru items and/or meta are used. + derivation = hostPkgs.stdenv.mkDerivation { + name = "vm-test-run-${config.name}"; - requiredSystemFeatures = [ "kvm" "nixos-test" ]; + requiredSystemFeatures = [ "kvm" "nixos-test" ]; - buildCommand = - '' + buildCommand = '' mkdir -p $out # effectively mute the XMLLogger @@ -40,9 +40,11 @@ in ${config.driver}/bin/nixos-test-driver -o $out ''; - passthru = config.passthru; + passthru = config.passthru; - meta = config.meta; + meta = config.meta; + }; + inherit (config) passthru meta; }; # useful for inspection (debugging / exploration) diff --git a/nixos/release.nix b/nixos/release.nix index f70b02c4292..4f27e5dbb21 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -22,8 +22,8 @@ let import ./tests/all-tests.nix { inherit system; pkgs = import ./.. { inherit system; }; - callTest = t: { - ${system} = hydraJob t.test; + callTest = config: { + ${system} = hydraJob config.test; }; } // { # for typechecking of the scripts and evaluation of @@ -32,8 +32,8 @@ let import ./tests/all-tests.nix { inherit system; pkgs = import ./.. { inherit system; }; - callTest = t: { - ${system} = hydraJob t.test.driver; + callTest = config: { + ${system} = hydraJob config.driver; }; }; }; diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 5cd58cb5c3f..62e05fcf2b1 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1,4 +1,11 @@ -{ system, pkgs, callTest }: +{ system, + pkgs, + + # Projects the test configuration into a the desired value; usually + # the test runner: `config: config.test`. + callTest, + +}: # The return value of this function will be an attrset with arbitrary depth and # the `anything` returned by callTest at its test leafs. # The tests not supported by `system` will be replaced with `{}`, so that @@ -29,11 +36,17 @@ let inherit (rec { - doRunTest = (import ../lib/testing-python.nix { inherit system pkgs; }).runTest; + doRunTest = arg: (import ../lib/testing-python.nix { inherit system pkgs; }).runTest { + imports = [ arg { inherit callTest; } ]; + }; findTests = tree: if tree?recurseForDerivations && tree.recurseForDerivations - then mapAttrs (k: findTests) (builtins.removeAttrs tree ["recurseForDerivations"]) - else callTest ({ test = tree; }); + then + mapAttrs + (k: findTests) + (builtins.removeAttrs tree ["recurseForDerivations"]) + else callTest tree; + runTest = arg: let r = doRunTest arg; in findTests r; runTestOn = systems: arg: if elem system systems then runTest arg diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ec53eedd77f..d369fafdcc4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -140,14 +140,14 @@ with pkgs; nixosTests = import ../../nixos/tests/all-tests.nix { inherit pkgs; system = stdenv.hostPlatform.system; - callTest = t: t.test; + callTest = config: config.test; } // { # for typechecking of the scripts and evaluation of # the nodes, without running VMs. allDrivers = import ../../nixos/tests/all-tests.nix { inherit pkgs; system = stdenv.hostPlatform.system; - callTest = t: t.test.driver; + callTest = config: config.test.driver; }; }; -- cgit 1.4.1 From e77913a680bc9e7bfd2c93047ecfd6697e2402d7 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 25 Jun 2022 21:26:50 +0200 Subject: nixos/all-tests.nix: Invoke tests based on make-test-python.nix --- nixos/tests/all-tests.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 62e05fcf2b1..21e75561964 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -18,9 +18,18 @@ with pkgs.lib; let discoverTests = val: - if !isAttrs val then val - else if hasAttr "test" val then callTest val - else mapAttrs (n: s: discoverTests s) val; + if isAttrs val + then + if hasAttr "test" val then callTest val + else mapAttrs (n: s: discoverTests s) val + else if isFunction val + then + # Tests based on make-test-python.nix will return the second lambda + # in that file, which are then forwarded to the test definition + # following the `import make-test-python.nix` expression + # (if it is a function). + discoverTests (val { inherit system pkgs; }) + else val; handleTest = path: args: discoverTests (import path ({ inherit system pkgs; } // args)); handleTestOn = systems: path: args: -- cgit 1.4.1 From f01fec40994463da0157e8833969c37e4c03ba25 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 25 Jun 2022 23:29:49 +0200 Subject: nixos/testing/network.nix: Fix specialisations onlyShorthand --- nixos/lib/testing/network.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/nixos/lib/testing/network.nix b/nixos/lib/testing/network.nix index c87abee30c9..4c00a0ba45d 100644 --- a/nixos/lib/testing/network.nix +++ b/nixos/lib/testing/network.nix @@ -93,11 +93,15 @@ let specialisation = mkOption { type = types.attrsOf (types.submodule { options.configuration = mkOption { - type = types.submodule ({ - config.virtualisation.test.nodeName = - # assert regular.config.virtualisation.test.nodeName != "configuration"; - regular.config.virtualisation.test.nodeName; - }); + type = types.submoduleWith { + modules = [ + { + config.virtualisation.test.nodeName = + # assert regular.config.virtualisation.test.nodeName != "configuration"; + regular.config.virtualisation.test.nodeName; + } + ]; + }; }; }); }; -- cgit 1.4.1 From 0af6e6b0e5c3919190c0eca0b42dc10cab82458f Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 26 Jun 2022 00:13:03 +0200 Subject: nixos/testing/meta.nix: Add options, some optional --- nixos/lib/testing/meta.nix | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/nixos/lib/testing/meta.nix b/nixos/lib/testing/meta.nix index 1312d6a986e..07ab27b11f8 100644 --- a/nixos/lib/testing/meta.nix +++ b/nixos/lib/testing/meta.nix @@ -4,9 +4,25 @@ let in { options = { - meta.maintainers = lib.mkOption { - type = types.listOf types.raw; - default = []; + meta = lib.mkOption { + apply = lib.filterAttrs (k: v: v != null); + type = types.submodule { + options = { + maintainers = lib.mkOption { + type = types.listOf types.raw; + default = []; + }; + timeout = lib.mkOption { + type = types.nullOr types.int; + default = null; + }; + broken = lib.mkOption { + type = types.bool; + default = false; + }; + }; + }; + default = {}; }; }; } -- cgit 1.4.1 From e260018f9c356ff6f82d19b37f0501f8a19f29c0 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 26 Jun 2022 00:14:38 +0200 Subject: nixos/tests: Add names --- nixos/tests/corerad.nix | 1 + nixos/tests/ghostunnel.nix | 1 + nixos/tests/lorri/default.nix | 2 ++ nixos/tests/matomo.nix | 2 ++ nixos/tests/matrix/conduit.nix | 2 ++ nixos/tests/nixops/default.nix | 1 + nixos/tests/pam/pam-file-contents.nix | 1 + nixos/tests/pppd.nix | 2 ++ nixos/tests/thelounge.nix | 2 ++ nixos/tests/zrepl.nix | 2 ++ 10 files changed, 16 insertions(+) diff --git a/nixos/tests/corerad.nix b/nixos/tests/corerad.nix index 638010f92f4..b6f5d7fc6f7 100644 --- a/nixos/tests/corerad.nix +++ b/nixos/tests/corerad.nix @@ -1,5 +1,6 @@ import ./make-test-python.nix ( { + name = "corerad"; nodes = { router = {config, pkgs, ...}: { config = { diff --git a/nixos/tests/ghostunnel.nix b/nixos/tests/ghostunnel.nix index 8bea6485402..91a7b7085f6 100644 --- a/nixos/tests/ghostunnel.nix +++ b/nixos/tests/ghostunnel.nix @@ -1,4 +1,5 @@ import ./make-test-python.nix ({ pkgs, ... }: { + name = "ghostunnel"; nodes = { backend = { pkgs, ... }: { services.nginx.enable = true; diff --git a/nixos/tests/lorri/default.nix b/nixos/tests/lorri/default.nix index 209b87f9f26..a4bdc92490c 100644 --- a/nixos/tests/lorri/default.nix +++ b/nixos/tests/lorri/default.nix @@ -1,4 +1,6 @@ import ../make-test-python.nix { + name = "lorri"; + nodes.machine = { pkgs, ... }: { imports = [ ../../modules/profiles/minimal.nix ]; environment.systemPackages = [ pkgs.lorri ]; diff --git a/nixos/tests/matomo.nix b/nixos/tests/matomo.nix index 526a24fc4db..0e09ad295f9 100644 --- a/nixos/tests/matomo.nix +++ b/nixos/tests/matomo.nix @@ -7,6 +7,8 @@ with pkgs.lib; let matomoTest = package: makeTest { + name = "matomo"; + nodes.machine = { config, pkgs, ... }: { services.matomo = { package = package; diff --git a/nixos/tests/matrix/conduit.nix b/nixos/tests/matrix/conduit.nix index 780837f962f..2b81c23598e 100644 --- a/nixos/tests/matrix/conduit.nix +++ b/nixos/tests/matrix/conduit.nix @@ -3,6 +3,8 @@ import ../make-test-python.nix ({ pkgs, ... }: name = "conduit"; in { + name = "matrix-conduit"; + nodes = { conduit = args: { services.matrix-conduit = { diff --git a/nixos/tests/nixops/default.nix b/nixos/tests/nixops/default.nix index 227b3881507..b77ac247639 100644 --- a/nixos/tests/nixops/default.nix +++ b/nixos/tests/nixops/default.nix @@ -19,6 +19,7 @@ let }); testLegacyNetwork = { nixopsPkg }: pkgs.nixosTest ({ + name = "nixops-legacy-network"; nodes = { deployer = { config, lib, nodes, pkgs, ... }: { imports = [ ../../modules/installer/cd-dvd/channel.nix ]; diff --git a/nixos/tests/pam/pam-file-contents.nix b/nixos/tests/pam/pam-file-contents.nix index 86c61003aeb..2bafd90618e 100644 --- a/nixos/tests/pam/pam-file-contents.nix +++ b/nixos/tests/pam/pam-file-contents.nix @@ -2,6 +2,7 @@ let name = "pam"; in import ../make-test-python.nix ({ pkgs, ... }: { + name = "pam-file-contents"; nodes.machine = { ... }: { imports = [ ../../modules/profiles/minimal.nix ]; diff --git a/nixos/tests/pppd.nix b/nixos/tests/pppd.nix index bda0aa75bb5..e714a6c21a6 100644 --- a/nixos/tests/pppd.nix +++ b/nixos/tests/pppd.nix @@ -5,6 +5,8 @@ import ./make-test-python.nix ( mode = "0640"; }; in { + name = "pppd"; + nodes = { server = {config, pkgs, ...}: { config = { diff --git a/nixos/tests/thelounge.nix b/nixos/tests/thelounge.nix index e9b85685bf2..8d5a37d46c4 100644 --- a/nixos/tests/thelounge.nix +++ b/nixos/tests/thelounge.nix @@ -1,4 +1,6 @@ import ./make-test-python.nix { + name = "thelounge"; + nodes = { private = { config, pkgs, ... }: { services.thelounge = { diff --git a/nixos/tests/zrepl.nix b/nixos/tests/zrepl.nix index 85dd834a6aa..0ed73fea34b 100644 --- a/nixos/tests/zrepl.nix +++ b/nixos/tests/zrepl.nix @@ -1,5 +1,7 @@ import ./make-test-python.nix ( { + name = "zrepl"; + nodes.host = {config, pkgs, ...}: { config = { # Prerequisites for ZFS and tests. -- cgit 1.4.1 From 583a4f0275c0c06e7c99758b0aa66aa738a098ab Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 26 Jun 2022 00:15:00 +0200 Subject: nixos/tests/cri-o: Fix maintainers --- nixos/tests/cri-o.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/tests/cri-o.nix b/nixos/tests/cri-o.nix index d3a8713d6a9..08e1e8f36b0 100644 --- a/nixos/tests/cri-o.nix +++ b/nixos/tests/cri-o.nix @@ -1,7 +1,7 @@ # This test runs CRI-O and verifies via critest import ./make-test-python.nix ({ pkgs, ... }: { name = "cri-o"; - meta.maintainers = with pkgs.lib.maintainers; teams.podman.members; + meta.maintainers = with pkgs.lib; teams.podman.members; nodes = { crio = { -- cgit 1.4.1 From 9303a3c73bd45f95997ea52597f901bb8759fd2d Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 26 Jun 2022 00:15:17 +0200 Subject: nixos/tests/installed-tests: Fix maintainers --- nixos/tests/installed-tests/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/tests/installed-tests/default.nix b/nixos/tests/installed-tests/default.nix index 3bb678d3678..b2c1b43f90e 100644 --- a/nixos/tests/installed-tests/default.nix +++ b/nixos/tests/installed-tests/default.nix @@ -40,7 +40,7 @@ let name = tested.name; meta = { - maintainers = tested.meta.maintainers; + maintainers = tested.meta.maintainers or []; }; nodes.machine = { ... }: { -- cgit 1.4.1 From 52bfa318e8797cffbd4750efbb59cc4d276187a6 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 26 Jun 2022 13:57:58 +0200 Subject: nixos/testing: Support mypy through regular mechanisms Rebase / forward port of 2c8bbf33fd84d2fd9de70d66c1f50ac1b6123dd8 --- nixos/lib/testing/driver.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nixos/lib/testing/driver.nix b/nixos/lib/testing/driver.nix index 9473d888cbb..b041693686e 100644 --- a/nixos/lib/testing/driver.nix +++ b/nixos/lib/testing/driver.nix @@ -52,6 +52,7 @@ let nativeBuildInputs = [ hostPkgs.makeWrapper ] ++ lib.optionals (!config.skipTypeCheck) [ hostPkgs.mypy ]; + buildInputs = [ testDriver ]; testScript = config.testScriptString; preferLocalBuild = true; passthru = config.passthru; @@ -73,13 +74,10 @@ let cat -n testScriptWithTypes - # set pythonpath so mypy knows where to find the imports. this requires the py.typed file. - export PYTHONPATH='${../test-driver}' mypy --no-implicit-optional \ --pretty \ --no-color-output \ testScriptWithTypes - unset PYTHONPATH ''} echo -n "$testScript" >> $out/test-script -- cgit 1.4.1 From 618f82406fb5ef9d57b04c965516c35f41d0e7a3 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 26 Jun 2022 14:59:21 +0200 Subject: nixos/tests/installer: Fix docbook dependency --- nixos/tests/installer.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 8bef4fad3dd..9e2eca8daa3 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -324,6 +324,9 @@ let desktop-file-utils docbook5 docbook_xsl_ns + (docbook-xsl-ns.override { + withManOptDedupPatch = true; + }) kmod.dev libarchive.dev libxml2.bin @@ -333,6 +336,7 @@ let perlPackages.ListCompare perlPackages.XMLLibXML python3Minimal + python3Packages.mistune shared-mime-info sudo texinfo -- cgit 1.4.1 From 4ce93fbae87bac1b4054b4875d607bcc00ba92bb Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 27 Jun 2022 13:05:59 +0200 Subject: nixos/testing-python: Add interactive variant support to makeTest --- nixos/lib/testing-python.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/lib/testing-python.nix b/nixos/lib/testing-python.nix index fd34fe23d76..c303b0bf17b 100644 --- a/nixos/lib/testing-python.nix +++ b/nixos/lib/testing-python.nix @@ -47,6 +47,7 @@ rec { then builtins.unsafeGetAttrPos "description" meta else builtins.unsafeGetAttrPos "testScript" t) , extraPythonPackages ? (_ : []) + , interactive ? {} } @ t: runTest { imports = [ -- cgit 1.4.1 From 6205d377477042582adc533197b1a05fbac6ddd0 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 27 Jun 2022 20:06:30 +0200 Subject: nixos/testing: Improve option docs --- doc/stdenv/meta.chapter.md | 4 +++ nixos/doc/manual/default.nix | 2 ++ .../development/writing-nixos-tests.section.md | 14 ++++---- .../development/writing-nixos-tests.section.xml | 32 +++++++++++-------- nixos/lib/testing/driver.nix | 31 ++++++++++++------ nixos/lib/testing/interactive.nix | 11 +++++-- nixos/lib/testing/meta.nix | 18 +++++++++-- nixos/lib/testing/name.nix | 13 ++++++-- nixos/lib/testing/network.nix | 5 +-- nixos/lib/testing/nodes.nix | 37 ++++++++++++++++++++-- nixos/lib/testing/run.nix | 10 ++++-- nixos/lib/testing/testScript.nix | 10 ++++-- 12 files changed, 141 insertions(+), 46 deletions(-) diff --git a/doc/stdenv/meta.chapter.md b/doc/stdenv/meta.chapter.md index 51ad29b4b16..a83aa0bd90f 100644 --- a/doc/stdenv/meta.chapter.md +++ b/doc/stdenv/meta.chapter.md @@ -213,6 +213,10 @@ runCommand "my-package-test" { A timeout (in seconds) for building the derivation. If the derivation takes longer than this time to build, it can fail due to breaking the timeout. However, all computers do not have the same computing power, hence some builders may decide to apply a multiplicative factor to this value. When filling this value in, try to keep it approximately consistent with other values already present in `nixpkgs`. +`meta` attributes are not stored in the instantiated derivation. +Therefore, this setting may be lost when the package is used as a dependency. +To be effective, it must be presented directly to an evaluation process that handles the `meta.timeout` attribute. + ### `hydraPlatforms` {#var-meta-hydraPlatforms} The list of Nix platform types for which the Hydra instance at `hydra.nixos.org` will build the package. (Hydra is the Nix-based continuous build system.) It defaults to the value of `meta.platforms`. Thus, the only reason to set `meta.hydraPlatforms` is if you want `hydra.nixos.org` to build the package on a subset of `meta.platforms`, or not at all, e.g. diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix index d61bbaddf76..5eaa4410601 100644 --- a/nixos/doc/manual/default.nix +++ b/nixos/doc/manual/default.nix @@ -13,6 +13,8 @@ with pkgs; let + inherit (lib) hasPrefix removePrefix; + lib = pkgs.lib; docbook_xsl_ns = pkgs.docbook-xsl-ns.override { diff --git a/nixos/doc/manual/development/writing-nixos-tests.section.md b/nixos/doc/manual/development/writing-nixos-tests.section.md index 8dd3e6fb759..1d8c0a2a664 100644 --- a/nixos/doc/manual/development/writing-nixos-tests.section.md +++ b/nixos/doc/manual/development/writing-nixos-tests.section.md @@ -22,12 +22,12 @@ A NixOS test is a module that has the following structure: ``` We refer to the whole test above as a test module, whereas the values -in `nodes.` are NixOS modules. (A NixOS configuration is a module.) +in [`nodes.`](#opt-nodes) are NixOS modules themselves. -The option `testScript` is a bit of Python code that executes the +The option [`testScript`](#opt-testScript) is a piece of Python code that executes the test (described below). During the test, it will start one or more virtual machines, the configuration of which is described by -the attribute `nodes`. +the option [`nodes`](#opt-nodes). An example of a single-node test is [`login.nix`](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/login.nix). @@ -58,7 +58,7 @@ For the purpose of constructing a test matrix, use the `matrix` options instead. hostname = runTest { imports = [ ./hostname.nix ]; defaults.networking.firewall.enable = false; }; ``` -You can run a test with attribute name `mytest` in `all-tests.nix` by invoking: +You can run a test with attribute name `mytest` in `nixos/tests/all-tests.nix` by invoking: ```shell nix-build -A nixosTests.mytest @@ -181,7 +181,7 @@ The following methods are available on machine objects: least one will be returned. ::: {.note} - This requires passing `enableOCR` to the test attribute set. + This requires [`enableOCR`](#opt-enableOCR) to be set to `true`. ::: `get_screen_text` @@ -190,7 +190,7 @@ The following methods are available on machine objects: machine\'s screen using optical character recognition. ::: {.note} - This requires passing `enableOCR` to the test attribute set. + This requires [`enableOCR`](#opt-enableOCR) to be set to `true`. ::: `send_monitor_command` @@ -301,7 +301,7 @@ The following methods are available on machine objects: `get_screen_text` and `get_screen_text_variants`). ::: {.note} - This requires passing `enableOCR` to the test attribute set. + This requires [`enableOCR`](#opt-enableOCR) to be set to `true`. ::: `wait_for_console_text` diff --git a/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml b/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml index 6d0465e4230..4910f0e863b 100644 --- a/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml +++ b/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml @@ -23,14 +23,17 @@
We refer to the whole test above as a test module, whereas the - values in nodes.<name> are NixOS modules. - (A NixOS configuration is a module.) + values in + nodes.<name> + are NixOS modules themselves. - The option testScript is a bit of Python code - that executes the test (described below). During the test, it will - start one or more virtual machines, the configuration of which is - described by the attribute nodes. + The option + testScript + is a piece of Python code that executes the test (described below). + During the test, it will start one or more virtual machines, the + configuration of which is described by the option + nodes. An example of a single-node test is @@ -73,7 +76,7 @@ You can run a test with attribute name mytest - in all-tests.nix by invoking: + in nixos/tests/all-tests.nix by invoking: nix-build -A nixosTests.mytest @@ -270,8 +273,9 @@ start_all() - This requires passing enableOCR to the - test attribute set. + This requires + enableOCR + to be set to true. @@ -287,8 +291,9 @@ start_all() - This requires passing enableOCR to the - test attribute set. + This requires + enableOCR + to be set to true. @@ -527,8 +532,9 @@ start_all() - This requires passing enableOCR to the - test attribute set. + This requires + enableOCR + to be set to true. diff --git a/nixos/lib/testing/driver.nix b/nixos/lib/testing/driver.nix index b041693686e..04e99f9e21d 100644 --- a/nixos/lib/testing/driver.nix +++ b/nixos/lib/testing/driver.nix @@ -1,6 +1,6 @@ { config, lib, hostPkgs, ... }: let - inherit (lib) mkOption types; + inherit (lib) mkOption types literalMD mdDoc; # Reifies and correctly wraps the python test driver for # the respective qemu version and with or without ocr support @@ -106,13 +106,13 @@ in options = { driver = mkOption { - description = "Script that runs the test."; + description = mdDoc "Package containing a script that runs the test."; type = types.package; - defaultText = lib.literalDocBook "set by the test framework"; + defaultText = literalMD "set by the test framework"; }; hostPkgs = mkOption { - description = "Nixpkgs attrset used outside the nodes."; + description = mdDoc "Nixpkgs attrset used outside the nodes."; type = types.raw; example = lib.literalExpression '' import nixpkgs { inherit system config overlays; } @@ -120,34 +120,39 @@ in }; qemu.package = mkOption { - description = "Which qemu package to use."; + description = mdDoc "Which qemu package to use for the virtualisation of [{option}`nodes`](#opt-nodes)."; type = types.package; default = hostPkgs.qemu_test; defaultText = "hostPkgs.qemu_test"; }; enableOCR = mkOption { - description = '' + description = mdDoc '' Whether to enable Optical Character Recognition functionality for - testing graphical programs. + testing graphical programs. See [Machine objects](`ssec-machine-objects`). ''; type = types.bool; default = false; }; extraPythonPackages = mkOption { - description = '' + description = mdDoc '' Python packages to add to the test driver. The argument is a Python package set, similar to `pkgs.pythonPackages`. ''; + example = lib.literalExpression '' + p: [ p.numpy ] + ''; type = types.functionTo (types.listOf types.package); default = ps: [ ]; }; extraDriverArgs = mkOption { - description = '' + description = mdDoc '' Extra arguments to pass to the test driver. + + They become part of [{option}`driver`](#opt-driver) via `wrapProgram`. ''; type = types.listOf types.str; default = []; @@ -156,11 +161,19 @@ in skipLint = mkOption { type = types.bool; default = false; + description = mdDoc '' + Do not run the linters. This may speed up your iteration cycle, but it is not something you should commit. + ''; }; skipTypeCheck = mkOption { type = types.bool; default = false; + description = mdDoc '' + Disable type checking. This must not be enabled for new NixOS tests. + + This may speed up your iteration cycle, unless you're working on the [{option}`testScript`](#opt-testScript). + ''; }; }; diff --git a/nixos/lib/testing/interactive.nix b/nixos/lib/testing/interactive.nix index fd4d481a3f8..43886fa7267 100644 --- a/nixos/lib/testing/interactive.nix +++ b/nixos/lib/testing/interactive.nix @@ -1,12 +1,19 @@ { config, lib, moduleType, hostPkgs, ... }: let - inherit (lib) mkOption types; + inherit (lib) mkOption types mdDoc; in { options = { interactive = mkOption { - description = "All the same options, but configured for interactive use."; + description = mdDoc '' + Tests [can be run interactively](#sec-running-nixos-tests-interactively). + + When they are, the configuration will include anything set in this submodule. + + You can set any top-level test option here. + ''; type = moduleType; + visible = "shallow"; }; }; diff --git a/nixos/lib/testing/meta.nix b/nixos/lib/testing/meta.nix index 07ab27b11f8..4d8b0e0f1c4 100644 --- a/nixos/lib/testing/meta.nix +++ b/nixos/lib/testing/meta.nix @@ -1,24 +1,38 @@ { lib, ... }: let - inherit (lib) types mkOption; + inherit (lib) types mkOption mdDoc; in { options = { meta = lib.mkOption { + description = mdDoc '' + The [`meta`](https://nixos.org/manual/nixpkgs/stable/#chap-meta) attributes that will be set on the returned derivations. + + Not all [`meta`](https://nixos.org/manual/nixpkgs/stable/#chap-meta) attributes are supported, but more can be added as desired. + ''; apply = lib.filterAttrs (k: v: v != null); type = types.submodule { options = { maintainers = lib.mkOption { type = types.listOf types.raw; default = []; + description = mdDoc '' + The [list of maintainers](https://nixos.org/manual/nixpkgs/stable/#var-meta-maintainers) for this test. + ''; }; timeout = lib.mkOption { type = types.nullOr types.int; - default = null; + default = null; # NOTE: null values are filtered out by `meta`. + description = mdDoc '' + The [{option}`test`](#opt-test)'s [`meta.timeout`](https://nixos.org/manual/nixpkgs/stable/#var-meta-timeout) in seconds. + ''; }; broken = lib.mkOption { type = types.bool; default = false; + description = mdDoc '' + Sets the [`meta.broken`](https://nixos.org/manual/nixpkgs/stable/#var-meta-broken) attribute on the [{option}`test`](#opt-test) derivation. + ''; }; }; }; diff --git a/nixos/lib/testing/name.nix b/nixos/lib/testing/name.nix index f9fa488511c..a54622e139b 100644 --- a/nixos/lib/testing/name.nix +++ b/nixos/lib/testing/name.nix @@ -1,7 +1,14 @@ { lib, ... }: +let + inherit (lib) mkOption types mdDoc; +in { - options.name = lib.mkOption { - description = "The name of the test."; - type = lib.types.str; + options.name = mkOption { + description = mdDoc '' + The name of the test. + + This is used in the derivation names of the [{option}`driver`](#opt-driver) and [{option}`test`](#opt-test) runner. + ''; + type = types.str; }; } diff --git a/nixos/lib/testing/network.nix b/nixos/lib/testing/network.nix index 4c00a0ba45d..513ec7a1409 100644 --- a/nixos/lib/testing/network.nix +++ b/nixos/lib/testing/network.nix @@ -5,6 +5,7 @@ let attrNames concatMap concatMapStrings flip forEach head listToAttrs mkDefault mkOption nameValuePair optionalString range types zipListsWith zipLists + mdDoc ; nodeNumbers = @@ -74,7 +75,7 @@ let default = name; # We need to force this in specilisations, otherwise it'd be # readOnly = true; - description = '' + description = mdDoc '' The `name` in `nodes.`; stable across `specialisations`. ''; }; @@ -83,7 +84,7 @@ let type = types.int; readOnly = true; default = nodeNumbers.${config.virtualisation.test.nodeName}; - description = '' + description = mdDoc '' A unique number assigned for each node in `nodes`. ''; }; diff --git a/nixos/lib/testing/nodes.nix b/nixos/lib/testing/nodes.nix index a83c2a52d3a..624fc384c7e 100644 --- a/nixos/lib/testing/nodes.nix +++ b/nixos/lib/testing/nodes.nix @@ -1,7 +1,7 @@ testModuleArgs@{ config, lib, hostPkgs, nodes, ... }: let - inherit (lib) mkOption mkForce optional types mapAttrs mkDefault; + inherit (lib) mkOption mkForce optional types mapAttrs mkDefault mdDoc; system = hostPkgs.stdenv.hostPlatform.system; @@ -39,11 +39,29 @@ in nodes = mkOption { type = types.lazyAttrsOf config.node.type; + visible = "shallow"; + description = mdDoc '' + An attribute set of NixOS configuration modules. + + The configurations are augmented by the [`defaults`](#opt-defaults) option. + + They are assigned network addresses according to the `nixos/lib/testing/network.nix` module. + + A few special options are available, that aren't in a plain NixOS configuration. See [Configuring the nodes](#sec-nixos-test-nodes) + ''; }; defaults = mkOption { - description = '' - NixOS configuration that is applied to all {option}`nodes`. + description = mdDoc '' + NixOS configuration that is applied to all [{option}`nodes`](#opt-nodes). + ''; + type = types.deferredModule; + default = { }; + }; + + extraBaseModules = mkOption { + description = mdDoc '' + NixOS configuration that, like [{option}`defaults`](#opt-defaults), is applied to all [{option}`nodes`](#opt-nodes) and can not be undone with [`specialisation..inheritParentConfig`](https://search.nixos.org/options?show=specialisation.%3Cname%3E.inheritParentConfig&from=0&size=50&sort=relevance&type=packages&query=specialisation). ''; type = types.deferredModule; default = { }; @@ -52,15 +70,28 @@ in node.specialArgs = mkOption { type = types.lazyAttrsOf types.raw; default = { }; + description = mdDoc '' + An attribute set of arbitrary values that will be made available as module arguments during the resolution of module `imports`. + + Note that it is not possible to override these from within the NixOS configurations. If you argument is not relevant to `imports`, consider setting {option}`defaults._module.args.` instead. + ''; }; minimal = mkOption { type = types.bool; default = false; + description = mdDoc '' + Enable to configure all [{option}`nodes`](#opt-nodes) to run with a minimal kernel. + ''; }; nodesCompat = mkOption { internal = true; + description = mdDoc '' + Basically `_module.args.nodes`, but with backcompat and warnings added. + + This will go away. + ''; }; }; diff --git a/nixos/lib/testing/run.nix b/nixos/lib/testing/run.nix index cc31914f745..0cd07d8afd2 100644 --- a/nixos/lib/testing/run.nix +++ b/nixos/lib/testing/run.nix @@ -1,12 +1,12 @@ { config, hostPkgs, lib, ... }: let - inherit (lib) types mkOption; + inherit (lib) types mkOption mdDoc; in { options = { passthru = mkOption { type = types.lazyAttrsOf types.raw; - description = '' + description = mdDoc '' Attributes to add to the returned derivations, which are not necessarily part of the build. @@ -18,8 +18,12 @@ in test = mkOption { type = types.package; - description = '' + # TODO: can the interactive driver be configured to access the network? + description = mdDoc '' Derivation that runs the test as its "build" process. + + This implies that NixOS tests run isolated from the network, making them + more dependable. ''; }; }; diff --git a/nixos/lib/testing/testScript.nix b/nixos/lib/testing/testScript.nix index 08e87b626b3..5d4181c5f5d 100644 --- a/nixos/lib/testing/testScript.nix +++ b/nixos/lib/testing/testScript.nix @@ -1,12 +1,16 @@ testModuleArgs@{ config, lib, hostPkgs, nodes, moduleType, ... }: let - inherit (lib) mkOption types; + inherit (lib) mkOption types mdDoc; inherit (types) either str functionTo; in { options = { testScript = mkOption { type = either str (functionTo str); + description = '' + A series of python declarations and statements that you write to perform + the test. + ''; }; testScriptString = mkOption { type = str; @@ -21,9 +25,11 @@ in }; withoutTestScriptReferences = mkOption { type = moduleType; - description = '' + description = mdDoc '' A parallel universe where the testScript is invalid and has no references. ''; + internal = true; + visible = false; }; }; config = { -- cgit 1.4.1 From ac03757eb214edf3de5d36761ea4a3f2b0dfd370 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 27 Jun 2022 17:52:08 +0200 Subject: nixos/doc: Wire up the test options reference --- nixos/doc/manual/default.nix | 28 ++++++++++++++++++++++ .../development/writing-nixos-tests.section.md | 9 ++++++- .../development/writing-nixos-tests.section.xml | 13 ++++++---- 3 files changed, 45 insertions(+), 5 deletions(-) diff --git a/nixos/doc/manual/default.nix b/nixos/doc/manual/default.nix index 5eaa4410601..ecd62eb4e84 100644 --- a/nixos/doc/manual/default.nix +++ b/nixos/doc/manual/default.nix @@ -38,6 +38,33 @@ let }; }; + nixos-lib = import ../../lib { }; + + testOptionsDoc = let + eval = nixos-lib.evalTest { + # Avoid evaluating a NixOS config prototype. + config.node.type = lib.types.deferredModule; + options._module.args = lib.mkOption { internal = true; }; + }; + in buildPackages.nixosOptionsDoc { + inherit (eval) options; + inherit (revision); + transformOptions = opt: opt // { + # Clean up declaration sites to not refer to the NixOS source tree. + declarations = + map + (decl: + if hasPrefix (toString ../../..) (toString decl) + then + let subpath = removePrefix "/" (removePrefix (toString ../../..) (toString decl)); + in { url = "https://github.com/NixOS/nixpkgs/blob/master/${subpath}"; name = subpath; } + else decl) + opt.declarations; + }; + documentType = "none"; + variablelistId = "test-options-list"; + }; + sources = lib.sourceFilesBySuffices ./. [".xml"]; modulesDoc = builtins.toFile "modules.xml" '' @@ -52,6 +79,7 @@ let mkdir $out ln -s ${modulesDoc} $out/modules.xml ln -s ${optionsDoc.optionsDocBook} $out/options-db.xml + ln -s ${testOptionsDoc.optionsDocBook} $out/test-options-db.xml printf "%s" "${version}" > $out/version ''; diff --git a/nixos/doc/manual/development/writing-nixos-tests.section.md b/nixos/doc/manual/development/writing-nixos-tests.section.md index 1d8c0a2a664..043da45d517 100644 --- a/nixos/doc/manual/development/writing-nixos-tests.section.md +++ b/nixos/doc/manual/development/writing-nixos-tests.section.md @@ -52,7 +52,6 @@ Tests that are part of NixOS are added to [`nixos/tests/all-tests.nix`](https:// ``` Overrides can be added by defining an anonymous module in `all-tests.nix`. -For the purpose of constructing a test matrix, use the `matrix` options instead. ```nix hostname = runTest { imports = [ ./hostname.nix ]; defaults.networking.firewall.enable = false; }; @@ -476,3 +475,11 @@ added using the parameter `extraPythonPackages`. For example, you could add ``` In that case, `numpy` is chosen from the generic `python3Packages`. + +## Test Options Reference {#sec-test-options-reference} + +The following options can be used when writing tests. + +```{=docbook} + +``` diff --git a/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml b/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml index 4910f0e863b..ed6662f637f 100644 --- a/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml +++ b/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml @@ -1,4 +1,4 @@ -
+
Writing Tests A NixOS test is a module that has the following structure: @@ -67,9 +67,7 @@ Overrides can be added by defining an anonymous module in - all-tests.nix. For the purpose of - constructing a test matrix, use the matrix - options instead. + all-tests.nix. hostname = runTest { imports = [ ./hostname.nix ]; defaults.networking.firewall.enable = false; }; @@ -770,4 +768,11 @@ def foo_running(): python3Packages.
+
+ Test Options Reference + + The following options can be used when writing tests. + + +
-- cgit 1.4.1 From 666e969da02e809ccd9f933e50d5759712286f8b Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 27 Jun 2022 20:07:08 +0200 Subject: nixos/testing: Add nodes.config backcompat to nodes module argument --- nixos/lib/testing/nodes.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/lib/testing/nodes.nix b/nixos/lib/testing/nodes.nix index 624fc384c7e..c2d4ad6e61b 100644 --- a/nixos/lib/testing/nodes.nix +++ b/nixos/lib/testing/nodes.nix @@ -13,7 +13,7 @@ let baseModules = (import ../../modules/module-list.nix) ++ [ ./nixos-test-base.nix - { key = "nodes"; _module.args.nodes = nodes; } + { key = "nodes"; _module.args.nodes = config.nodesCompat; } ({ config, ... }: { virtualisation.qemu.package = testModuleArgs.config.qemu.package; -- cgit 1.4.1 From b2caf7965c0ba5526956ad05d340168a77fd799e Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Mon, 11 Jul 2022 11:44:15 +0200 Subject: nixos/doc/writing-nixos-tests: Clarify working directory Co-authored-by: christian-burger --- nixos/doc/manual/development/writing-nixos-tests.section.md | 1 + nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml | 1 + 2 files changed, 2 insertions(+) diff --git a/nixos/doc/manual/development/writing-nixos-tests.section.md b/nixos/doc/manual/development/writing-nixos-tests.section.md index 043da45d517..f6f6c960b07 100644 --- a/nixos/doc/manual/development/writing-nixos-tests.section.md +++ b/nixos/doc/manual/development/writing-nixos-tests.section.md @@ -60,6 +60,7 @@ Overrides can be added by defining an anonymous module in `all-tests.nix`. You can run a test with attribute name `mytest` in `nixos/tests/all-tests.nix` by invoking: ```shell +cd /my/git/clone/of/nixpkgs nix-build -A nixosTests.mytest ``` diff --git a/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml b/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml index ed6662f637f..c5343f0a711 100644 --- a/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml +++ b/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml @@ -77,6 +77,7 @@ in nixos/tests/all-tests.nix by invoking: +cd /my/git/clone/of/nixpkgs nix-build -A nixosTests.mytest
-- cgit 1.4.1 From 6a78b414768de3f8107e1eecdf79121f3ee0c8a0 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 29 Jul 2022 11:50:12 +0200 Subject: nixos/doc/writing-nixos-tests: Various improvements Thanks to fricklerhandwerk for the many suggestions, most of which I have fixupped into preceding commits. --- .../development/writing-nixos-tests.section.md | 15 ++++++++------- .../development/writing-nixos-tests.section.xml | 22 +++++++++++----------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/nixos/doc/manual/development/writing-nixos-tests.section.md b/nixos/doc/manual/development/writing-nixos-tests.section.md index f6f6c960b07..62da4f33d81 100644 --- a/nixos/doc/manual/development/writing-nixos-tests.section.md +++ b/nixos/doc/manual/development/writing-nixos-tests.section.md @@ -39,12 +39,10 @@ It uses two client nodes to test correct locking across server crashes. ## Calling a test {#sec-calling-nixos-tests} -Tests are invoked a bit differently depending on whether the test lives in NixOS or in another project. +Tests are invoked differently depending on whether the test is part of NixOS or lives in a different project. ### Testing within NixOS {#sec-call-nixos-test-in-nixos} -Test modules can be instantiated into derivations in multiple ways. - Tests that are part of NixOS are added to [`nixos/tests/all-tests.nix`](https://github.com/NixOS/nixpkgs/blob/master/nixos/tests/all-tests.nix). ```nix @@ -54,19 +52,22 @@ Tests that are part of NixOS are added to [`nixos/tests/all-tests.nix`](https:// Overrides can be added by defining an anonymous module in `all-tests.nix`. ```nix - hostname = runTest { imports = [ ./hostname.nix ]; defaults.networking.firewall.enable = false; }; + hostname = runTest { + imports = [ ./hostname.nix ]; + defaults.networking.firewall.enable = false; + }; ``` -You can run a test with attribute name `mytest` in `nixos/tests/all-tests.nix` by invoking: +You can run a test with attribute name `hostname` in `nixos/tests/all-tests.nix` by invoking: ```shell cd /my/git/clone/of/nixpkgs -nix-build -A nixosTests.mytest +nix-build -A nixosTests.hostname ``` ### Testing outside the NixOS project {#sec-call-nixos-test-outside-nixos} -Outside the `nixpkgs` repository, you can instantiate the test by first acquiring the NixOS library, +Outside the `nixpkgs` repository, you can instantiate the test by first importing the NixOS library, ```nix # regular nix diff --git a/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml b/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml index c5343f0a711..6e27845b598 100644 --- a/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml +++ b/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml @@ -49,15 +49,11 @@
Calling a test - Tests are invoked a bit differently depending on whether the test - lives in NixOS or in another project. + Tests are invoked differently depending on whether the test is + part of NixOS or lives in a different project.
Testing within NixOS - - Test modules can be instantiated into derivations in multiple - ways. - Tests that are part of NixOS are added to nixos/tests/all-tests.nix. @@ -70,22 +66,26 @@ all-tests.nix. - hostname = runTest { imports = [ ./hostname.nix ]; defaults.networking.firewall.enable = false; }; + hostname = runTest { + imports = [ ./hostname.nix ]; + defaults.networking.firewall.enable = false; + }; - You can run a test with attribute name mytest - in nixos/tests/all-tests.nix by invoking: + You can run a test with attribute name + hostname in + nixos/tests/all-tests.nix by invoking: cd /my/git/clone/of/nixpkgs -nix-build -A nixosTests.mytest +nix-build -A nixosTests.hostname
Testing outside the NixOS project Outside the nixpkgs repository, you can - instantiate the test by first acquiring the NixOS library, + instantiate the test by first importing the NixOS library, # regular nix -- cgit 1.4.1 From 7cdc9bc34012e367522b6ac7ed98631fa95c5deb Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 19 Aug 2022 12:09:58 +0200 Subject: nixos/testing: Improve interactive docs --- .../running-nixos-tests-interactively.section.md | 12 ++++++++--- .../running-nixos-tests-interactively.section.xml | 23 ++++++++++++++++------ nixos/lib/testing/interactive.nix | 22 ++++++++++++++++++++- 3 files changed, 47 insertions(+), 10 deletions(-) diff --git a/nixos/doc/manual/development/running-nixos-tests-interactively.section.md b/nixos/doc/manual/development/running-nixos-tests-interactively.section.md index 6170057442d..d9c316f4b13 100644 --- a/nixos/doc/manual/development/running-nixos-tests-interactively.section.md +++ b/nixos/doc/manual/development/running-nixos-tests-interactively.section.md @@ -38,6 +38,12 @@ directory. ## Interactive-only test configuration {#sec-nixos-test-interactive-configuration} -You can add configuration that is specific to the interactive test driver, by adding to the `interactive` option. -`interactive` is a copy of the regular test options namespace, and is used by the interactive test driver. -It can be helpful for troubleshooting changes that you don't want to apply to regular test runs. +The `.driverInteractive` attribute combines the regular test configuration with +definitions from the [`interactive` submodule](#opt-interactive). This gives you +a more usable, graphical, but slightly different configuration. + +You can add your own interactive-only test configuration by adding extra +configuration to the [`interactive` submodule](#opt-interactive). + +To interactively run only the regular configuration, build the `.driver` attribute +instead, and call it with the flag `result/bin/nixos-test-driver --interactive`. diff --git a/nixos/doc/manual/from_md/development/running-nixos-tests-interactively.section.xml b/nixos/doc/manual/from_md/development/running-nixos-tests-interactively.section.xml index edd3c33ff40..35d9bbd1c1f 100644 --- a/nixos/doc/manual/from_md/development/running-nixos-tests-interactively.section.xml +++ b/nixos/doc/manual/from_md/development/running-nixos-tests-interactively.section.xml @@ -42,12 +42,23 @@ $ ./result/bin/nixos-test-driver --keep-vm-state
Interactive-only test configuration - You can add configuration that is specific to the interactive test - driver, by adding to the interactive option. - interactive is a copy of the regular test - options namespace, and is used by the interactive test driver. It - can be helpful for troubleshooting changes that you don’t want to - apply to regular test runs. + The .driverInteractive attribute combines the + regular test configuration with definitions from the + interactive + submodule. This gives you a more usable, graphical, but + slightly different configuration. + + + You can add your own interactive-only test configuration by adding + extra configuration to the + interactive + submodule. + + + To interactively run only the regular configuration, build the + <test>.driver attribute instead, and call + it with the flag + result/bin/nixos-test-driver --interactive.
diff --git a/nixos/lib/testing/interactive.nix b/nixos/lib/testing/interactive.nix index 43886fa7267..317ed424188 100644 --- a/nixos/lib/testing/interactive.nix +++ b/nixos/lib/testing/interactive.nix @@ -6,11 +6,31 @@ in options = { interactive = mkOption { description = mdDoc '' - Tests [can be run interactively](#sec-running-nixos-tests-interactively). + Tests [can be run interactively](#sec-running-nixos-tests-interactively) + using the program in the test derivation's `.driverInteractive` attribute. When they are, the configuration will include anything set in this submodule. You can set any top-level test option here. + + Example test module: + + ```nix + { config, lib, ... }: { + + nodes.rabbitmq = { + services.rabbitmq.enable = true; + }; + + # When running interactively ... + interactive.nodes.rabbitmq = { + # ... enable the web ui. + services.rabbitmq.managementPlugin.enable = true; + }; + } + ``` + + For details, see the section about [running tests interactively](#sec-running-nixos-tests-interactively). ''; type = moduleType; visible = "shallow"; -- cgit 1.4.1 From 1c0b9c4a482b745040be828eafa8bb6b4e3b2200 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 17 Sep 2022 14:34:14 +0100 Subject: nixos/testing/network.nix: Add network config to specialisations --- nixos/lib/testing/network.nix | 2 +- nixos/lib/testing/nodes.nix | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/lib/testing/network.nix b/nixos/lib/testing/network.nix index 513ec7a1409..04ea9a2bc9f 100644 --- a/nixos/lib/testing/network.nix +++ b/nixos/lib/testing/network.nix @@ -112,6 +112,6 @@ let in { config = { - defaults = { imports = [ networkModule nodeNumberModule ]; }; + extraBaseModules = { imports = [ networkModule nodeNumberModule ]; }; }; } diff --git a/nixos/lib/testing/nodes.nix b/nixos/lib/testing/nodes.nix index c2d4ad6e61b..765af2878df 100644 --- a/nixos/lib/testing/nodes.nix +++ b/nixos/lib/testing/nodes.nix @@ -22,6 +22,7 @@ let # when the test framework is used by Nixpkgs NixOS tests. nixpkgs.config.allowAliases = false; }) + testModuleArgs.config.extraBaseModules ] ++ optional config.minimal ../../modules/testing/minimal-kernel.nix; }; -- cgit 1.4.1 From f40ff7f1f12b49ca1aa5c9a0e3bad6cfdcf3ccaa Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 18 Sep 2022 12:59:14 +0100 Subject: nixos/tests/installer: Add make-options-doc dep --- nixos/tests/installer.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 9e2eca8daa3..d9f64a781c5 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -336,7 +336,13 @@ let perlPackages.ListCompare perlPackages.XMLLibXML python3Minimal - python3Packages.mistune + # make-options-doc/default.nix + (let + self = (pkgs.python3Minimal.override { + inherit self; + includeSiteCustomize = true; + }); + in self.withPackages (p: [ p.mistune ])) shared-mime-info sudo texinfo -- cgit 1.4.1 From 3ce4179374352b1407b1800cb97c1e08a07db4ca Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sat, 24 Sep 2022 17:32:56 +0100 Subject: nixos/doc/writing-nixos-tests: Remove flake info for now --- nixos/doc/manual/development/writing-nixos-tests.section.md | 11 ----------- .../from_md/development/writing-nixos-tests.section.xml | 12 +----------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/nixos/doc/manual/development/writing-nixos-tests.section.md b/nixos/doc/manual/development/writing-nixos-tests.section.md index 62da4f33d81..99704ec3c14 100644 --- a/nixos/doc/manual/development/writing-nixos-tests.section.md +++ b/nixos/doc/manual/development/writing-nixos-tests.section.md @@ -70,20 +70,9 @@ nix-build -A nixosTests.hostname Outside the `nixpkgs` repository, you can instantiate the test by first importing the NixOS library, ```nix -# regular nix let nixos-lib = import (nixpkgs + "/nixos/lib") { }; in -``` -```nix -# flake -let nixos-lib = nixpkgs.lib.nixos; -in -``` - -... and then invoking `runTest`, for example: - -```nix nixos-lib.runTest { imports = [ ./test.nix ]; hostPkgs = pkgs; # the Nixpkgs package set used outside the VMs diff --git a/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml b/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml index 6e27845b598..32f5fdb77f5 100644 --- a/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml +++ b/nixos/doc/manual/from_md/development/writing-nixos-tests.section.xml @@ -88,19 +88,9 @@ nix-build -A nixosTests.hostname instantiate the test by first importing the NixOS library, -# regular nix let nixos-lib = import (nixpkgs + "/nixos/lib") { }; in - - -# flake -let nixos-lib = nixpkgs.lib.nixos; -in - - - … and then invoking runTest, for example: - - + nixos-lib.runTest { imports = [ ./test.nix ]; hostPkgs = pkgs; # the Nixpkgs package set used outside the VMs -- cgit 1.4.1 From 2ea06ef2daaaaca73f4152f367bc76d8accdc389 Mon Sep 17 00:00:00 2001 From: maralorn Date: Sun, 25 Sep 2022 07:16:54 +0200 Subject: haskellPackages: stackage LTS 19.24 -> LTS 19.25 This commit has been generated by maintainers/scripts/haskell/update-stackage.sh --- .../configuration-hackage2nix/stackage.yaml | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/stackage.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/stackage.yaml index d15dbb313b0..40512dd991f 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/stackage.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/stackage.yaml @@ -1,4 +1,4 @@ -# Stackage LTS 19.24 +# Stackage LTS 19.25 # This file is auto-generated by # maintainers/scripts/haskell/update-stackage.sh default-package-overrides: @@ -352,7 +352,7 @@ default-package-overrides: - clumpiness ==0.17.0.2 - ClustalParser ==1.3.0 - cmark ==0.6 - - cmark-gfm ==0.2.3 + - cmark-gfm ==0.2.4 - cmark-lucid ==0.1.0.0 - cmdargs ==0.10.21 - codec-beam ==0.2.0 @@ -408,7 +408,7 @@ default-package-overrides: - conferer-aeson ==1.1.0.2 - conferer-warp ==1.1.0.0 - ConfigFile ==1.1.4 - - config-ini ==0.2.4.0 + - config-ini ==0.2.5.0 - configuration-tools ==0.6.1 - configurator ==0.3.0.0 - configurator-export ==0.1.0.1 @@ -622,7 +622,7 @@ default-package-overrides: - drifter ==0.3.0 - drifter-postgresql ==0.2.1 - drifter-sqlite ==0.1.0.0 - - dsp ==0.2.5.1 + - dsp ==0.2.5.2 - dual ==0.1.1.1 - dual-tree ==0.2.3.1 - dublincore-xml-conduit ==0.1.0.2 @@ -708,7 +708,7 @@ default-package-overrides: - exomizer ==1.0.0 - experimenter ==0.1.0.12 - expiring-cache-map ==0.0.6.1 - - explainable-predicates ==0.1.2.2 + - explainable-predicates ==0.1.2.3 - explicit-exception ==0.1.10 - exp-pairs ==0.2.1.0 - express ==1.0.10 @@ -846,7 +846,7 @@ default-package-overrides: - genvalidity-bytestring ==1.0.0.0 - genvalidity-containers ==1.0.0.0 - genvalidity-criterion ==1.0.0.0 - - genvalidity-hspec ==1.0.0.1 + - genvalidity-hspec ==1.0.0.2 - genvalidity-hspec-aeson ==1.0.0.0 - genvalidity-hspec-binary ==1.0.0.0 - genvalidity-hspec-cereal ==1.0.0.0 @@ -2135,8 +2135,8 @@ default-package-overrides: - search-algorithms ==0.3.2 - secp256k1-haskell ==0.6.1 - securemem ==0.1.10 - - selda ==0.5.1.0 - - selda-sqlite ==0.1.7.1 + - selda ==0.5.2.0 + - selda-sqlite ==0.1.7.2 - selections ==0.3.0.0 - selective ==0.5 - semialign ==1.2.0.1 @@ -2360,7 +2360,7 @@ default-package-overrides: - string-conversions ==0.4.0.1 - string-interpolate ==0.3.1.2 - string-qq ==0.0.4 - - string-random ==0.1.4.2 + - string-random ==0.1.4.3 - stringsearch ==0.3.6.6 - string-transform ==1.1.1 - stripe-concepts ==1.0.3.1 @@ -2510,7 +2510,7 @@ default-package-overrides: - through-text ==0.1.0.0 - th-strict-compat ==0.1.0.1 - th-test-utils ==1.1.1 - - th-utilities ==0.2.4.3 + - th-utilities ==0.2.5.0 - tidal ==1.7.10 - tile ==0.3.0.0 - time-compat ==1.9.6.1 @@ -2841,7 +2841,7 @@ with-compiler: ghc-9.0.2 - yesod-bin ==1.6.2.2 - yesod-core ==1.6.24.0 - yesod-eventsource ==1.6.0.1 - - yesod-form ==1.7.0 + - yesod-form ==1.7.2 - yesod-form-bootstrap4 ==3.0.1 - yesod-gitrepo ==0.3.0 - yesod-gitrev ==0.2.2 @@ -2854,7 +2854,7 @@ with-compiler: ghc-9.0.2 - yesod-routes-flow ==3.0.0.2 - yesod-sitemap ==1.6.0 - yesod-static ==1.6.1.0 - - yesod-test ==1.6.14 + - yesod-test ==1.6.15 - yesod-websockets ==0.3.0.3 - yes-precure5-command ==5.5.3 - yi-rope ==0.11 -- cgit 1.4.1 From 4bf438769b23f6f4efc0098ea9e7b1369786ac86 Mon Sep 17 00:00:00 2001 From: maralorn Date: Sun, 25 Sep 2022 07:17:08 +0200 Subject: all-cabal-hashes: 2022-09-21T15:25:15Z -> 2022-09-25T05:09:53Z This commit has been generated by maintainers/scripts/haskell/update-hackage.sh --- pkgs/data/misc/hackage/pin.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/data/misc/hackage/pin.json b/pkgs/data/misc/hackage/pin.json index d24661ecd03..b6342141f38 100644 --- a/pkgs/data/misc/hackage/pin.json +++ b/pkgs/data/misc/hackage/pin.json @@ -1,6 +1,6 @@ { - "commit": "12bd870a1ed095ff74dbe08ef4d5d930821e878d", - "url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/12bd870a1ed095ff74dbe08ef4d5d930821e878d.tar.gz", - "sha256": "196pl60xyv4ij1nxz4hv5fhmliisb5dmxl8w1jfl07z22cpd92p5", - "msg": "Update from Hackage at 2022-09-21T15:25:15Z" + "commit": "2712aaf8b4e5941ccc467326be418c19f4192703", + "url": "https://github.com/commercialhaskell/all-cabal-hashes/archive/2712aaf8b4e5941ccc467326be418c19f4192703.tar.gz", + "sha256": "0gsy99iqazv1cg0vznvdzf8q3zm5flv5645jx3q78fmq1rdzqwny", + "msg": "Update from Hackage at 2022-09-25T05:09:53Z" } -- cgit 1.4.1 From acc740181041a973e9870cdb76dcfb385a2ad200 Mon Sep 17 00:00:00 2001 From: maralorn Date: Sun, 25 Sep 2022 07:18:11 +0200 Subject: haskellPackages: regenerate package set based on current config This commit has been generated by maintainers/scripts/haskell/regenerate-hackage-packages.sh --- .../haskell-modules/hackage-packages.nix | 742 ++++++++++++--------- 1 file changed, 444 insertions(+), 298 deletions(-) diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index b364787e620..801e94399d5 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -12,6 +12,8 @@ self: { pname = "2captcha"; version = "0.1.0.0"; sha256 = "1876bdriagjfp4dyhhkpjrwa8kycvwa0zrdihw5q7dj5msmnxsrc"; + revision = "2"; + editedCabalFile = "1bqa1a49v1xbkl4p4q34wxk3a4pw5nkr6vb1s1lrdmdnkbf77y6v"; libraryHaskellDepends = [ aeson base bytestring clock exceptions http-client lens lens-aeson parsec text wreq @@ -16925,17 +16927,15 @@ self: { license = lib.licenses.bsd3; }) {}; - "PyF_0_11_0_0" = callPackage + "PyF_0_11_1_0" = callPackage ({ mkDerivation, base, bytestring, deepseq, filepath, ghc, ghc-boot , hspec, HUnit, mtl, parsec, process, template-haskell, temporary , text, time }: mkDerivation { pname = "PyF"; - version = "0.11.0.0"; - sha256 = "0c5dahiad6rnr1v6s8mijyw9z5xhiip5ycrlwphq1wzm6prmx6ma"; - revision = "1"; - editedCabalFile = "091gbpmwhzvkmsk1kpsczwqb02vyw3603mqxflrajg9h2idgsdkd"; + version = "0.11.1.0"; + sha256 = "07qwws303g4yzs01qi4r2nqjyp5sk2naiqb4qh9kirp54fn53m4g"; libraryHaskellDepends = [ base bytestring ghc ghc-boot mtl parsec template-haskell text time ]; @@ -21570,8 +21570,8 @@ self: { ({ mkDerivation, base, bytestring, transformers, vector, vulkan }: mkDerivation { pname = "VulkanMemoryAllocator"; - version = "0.10.1"; - sha256 = "0h9d6dnph9mbjyb6r77scy98j564i92nvipdrl4r5rhlni8hdj4p"; + version = "0.10.2"; + sha256 = "122r9za1vlgkm03lbq8yvpngacinick88vs9dpizd80rb2z4dy6k"; libraryHaskellDepends = [ base bytestring transformers vector vulkan ]; @@ -43052,8 +43052,8 @@ self: { ({ mkDerivation, base, bytestring, cborg, serialise }: mkDerivation { pname = "binary-serialise-cbor"; - version = "0.2.1.0"; - sha256 = "0qdbz2qvvqiaqp859fn00470gzxpvw8k3v0wqclgqps3zj9g9854"; + version = "0.2.2.0"; + sha256 = "16yhimka17dza5nda62927k5x66c0yrsxzz92kya3gicd6vaga2g"; libraryHaskellDepends = [ base bytestring cborg serialise ]; description = "Yet Another Binary Serialisation Library (compatibility shim)"; license = lib.licenses.bsd3; @@ -48190,6 +48190,37 @@ self: { mainProgram = "brainheck"; }) {}; + "brassica" = callPackage + ({ mkDerivation, base, bytestring, conduit, containers, criterion + , deepseq, file-embed, megaparsec, mtl, optparse-applicative + , parser-combinators, split, tasty, tasty-golden, text + , transformers, utf8-string + }: + mkDerivation { + pname = "brassica"; + version = "0.0.3"; + sha256 = "1anqswy00v2kg3l5n9m5cydpbhar7jqlj5ixki8k99ids0w1fws9"; + revision = "1"; + editedCabalFile = "0avv063fz3l71j241fvlvf26gv78n02fb6w61vd31aial073bwdc"; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ + base containers deepseq megaparsec mtl parser-combinators split + transformers + ]; + executableHaskellDepends = [ + base bytestring conduit optparse-applicative text + ]; + testHaskellDepends = [ + base bytestring conduit tasty tasty-golden text transformers + utf8-string + ]; + benchmarkHaskellDepends = [ base criterion file-embed text ]; + description = "Featureful sound change applier"; + license = lib.licenses.bsd3; + mainProgram = "brassica"; + }) {}; + "break" = callPackage ({ mkDerivation, base, mtl, transformers }: mkDerivation { @@ -52331,7 +52362,7 @@ self: { mainProgram = "cabal-plan"; }) {}; - "cabal-plan_0_7_2_2" = callPackage + "cabal-plan_0_7_2_3" = callPackage ({ mkDerivation, aeson, ansi-terminal, async, base, base-compat , base16-bytestring, bytestring, containers, directory, filepath , mtl, optics-core, optparse-applicative, parsec, process @@ -52340,8 +52371,8 @@ self: { }: mkDerivation { pname = "cabal-plan"; - version = "0.7.2.2"; - sha256 = "0ld2hgyyx64ns9cfxp1blb3azkv951qrcpx878hdvx2cdllgyy31"; + version = "0.7.2.3"; + sha256 = "0zrk1hai7j0kk7l3nv1ca6srzz36dv1rmvzw7zby945nam7030k2"; configureFlags = [ "-fexe" ]; isLibrary = true; isExecutable = true; @@ -53104,35 +53135,36 @@ self: { "cachix" = callPackage ({ mkDerivation, aeson, async, base, base64-bytestring, bytestring , cachix-api, concurrent-extra, conduit, conduit-extra, containers - , cookie, cryptonite, dhall, directory, ed25519, extra, filepath - , fsnotify, hercules-ci-cnix-store, here, hspec, hspec-discover - , http-client, http-client-tls, http-conduit, http-types - , inline-c-cpp, katip, lukko, lzma-conduit, megaparsec, memory - , mmorph, netrc, nix, optparse-applicative, pretty-terminal - , process, protolude, resourcet, retry, safe-exceptions, servant - , servant-auth, servant-auth-client, servant-client - , servant-client-core, servant-conduit, stm, stm-chans, stm-conduit - , systemd, temporary, text, time, unix, unordered-containers - , uri-bytestring, uuid, vector, versions, websockets, wuss + , cookie, cryptonite, dhall, directory, ed25519, either, extra + , filepath, fsnotify, hercules-ci-cnix-store, here, hspec + , hspec-discover, http-client, http-client-tls, http-conduit + , http-types, inline-c-cpp, katip, lukko, lzma-conduit, megaparsec + , memory, mmorph, netrc, nix, optparse-applicative, pretty-terminal + , prettyprinter, process, protolude, resourcet, retry + , safe-exceptions, servant, servant-auth, servant-auth-client + , servant-client, servant-client-core, servant-conduit, stm + , stm-chans, stm-conduit, systemd, temporary, text, time, unix + , unordered-containers, uri-bytestring, uuid, vector, versions + , websockets, wuss }: mkDerivation { pname = "cachix"; - version = "1.0.0"; - sha256 = "0gj5phmvcy6q6nd50yl9sg77aqb1nwm5z74lvijpb27cz453b8i1"; + version = "1.0.1"; + sha256 = "0jgs43h6pmyyq3r1sc7d27zsdxr5fbimgdvl8r8l1fdw1nlb322q"; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ aeson async base base64-bytestring bytestring cachix-api concurrent-extra conduit conduit-extra containers cookie cryptonite - dhall directory ed25519 extra filepath fsnotify + dhall directory ed25519 either extra filepath fsnotify hercules-ci-cnix-store here http-client http-client-tls http-conduit http-types inline-c-cpp katip lukko lzma-conduit megaparsec memory mmorph netrc optparse-applicative pretty-terminal - process protolude resourcet retry safe-exceptions servant - servant-auth servant-auth-client servant-client servant-client-core - servant-conduit stm stm-conduit systemd temporary text time unix - unordered-containers uri-bytestring uuid vector versions websockets - wuss + prettyprinter process protolude resourcet retry safe-exceptions + servant servant-auth servant-auth-client servant-client + servant-client-core servant-conduit stm stm-conduit systemd + temporary text time unix unordered-containers uri-bytestring uuid + vector versions websockets wuss ]; libraryPkgconfigDepends = [ nix ]; executableHaskellDepends = [ @@ -53160,8 +53192,8 @@ self: { }: mkDerivation { pname = "cachix-api"; - version = "1.0.0"; - sha256 = "1fx3d32y6xhc4djkdwssn7v44fm4wq5r23gjghddd0bd6z1rbrss"; + version = "1.0.1"; + sha256 = "1bv4pbzqzkfll8zm9qdrwbpj80jgdk5n0jby52j8szkvbj4rd357"; libraryHaskellDepends = [ aeson async base base16-bytestring bytestring conduit cookie cryptonite deepseq deriving-aeson exceptions http-api-data @@ -54253,6 +54285,8 @@ self: { pname = "captcha-2captcha"; version = "0.1.0.0"; sha256 = "19r7977vkbyd6if9bvh9m2vv2wmhynly6qzsq7ndckn4yw4xc5wx"; + revision = "1"; + editedCabalFile = "16rvzkg7wy82crgmlz68y9gljp5vv1dldwp3gdn61y95cmi9pybi"; libraryHaskellDepends = [ aeson base bytestring captcha-core errors extra http-client lens lens-aeson mtl o-clock string-conversions string-interpolate text @@ -54278,6 +54312,8 @@ self: { pname = "captcha-capmonster"; version = "0.1.0.0"; sha256 = "0ps7dwbkafi92a408c0fcc15vjp8b2gf400ijbx4vz5vm0s9dzvl"; + revision = "1"; + editedCabalFile = "14dl2762c0n4h3492252l3y3gyw9ds44hhw2123hlaq542apqvff"; libraryHaskellDepends = [ aeson aeson-qq base bytestring captcha-core errors extra http-client lens lens-aeson mtl o-clock string-interpolate text @@ -54302,6 +54338,8 @@ self: { pname = "captcha-core"; version = "0.1.0.1"; sha256 = "1qalmxbmpyr28v9683q7yqk8xky34ksgqxr6qgn7v8y1c0a4jlqd"; + revision = "1"; + editedCabalFile = "0vzk01va3h5vmshqicb7ngqky6759lzvfcx740qifi38rnvwmmdq"; libraryHaskellDepends = [ aeson base bytestring cookie data-default-extra lens mtl o-clock string-conversions text unliftio wreq @@ -55768,6 +55806,31 @@ self: { license = lib.licenses.bsd3; }) {}; + "cborg_0_2_8_0" = callPackage + ({ mkDerivation, aeson, array, base, base-orphans + , base16-bytestring, base64-bytestring, bytestring, containers + , deepseq, ghc-bignum, ghc-prim, half, primitive, QuickCheck + , random, scientific, tasty, tasty-hunit, tasty-quickcheck, text + , vector + }: + mkDerivation { + pname = "cborg"; + version = "0.2.8.0"; + sha256 = "07mh5bk61k5dz2x5g7fqw2cv7bjzs7v65yxvzkq7mdbkq8kwhn9f"; + libraryHaskellDepends = [ + array base bytestring containers deepseq ghc-bignum ghc-prim half + primitive text + ]; + testHaskellDepends = [ + aeson array base base-orphans base16-bytestring base64-bytestring + bytestring deepseq half QuickCheck random scientific tasty + tasty-hunit tasty-quickcheck text vector + ]; + description = "Concise Binary Object Representation (CBOR)"; + license = lib.licenses.bsd3; + hydraPlatforms = lib.platforms.none; + }) {}; + "cborg-json" = callPackage ({ mkDerivation, aeson, aeson-pretty, base, bytestring, cborg , criterion, deepseq, directory, process, scientific, text @@ -55789,6 +55852,28 @@ self: { license = lib.licenses.bsd3; }) {}; + "cborg-json_0_2_5_0" = callPackage + ({ mkDerivation, aeson, aeson-pretty, base, bytestring, cborg + , criterion, deepseq, directory, process, scientific, text + , unordered-containers, vector, zlib + }: + mkDerivation { + pname = "cborg-json"; + version = "0.2.5.0"; + sha256 = "1m3w0yyp6xb07fx04g5c52pb0b46vpkgpi32w1c8bz867x2p7hsq"; + libraryHaskellDepends = [ + aeson aeson-pretty base cborg scientific text unordered-containers + vector + ]; + benchmarkHaskellDepends = [ + aeson base bytestring cborg criterion deepseq directory process + zlib + ]; + description = "A library for encoding JSON as CBOR"; + license = lib.licenses.bsd3; + hydraPlatforms = lib.platforms.none; + }) {}; + "ccast" = callPackage ({ mkDerivation, base, template-haskell }: mkDerivation { @@ -60990,8 +61075,8 @@ self: { }: mkDerivation { pname = "cmark-gfm"; - version = "0.2.3"; - sha256 = "0krf1991bny99raw3961wp6hqdi0xmzcz18yisfp172kvd4cx33q"; + version = "0.2.4"; + sha256 = "1nkmlq015a8cyhcp669h8cd720n24j26v8w8rb04980z8h5z4ymp"; libraryHaskellDepends = [ base bytestring text ]; testHaskellDepends = [ base HUnit text ]; benchmarkHaskellDepends = [ @@ -63354,8 +63439,8 @@ self: { pname = "commutative-semigroups"; version = "0.1.0.0"; sha256 = "06063ayahakj0wdwwzqwbb61cxjrrkpayzmvbvf7pcdsgyn427b6"; - revision = "1"; - editedCabalFile = "107qs0srrd88n5hz1v2fwapsr36zr5lnz04lxsicj1mq7ss54zm3"; + revision = "2"; + editedCabalFile = "0pa5rwafvcf38bfw7fxg420gd68x3p3xh8apih0ni2wv9h9wc8vz"; libraryHaskellDepends = [ base containers ]; description = "Commutative semigroups"; license = lib.licenses.bsd3; @@ -66181,26 +66266,6 @@ self: { }) {}; "config-ini" = callPackage - ({ mkDerivation, base, containers, directory, hedgehog, ini - , megaparsec, text, transformers, unordered-containers - }: - mkDerivation { - pname = "config-ini"; - version = "0.2.4.0"; - sha256 = "0dfm4xb1sd713rcqzplzdgw68fyhj24i6lj8j3q8kldpmkl98lbf"; - revision = "2"; - editedCabalFile = "0iwraaa0y1b3xdsg760j1wpylkqshky0k2djcg0k4s97lrwqpbcz"; - libraryHaskellDepends = [ - base containers megaparsec text transformers unordered-containers - ]; - testHaskellDepends = [ - base containers directory hedgehog ini text unordered-containers - ]; - description = "A library for simple INI-based configuration files"; - license = lib.licenses.bsd3; - }) {}; - - "config-ini_0_2_5_0" = callPackage ({ mkDerivation, base, containers, directory, hedgehog, ini , megaparsec, text, transformers, unordered-containers }: @@ -66216,7 +66281,6 @@ self: { ]; description = "A library for simple INI-based configuration files"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; }) {}; "config-manager" = callPackage @@ -67015,6 +67079,8 @@ self: { pname = "constraints-extras"; version = "0.3.2.1"; sha256 = "0w2wwqsgxqkn8byivrgcsi6fh1kxbivqarmdnpxyh1a1cg373xfp"; + revision = "1"; + editedCabalFile = "1smha6ljia9bfgdy1h0lkgi9464rwa9lnw7rqfi1c23pzyiw13lh"; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ base constraints template-haskell ]; @@ -79960,8 +80026,8 @@ self: { pname = "diagrams-builder"; version = "0.8.0.5"; sha256 = "0dz617kfkvjf3f2zbphkdx1scglcjj162qsfk9xj7slbapnj918m"; - revision = "4"; - editedCabalFile = "0ni9kbzcazr0wcgzp6r19n0hd36sd29nrwj5af1sf4a1mbs4jwqf"; + revision = "5"; + editedCabalFile = "0h1wk2b256fv9h5h2r43rqia6n4i3fapsizflrhw2bfyqf0kw736"; configureFlags = [ "-fcairo" "-fps" "-frasterific" "-fsvg" ]; isLibrary = true; isExecutable = true; @@ -81947,6 +82013,8 @@ self: { pname = "discord-haskell"; version = "1.15.3"; sha256 = "1lgw0p7lzjz3mj49i45h4s0h5skjhjn3wmv79gv4wz9sxn9gp7bi"; + revision = "1"; + editedCabalFile = "0ajrdam5xdkkij8qm9qxlb5hl82qzmrlib3sxicdifn8kzxqvkdb"; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ @@ -85990,20 +86058,6 @@ self: { }) {}; "dsp" = callPackage - ({ mkDerivation, array, base, containers, QuickCheck, random }: - mkDerivation { - pname = "dsp"; - version = "0.2.5.1"; - sha256 = "03mhqqnjqjhklmlim6cljq5ik0l4h6lgqffw2i2clqgwj64ky5nf"; - isLibrary = true; - isExecutable = true; - libraryHaskellDepends = [ array base containers random ]; - testHaskellDepends = [ array base containers QuickCheck ]; - description = "Haskell Digital Signal Processing"; - license = lib.licenses.gpl2Only; - }) {}; - - "dsp_0_2_5_2" = callPackage ({ mkDerivation, array, base, containers, QuickCheck, random }: mkDerivation { pname = "dsp"; @@ -86015,7 +86069,6 @@ self: { testHaskellDepends = [ array base containers QuickCheck ]; description = "Haskell Digital Signal Processing"; license = lib.licenses.gpl2Only; - hydraPlatforms = lib.platforms.none; }) {}; "dstring" = callPackage @@ -88121,6 +88174,27 @@ self: { mainProgram = "editpipe"; }) {}; + "edits" = callPackage + ({ mkDerivation, base, containers, hedgehog, matrix, primitive + , protolude, registry-hedgehog, tasty, tasty-discover + , tasty-hedgehog, text, vector + }: + mkDerivation { + pname = "edits"; + version = "0.1.1.0"; + sha256 = "1labg64a8v72zwi2g5mzbs2b47vvk5kagnyi583r2i490v9l826w"; + libraryHaskellDepends = [ + base containers matrix primitive protolude text vector + ]; + testHaskellDepends = [ + base containers hedgehog matrix primitive protolude + registry-hedgehog tasty tasty-discover tasty-hedgehog text vector + ]; + testToolDepends = [ tasty-discover ]; + description = "show the differences between 2 pieces of Text using the Levenshtein distance"; + license = lib.licenses.mit; + }) {}; + "effect-handlers" = callPackage ({ mkDerivation, base, criterion, free, hspec, hspec-discover , HUnit, kan-extensions, mtl, QuickCheck @@ -94301,8 +94375,8 @@ self: { }: mkDerivation { pname = "exon"; - version = "1.0.0.2"; - sha256 = "04b418sxvj2pgjrq7nsz2hd30p5gimxg1csd8yj1xkmv2fjai1zl"; + version = "1.0.1.0"; + sha256 = "17yfbj1hc2vm1vgsz3nngj06i67w6m0nzq1hm40n4q9w9fzaspvv"; libraryHaskellDepends = [ base flatparse generics-sop ghc-hs-meta incipit-base template-haskell type-errors-pretty @@ -94530,26 +94604,6 @@ self: { }) {}; "explainable-predicates" = callPackage - ({ mkDerivation, array, base, doctest-exitcode-stdio, doctest-lib - , hspec, HUnit, mono-traversable, QuickCheck, regex-tdfa, syb - , template-haskell - }: - mkDerivation { - pname = "explainable-predicates"; - version = "0.1.2.2"; - sha256 = "16aajh4b6pg94y14581ppqlwhkb3qgz1d87zz6zjy7kbg8acrffa"; - libraryHaskellDepends = [ - array base HUnit mono-traversable QuickCheck regex-tdfa syb - template-haskell - ]; - testHaskellDepends = [ - base doctest-exitcode-stdio doctest-lib hspec - ]; - description = "Predicates that can explain themselves"; - license = lib.licenses.bsd3; - }) {}; - - "explainable-predicates_0_1_2_3" = callPackage ({ mkDerivation, array, base, doctest-exitcode-stdio, doctest-lib , hspec, HUnit, mono-traversable, QuickCheck, regex-tdfa, syb , template-haskell @@ -94567,7 +94621,6 @@ self: { ]; description = "Predicates that can explain themselves"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; }) {}; "explicit-constraint-lens" = callPackage @@ -97751,6 +97804,24 @@ self: { license = lib.licenses.bsd3; }) {}; + "fgl_5_8_0_0" = callPackage + ({ mkDerivation, array, base, containers, deepseq, hspec + , microbench, QuickCheck, transformers + }: + mkDerivation { + pname = "fgl"; + version = "5.8.0.0"; + sha256 = "02cdigf5m3520vh30lld0j5d4al7nmsa4m9v9bjw1fprfaac03nn"; + libraryHaskellDepends = [ + array base containers deepseq transformers + ]; + testHaskellDepends = [ base containers hspec QuickCheck ]; + benchmarkHaskellDepends = [ base deepseq microbench ]; + description = "Martin Erwig's Functional Graph Library"; + license = lib.licenses.bsd3; + hydraPlatforms = lib.platforms.none; + }) {}; + "fgl-arbitrary" = callPackage ({ mkDerivation, base, containers, fgl, hspec, QuickCheck }: mkDerivation { @@ -101434,8 +101505,8 @@ self: { }: mkDerivation { pname = "foreign"; - version = "0.1.1.0"; - sha256 = "0r9lag2d7hki1ciah4hzf4gdsxdlskjzkcafp6h99ifhb63m55i3"; + version = "0.1.2.0"; + sha256 = "0pmwf96miai50q7vbwjdm5rz2cljpmp115hp3blv2l596mdjrvc0"; libraryHaskellDepends = [ base bytestring ghc-prim primitive primitive-unlifted ]; @@ -103786,28 +103857,30 @@ self: { license = lib.licenses.bsd3; }) {}; - "fsnotify_0_4_0_0" = callPackage + "fsnotify_0_4_0_1" = callPackage ({ mkDerivation, async, base, bytestring, containers, directory - , exceptions, filepath, hinotify, hspec, hspec-core - , hspec-expectations, HUnit, monad-control, random, retry - , safe-exceptions, temporary, text, time, unix, unix-compat + , exceptions, filepath, hinotify, monad-control, random, retry + , safe-exceptions, sandwich, temporary, text, time, unix + , unix-compat, unliftio }: mkDerivation { pname = "fsnotify"; - version = "0.4.0.0"; - sha256 = "033qwa71spjz3klqmsdzi85fjb0ps9l5v1vl5zylz5jarh41z66y"; + version = "0.4.0.1"; + sha256 = "02gnbwxgs5b4rnqpgprvqxw9d2vw2yi276dn6ync3czrxyqliz78"; + isLibrary = true; + isExecutable = true; libraryHaskellDepends = [ async base bytestring containers directory filepath hinotify monad-control safe-exceptions text time unix unix-compat ]; - testHaskellDepends = [ - async base directory exceptions filepath hspec hspec-core - hspec-expectations HUnit random retry safe-exceptions temporary - unix-compat + executableHaskellDepends = [ + async base directory exceptions filepath random retry + safe-exceptions sandwich temporary unix-compat unliftio ]; description = "Cross platform library for file change notification"; license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; + mainProgram = "tests"; }) {}; "fsnotify-conduit" = callPackage @@ -105061,8 +105134,8 @@ self: { ({ mkDerivation, base, directory, raw-strings-qq, split }: mkDerivation { pname = "futhask"; - version = "0.1.0"; - sha256 = "11cgnalnywm0xrjhzygd9vvff8yd46s886ljvdbmpl01py97kpwx"; + version = "0.2.0"; + sha256 = "1x3f4qsh0hnrzgdfl7zgd5n8k01x0vrvb8v3vjp3yar60v4dhdsg"; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ base directory raw-strings-qq split ]; @@ -105200,6 +105273,21 @@ self: { license = lib.licenses.mit; }) {}; + "fuzzy-time_0_2_0_2" = callPackage + ({ mkDerivation, base, containers, deepseq, megaparsec, text, time + , validity, validity-time + }: + mkDerivation { + pname = "fuzzy-time"; + version = "0.2.0.2"; + sha256 = "0r0fmkh33v65h000y9bwr7fjd1a50m8pgrsvmwf6g52f33i7ds7h"; + libraryHaskellDepends = [ + base containers deepseq megaparsec text time validity validity-time + ]; + license = lib.licenses.mit; + hydraPlatforms = lib.platforms.none; + }) {}; + "fuzzy-time-gen" = callPackage ({ mkDerivation, base, containers, criterion, fuzzy-time , genvalidity, genvalidity-criterion, genvalidity-hspec @@ -105208,8 +105296,8 @@ self: { }: mkDerivation { pname = "fuzzy-time-gen"; - version = "0.2.0.0"; - sha256 = "0lcs0kgm935rizvsy2p8v8g1kjsjishd9l7jzgl45vlwbs5g863l"; + version = "0.2.0.1"; + sha256 = "100j98l32hgdm1ib22x1gnkjmnzmyih0ggsqmj8dihm8gqp9z094"; libraryHaskellDepends = [ base containers fuzzy-time genvalidity genvalidity-time megaparsec QuickCheck time @@ -107807,25 +107895,6 @@ self: { }) {}; "genvalidity-hspec" = callPackage - ({ mkDerivation, base, genvalidity, genvalidity-property, hspec - , hspec-core, QuickCheck, transformers, validity - }: - mkDerivation { - pname = "genvalidity-hspec"; - version = "1.0.0.1"; - sha256 = "1l5iwzdidlir92zanr9672954dxcp4cg8pl5rb4x10vzg5y0s369"; - libraryHaskellDepends = [ - base genvalidity genvalidity-property hspec hspec-core QuickCheck - transformers validity - ]; - testHaskellDepends = [ - base genvalidity hspec hspec-core QuickCheck - ]; - description = "Standard spec's for GenValidity instances"; - license = lib.licenses.mit; - }) {}; - - "genvalidity-hspec_1_0_0_2" = callPackage ({ mkDerivation, base, genvalidity, genvalidity-property, hspec , hspec-core, QuickCheck, transformers, validity }: @@ -107842,7 +107911,6 @@ self: { ]; description = "Standard spec's for GenValidity instances"; license = lib.licenses.mit; - hydraPlatforms = lib.platforms.none; }) {}; "genvalidity-hspec-aeson" = callPackage @@ -118291,8 +118359,8 @@ self: { }: mkDerivation { pname = "google-server-api"; - version = "0.4.0.2"; - sha256 = "0wnfn75z5k9lh8h38ya52dc4rjjxzpybj0sayjz6ax1xxiaz3d90"; + version = "0.4.1.0"; + sha256 = "1l0cgj8z210a9b4xa4y6rvnfgmxzj2pjpk0r6hxkb2qwjkrnbs8h"; libraryHaskellDepends = [ aeson aeson-casing base base64-bytestring bytestring HsOpenSSL http-api-data http-client http-client-tls http-media mime-mail @@ -121835,8 +121903,8 @@ self: { }: mkDerivation { pname = "h-gpgme"; - version = "0.6.0.0"; - sha256 = "13v9xalqaag87jviw4dlnm9yajpjfzxsimcdpnhbccz55qgchc65"; + version = "0.6.1.0"; + sha256 = "0q80q7dx1nsgsy486g4k66kz83k0bsimz4bn3l5c2qwl1wvrm4c8"; libraryHaskellDepends = [ base bindings-gpgme bytestring data-default email-validate time transformers unix @@ -123614,6 +123682,8 @@ self: { pname = "haddock-library"; version = "1.11.0"; sha256 = "02m2pr1jyn0k86bjqksn2vrpyv0y40sj3rq5svcs5c3qlg4mw1vw"; + revision = "1"; + editedCabalFile = "0mqwr0vbpj9zw7f1p5kdd7hsr76gs1ijmh8h9hak47nphffi1fxv"; libraryHaskellDepends = [ base containers parsec text ]; testHaskellDepends = [ base base-compat containers deepseq directory filepath hspec @@ -135288,6 +135358,22 @@ self: { broken = true; }) {}; + "heist-extra" = callPackage + ({ mkDerivation, base, data-default, filepath, heist-emanote + , map-syntax, mtl, pandoc-types, relude, xmlhtml + }: + mkDerivation { + pname = "heist-extra"; + version = "0.1.0.0"; + sha256 = "175bch1045r69xqzaxh3fhlii2yn5wcwpifk0m5qw9520pbrg4rs"; + libraryHaskellDepends = [ + base data-default filepath heist-emanote map-syntax mtl + pandoc-types relude xmlhtml + ]; + description = "Extra heist functionality"; + license = lib.licenses.mit; + }) {}; + "helf" = callPackage ({ mkDerivation, alex, array, base, containers, happy, mtl, pretty , QuickCheck, transformers @@ -137502,10 +137588,8 @@ self: { ({ mkDerivation, base, ghc-bignum, ghc-prim, QuickCheck }: mkDerivation { pname = "hgmp"; - version = "0.1.2"; - sha256 = "1sqnywh4h1nklcpci60n427m1kahkza1vy1j60jmq3lnlrbgzfzk"; - revision = "1"; - editedCabalFile = "0h9nrcrjbzjygcy1f4ws2gpjqqsy4l2zpv1fkxxi4flqj9yjl4i5"; + version = "0.1.2.1"; + sha256 = "08w0b6yla086vk802xqcqslpkqpjx2h2hc6l3jyymms77qyn70f6"; libraryHaskellDepends = [ base ghc-bignum ghc-prim ]; testHaskellDepends = [ base QuickCheck ]; description = "Haskell interface to GMP"; @@ -145045,7 +145129,7 @@ self: { broken = true; }) {inherit (pkgs) postgresql;}; - "hpqtypes_1_10_0_0" = callPackage + "hpqtypes_1_10_0_1" = callPackage ({ mkDerivation, aeson, async, base, bytestring, Cabal, containers , directory, exceptions, filepath, HUnit, lifted-base , monad-control, mtl, postgresql, QuickCheck, random, resource-pool @@ -145055,8 +145139,8 @@ self: { }: mkDerivation { pname = "hpqtypes"; - version = "1.10.0.0"; - sha256 = "082hn1g2ilia146rkczia0b37n628wa6xi28w75ikxpwpnkmz422"; + version = "1.10.0.1"; + sha256 = "19lakc0m4fgv36kiw9ziyr3abq6jrb6rij443s7a2n3xfrjwy0b8"; setupHaskellDepends = [ base Cabal directory filepath ]; libraryHaskellDepends = [ aeson async base bytestring containers exceptions lifted-base @@ -148899,6 +148983,23 @@ self: { hydraPlatforms = lib.platforms.none; }) {}; + "hslua-cli" = callPackage + ({ mkDerivation, base, bytestring, hslua-core, hslua-marshalling + , lua, text + }: + mkDerivation { + pname = "hslua-cli"; + version = "1.0.0"; + sha256 = "1db2fglg6i0pqx1n0sdrsf4p9h1sdmfswqmsrspif2jhkipbh64m"; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ + base bytestring hslua-core hslua-marshalling lua text + ]; + description = "Command-line interface for Lua"; + license = lib.licenses.mit; + }) {}; + "hslua-core" = callPackage ({ mkDerivation, base, bytestring, exceptions, lua, lua-arbitrary , mtl, QuickCheck, quickcheck-instances, tasty, tasty-hunit @@ -150228,6 +150329,22 @@ self: { license = lib.licenses.bsd3; }) {}; + "hspec-need-env_0_1_0_10" = callPackage + ({ mkDerivation, base, hspec, hspec-core, hspec-discover + , hspec-expectations, setenv, transformers + }: + mkDerivation { + pname = "hspec-need-env"; + version = "0.1.0.10"; + sha256 = "13ms7ifdszwgmvvv1lbyqs53l86li0k639f3f9blfkz3lk3qx2kn"; + libraryHaskellDepends = [ base hspec-core hspec-expectations ]; + testHaskellDepends = [ base hspec hspec-core setenv transformers ]; + testToolDepends = [ hspec-discover ]; + description = "Read environment variables for hspec tests"; + license = lib.licenses.bsd3; + hydraPlatforms = lib.platforms.none; + }) {}; + "hspec-parsec" = callPackage ({ mkDerivation, base, hspec, hspec-expectations, parsec }: mkDerivation { @@ -171273,10 +171390,8 @@ self: { }: mkDerivation { pname = "lambdabot-telegram-plugins"; - version = "0.2.0"; - sha256 = "1fm4amq0a0aqi2mvd0sxj5r3jziy98i2kj7qqin2q6rq0didh0y5"; - revision = "1"; - editedCabalFile = "0ag8pbnz4q9gpdd20axmz90ww260gh7i266pgfylqslz1dlmvirz"; + version = "0.2.1"; + sha256 = "1r0qr28n2lz4nxbvnv3iyc221b8b1w92m23mcahh95agvkjxk6ys"; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ @@ -176078,12 +176193,12 @@ self: { license = lib.licenses.bsd3; }) {ffi = null; inherit (pkgs) libffi;}; - "libffi_0_2" = callPackage + "libffi_0_2_1" = callPackage ({ mkDerivation, base, bytestring }: mkDerivation { pname = "libffi"; - version = "0.2"; - sha256 = "08pp09cjygvc0ddm7gdrrk0hpcy3bsnp8g7z9cyix2ckdg43rldq"; + version = "0.2.1"; + sha256 = "1w9ssmjx521f4lmaynmh1zargl2zmfvvpq2bldsvnwldfdgikbkn"; libraryHaskellDepends = [ base bytestring ]; description = "A binding to libffi"; license = lib.licenses.bsd3; @@ -182806,6 +182921,18 @@ self: { broken = true; }) {}; + "lucid2-htmx" = callPackage + ({ mkDerivation, base, hspec, HUnit, lucid2, text }: + mkDerivation { + pname = "lucid2-htmx"; + version = "0.1.0.8"; + sha256 = "07q9bqdfkk173nz6ddsnmg9ilnhs5kxngza52laiiipn432z4aw9"; + libraryHaskellDepends = [ base lucid2 text ]; + testHaskellDepends = [ base hspec HUnit lucid2 text ]; + description = "Use htmx in your lucid templates"; + license = lib.licenses.bsd3; + }) {}; + "lucienne" = callPackage ({ mkDerivation, base, base64-bytestring, blaze-html, bson , bytestring, compact-string-fix, feed, happstack, happstack-server @@ -184923,8 +185050,8 @@ self: { }: mkDerivation { pname = "mandulia"; - version = "0.7"; - sha256 = "1wrpzai3482c9g7zfacmjszi6h073ip00fbq17nyc22z2zw4908s"; + version = "0.8.0.1"; + sha256 = "1iknqhdqsyahdybcngy239lkvvpw6v8ciby42db21vx1npdzl8xn"; isLibrary = false; isExecutable = true; enableSeparateDataOutput = true; @@ -190280,6 +190407,8 @@ self: { pname = "minizinc-process"; version = "0.1.4.1"; sha256 = "0sihpmjzda7kph8mds4p4fn4pgbiay6v680pcqv2d116a5di2c5g"; + revision = "1"; + editedCabalFile = "09h0brd6zhfdz8y780xiqxzs78fcclwljh9r2xiw60wcigasa15j"; libraryHaskellDepends = [ aeson attoparsec base bytestring containers directory hashable process process-extras template-haskell text @@ -193912,6 +194041,8 @@ self: { pname = "monoid-subclasses"; version = "1.1.3"; sha256 = "1nglki10rlpi872p55pa8g809q5sna7yzh3zw4rqfhq89kb15wcv"; + revision = "1"; + editedCabalFile = "0y8sw3zsmz5ssn2gl2fsqg44n7xf3xsf6vhrzwnkbaa97hj76nh2"; libraryHaskellDepends = [ base bytestring containers primes text vector ]; @@ -197938,6 +198069,26 @@ self: { license = lib.licenses.mit; }) {}; + "mutable-containers_0_3_4_1" = callPackage + ({ mkDerivation, base, containers, gauge, ghc-prim, hspec + , mono-traversable, primitive, QuickCheck, vector + }: + mkDerivation { + pname = "mutable-containers"; + version = "0.3.4.1"; + sha256 = "1krndid8s8x0gklrzjaqfas1gl31qbhizpnidfa0ibclkk39whkr"; + libraryHaskellDepends = [ + base containers ghc-prim mono-traversable primitive vector + ]; + testHaskellDepends = [ + base containers hspec primitive QuickCheck vector + ]; + benchmarkHaskellDepends = [ base containers gauge vector ]; + description = "Abstactions and concrete implementations of mutable containers"; + license = lib.licenses.mit; + hydraPlatforms = lib.platforms.none; + }) {}; + "mutable-iter" = callPackage ({ mkDerivation, base, iteratee, MonadCatchIO-transformers , transformers, vector @@ -200165,8 +200316,8 @@ self: { }: mkDerivation { pname = "net-mqtt"; - version = "0.8.2.3"; - sha256 = "0z75is6s7flxhcw4bqc0zzm81swvcq1yxcczw2dph93n4wbgsz90"; + version = "0.8.2.4"; + sha256 = "03w0086kn9zgsry8gm1ij7n5m3fqq7xfas4ma1fviqsx7w8wdc3r"; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ @@ -203068,6 +203219,32 @@ self: { maintainers = [ lib.maintainers.peti ]; }) {inherit (pkgs) nix;}; + "nix-serve-ng" = callPackage + ({ mkDerivation, async, base, base16, base32, bytestring, charset + , http-client, http-types, managed, megaparsec, mtl, network, nix + , optparse-applicative, tasty-bench, temporary, text, turtle + , vector, wai, wai-extra, warp, warp-tls + }: + mkDerivation { + pname = "nix-serve-ng"; + version = "1.0.0"; + sha256 = "0dvy1xjrxh69kl9jlka750v2981mcrv5xvxqmjng1ms0vi1grz0n"; + isLibrary = false; + isExecutable = true; + executableHaskellDepends = [ + base base16 base32 bytestring charset http-types managed megaparsec + mtl network optparse-applicative vector wai wai-extra warp warp-tls + ]; + executablePkgconfigDepends = [ nix ]; + benchmarkHaskellDepends = [ + async base bytestring http-client tasty-bench temporary text turtle + vector + ]; + description = "A drop-in replacement for nix-serve that's faster and more stable"; + license = lib.licenses.bsd3; + mainProgram = "nix-serve"; + }) {inherit (pkgs) nix;}; + "nix-thunk" = callPackage ({ mkDerivation, aeson, aeson-pretty, base, bytestring, cli-extras , cli-git, cli-nix, containers, cryptonite, data-default, directory @@ -223863,19 +224040,19 @@ self: { }) {}; "portray" = callPackage - ({ mkDerivation, base, containers, HUnit, test-framework - , test-framework-hunit, text, wrapped + ({ mkDerivation, base, bytestring, containers, HUnit + , test-framework, test-framework-hunit, text, wrapped }: mkDerivation { pname = "portray"; - version = "0.2.0"; - sha256 = "1kzzvwqphlg1dmd486ijkv6vsqmxnp8h05mwc8590yjxdln5vzdw"; - revision = "3"; - editedCabalFile = "0zszhxd9f51wb15rw5rvz6cb20kbf2f8r8xn2dksm5mdnyiv3pgz"; - libraryHaskellDepends = [ base containers text wrapped ]; + version = "0.3.0"; + sha256 = "059lyc5p7726y9yj7c3by854czhbiwspgrgiqa6qp22pfbx2ycqn"; + libraryHaskellDepends = [ + base bytestring containers text wrapped + ]; testHaskellDepends = [ - base containers HUnit test-framework test-framework-hunit text - wrapped + base bytestring containers HUnit test-framework + test-framework-hunit text wrapped ]; description = "Rendering to pseudo-Haskell syntax"; license = lib.licenses.asl20; @@ -223885,10 +224062,8 @@ self: { ({ mkDerivation, base, containers, dlist, portray, text, wrapped }: mkDerivation { pname = "portray-diff"; - version = "0.1.0.1"; - sha256 = "1da884cj865q6g1bd1fhcazyl1nzxb0pk2nvhcpp4iqkjvhyd8hw"; - revision = "3"; - editedCabalFile = "1wikgdbb1bngppqq8n4pgfqaf040rpfn5hdzspcycc8i7z8gi5mw"; + version = "0.1.1"; + sha256 = "1z09bs62hh9hsf88qkbsqp3ydxr66jdpbp9s8c7d142vcinmi3wm"; libraryHaskellDepends = [ base containers dlist portray text wrapped ]; @@ -236902,16 +237077,14 @@ self: { }: mkDerivation { pname = "rec-def"; - version = "0.1"; - sha256 = "1ki145p9cb8dks2vxlwinma8h3kifx5ikyjsfcabv1dg6qrp77vj"; - revision = "1"; - editedCabalFile = "1q1ajjy26gqgbhgjazzg0j74rk1lcy1vfax3rjnxdc7qsj5bv95g"; + version = "0.2"; + sha256 = "0dfw86ws00gsdnzb238pmr4i2lyfp405lp70nbak45qq2cbz0zj8"; libraryHaskellDepends = [ base containers ]; testHaskellDepends = [ base concurrency containers dejafu doctest QuickCheck random tasty tasty-dejafu template-haskell ]; - description = "Recusively defined values"; + description = "Recursively defined values"; license = lib.licenses.bsd2; }) {}; @@ -250932,24 +251105,6 @@ self: { }) {}; "selda" = callPackage - ({ mkDerivation, base, bytestring, containers, exceptions, mtl - , random, text, time, uuid-types - }: - mkDerivation { - pname = "selda"; - version = "0.5.1.0"; - sha256 = "1gd7fdgqw6q507wn7h1pln9wb7kh65vd7iv0s1ydg54r36qdlrgl"; - revision = "1"; - editedCabalFile = "0sdzfgsmgw20idxnvvf4sbp8bkl3n7qa7qkphv63pfmqvzyplkwg"; - libraryHaskellDepends = [ - base bytestring containers exceptions mtl random text time - uuid-types - ]; - description = "Multi-backend, high-level EDSL for interacting with SQL databases"; - license = lib.licenses.mit; - }) {}; - - "selda_0_5_2_0" = callPackage ({ mkDerivation, base, bytestring, containers, exceptions, mtl , random, text, time, uuid-types }: @@ -250963,7 +251118,6 @@ self: { ]; description = "Multi-backend, high-level EDSL for interacting with SQL databases"; license = lib.licenses.mit; - hydraPlatforms = lib.platforms.none; }) {}; "selda-json" = callPackage @@ -250997,24 +251151,6 @@ self: { }) {}; "selda-sqlite" = callPackage - ({ mkDerivation, base, bytestring, direct-sqlite, directory - , exceptions, selda, text, time, uuid-types - }: - mkDerivation { - pname = "selda-sqlite"; - version = "0.1.7.1"; - sha256 = "1a1rik32h8ijd98v98db1il10ap76rqdwmjwhj0hc0h77mm6qdfb"; - revision = "1"; - editedCabalFile = "05zdf07fizf97yby0ld4qkd5padxg9fhmpfiiii4jl7xklccnl6p"; - libraryHaskellDepends = [ - base bytestring direct-sqlite directory exceptions selda text time - uuid-types - ]; - description = "SQLite backend for the Selda database EDSL"; - license = lib.licenses.mit; - }) {}; - - "selda-sqlite_0_1_7_2" = callPackage ({ mkDerivation, base, bytestring, direct-sqlite, directory , exceptions, selda, text, time, uuid-types }: @@ -251028,7 +251164,6 @@ self: { ]; description = "SQLite backend for the Selda database EDSL"; license = lib.licenses.mit; - hydraPlatforms = lib.platforms.none; }) {}; "select" = callPackage @@ -252131,6 +252266,37 @@ self: { license = lib.licenses.bsd3; }) {}; + "serialise_0_2_6_0" = callPackage + ({ mkDerivation, aeson, array, base, binary, bytestring, cborg + , cereal, cereal-vector, containers, criterion, deepseq, directory + , fail, filepath, ghc-prim, half, hashable, pretty, primitive + , QuickCheck, quickcheck-instances, semigroups, store, strict, tar + , tasty, tasty-hunit, tasty-quickcheck, text, these, time + , unordered-containers, vector, zlib + }: + mkDerivation { + pname = "serialise"; + version = "0.2.6.0"; + sha256 = "05m5h5vfjp4wvh6y7j2f3d4c3l6gxww2n1v38vqrjacpw641izwk"; + libraryHaskellDepends = [ + array base bytestring cborg containers ghc-prim half hashable + primitive strict text these time unordered-containers vector + ]; + testHaskellDepends = [ + base bytestring cborg containers directory filepath primitive + QuickCheck quickcheck-instances tasty tasty-hunit tasty-quickcheck + text time unordered-containers vector + ]; + benchmarkHaskellDepends = [ + aeson array base binary bytestring cborg cereal cereal-vector + containers criterion deepseq directory fail filepath ghc-prim half + pretty semigroups store tar text time vector zlib + ]; + description = "A binary serialisation library for Haskell values"; + license = lib.licenses.bsd3; + hydraPlatforms = lib.platforms.none; + }) {}; + "serialise-uuid" = callPackage ({ mkDerivation, base, bytestring, cborg, serialise, tasty , tasty-hunit, tasty-quickcheck, uuid-types @@ -254443,8 +254609,8 @@ self: { ({ mkDerivation, base, Cabal, directory, exceptions, filepath }: mkDerivation { pname = "servant-serf"; - version = "0.3.1.1"; - sha256 = "1092b8xsdkqmaii0dxyn0dshj01crilmnp83qczxvy426dik4zww"; + version = "0.3.1.2"; + sha256 = "12qyg3bj4f8y4f3z0p3dxh4ms8xdv6226120xsdd6jkbxynmap01"; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ @@ -262122,12 +262288,12 @@ self: { }: mkDerivation { pname = "smtpbz"; - version = "1.0.0"; - sha256 = "1xn66l3bifrd6y12rssgsj4dihy325c9lbxl20ms49rnkcnwzwfq"; + version = "1.0.1"; + sha256 = "1zxcr4md1r9dlg14a3b6ywqnir6jx95qsffwv2f08k2mkifm82w3"; libraryHaskellDepends = [ aeson base bytestring http-conduit http-types text ]; - description = "This is smtpbz"; + description = "Unofficial API client for smtp.bz"; license = lib.licenses.bsd2; }) {}; @@ -267345,8 +267511,8 @@ self: { pname = "stack"; version = "2.9.1"; sha256 = "01020dx89m07qmjs58vs2kidhkzq3106md08w6c65bzxvlf6kcwk"; - revision = "1"; - editedCabalFile = "06xrw6k1vqkvgmb4cvxqmh756n7h9vynbb3smicb1149czrlwkv2"; + revision = "2"; + editedCabalFile = "14k4b8cn52bdl4n181afq8zqycl8nb4mv8vsg636c6b4s9yc053w"; configureFlags = [ "-fdisable-git-info" "-fhide-dependency-versions" "-fsupported-build" @@ -271761,30 +271927,6 @@ self: { }) {}; "string-random" = callPackage - ({ mkDerivation, attoparsec, base, bytestring, containers - , optparse-applicative, pcre-heavy, QuickCheck, random, tasty - , tasty-hunit, tasty-quickcheck, text, transformers - }: - mkDerivation { - pname = "string-random"; - version = "0.1.4.2"; - sha256 = "0rqh0cwywlzg4xyb1s80mghl3kq3sngg8xjbh4g9x4p8fc6maiw9"; - isLibrary = true; - isExecutable = true; - libraryHaskellDepends = [ - attoparsec base containers random text transformers - ]; - executableHaskellDepends = [ base optparse-applicative text ]; - testHaskellDepends = [ - base bytestring pcre-heavy QuickCheck tasty tasty-hunit - tasty-quickcheck text - ]; - description = "A library for generating random string from a regular experession"; - license = lib.licenses.bsd3; - mainProgram = "hstrrand"; - }) {}; - - "string-random_0_1_4_3" = callPackage ({ mkDerivation, attoparsec, base, bytestring, containers , optparse-applicative, pcre-heavy, QuickCheck, random, tasty , tasty-hunit, tasty-quickcheck, text, transformers @@ -271805,7 +271947,6 @@ self: { ]; description = "A library for generating random string from a regular experession"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; mainProgram = "hstrrand"; }) {}; @@ -273933,8 +274074,8 @@ self: { ({ mkDerivation, base, blaze-markup, blaze-svg, directory, text }: mkDerivation { pname = "svg-icons"; - version = "1.0.0.0"; - sha256 = "1ddq3im8z4jqpxxk3qqa30372ybvp8capmxbi3xx5ik5vjrcp0cv"; + version = "2.0.1.0"; + sha256 = "10a5bcbm28fnkrr6cfzfqwsm8lz8rpwdbsgbr8w40bwdgn8v5r06"; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ @@ -279511,26 +279652,27 @@ self: { license = lib.licenses.bsd3; }) {}; - "telegram-bot-simple_0_5_2" = callPackage + "telegram-bot-simple_0_6" = callPackage ({ mkDerivation, aeson, aeson-pretty, base, bytestring, cron , filepath, hashable, http-api-data, http-client, http-client-tls , monad-control, mtl, pretty-show, profunctors, servant , servant-client, servant-multipart-api, servant-multipart-client - , split, stm, template-haskell, text, time, transformers - , unordered-containers + , servant-server, split, stm, template-haskell, text, time + , transformers, unordered-containers, warp, warp-tls }: mkDerivation { pname = "telegram-bot-simple"; - version = "0.5.2"; - sha256 = "1fkpgdyrfa1ckaljmchha89mpqrkdwwj0pvcwvn38jg3y523n6k9"; + version = "0.6"; + sha256 = "1f4nfh32v5l60p2bqifg5dl311p86lis51na7hri074w0p3kg6ki"; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ aeson aeson-pretty base bytestring cron filepath hashable http-api-data http-client http-client-tls monad-control mtl pretty-show profunctors servant servant-client - servant-multipart-api servant-multipart-client split stm - template-haskell text time transformers unordered-containers + servant-multipart-api servant-multipart-client servant-server split + stm template-haskell text time transformers unordered-containers + warp warp-tls ]; description = "Easy to use library for building Telegram bots"; license = lib.licenses.bsd3; @@ -283570,27 +283712,6 @@ self: { }) {}; "th-utilities" = callPackage - ({ mkDerivation, base, bytestring, containers, directory, filepath - , hspec, primitive, syb, template-haskell, text, th-abstraction - , th-orphans, vector - }: - mkDerivation { - pname = "th-utilities"; - version = "0.2.4.3"; - sha256 = "1krvn3xp7zicp6wqcgmgbgl2a894n677vxi6vhcna16cx03smic9"; - libraryHaskellDepends = [ - base bytestring containers directory filepath primitive syb - template-haskell text th-abstraction th-orphans - ]; - testHaskellDepends = [ - base bytestring containers directory filepath hspec primitive syb - template-haskell text th-abstraction th-orphans vector - ]; - description = "Collection of useful functions for use with Template Haskell"; - license = lib.licenses.mit; - }) {}; - - "th-utilities_0_2_5_0" = callPackage ({ mkDerivation, base, bytestring, containers, directory, filepath , hspec, primitive, syb, template-haskell, text, th-abstraction , th-orphans, vector @@ -283609,7 +283730,6 @@ self: { ]; description = "Collection of useful functions for use with Template Haskell"; license = lib.licenses.mit; - hydraPlatforms = lib.platforms.none; }) {}; "thank-you-stars" = callPackage @@ -283802,6 +283922,8 @@ self: { pname = "these-skinny"; version = "0.7.5"; sha256 = "1nbcfkjs7cn3gnyypxdf1gxm52gzqc3lqygdl8qrfgdk7cck6sbj"; + revision = "1"; + editedCabalFile = "1paqqcdbqr91gvvs0anq30pkdd37g70ql4v11lszl6dzjl6yy3d5"; libraryHaskellDepends = [ base deepseq ghc-prim ]; description = "A fork of the 'these' package without the dependency bloat"; license = lib.licenses.bsd3; @@ -284915,8 +285037,8 @@ self: { ({ mkDerivation, base, time }: mkDerivation { pname = "time-domain"; - version = "0.1.0.0"; - sha256 = "1gmz0l9nf185cl43qfdcsb15hgfkk6wprrfc5q93l82kgdc30bj4"; + version = "0.1.0.1"; + sha256 = "012dgd2265c6w6j9015js9ag8430xnwkd1vl1mkiv3wwg98svvrq"; libraryHaskellDepends = [ base time ]; description = "A library for time domains and durations"; license = lib.licenses.mit; @@ -287181,8 +287303,8 @@ self: { pname = "toml-reader"; version = "0.1.0.0"; sha256 = "06gxp8pzh8cdrifg5n0mhlnrslrx7k235sz2ldpy60x7vz7qywv9"; - revision = "1"; - editedCabalFile = "16qfl1bz7c8a34xvs5fzs5r421309xpw9gfsiv2szivd5hcp9f9r"; + revision = "2"; + editedCabalFile = "0ga0nc2n3irk0iy7ih90vww1cyaydn5sz7bpk7bz21ncny3g9fyg"; libraryHaskellDepends = [ base containers deepseq megaparsec parser-combinators text time ]; @@ -287196,17 +287318,21 @@ self: { "toml-reader-parse" = callPackage ({ mkDerivation, base, comonad, containers, deepseq, dlist, mtl - , prettyprinter, prettyprinter-combinators, text, time, toml-reader - , vector + , optparse-applicative, prettyprinter, prettyprinter-combinators + , tasty, tasty-hunit, text, time, toml-reader, vector }: mkDerivation { pname = "toml-reader-parse"; - version = "0.1.0.0"; - sha256 = "1ddwk29isiq190fd025laq0g8js7ifcngph9acy8zlmppp3685w7"; + version = "0.1.1.0"; + sha256 = "1ah47icy8lnpnmhpsmyp9pvp8f134pzzi6cvv5vpnw2r5szr9vly"; libraryHaskellDepends = [ base comonad containers deepseq dlist mtl prettyprinter prettyprinter-combinators text time toml-reader vector ]; + testHaskellDepends = [ + base optparse-applicative prettyprinter prettyprinter-combinators + tasty tasty-hunit text toml-reader + ]; description = "Alternative parser for TOML values produced by the toml-reader package"; license = lib.licenses.asl20; }) {}; @@ -293054,6 +293180,26 @@ self: { license = lib.licenses.asl20; }) {}; + "tzdata_0_2_20220923_0" = callPackage + ({ mkDerivation, base, bytestring, containers, deepseq, HUnit + , tasty, tasty-hunit, tasty-th, unix, vector + }: + mkDerivation { + pname = "tzdata"; + version = "0.2.20220923.0"; + sha256 = "0wzk15hlrjpdqh796h1v120223kn1327qr0rzp13ak0y5hm1fqrw"; + enableSeparateDataOutput = true; + libraryHaskellDepends = [ + base bytestring containers deepseq vector + ]; + testHaskellDepends = [ + base bytestring HUnit tasty tasty-hunit tasty-th unix + ]; + description = "Time zone database (as files and as a module)"; + license = lib.licenses.asl20; + hydraPlatforms = lib.platforms.none; + }) {}; + "tztime" = callPackage ({ mkDerivation, base, deepseq, directory, doctest-parallel , filepath, mtl, safe-exceptions, tasty, tasty-discover @@ -301237,8 +301383,8 @@ self: { }: mkDerivation { pname = "vulkan"; - version = "3.21.1"; - sha256 = "06yh0iw0yhs7kdgra3s39cl7fyvl2ys81ihw48k9jpravaal31xl"; + version = "3.22"; + sha256 = "074qg7r78p427gar1zqx98r7ypy3b0r9flvpsqpm27w1d7rlxl21"; libraryHaskellDepends = [ base bytestring transformers vector ]; libraryPkgconfigDepends = [ vulkan ]; testHaskellDepends = [ @@ -301272,8 +301418,8 @@ self: { }: mkDerivation { pname = "vulkan-utils"; - version = "0.5.8.1"; - sha256 = "185ln34gv8p6iwifhjfzkvxbcnbb7zkkf3phlfm6hk7kykgdypvy"; + version = "0.5.9"; + sha256 = "114kx06i58d6pzgd86qxqih7nv845nvf04isl83xbfzij4bf1p06"; setupHaskellDepends = [ base Cabal cabal-doctest ]; libraryHaskellDepends = [ base bytestring containers dependent-map dependent-sum extra @@ -304700,25 +304846,25 @@ self: { "webby" = callPackage ({ mkDerivation, aeson, base, binary, bytestring, formatting - , http-api-data, http-types, relude, resourcet, tasty, tasty-hunit - , tasty-quickcheck, text, unliftio, unliftio-core + , http-api-data, http-types, mime-types, relude, resourcet, tasty + , tasty-hunit, tasty-quickcheck, text, unliftio, unliftio-core , unordered-containers, wai }: mkDerivation { pname = "webby"; - version = "1.0.2"; - sha256 = "17mx6xwrb49rqx55ccg1wx3ysjpfbvii8kwrmd4nd9wisslldiv6"; + version = "1.1.0"; + sha256 = "1nrk40blzmzv3drgja76bq6czlayqan4rl3wgkd7mlkbkvdplmxj"; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ aeson base binary bytestring formatting http-api-data http-types - relude resourcet text unliftio unliftio-core unordered-containers - wai + mime-types relude resourcet text unliftio unliftio-core + unordered-containers wai ]; testHaskellDepends = [ aeson base binary bytestring formatting http-api-data http-types - relude resourcet tasty tasty-hunit tasty-quickcheck text unliftio - unliftio-core unordered-containers wai + mime-types relude resourcet tasty tasty-hunit tasty-quickcheck text + unliftio unliftio-core unordered-containers wai ]; description = "A super-simple web server framework"; license = lib.licenses.asl20; @@ -308709,8 +308855,8 @@ self: { }: mkDerivation { pname = "xcffib"; - version = "0.11.1"; - sha256 = "18xwliqcba0ia4p64gxiqd0pvkg3r3ylsmn3mywa5p43x1dji481"; + version = "0.12.0"; + sha256 = "0vgxicqhzvhnbi6mn2bjw56pnvnqd4d49hn5q1fpjhjbpxxz5vgi"; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ @@ -314483,8 +314629,8 @@ self: { }: mkDerivation { pname = "yesod-test"; - version = "1.6.14"; - sha256 = "1sb50n9x5xsisad6czxx1gazrjak9hj6mcpv3q147yhpgfnpay9k"; + version = "1.6.15"; + sha256 = "16q4f1l3m4l8iy5vmaa8c0vm2iiqhpghf3kykymlh41xy96mqpn3"; libraryHaskellDepends = [ aeson attoparsec base blaze-builder blaze-html blaze-markup bytestring case-insensitive conduit containers cookie hspec-core -- cgit 1.4.1 From ba9342a67b58df0b39aeeea3d014082b5205a9d9 Mon Sep 17 00:00:00 2001 From: Domen Kožar Date: Sun, 25 Sep 2022 11:09:09 +0100 Subject: haskellPackages.cachix: fix build --- pkgs/development/haskell-modules/configuration-common.nix | 3 +++ pkgs/development/haskell-modules/patches/cachix.patch | 10 ++++++++++ 2 files changed, 13 insertions(+) create mode 100755 pkgs/development/haskell-modules/patches/cachix.patch diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index f7041b8222b..d83d6fd30cc 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -121,6 +121,9 @@ self: super: { postPatch = "sed -i s/home/tmp/ test/Spec.hs"; }) super.shell-conduit; + # https://github.com/cachix/cachix/pull/451 + cachix = appendPatch ./patches/cachix.patch super.cachix; + # https://github.com/froozen/kademlia/issues/2 kademlia = dontCheck super.kademlia; diff --git a/pkgs/development/haskell-modules/patches/cachix.patch b/pkgs/development/haskell-modules/patches/cachix.patch new file mode 100755 index 00000000000..21f1496933a --- /dev/null +++ b/pkgs/development/haskell-modules/patches/cachix.patch @@ -0,0 +1,10 @@ +--- a/src/Cachix/Client/OptionsParser.hs ++++ b/src/Cachix/Client/OptionsParser.hs +@@ -15,7 +15,7 @@ + import qualified Cachix.Client.URI as URI + import qualified Cachix.Deploy.OptionsParser as DeployOptions + import Options.Applicative +-import Protolude hiding (toS) ++import Protolude hiding (option, toS) + import Protolude.Conv + import qualified URI.ByteString as URI -- cgit 1.4.1 From 72f01f15ccdcc14c1ead70a2cc2f9691c761fe37 Mon Sep 17 00:00:00 2001 From: Dennis Gosnell Date: Sun, 25 Sep 2022 11:25:21 -0400 Subject: haskellPackages.polysemy-zoo: unbreak --- pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml | 1 - pkgs/development/haskell-modules/hackage-packages.nix | 2 -- 2 files changed, 3 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index d152dec5e27..a49fe7285ef 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -3944,7 +3944,6 @@ broken-packages: - polysemy-mocks - polysemy-readline - polysemy-scoped-fs - - polysemy-zoo - polytypeable - pomaps - pomohoro diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 801e94399d5..440ed523159 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -223388,8 +223388,6 @@ self: { testToolDepends = [ hspec-discover ]; description = "Experimental, user-contributed effects and interpreters for polysemy"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; - broken = true; }) {}; "polyseq" = callPackage -- cgit 1.4.1 From 608a3ef0b71359fb19ecfaaa3c8163dc58058010 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 25 Sep 2022 17:54:23 +0200 Subject: gscan2pdf: 2.12.6 -> 2.12.8 Adds a patch that fixes ffmpeg 5.1 compatibility --- pkgs/applications/graphics/gscan2pdf/default.nix | 8 ++++++-- pkgs/applications/graphics/gscan2pdf/ffmpeg5-compat.patch | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 pkgs/applications/graphics/gscan2pdf/ffmpeg5-compat.patch diff --git a/pkgs/applications/graphics/gscan2pdf/default.nix b/pkgs/applications/graphics/gscan2pdf/default.nix index 214688b56f8..fc686ad1f21 100644 --- a/pkgs/applications/graphics/gscan2pdf/default.nix +++ b/pkgs/applications/graphics/gscan2pdf/default.nix @@ -10,13 +10,17 @@ with lib; perlPackages.buildPerlPackage rec { pname = "gscan2pdf"; - version = "2.12.6"; + version = "2.12.8"; src = fetchurl { url = "mirror://sourceforge/gscan2pdf/gscan2pdf-${version}.tar.xz"; - sha256 = "sha256-9ntpUEM3buT3EhneXz9G8bibvzOnEK6Xt0jJcTvLKT0="; + hash = "sha256-dmN2fMBDZqgvdHQryQgjmBHeH/h2dihRH8LkflFYzTk="; }; + patches = [ + ./ffmpeg5-compat.patch + ]; + nativeBuildInputs = [ wrapGAppsHook ]; buildInputs = diff --git a/pkgs/applications/graphics/gscan2pdf/ffmpeg5-compat.patch b/pkgs/applications/graphics/gscan2pdf/ffmpeg5-compat.patch new file mode 100644 index 00000000000..ff522735fe3 --- /dev/null +++ b/pkgs/applications/graphics/gscan2pdf/ffmpeg5-compat.patch @@ -0,0 +1,15 @@ +--- a/t/351_unpaper.t ++++ b/t/351_unpaper.t +@@ -88,8 +88,10 @@ + + # if we use unlike, we no longer + # know how many tests there will be +- if ( $msg !~ +-/(deprecated|Encoder did not produce proper pts, making some up)/ ++ if ( $msg !~ /( deprecated | ++ \Qdoes not contain an image sequence pattern\E | ++ \QEncoder did not produce proper pts, making some up\E | ++ \Quse the -update option\E )/x + ) + { + fail 'no warnings'; -- cgit 1.4.1 From 7f8e423fd0537aff741e45ae5a3768b5fb87a150 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 25 Sep 2022 23:40:10 +0200 Subject: python310Packages.testcontainers: 3.5.0 -> 3.7.0 --- pkgs/development/python-modules/testcontainers/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/testcontainers/default.nix b/pkgs/development/python-modules/testcontainers/default.nix index 65c8ed8bf46..20c52fd686a 100644 --- a/pkgs/development/python-modules/testcontainers/default.nix +++ b/pkgs/development/python-modules/testcontainers/default.nix @@ -7,13 +7,13 @@ buildPythonPackage rec { pname = "testcontainers"; - version = "3.5.0"; + version = "3.7.0"; src = fetchFromGitHub { owner = "testcontainers"; repo = "testcontainers-python"; rev = "v${version}"; - sha256 = "sha256-uB3MbRVQzbUdZRxkGl635O+K17bkHIGY2JbU8R23Kt0="; + sha256 = "sha256-t6W5A877bSPcbKVzCLEhjPzOPwF8ZTGjlvnwt1CwWCE="; }; buildInputs = [ -- cgit 1.4.1 From 32976e0eabce085fe4cbb018728348bf2864b697 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 26 Sep 2022 07:23:08 +0000 Subject: gensio: 2.3.7 -> 2.5.5 --- pkgs/development/libraries/gensio/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gensio/default.nix b/pkgs/development/libraries/gensio/default.nix index 48e2d4fd8fb..2ae3d8d93b0 100644 --- a/pkgs/development/libraries/gensio/default.nix +++ b/pkgs/development/libraries/gensio/default.nix @@ -8,13 +8,13 @@ stdenv.mkDerivation rec { pname = "gensio"; - version = "2.3.7"; + version = "2.5.5"; src = fetchFromGitHub { owner = "cminyard"; repo = pname; rev = "v${version}"; - sha256 = "sha256-g1o/udsIFLJ+gunvI2QtsnksPaa946jWKkcdmdGmQ/k="; + sha256 = "sha256-K2A61OflKdVVzdV8qH5x/ggZKa4i8yvs5bdPoOwmm7A="; }; passthru = { -- cgit 1.4.1 From b59be74f0e9a72cc241ac215efce63b03075c924 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 26 Sep 2022 10:08:11 +0200 Subject: python310Packages.hass-nabucasa: 0.55.0 -> 0.56.0 --- pkgs/development/python-modules/hass-nabucasa/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/hass-nabucasa/default.nix b/pkgs/development/python-modules/hass-nabucasa/default.nix index ce2f12804bd..c6b17872ea8 100644 --- a/pkgs/development/python-modules/hass-nabucasa/default.nix +++ b/pkgs/development/python-modules/hass-nabucasa/default.nix @@ -15,13 +15,13 @@ buildPythonPackage rec { pname = "hass-nabucasa"; - version = "0.55.0"; + version = "0.56.0"; src = fetchFromGitHub { owner = "nabucasa"; repo = pname; rev = version; - sha256 = "sha256-3r955nZu/nNHnFQJy8bSswtd4N0JxGZA8RLU0CXZT7o="; + sha256 = "sha256-IgDOugHr4fCD9o3QQY5w/ibjak/d56R31KgQAbjUkkI="; }; postPatch = '' -- cgit 1.4.1 From b4429529f54bbedfb47c8df02895cb07dbb3da16 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Mon, 26 Sep 2022 16:15:08 +0200 Subject: haskell.compiler: upgrade to 9.2.4 for 9.2.* binary compiler --- pkgs/development/compilers/ghc/9.2.2-binary.nix | 448 ------------------------ pkgs/development/compilers/ghc/9.2.4-binary.nix | 436 +++++++++++++++++++++++ pkgs/top-level/haskell-packages.nix | 29 +- 3 files changed, 452 insertions(+), 461 deletions(-) delete mode 100644 pkgs/development/compilers/ghc/9.2.2-binary.nix create mode 100644 pkgs/development/compilers/ghc/9.2.4-binary.nix diff --git a/pkgs/development/compilers/ghc/9.2.2-binary.nix b/pkgs/development/compilers/ghc/9.2.2-binary.nix deleted file mode 100644 index 53b56b04479..00000000000 --- a/pkgs/development/compilers/ghc/9.2.2-binary.nix +++ /dev/null @@ -1,448 +0,0 @@ -{ lib, stdenv -, fetchurl, perl, gcc -, ncurses5 -, ncurses6, gmp, libiconv, numactl, libffi -, llvmPackages -, coreutils -, targetPackages - - # minimal = true; will remove files that aren't strictly necessary for - # regular builds and GHC bootstrapping. - # This is "useful" for staying within hydra's output limits for at least the - # aarch64-linux architecture. -, minimal ? false -}: - -# Prebuilt only does native -assert stdenv.targetPlatform == stdenv.hostPlatform; - -let - downloadsUrl = "https://downloads.haskell.org/ghc"; - - # Copy sha256 from https://downloads.haskell.org/~ghc/9.2.2/SHA256SUMS - version = "9.2.2"; - - # Information about available bindists that we use in the build. - # - # # Bindist library checking - # - # The field `archSpecificLibraries` also provides a way for us get notified - # early when the upstream bindist changes its dependencies (e.g. because a - # newer Debian version is used that uses a new `ncurses` version). - # - # Usage: - # - # * You can find the `fileToCheckFor` of libraries by running `readelf -d` - # on the compiler binary (`exePathForLibraryCheck`). - # * To skip library checking for an architecture, - # set `exePathForLibraryCheck = null`. - # * To skip file checking for a specific arch specfic library, - # set `fileToCheckFor = null`. - ghcBinDists = { - # Binary distributions for the default libc (e.g. glibc, or libSystem on Darwin) - # nixpkgs uses for the respective system. - defaultLibc = { - i686-linux = { - variantSuffix = ""; - src = { - url = "${downloadsUrl}/${version}/ghc-${version}-i386-deb9-linux.tar.xz"; - sha256 = "24234486ed4508161c6f88f4750a36d38b135b0c6e5fe78efe2d85c612ecaf9e"; - }; - exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; - archSpecificLibraries = [ - { nixPackage = gmp; fileToCheckFor = null; } - # The i686-linux bindist provided by GHC HQ is currently built on Debian 9, - # which link it against `libtinfo.so.5` (ncurses 5). - # Other bindists are linked `libtinfo.so.6` (ncurses 6). - { nixPackage = ncurses5; fileToCheckFor = "libtinfo.so.5"; } - ]; - }; - x86_64-linux = { - variantSuffix = ""; - src = { - url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-deb10-linux.tar.xz"; - sha256 = "fb61dea556a2023dc2d50ee61a22144bb23e4229a378e533065124c218f40cfc"; - }; - exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; - archSpecificLibraries = [ - { nixPackage = gmp; fileToCheckFor = null; } - { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; } - ]; - }; - armv7l-linux = { - variantSuffix = ""; - src = { - url = "${downloadsUrl}/${version}/ghc-${version}-armv7-deb10-linux.tar.xz"; - sha256 = "ce5a7c3beb19d8c13a9e60bd39d3ba8ef0060b954ea42eb23f1ef8d077fa9e8b"; - }; - exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; - archSpecificLibraries = [ - { nixPackage = gmp; fileToCheckFor = null; } - { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; } - ]; - }; - aarch64-linux = { - variantSuffix = ""; - src = { - url = "${downloadsUrl}/${version}/ghc-${version}-aarch64-deb10-linux.tar.xz"; - sha256 = "f3621ccba7ae48fcd67a9505f61bb5ccfb05c4cbfecd5a6ea65fe3f150af0e98"; - }; - exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; - archSpecificLibraries = [ - { nixPackage = gmp; fileToCheckFor = null; } - { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; } - { nixPackage = numactl; fileToCheckFor = null; } - ]; - }; - x86_64-darwin = { - variantSuffix = ""; - src = { - url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz"; - sha256 = "934abbd6083d3aeb5ff081955682d7711d9e79db57b1613eb229c325dd06f83f"; - }; - exePathForLibraryCheck = null; # we don't have a library check for darwin yet - archSpecificLibraries = [ - { nixPackage = gmp; fileToCheckFor = null; } - { nixPackage = ncurses6; fileToCheckFor = null; } - { nixPackage = libiconv; fileToCheckFor = null; } - ]; - }; - aarch64-darwin = { - variantSuffix = ""; - src = { - url = "${downloadsUrl}/${version}/ghc-${version}-aarch64-apple-darwin.tar.xz"; - sha256 = "d1f04f7cc062ed134f863305c67dfe2c42df46ed658dd34f9dd552186f194e5c"; - }; - exePathForLibraryCheck = null; # we don't have a library check for darwin yet - archSpecificLibraries = [ - { nixPackage = gmp; fileToCheckFor = null; } - { nixPackage = ncurses6; fileToCheckFor = null; } - { nixPackage = libiconv; fileToCheckFor = null; } - ]; - }; - }; - # Binary distributions for the musl libc for the respective system. - musl = { - x86_64-linux = { - variantSuffix = "-musl"; - src = { - url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-alpine3.12-linux-gmp.tar.xz"; - sha256 = "624523826e24eae33c03490267cddecc1d80c047f2a3f4b03580f1040112d5c0"; - }; - isStatic = true; - # We can't check the RPATH for statically linked executable - exePathForLibraryCheck = null; - archSpecificLibraries = [ - { nixPackage = gmp.override { withStatic = true; }; fileToCheckFor = null; } - ]; - }; - }; - }; - - distSetName = if stdenv.hostPlatform.isMusl then "musl" else "defaultLibc"; - - binDistUsed = ghcBinDists.${distSetName}.${stdenv.hostPlatform.system} - or (throw "cannot bootstrap GHC on this platform ('${stdenv.hostPlatform.system}' with libc '${distSetName}')"); - - gmpUsed = (builtins.head ( - builtins.filter ( - drv: lib.hasPrefix "gmp" (drv.nixPackage.name or "") - ) binDistUsed.archSpecificLibraries - )).nixPackage; - - # GHC has other native backends (like PowerPC), but here only the ones - # we ship bindists for matter. - useLLVM = !(stdenv.targetPlatform.isx86 - || (stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin)); - - libPath = - lib.makeLibraryPath ( - # Add arch-specific libraries. - map ({ nixPackage, ... }: nixPackage) binDistUsed.archSpecificLibraries - ); - - libEnvVar = lib.optionalString stdenv.hostPlatform.isDarwin "DY" - + "LD_LIBRARY_PATH"; - - runtimeDeps = [ - targetPackages.stdenv.cc - targetPackages.stdenv.cc.bintools - coreutils # for cat - ] - ++ lib.optionals useLLVM [ - (lib.getBin llvmPackages.llvm) - ] - # On darwin, we need unwrapped bintools as well (for otool) - ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ - targetPackages.stdenv.cc.bintools.bintools - ]; - -in - -stdenv.mkDerivation rec { - inherit version; - pname = "ghc-binary${binDistUsed.variantSuffix}"; - - src = fetchurl binDistUsed.src; - - nativeBuildInputs = [ perl ]; - - # Set LD_LIBRARY_PATH or equivalent so that the programs running as part - # of the bindist installer can find the libraries they expect. - # Cannot patchelf beforehand due to relative RPATHs that anticipate - # the final install location. - ${libEnvVar} = libPath; - - postUnpack = - # Verify our assumptions of which `libtinfo.so` (ncurses) version is used, - # so that we know when ghc bindists upgrade that and we need to update the - # version used in `libPath`. - lib.optionalString - (binDistUsed.exePathForLibraryCheck != null) - # Note the `*` glob because some GHCs have a suffix when unpacked, e.g. - # the musl bindist has dir `ghc-VERSION-x86_64-unknown-linux/`. - # As a result, don't shell-quote this glob when splicing the string. - (let buildExeGlob = ''ghc-${version}*/"${binDistUsed.exePathForLibraryCheck}"''; in - lib.concatStringsSep "\n" [ - ('' - echo "Checking that ghc binary exists in bindist at ${buildExeGlob}" - if ! test -e ${buildExeGlob}; then - echo >&2 "GHC binary ${binDistUsed.exePathForLibraryCheck} could not be found in the bindist build directory (at ${buildExeGlob}) for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1; - fi - '') - (lib.concatMapStringsSep - "\n" - ({ fileToCheckFor, nixPackage }: - lib.optionalString (fileToCheckFor != null) '' - echo "Checking bindist for ${fileToCheckFor} to ensure that is still used" - if ! readelf -d ${buildExeGlob} | grep "${fileToCheckFor}"; then - echo >&2 "File ${fileToCheckFor} could not be found in ${binDistUsed.exePathForLibraryCheck} for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1; - fi - - echo "Checking that the nix package ${nixPackage} contains ${fileToCheckFor}" - if ! test -e "${lib.getLib nixPackage}/lib/${fileToCheckFor}"; then - echo >&2 "Nix package ${nixPackage} did not contain ${fileToCheckFor} for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1; - fi - '' - ) - binDistUsed.archSpecificLibraries - ) - ]) - # GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib - # during linking - + lib.optionalString stdenv.isDarwin '' - export NIX_LDFLAGS+=" -no_dtrace_dof" - # not enough room in the object files for the full path to libiconv :( - for exe in $(find . -type f -executable); do - isScript $exe && continue - ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib - install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib -change /usr/local/lib/gcc/6/libgcc_s.1.dylib ${gcc.cc.lib}/lib/libgcc_s.1.dylib $exe - done - '' + - - # Some scripts used during the build need to have their shebangs patched - '' - patchShebangs ghc-${version}/utils/ - patchShebangs ghc-${version}/configure - '' + - # We have to patch the GMP paths for the integer-gmp package. - '' - find . -name ghc-bignum.buildinfo \ - -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${lib.getLib gmpUsed}/lib@" {} \; - - # we need to modify the package db directly for hadrian bindists - find . -name 'ghc-bignum*.conf' \ - -exec sed -e '/^[a-z-]*library-dirs/a \ ${lib.getLib gmpUsed}/lib' -i {} \; - '' + lib.optionalString stdenv.isDarwin '' - # we need to modify the package db directly for hadrian bindists - # (all darwin bindists are hadrian-based for 9.2.2) - find . -name 'base*.conf' \ - -exec sed -e '/^[a-z-]*library-dirs/a \ ${lib.getLib libiconv}/lib' -i {} \; - - # To link RTS in the end we also need libffi now - find . -name 'rts*.conf' \ - -exec sed -e '/^[a-z-]*library-dirs/a \ ${lib.getLib libffi}/lib' \ - -e 's@/Library/Developer/.*/usr/include/ffi@${lib.getDev libffi}/include@' \ - -i {} \; - '' + - # aarch64 does HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in - # FFI_LIB_DIR is a good indication of places it must be needed. - lib.optionalString (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) '' - find . -name package.conf.in \ - -exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \; - '' + - # Rename needed libraries and binaries, fix interpreter - lib.optionalString stdenv.isLinux '' - find . -type f -executable -exec patchelf \ - --interpreter ${stdenv.cc.bintools.dynamicLinker} {} \; - '' + - # The hadrian install Makefile uses 'xxx' as a temporary placeholder in path - # substitution. Which can break the build if the store path / prefix happens - # to contain this string. This will be fixed with 9.2.3 bindists. - # https://gitlab.haskell.org/ghc/ghc/-/issues/21402 - '' - # Detect hadrian Makefile by checking for the target that has the problem - if grep '^update_package_db' ghc-${version}*/Makefile > /dev/null; then - echo Hadrian bindist, applying workaround for xxx path substitution. - # based on https://gitlab.haskell.org/ghc/ghc/-/commit/dd5fecb0e2990b192d92f4dfd7519ecb33164fad.patch - substituteInPlace ghc-${version}*/Makefile --replace 'xxx' '\0xxx\0' - else - echo Not a hadrian bindist, not applying xxx path workaround. - fi - ''; - - # fix for `configure: error: Your linker is affected by binutils #16177` - preConfigure = lib.optionalString - stdenv.targetPlatform.isAarch32 - "LD=ld.gold"; - - configurePlatforms = [ ]; - configureFlags = [ - "--with-gmp-includes=${lib.getDev gmpUsed}/include" - # Note `--with-gmp-libraries` does nothing for GHC bindists: - # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6124 - ] ++ lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}" - # From: https://github.com/NixOS/nixpkgs/pull/43369/commits - ++ lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override"; - - # No building is necessary, but calling make without flags ironically - # calls install-strip ... - dontBuild = true; - - # Patch scripts to include runtime dependencies in $PATH. - postInstall = '' - for i in "$out/bin/"*; do - test ! -h "$i" || continue - isScript "$i" || continue - sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i" - done - ''; - - # Apparently necessary for the ghc Alpine (musl) bindist: - # When we strip, and then run the - # patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p - # below, running ghc (e.g. during `installCheckPhase)` gives some apparently - # corrupted rpath or whatever makes the loader work on nonsensical strings: - # running install tests - # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: : symbol not found - # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: ir6zf6c9f86pfx8sr30n2vjy-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/../lib/x86_64-linux-ghc-8.10.5/libHSexceptions-0.10.4-ghc8.10.5.so: symbol not found - # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: y/lib/ghc-8.10.5/bin/../lib/x86_64-linux-ghc-8.10.5/libHStemplate-haskell-2.16.0.0-ghc8.10.5.so: symbol not found - # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: 8.10.5/libHStemplate-haskell-2.16.0.0-ghc8.10.5.so: symbol not found - # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: �: symbol not found - # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: �?: symbol not found - # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: 64-linux-ghc-8.10.5/libHSexceptions-0.10.4-ghc8.10.5.so: symbol not found - # This is extremely bogus and should be investigated. - dontStrip = if stdenv.hostPlatform.isMusl then true else false; # `if` for explicitness - - # On Linux, use patchelf to modify the executables so that they can - # find editline/gmp. - postFixup = lib.optionalString (stdenv.isLinux && !(binDistUsed.isStatic or false)) - (if stdenv.hostPlatform.isAarch64 then - # Keep rpath as small as possible on aarch64 for patchelf#244. All Elfs - # are 2 directories deep from $out/lib, so pooling symlinks there makes - # a short rpath. - '' - (cd $out/lib; ln -s ${ncurses6.out}/lib/libtinfo.so.6) - (cd $out/lib; ln -s ${lib.getLib gmpUsed}/lib/libgmp.so.10) - (cd $out/lib; ln -s ${numactl.out}/lib/libnuma.so.1) - for p in $(find "$out/lib" -type f -name "*\.so*"); do - (cd $out/lib; ln -s $p) - done - - for p in $(find "$out/lib" -type f -executable); do - if isELF "$p"; then - echo "Patchelfing $p" - patchelf --set-rpath "\$ORIGIN:\$ORIGIN/../.." $p - fi - done - '' - else - '' - for p in $(find "$out" -type f -executable); do - if isELF "$p"; then - echo "Patchelfing $p" - patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p - fi - done - '') + lib.optionalString stdenv.isDarwin '' - # not enough room in the object files for the full path to libiconv :( - for exe in $(find "$out" -type f -executable); do - isScript $exe && continue - ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib - install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib -change /usr/local/lib/gcc/6/libgcc_s.1.dylib ${gcc.cc.lib}/lib/libgcc_s.1.dylib $exe - done - - for file in $(find "$out" -name setup-config); do - substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)" - done - '' + - lib.optionalString minimal '' - # Remove profiling files - find $out -type f -name '*.p_o' -delete - find $out -type f -name '*.p_hi' -delete - find $out -type f -name '*_p.a' -delete - # `-f` because e.g. musl bindist does not have this file. - rm -f $out/lib/ghc-*/bin/ghc-iserv-prof - # Hydra will redistribute this derivation, so we have to keep the docs for - # legal reasons (retaining the legal notices etc) - # As a last resort we could unpack the docs separately and symlink them in. - # They're in $out/share/{doc,man}. - '' - # Recache package db which needs to happen for Hadrian bindists - # where we modify the package db before installing - + '' - "$out/bin/ghc-pkg" --package-db="$out/lib/"ghc-*/package.conf.d recache - ''; - - # In nixpkgs, musl based builds currently enable `pie` hardening by default - # (see `defaultHardeningFlags` in `make-derivation.nix`). - # But GHC cannot currently produce outputs that are ready for `-pie` linking. - # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear. - # See: - # * https://github.com/NixOS/nixpkgs/issues/129247 - # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580 - hardeningDisable = lib.optional stdenv.targetPlatform.isMusl "pie"; - - doInstallCheck = true; - installCheckPhase = '' - # Sanity check, can ghc create executables? - cd $TMP - mkdir test-ghc; cd test-ghc - cat > main.hs << EOF - {-# LANGUAGE TemplateHaskell #-} - module Main where - main = putStrLn \$([|"yes"|]) - EOF - env -i $out/bin/ghc --make main.hs || exit 1 - echo compilation ok - [ $(./main) == "yes" ] - ''; - - passthru = { - targetPrefix = ""; - enableShared = true; - - inherit llvmPackages; - - # Our Cabal compiler name - haskellCompilerName = "ghc-${version}"; - }; - - meta = rec { - homepage = "http://haskell.org/ghc"; - description = "The Glasgow Haskell Compiler"; - license = lib.licenses.bsd3; - # HACK: since we can't encode the libc / abi in platforms, we need - # to make the platform list dependent on the evaluation platform - # in order to avoid eval errors with musl which supports less - # platforms than the default libcs (i. e. glibc / libSystem). - # This is done for the benefit of Hydra, so `packagePlatforms` - # won't return any platforms that would cause an evaluation - # failure for `pkgsMusl.haskell.compiler.ghc922Binary`, as - # long as the evaluator runs on a platform that supports - # `pkgsMusl`. - platforms = builtins.attrNames ghcBinDists.${distSetName}; - hydraPlatforms = builtins.filter (p: minimal || p != "aarch64-linux") platforms; - maintainers = lib.teams.haskell.members; - }; -} diff --git a/pkgs/development/compilers/ghc/9.2.4-binary.nix b/pkgs/development/compilers/ghc/9.2.4-binary.nix new file mode 100644 index 00000000000..4cd22a358e1 --- /dev/null +++ b/pkgs/development/compilers/ghc/9.2.4-binary.nix @@ -0,0 +1,436 @@ +{ lib, stdenv +, fetchurl, perl, gcc +, ncurses5 +, ncurses6, gmp, libiconv, numactl, libffi +, llvmPackages +, coreutils +, targetPackages + + # minimal = true; will remove files that aren't strictly necessary for + # regular builds and GHC bootstrapping. + # This is "useful" for staying within hydra's output limits for at least the + # aarch64-linux architecture. +, minimal ? false +}: + +# Prebuilt only does native +assert stdenv.targetPlatform == stdenv.hostPlatform; + +let + downloadsUrl = "https://downloads.haskell.org/ghc"; + + # Copy sha256 from https://downloads.haskell.org/~ghc/9.2.4/SHA256SUMS + version = "9.2.4"; + + # Information about available bindists that we use in the build. + # + # # Bindist library checking + # + # The field `archSpecificLibraries` also provides a way for us get notified + # early when the upstream bindist changes its dependencies (e.g. because a + # newer Debian version is used that uses a new `ncurses` version). + # + # Usage: + # + # * You can find the `fileToCheckFor` of libraries by running `readelf -d` + # on the compiler binary (`exePathForLibraryCheck`). + # * To skip library checking for an architecture, + # set `exePathForLibraryCheck = null`. + # * To skip file checking for a specific arch specfic library, + # set `fileToCheckFor = null`. + ghcBinDists = { + # Binary distributions for the default libc (e.g. glibc, or libSystem on Darwin) + # nixpkgs uses for the respective system. + defaultLibc = { + i686-linux = { + variantSuffix = ""; + src = { + url = "${downloadsUrl}/${version}/ghc-${version}-i386-deb9-linux.tar.xz"; + sha256 = "5dc1eb9c65f01b1e5c5693af72af07a4e9e75c6920e620fd598daeefa804487a"; + }; + exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; + archSpecificLibraries = [ + { nixPackage = gmp; fileToCheckFor = null; } + # The i686-linux bindist provided by GHC HQ is currently built on Debian 9, + # which link it against `libtinfo.so.5` (ncurses 5). + # Other bindists are linked `libtinfo.so.6` (ncurses 6). + { nixPackage = ncurses5; fileToCheckFor = "libtinfo.so.5"; } + ]; + }; + x86_64-linux = { + variantSuffix = ""; + src = { + url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-deb10-linux.tar.xz"; + sha256 = "a77a91a39d9b0167124b7e97648b2b52973ae0978cb259e0d44f0752a75037cb"; + }; + exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; + archSpecificLibraries = [ + { nixPackage = gmp; fileToCheckFor = null; } + { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; } + ]; + }; + aarch64-linux = { + variantSuffix = ""; + src = { + url = "${downloadsUrl}/${version}/ghc-${version}-aarch64-deb10-linux.tar.xz"; + sha256 = "fc7dbc6bae36ea5ac30b7e9a263b7e5be3b45b0eb3e893ad0bc2c950a61f14ec"; + }; + exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2"; + archSpecificLibraries = [ + { nixPackage = gmp; fileToCheckFor = null; } + { nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; } + { nixPackage = numactl; fileToCheckFor = null; } + ]; + }; + x86_64-darwin = { + variantSuffix = ""; + src = { + url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz"; + sha256 = "f2e8366fd3754dd9388510792aba2d2abecb1c2f7f1e5555f6065c3c5e2ffec4"; + }; + exePathForLibraryCheck = null; # we don't have a library check for darwin yet + archSpecificLibraries = [ + { nixPackage = gmp; fileToCheckFor = null; } + { nixPackage = ncurses6; fileToCheckFor = null; } + { nixPackage = libiconv; fileToCheckFor = null; } + ]; + }; + aarch64-darwin = { + variantSuffix = ""; + src = { + url = "${downloadsUrl}/${version}/ghc-${version}-aarch64-apple-darwin.tar.xz"; + sha256 = "8cf8408544a1a43adf1bbbb0dd6b074efadffc68bfa1a792947c52e825171224"; + }; + exePathForLibraryCheck = null; # we don't have a library check for darwin yet + archSpecificLibraries = [ + { nixPackage = gmp; fileToCheckFor = null; } + { nixPackage = ncurses6; fileToCheckFor = null; } + { nixPackage = libiconv; fileToCheckFor = null; } + ]; + }; + }; + # Binary distributions for the musl libc for the respective system. + musl = { + x86_64-linux = { + variantSuffix = "-musl"; + src = { + url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-alpine3.12-linux-gmp.tar.xz"; + sha256 = "026348947d30a156b84de5d6afeaa48fdcb2795b47954cd8341db00d3263a481"; + }; + isStatic = true; + # We can't check the RPATH for statically linked executable + exePathForLibraryCheck = null; + archSpecificLibraries = [ + { nixPackage = gmp.override { withStatic = true; }; fileToCheckFor = null; } + ]; + }; + }; + }; + + distSetName = if stdenv.hostPlatform.isMusl then "musl" else "defaultLibc"; + + binDistUsed = ghcBinDists.${distSetName}.${stdenv.hostPlatform.system} + or (throw "cannot bootstrap GHC on this platform ('${stdenv.hostPlatform.system}' with libc '${distSetName}')"); + + gmpUsed = (builtins.head ( + builtins.filter ( + drv: lib.hasPrefix "gmp" (drv.nixPackage.name or "") + ) binDistUsed.archSpecificLibraries + )).nixPackage; + + # GHC has other native backends (like PowerPC), but here only the ones + # we ship bindists for matter. + useLLVM = !(stdenv.targetPlatform.isx86 + || (stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin)); + + libPath = + lib.makeLibraryPath ( + # Add arch-specific libraries. + map ({ nixPackage, ... }: nixPackage) binDistUsed.archSpecificLibraries + ); + + libEnvVar = lib.optionalString stdenv.hostPlatform.isDarwin "DY" + + "LD_LIBRARY_PATH"; + + runtimeDeps = [ + targetPackages.stdenv.cc + targetPackages.stdenv.cc.bintools + coreutils # for cat + ] + ++ lib.optionals useLLVM [ + (lib.getBin llvmPackages.llvm) + ] + # On darwin, we need unwrapped bintools as well (for otool) + ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ + targetPackages.stdenv.cc.bintools.bintools + ]; + +in + +stdenv.mkDerivation rec { + inherit version; + pname = "ghc-binary${binDistUsed.variantSuffix}"; + + src = fetchurl binDistUsed.src; + + nativeBuildInputs = [ perl ]; + + # Set LD_LIBRARY_PATH or equivalent so that the programs running as part + # of the bindist installer can find the libraries they expect. + # Cannot patchelf beforehand due to relative RPATHs that anticipate + # the final install location. + ${libEnvVar} = libPath; + + postUnpack = + # Verify our assumptions of which `libtinfo.so` (ncurses) version is used, + # so that we know when ghc bindists upgrade that and we need to update the + # version used in `libPath`. + lib.optionalString + (binDistUsed.exePathForLibraryCheck != null) + # Note the `*` glob because some GHCs have a suffix when unpacked, e.g. + # the musl bindist has dir `ghc-VERSION-x86_64-unknown-linux/`. + # As a result, don't shell-quote this glob when splicing the string. + (let buildExeGlob = ''ghc-${version}*/"${binDistUsed.exePathForLibraryCheck}"''; in + lib.concatStringsSep "\n" [ + ('' + echo "Checking that ghc binary exists in bindist at ${buildExeGlob}" + if ! test -e ${buildExeGlob}; then + echo >&2 "GHC binary ${binDistUsed.exePathForLibraryCheck} could not be found in the bindist build directory (at ${buildExeGlob}) for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1; + fi + '') + (lib.concatMapStringsSep + "\n" + ({ fileToCheckFor, nixPackage }: + lib.optionalString (fileToCheckFor != null) '' + echo "Checking bindist for ${fileToCheckFor} to ensure that is still used" + if ! readelf -d ${buildExeGlob} | grep "${fileToCheckFor}"; then + echo >&2 "File ${fileToCheckFor} could not be found in ${binDistUsed.exePathForLibraryCheck} for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1; + fi + + echo "Checking that the nix package ${nixPackage} contains ${fileToCheckFor}" + if ! test -e "${lib.getLib nixPackage}/lib/${fileToCheckFor}"; then + echo >&2 "Nix package ${nixPackage} did not contain ${fileToCheckFor} for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1; + fi + '' + ) + binDistUsed.archSpecificLibraries + ) + ]) + # GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib + # during linking + + lib.optionalString stdenv.isDarwin '' + export NIX_LDFLAGS+=" -no_dtrace_dof" + # not enough room in the object files for the full path to libiconv :( + for exe in $(find . -type f -executable); do + isScript $exe && continue + ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib + install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib -change /usr/local/lib/gcc/6/libgcc_s.1.dylib ${gcc.cc.lib}/lib/libgcc_s.1.dylib $exe + done + '' + + + # Some scripts used during the build need to have their shebangs patched + '' + patchShebangs ghc-${version}/utils/ + patchShebangs ghc-${version}/configure + '' + + # We have to patch the GMP paths for the integer-gmp package. + '' + find . -name ghc-bignum.buildinfo \ + -exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${lib.getLib gmpUsed}/lib@" {} \; + + # we need to modify the package db directly for hadrian bindists + find . -name 'ghc-bignum*.conf' \ + -exec sed -e '/^[a-z-]*library-dirs/a \ ${lib.getLib gmpUsed}/lib' -i {} \; + '' + lib.optionalString stdenv.isDarwin '' + # we need to modify the package db directly for hadrian bindists + # (all darwin bindists are hadrian-based for 9.2.2) + find . -name 'base*.conf' \ + -exec sed -e '/^[a-z-]*library-dirs/a \ ${lib.getLib libiconv}/lib' -i {} \; + + # To link RTS in the end we also need libffi now + find . -name 'rts*.conf' \ + -exec sed -e '/^[a-z-]*library-dirs/a \ ${lib.getLib libffi}/lib' \ + -e 's@/Library/Developer/.*/usr/include/ffi@${lib.getDev libffi}/include@' \ + -i {} \; + '' + + # aarch64 does HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in + # FFI_LIB_DIR is a good indication of places it must be needed. + lib.optionalString (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) '' + find . -name package.conf.in \ + -exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \; + '' + + # Rename needed libraries and binaries, fix interpreter + lib.optionalString stdenv.isLinux '' + find . -type f -executable -exec patchelf \ + --interpreter ${stdenv.cc.bintools.dynamicLinker} {} \; + '' + + # The hadrian install Makefile uses 'xxx' as a temporary placeholder in path + # substitution. Which can break the build if the store path / prefix happens + # to contain this string. This will be fixed with 9.2.3 bindists. + # https://gitlab.haskell.org/ghc/ghc/-/issues/21402 + '' + # Detect hadrian Makefile by checking for the target that has the problem + if grep '^update_package_db' ghc-${version}*/Makefile > /dev/null; then + echo Hadrian bindist, applying workaround for xxx path substitution. + # based on https://gitlab.haskell.org/ghc/ghc/-/commit/dd5fecb0e2990b192d92f4dfd7519ecb33164fad.patch + substituteInPlace ghc-${version}*/Makefile --replace 'xxx' '\0xxx\0' + else + echo Not a hadrian bindist, not applying xxx path workaround. + fi + ''; + + # fix for `configure: error: Your linker is affected by binutils #16177` + preConfigure = lib.optionalString + stdenv.targetPlatform.isAarch32 + "LD=ld.gold"; + + configurePlatforms = [ ]; + configureFlags = [ + "--with-gmp-includes=${lib.getDev gmpUsed}/include" + # Note `--with-gmp-libraries` does nothing for GHC bindists: + # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6124 + ] ++ lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}" + # From: https://github.com/NixOS/nixpkgs/pull/43369/commits + ++ lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override"; + + # No building is necessary, but calling make without flags ironically + # calls install-strip ... + dontBuild = true; + + # Patch scripts to include runtime dependencies in $PATH. + postInstall = '' + for i in "$out/bin/"*; do + test ! -h "$i" || continue + isScript "$i" || continue + sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i" + done + ''; + + # Apparently necessary for the ghc Alpine (musl) bindist: + # When we strip, and then run the + # patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p + # below, running ghc (e.g. during `installCheckPhase)` gives some apparently + # corrupted rpath or whatever makes the loader work on nonsensical strings: + # running install tests + # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: : symbol not found + # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: ir6zf6c9f86pfx8sr30n2vjy-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/../lib/x86_64-linux-ghc-8.10.5/libHSexceptions-0.10.4-ghc8.10.5.so: symbol not found + # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: y/lib/ghc-8.10.5/bin/../lib/x86_64-linux-ghc-8.10.5/libHStemplate-haskell-2.16.0.0-ghc8.10.5.so: symbol not found + # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: 8.10.5/libHStemplate-haskell-2.16.0.0-ghc8.10.5.so: symbol not found + # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: �: symbol not found + # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: �?: symbol not found + # Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: 64-linux-ghc-8.10.5/libHSexceptions-0.10.4-ghc8.10.5.so: symbol not found + # This is extremely bogus and should be investigated. + dontStrip = if stdenv.hostPlatform.isMusl then true else false; # `if` for explicitness + + # On Linux, use patchelf to modify the executables so that they can + # find editline/gmp. + postFixup = lib.optionalString (stdenv.isLinux && !(binDistUsed.isStatic or false)) + (if stdenv.hostPlatform.isAarch64 then + # Keep rpath as small as possible on aarch64 for patchelf#244. All Elfs + # are 2 directories deep from $out/lib, so pooling symlinks there makes + # a short rpath. + '' + (cd $out/lib; ln -s ${ncurses6.out}/lib/libtinfo.so.6) + (cd $out/lib; ln -s ${lib.getLib gmpUsed}/lib/libgmp.so.10) + (cd $out/lib; ln -s ${numactl.out}/lib/libnuma.so.1) + for p in $(find "$out/lib" -type f -name "*\.so*"); do + (cd $out/lib; ln -s $p) + done + + for p in $(find "$out/lib" -type f -executable); do + if isELF "$p"; then + echo "Patchelfing $p" + patchelf --set-rpath "\$ORIGIN:\$ORIGIN/../.." $p + fi + done + '' + else + '' + for p in $(find "$out" -type f -executable); do + if isELF "$p"; then + echo "Patchelfing $p" + patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p + fi + done + '') + lib.optionalString stdenv.isDarwin '' + # not enough room in the object files for the full path to libiconv :( + for exe in $(find "$out" -type f -executable); do + isScript $exe && continue + ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib + install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib -change /usr/local/lib/gcc/6/libgcc_s.1.dylib ${gcc.cc.lib}/lib/libgcc_s.1.dylib $exe + done + + for file in $(find "$out" -name setup-config); do + substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)" + done + '' + + lib.optionalString minimal '' + # Remove profiling files + find $out -type f -name '*.p_o' -delete + find $out -type f -name '*.p_hi' -delete + find $out -type f -name '*_p.a' -delete + # `-f` because e.g. musl bindist does not have this file. + rm -f $out/lib/ghc-*/bin/ghc-iserv-prof + # Hydra will redistribute this derivation, so we have to keep the docs for + # legal reasons (retaining the legal notices etc) + # As a last resort we could unpack the docs separately and symlink them in. + # They're in $out/share/{doc,man}. + '' + # Recache package db which needs to happen for Hadrian bindists + # where we modify the package db before installing + + '' + "$out/bin/ghc-pkg" --package-db="$out/lib/"ghc-*/package.conf.d recache + ''; + + # In nixpkgs, musl based builds currently enable `pie` hardening by default + # (see `defaultHardeningFlags` in `make-derivation.nix`). + # But GHC cannot currently produce outputs that are ready for `-pie` linking. + # Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear. + # See: + # * https://github.com/NixOS/nixpkgs/issues/129247 + # * https://gitlab.haskell.org/ghc/ghc/-/issues/19580 + hardeningDisable = lib.optional stdenv.targetPlatform.isMusl "pie"; + + doInstallCheck = true; + installCheckPhase = '' + # Sanity check, can ghc create executables? + cd $TMP + mkdir test-ghc; cd test-ghc + cat > main.hs << EOF + {-# LANGUAGE TemplateHaskell #-} + module Main where + main = putStrLn \$([|"yes"|]) + EOF + env -i $out/bin/ghc --make main.hs || exit 1 + echo compilation ok + [ $(./main) == "yes" ] + ''; + + passthru = { + targetPrefix = ""; + enableShared = true; + + inherit llvmPackages; + + # Our Cabal compiler name + haskellCompilerName = "ghc-${version}"; + }; + + meta = rec { + homepage = "http://haskell.org/ghc"; + description = "The Glasgow Haskell Compiler"; + license = lib.licenses.bsd3; + # HACK: since we can't encode the libc / abi in platforms, we need + # to make the platform list dependent on the evaluation platform + # in order to avoid eval errors with musl which supports less + # platforms than the default libcs (i. e. glibc / libSystem). + # This is done for the benefit of Hydra, so `packagePlatforms` + # won't return any platforms that would cause an evaluation + # failure for `pkgsMusl.haskell.compiler.ghc922Binary`, as + # long as the evaluator runs on a platform that supports + # `pkgsMusl`. + platforms = builtins.attrNames ghcBinDists.${distSetName}; + hydraPlatforms = builtins.filter (p: minimal || p != "aarch64-linux") platforms; + maintainers = lib.teams.haskell.members; + }; +} diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 8d512968a85..44ffc7335c3 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -8,8 +8,8 @@ let "ghc8102BinaryMinimal" "ghc8107Binary" "ghc8107BinaryMinimal" - "ghc922Binary" - "ghc922BinaryMinimal" + "ghc924Binary" + "ghc924BinaryMinimal" "ghcjs" "ghcjs810" "integer-simple" @@ -86,10 +86,10 @@ in { minimal = true; }; - ghc922Binary = callPackage ../development/compilers/ghc/9.2.2-binary.nix { + ghc924Binary = callPackage ../development/compilers/ghc/9.2.4-binary.nix { llvmPackages = pkgs.llvmPackages_12; }; - ghc922BinaryMinimal = callPackage ../development/compilers/ghc/9.2.2-binary.nix { + ghc924BinaryMinimal = callPackage ../development/compilers/ghc/9.2.4-binary.nix { llvmPackages = pkgs.llvmPackages_12; minimal = true; }; @@ -192,12 +192,15 @@ in { ghc94 = ghc942; ghcHEAD = callPackage ../development/compilers/ghc/head.nix { bootPkgs = - if stdenv.isAarch64 || stdenv.isAarch32 then - packages.ghc922BinaryMinimal + # For GHC 9.2.3 and 9.2.4 no armv7l bindists are available. + if stdenv.hostPlatform.isAarch32 then + packages.ghc924 else if stdenv.hostPlatform.isPower64 && stdenv.hostPlatform.isLittleEndian then packages.ghc924 + else if stdenv.isAarch64 then + packages.ghc924BinaryMinimal else - packages.ghc922Binary; + packages.ghc924Binary; inherit (buildPackages.python3Packages) sphinx; # Need to use apple's patched xattr until # https://github.com/xattr/xattr/issues/44 and @@ -272,15 +275,15 @@ in { compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.10.x.nix { }; packageSetConfig = bootstrapPackageSet; }; - ghc922Binary = callPackage ../development/haskell-modules { - buildHaskellPackages = bh.packages.ghc922Binary; - ghc = bh.compiler.ghc922Binary; + ghc924Binary = callPackage ../development/haskell-modules { + buildHaskellPackages = bh.packages.ghc924Binary; + ghc = bh.compiler.ghc924Binary; compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { }; packageSetConfig = bootstrapPackageSet; }; - ghc922BinaryMinimal = callPackage ../development/haskell-modules { - buildHaskellPackages = bh.packages.ghc922BinaryMinimal; - ghc = bh.compiler.ghc922BinaryMinimal; + ghc924BinaryMinimal = callPackage ../development/haskell-modules { + buildHaskellPackages = bh.packages.ghc924BinaryMinimal; + ghc = bh.compiler.ghc924BinaryMinimal; compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-9.2.x.nix { }; packageSetConfig = bootstrapPackageSet; }; -- cgit 1.4.1 From cfb9de171e1d75fc2d92a2a278c9239884a44b67 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 26 Sep 2022 22:30:45 +0000 Subject: pgloader: 3.6.7 -> 3.6.8 --- pkgs/development/tools/pgloader/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/pgloader/default.nix b/pkgs/development/tools/pgloader/default.nix index 339009a50eb..c86c3eb0870 100644 --- a/pkgs/development/tools/pgloader/default.nix +++ b/pkgs/development/tools/pgloader/default.nix @@ -1,11 +1,11 @@ { lib, stdenv, fetchurl, makeWrapper, sbcl_2_2_6, sqlite, freetds, libzip, curl, git, cacert, openssl }: stdenv.mkDerivation rec { pname = "pgloader"; - version = "3.6.7"; + version = "3.6.8"; src = fetchurl { - url = "https://github.com/dimitri/pgloader/releases/download/v3.6.7/pgloader-bundle-3.6.7.tgz"; - sha256 = "sha256-JfF2el0vJjDAyB2l3H4dLgEIgnmXlrCUVYKDpj2jM1Y="; + url = "https://github.com/dimitri/pgloader/releases/download/v3.6.8/pgloader-bundle-3.6.8.tgz"; + sha256 = "sha256-h5vB+KOapbXsSVNIVWEsaanyczaCfl81+SXdiNmNboE="; }; nativeBuildInputs = [ git makeWrapper ]; -- cgit 1.4.1 From c1607ac82b17a2441fb2b8c0814e172fb8fafe95 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 26 Sep 2022 22:31:59 +0000 Subject: pixelorama: 0.10.2 -> 0.10.3 --- pkgs/applications/editors/pixelorama/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/pixelorama/default.nix b/pkgs/applications/editors/pixelorama/default.nix index 4c95a93a140..20dcd766b17 100644 --- a/pkgs/applications/editors/pixelorama/default.nix +++ b/pkgs/applications/editors/pixelorama/default.nix @@ -9,13 +9,13 @@ let else throw "unsupported platform"; in stdenv.mkDerivation rec { pname = "pixelorama"; - version = "0.10.2"; + version = "0.10.3"; src = fetchFromGitHub { owner = "Orama-Interactive"; repo = "Pixelorama"; rev = "v${version}"; - sha256 = "sha256-IqOBZGo0M8JfREpCv14AvRub6yVTpKfAd5JCNqCVolQ="; + sha256 = "sha256-RFE7K8NMl0COzFEhUqWhhYd5MGBsCDJf0T5daPu/4DI="; }; nativeBuildInputs = [ -- cgit 1.4.1 From 643c82b0140984a002414da5a1ef87ac25ae3870 Mon Sep 17 00:00:00 2001 From: pkharvey Date: Mon, 26 Sep 2022 23:49:58 +0100 Subject: stm8flash: init at 2022-03-27 --- .../embedded/stm8/stm8flash/default.nix | 34 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/embedded/stm8/stm8flash/default.nix diff --git a/pkgs/development/embedded/stm8/stm8flash/default.nix b/pkgs/development/embedded/stm8/stm8flash/default.nix new file mode 100644 index 00000000000..eaf1a19c91b --- /dev/null +++ b/pkgs/development/embedded/stm8/stm8flash/default.nix @@ -0,0 +1,34 @@ +{ lib, stdenv, fetchFromGitHub, libusb1, pkg-config }: + +stdenv.mkDerivation rec { + pname = "stm8flash"; + version = "2022-03-27"; + + src = fetchFromGitHub { + owner = "vdudouyt"; + repo = "stm8flash"; + rev = "23305ce5adbb509c5cb668df31b0fd6c8759639c"; + sha256 = "sha256-fFoC2EKSmYyW2lqrdAh5A2WEtUMCenKse2ySJdNHu6w="; + }; + + strictDeps = true; + enableParallelBuilding = true; + + # NOTE: _FORTIFY_SOURCE requires compiling with optimization (-O) + NIX_CFLAGS_COMPILE = "-O"; + + preBuild = '' + export DESTDIR=$out; + ''; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ libusb1 ]; + + meta = with lib; { + homepage = "https://github.com/vdudouyt/stm8flash"; + description = "A tool for flashing STM8 MCUs via ST-LINK (V1 and V2)"; + maintainers = with maintainers; [ pkharvey ]; + license = licenses.gpl2; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1b7297191de..63cd17e58eb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17361,6 +17361,8 @@ with pkgs; stm32flash = callPackage ../development/embedded/stm32/stm32flash { }; + stm8flash = callPackage ../development/embedded/stm8/stm8flash { }; + strace = callPackage ../development/tools/misc/strace { }; stylua = callPackage ../development/tools/stylua { }; -- cgit 1.4.1 From 1bc09e202ea15719d10ac11b02da13d044b32dc1 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 26 Sep 2022 23:12:41 +0000 Subject: radarr: 4.1.0.6175 -> 4.2.4.6635 --- pkgs/servers/radarr/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/radarr/default.nix b/pkgs/servers/radarr/default.nix index ceb6d270d13..9f5541adff4 100644 --- a/pkgs/servers/radarr/default.nix +++ b/pkgs/servers/radarr/default.nix @@ -9,14 +9,14 @@ let }."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); hash = { - x64-linux_hash = "sha256-3oxCBg+lxN8eGaS1kmIK0kL2qUNOLHhLnkMPmPlZcyw="; - arm64-linux_hash = "sha256-OaCI2neL8bMFf/QuZEZXKuZgJBnUT+Q2XMChfSqF5Bc="; - x64-osx_hash = "sha256-vv3ds5BE2PDA94Hkr//MB0a7CF3dnk7r7wYF9SAzL48="; + x64-linux_hash = "sha256-kdY0RiZWrPCaXDGWhnJY2jGOO9h0WNRnT+CQ11l4How="; + arm64-linux_hash = "sha256-gG7r4G6iHLZPkjR43uD6s3b3mitTT2yfGxYdwPlI8D0="; + x64-osx_hash = "sha256-guqmzEMRytN2IJ907KW+rZq9cHT6oC3GyHzTyVyFU0w="; }."${arch}-${os}_hash"; in stdenv.mkDerivation rec { pname = "radarr"; - version = "4.1.0.6175"; + version = "4.2.4.6635"; src = fetchurl { url = "https://github.com/Radarr/Radarr/releases/download/v${version}/Radarr.master.${version}.${os}-core-${arch}.tar.gz"; -- cgit 1.4.1 From 22927943807e817b9eaa5360236056ad3a01584e Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 26 Sep 2022 18:58:50 -0400 Subject: asciinema-agg: init at 1.3.0 --- pkgs/tools/misc/asciinema-agg/default.nix | 26 ++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/tools/misc/asciinema-agg/default.nix diff --git a/pkgs/tools/misc/asciinema-agg/default.nix b/pkgs/tools/misc/asciinema-agg/default.nix new file mode 100644 index 00000000000..685afc2d66a --- /dev/null +++ b/pkgs/tools/misc/asciinema-agg/default.nix @@ -0,0 +1,26 @@ +{ lib, rustPlatform, fetchFromGitHub, stdenv, Security }: + +rustPlatform.buildRustPackage rec { + pname = "agg"; + version = "1.3.0"; + + src = fetchFromGitHub { + owner = "asciinema"; + repo = pname; + rev = "v${version}"; + sha256 = "15j7smkjv2z9vd7drdq83g40j986ny39ai6y9rnai3iljsycyvgs"; + }; + + cargoSha256 = "sha256-ORSYIRcvnKFkJxEjiTUSa1gkfmiQs3EAVOpXePVgBPQ="; + + buildInputs = lib.optionals stdenv.isDarwin [ + Security + ]; + + meta = with lib; { + description = "A command-line tool for generating animated GIF files from asciicast v2 files produced by asciinema terminal recorder"; + homepage = "https://github.com/asciinema/agg"; + license = licenses.asl20; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1b7297191de..accdfb01e04 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2088,6 +2088,10 @@ with pkgs; asciinema = callPackage ../tools/misc/asciinema {}; + asciinema-agg = callPackage ../tools/misc/asciinema-agg { + inherit (darwin.apple_sdk.frameworks) Security; + }; + asciinema-scenario = callPackage ../tools/misc/asciinema-scenario {}; asciiquarium = callPackage ../applications/misc/asciiquarium {}; -- cgit 1.4.1 From 6671b3a9503d883db9a8b9cfb90ce75dd806680d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 26 Sep 2022 23:39:09 +0000 Subject: python310Packages.hmmlearn: 0.2.7 -> 0.2.8 --- pkgs/development/python-modules/hmmlearn/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/hmmlearn/default.nix b/pkgs/development/python-modules/hmmlearn/default.nix index 8c699af9752..153c582b7cf 100644 --- a/pkgs/development/python-modules/hmmlearn/default.nix +++ b/pkgs/development/python-modules/hmmlearn/default.nix @@ -4,11 +4,11 @@ buildPythonPackage rec { pname = "hmmlearn"; - version = "0.2.7"; + version = "0.2.8"; src = fetchurl { url = "mirror://pypi/h/hmmlearn/${pname}-${version}.tar.gz"; - sha256 = "sha256-a0snIPJ6912pNnq02Q3LAPONozFo322Rf57F3mZw9uE="; + sha256 = "sha256-aWkx49zmgBzJt4xin1QwYd1+tnpxFVsD0bOeoXKipfk="; }; buildInputs = [ setuptools-scm cython pybind11 ]; -- cgit 1.4.1 From e628b43a9c2aff685e420028b58a4376e3117c8a Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 24 Sep 2022 14:52:38 +0200 Subject: common-updater-scripts: fix silent error on 404 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When TOFU was unable to download the file, there would be no hash in the fetch log, causing the grep to fail. Since the script is set to errexit, it would terminate the processing without any output. Let’s instead print the fetch log. --- pkgs/common-updater/scripts/update-source-version | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/common-updater/scripts/update-source-version b/pkgs/common-updater/scripts/update-source-version index 12a63fa9260..75ad6e7a5cf 100755 --- a/pkgs/common-updater/scripts/update-source-version +++ b/pkgs/common-updater/scripts/update-source-version @@ -237,9 +237,13 @@ fi if [[ -z "$newHash" ]]; then nix-build $systemArg --no-out-link -A "$attr.$sourceKey" 2>"$attr.fetchlog" >/dev/null || true # FIXME: use nix-build --hash here once https://github.com/NixOS/nix/issues/1172 is fixed - newHash=$(sed '1,/hash mismatch in fixed-output derivation/d' "$attr.fetchlog" | grep --perl-regexp --only-matching 'got: +.+[:-]\K.+') + newHash=$( + sed '1,/hash mismatch in fixed-output derivation/d' "$attr.fetchlog" \ + | grep --perl-regexp --only-matching 'got: +.+[:-]\K.+' \ + || true # handled below + ) - if [[ -n "$sri" ]]; then + if [[ -n "$newHash" && -n "$sri" ]]; then # nix-build preserves the hashing scheme so we can just convert the result to SRI using the old type newHash="$(nix --extra-experimental-features nix-command hash to-sri --type "$oldHashAlgo" "$newHash" 2>/dev/null \ || nix to-sri --type "$oldHashAlgo" "$newHash" 2>/dev/null)" \ -- cgit 1.4.1 From a5af361af4d6cda34611bde73e51e1d7bb438827 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 24 Sep 2022 14:58:58 +0200 Subject: gnome.updateScript: Support freezing up to an explicit version libgweather released version 4 after releasing version 40, we need to ignore the latter. --- pkgs/desktops/gnome/update.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/desktops/gnome/update.nix b/pkgs/desktops/gnome/update.nix index f5db71174ad..e945e005d48 100644 --- a/pkgs/desktops/gnome/update.nix +++ b/pkgs/desktops/gnome/update.nix @@ -12,7 +12,13 @@ let minorAvailable = builtins.length versionComponents > 1 && builtins.match "[0-9]+" minorVersion != null; nextMinor = builtins.fromJSON minorVersion + 1; upperBound = "${lib.versions.major packageVersion}.${builtins.toString nextMinor}"; - in lib.optionals (freeze && minorAvailable) [ upperBound ]; + in + if builtins.isBool freeze then + lib.optionals (freeze && minorAvailable) [ upperBound ] + else if builtins.isString freeze then + [ freeze ] + else + throw "“freeze” argument needs to be either a boolean, or a version string."; updateScript = writeScript "gnome-update-script" '' #!${bash}/bin/bash set -o errexit -- cgit 1.4.1 From 34d4ea2781a4d70aa71b6768280c2bf6af081953 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 27 Sep 2022 02:13:47 +0200 Subject: libgweather: Fix update script downloading wrong version Previous maintainer released version 40 but the current maintainer decided that it was a bad idea and continued with version 4. This was confusing our update script. --- pkgs/development/libraries/libgweather/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/libgweather/default.nix b/pkgs/development/libraries/libgweather/default.nix index cae2095f8eb..bc9a0468584 100644 --- a/pkgs/development/libraries/libgweather/default.nix +++ b/pkgs/development/libraries/libgweather/default.nix @@ -74,6 +74,8 @@ stdenv.mkDerivation rec { updateScript = gnome.updateScript { packageName = pname; versionPolicy = "odd-unstable"; + # Version 40.alpha preceded version 4.0. + freeze = "40.alpha"; }; }; -- cgit 1.4.1 From d019199454513e78700afb50e1f9312d4aca4706 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 27 Sep 2022 00:30:34 +0000 Subject: python310Packages.jellyfin-apiclient-python: 1.9.1 -> 1.9.2 --- pkgs/development/python-modules/jellyfin-apiclient-python/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/jellyfin-apiclient-python/default.nix b/pkgs/development/python-modules/jellyfin-apiclient-python/default.nix index be848b65282..4413f081a63 100644 --- a/pkgs/development/python-modules/jellyfin-apiclient-python/default.nix +++ b/pkgs/development/python-modules/jellyfin-apiclient-python/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "jellyfin-apiclient-python"; - version = "1.9.1"; + version = "1.9.2"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-fS+NQUTKNxHuE+qsV91mpTlYt7DfXQVsA9ybfLlHYtc="; + hash = "sha256-vMzZeoiWli3HjM8Dqr5RhNfR7gcjPqoXG3b/aNNlx2Q="; }; propagatedBuildInputs = [ -- cgit 1.4.1 From 6dc5f10d8085caa13c992dcc9e5e2296ea5fcf3b Mon Sep 17 00:00:00 2001 From: Yaya Date: Tue, 27 Sep 2022 07:51:48 +0000 Subject: snowflake: 2.3.0 -> 2.3.1 https://gitweb.torproject.org/pluggable-transports/snowflake.git/plain/ChangeLog --- pkgs/tools/networking/snowflake/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/snowflake/default.nix b/pkgs/tools/networking/snowflake/default.nix index 5f42f912548..5118186c4de 100644 --- a/pkgs/tools/networking/snowflake/default.nix +++ b/pkgs/tools/networking/snowflake/default.nix @@ -2,12 +2,12 @@ buildGoModule rec { pname = "snowflake"; - version = "2.3.0"; + version = "2.3.1"; src = fetchgit { url = "https://git.torproject.org/pluggable-transports/${pname}"; rev = "v${version}"; - sha256 = "sha256-LQ9QIdj3id6bEzAItMGc3pJFylNP4har79VKUa9qo20="; + sha256 = "sha256-4/ZTLyST73krOL87am28TM+1mktchpoCSaASMqQl5e8="; }; vendorSha256 = "sha256-a2Ng+D1I0v5odChM6XVVnNwea/0SOTOmdm2dqKaSU3s="; -- cgit 1.4.1 From ddf9f1800a8f6ed321646026ee9c795c90a8b993 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 27 Sep 2022 11:26:09 +0000 Subject: delly: 1.1.3 -> 1.1.5 --- pkgs/applications/science/biology/delly/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/biology/delly/default.nix b/pkgs/applications/science/biology/delly/default.nix index ee4a8f29944..f758e411679 100644 --- a/pkgs/applications/science/biology/delly/default.nix +++ b/pkgs/applications/science/biology/delly/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "delly"; - version = "1.1.3"; + version = "1.1.5"; src = fetchFromGitHub { owner = "dellytools"; repo = pname; rev = "v${version}"; - sha256 = "sha256-fGwSRYpvGYyYvRvP1ljs3mhXRpONzO5/QVegjqMsOdk="; + sha256 = "sha256-K75tpbW1h84gzZ+s5jMzmFItfBi6rjkAhzks9F0gYpA="; }; buildInputs = [ zlib htslib bzip2 xz ncurses boost ]; -- cgit 1.4.1 From f1abf12a042bfb0ded32ccebbe2b3634014311da Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 27 Sep 2022 12:30:34 +0000 Subject: pg_activity: 3.0.0 -> 3.0.1 --- pkgs/development/tools/database/pg_activity/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/database/pg_activity/default.nix b/pkgs/development/tools/database/pg_activity/default.nix index f7e034a9a77..399c8801f77 100644 --- a/pkgs/development/tools/database/pg_activity/default.nix +++ b/pkgs/development/tools/database/pg_activity/default.nix @@ -2,14 +2,14 @@ python3Packages.buildPythonApplication rec { pname = "pg_activity"; - version = "3.0.0"; + version = "3.0.1"; disabled = python3Packages.pythonOlder "3.6"; src = fetchFromGitHub { owner = "dalibo"; repo = pname; rev = "refs/tags/v${version}"; - sha256 = "sha256-MJZS5+i3s5fTFcgw5zt3GeJKKZ/GS66scuUAW9Fu73A="; + sha256 = "sha256-YsHY2Hvr1aDKA+YOftc7iUi1qXDv6HW+jQtTQgQ5+M4="; }; propagatedBuildInputs = with python3Packages; [ -- cgit 1.4.1 From 13943e2b68027819051996dfef46619a671aaae7 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 27 Sep 2022 12:54:23 +0000 Subject: geoipupdate: 4.9.0 -> 4.10.0 --- pkgs/applications/misc/geoipupdate/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/geoipupdate/default.nix b/pkgs/applications/misc/geoipupdate/default.nix index 26d729fe8a7..c2f025d20ae 100644 --- a/pkgs/applications/misc/geoipupdate/default.nix +++ b/pkgs/applications/misc/geoipupdate/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "geoipupdate"; - version = "4.9.0"; + version = "4.10.0"; src = fetchFromGitHub { owner = "maxmind"; repo = "geoipupdate"; rev = "v${version}"; - sha256 = "sha256-AqA0hzZGn5XU2Pyoj1vaP+ht7r3dpDhuang4KCXaSgs="; + sha256 = "sha256-Djr0IjRxf4kKOsL0KMTAkRjW/zo0+r63TBCjet2ZhNw="; }; - vendorSha256 = "sha256-S+CnIPoyGM7dEQICOIlAWBIC24Fyt7q+OY382evDgQc="; + vendorSha256 = "sha256-upyblOmT1UC1epOI5H92G/nzcCuGNyh3dbIApUg2Idk="; ldflags = [ "-X main.version=${version}" ]; -- cgit 1.4.1 From 2bfcff671172276635545ccaa8ed137151dec3d1 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 27 Sep 2022 16:05:11 +0200 Subject: haskellPackages: mark builds failing on hydra as broken This commit has been generated by maintainers/scripts/haskell/mark-broken.sh --- .../configuration-hackage2nix/broken.yaml | 8 ++++++ .../transitive-broken.yaml | 14 ++++++---- .../haskell-modules/hackage-packages.nix | 30 ++++++++++++++++++---- 3 files changed, 42 insertions(+), 10 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index a49fe7285ef..baaf69a88e2 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -454,6 +454,7 @@ broken-packages: - BPS - braid - brain-bleep + - brassica - Bravo - brians-brain - brick-dropdownmenu @@ -3958,6 +3959,8 @@ broken-packages: - portager - porte - PortFusion + - portray-pretty + - portray-prettyprinter - positron - posix-acl - posix-api @@ -4215,6 +4218,7 @@ broken-packages: - reanimate-svg - reasonable-lens - reason-export + - rec-def - record - record-encode - record-impl @@ -4356,6 +4360,7 @@ broken-packages: - rivet-simple-deploy - RJson - Rlang-QQ + - rle - rlglue - RLP - rl-satton @@ -4648,6 +4653,7 @@ broken-packages: - singnal - singular-factory - sink + - sint - sitepipe - sixfiguregroup - sized-grid @@ -5054,6 +5060,7 @@ broken-packages: - tempodb - temporal-csound - tempus + - ten - tensor - tensorflow - tensorflow-opgen @@ -5201,6 +5208,7 @@ broken-packages: - tomato-rubato-openal - toml - toml-parser + - toml-reader-parse - tonalude - tonaparser - toodles diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml index 329f9eb7514..2a6c9d5dabe 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml @@ -1168,6 +1168,7 @@ dont-distribute-packages: - dep-t-advice - dep-t-dynamic - dep-t-value + - dependent-literals - dependent-literals-plugin - dependent-state - depends @@ -1201,7 +1202,6 @@ dont-distribute-packages: - direct-rocksdb - directory-contents - dirfiles - - disco - discogs-haskell - discord-gateway - discord-hs @@ -1283,6 +1283,7 @@ dont-distribute-packages: - edge - edges - editable + - edits - effective-aspects-mzv - eflint - egison @@ -1413,6 +1414,7 @@ dont-distribute-packages: - filepath-io-access - filesystem-abstractions - filesystem-enumerator + - fin-int - find-clumpiness - findhttp - finitary-derive @@ -2024,6 +2026,7 @@ dont-distribute-packages: - hedgehog-gen-json - hedis-pile - heist-aeson + - heist-extra - helic - helics - helics-wai @@ -2564,6 +2567,7 @@ dont-distribute-packages: - ltext - luachunk - lucid-colonnade + - lucid2-htmx - lucienne - luhn - lui @@ -2992,9 +2996,7 @@ dont-distribute-packages: - poke - polh-lexicon - polydata - - polysemy-RandomFu - polysemy-http - - polysemy-optics - polyseq - polytypeable-utils - pomodoro @@ -3003,6 +3005,8 @@ dont-distribute-packages: - porcupine-core - porcupine-http - porcupine-s3 + - portray-diff-hunit + - portray-diff-quickcheck - ports - poseidon - poseidon-postgis @@ -3390,7 +3394,6 @@ dont-distribute-packages: - servant-matrix-param - servant-oauth2 - servant-oauth2-examples - - servant-polysemy - servant-postgresql - servant-pushbullet-client - servant-rate-limit @@ -3675,10 +3678,11 @@ dont-distribute-packages: - tdlib - tdlib-gen - tdlib-types - - techlab - telega - telegram-bot - telegram-raw-api + - ten-lens + - ten-unordered-containers - tensorflow-core-ops - tensorflow-logging - tensorflow-ops diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 440ed523159..6d4d247ecc7 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -48218,7 +48218,9 @@ self: { benchmarkHaskellDepends = [ base criterion file-embed text ]; description = "Featureful sound change applier"; license = lib.licenses.bsd3; + hydraPlatforms = lib.platforms.none; mainProgram = "brassica"; + broken = true; }) {}; "break" = callPackage @@ -77907,6 +77909,7 @@ self: { ]; description = "Library for dependent-literals-plugin"; license = lib.licenses.asl20; + hydraPlatforms = lib.platforms.none; }) {}; "dependent-literals-plugin" = callPackage @@ -81945,7 +81948,6 @@ self: { ]; description = "Functional programming language for teaching discrete math"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; mainProgram = "disco"; }) {}; @@ -88193,6 +88195,7 @@ self: { testToolDepends = [ tasty-discover ]; description = "show the differences between 2 pieces of Text using the Levenshtein distance"; license = lib.licenses.mit; + hydraPlatforms = lib.platforms.none; }) {}; "effect-handlers" = callPackage @@ -98572,6 +98575,7 @@ self: { ]; description = "Finite sets of static size"; license = lib.licenses.asl20; + hydraPlatforms = lib.platforms.none; }) {}; "final" = callPackage @@ -135372,6 +135376,7 @@ self: { ]; description = "Extra heist functionality"; license = lib.licenses.mit; + hydraPlatforms = lib.platforms.none; }) {}; "helf" = callPackage @@ -182931,6 +182936,7 @@ self: { testHaskellDepends = [ base hspec HUnit lucid2 text ]; description = "Use htmx in your lucid templates"; license = lib.licenses.bsd3; + hydraPlatforms = lib.platforms.none; }) {}; "lucienne" = callPackage @@ -222712,7 +222718,6 @@ self: { testToolDepends = [ hspec-discover ]; description = "Experimental, RandomFu effect and interpreters for polysemy"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; }) {}; "polysemy-check" = callPackage @@ -223064,7 +223069,6 @@ self: { libraryHaskellDepends = [ base optics polysemy polysemy-zoo ]; description = "Optics for Polysemy"; license = lib.licenses.bsd2; - hydraPlatforms = lib.platforms.none; }) {}; "polysemy-path" = callPackage @@ -224083,6 +224087,7 @@ self: { ]; description = "HUnit assertions based on portray-diff"; license = lib.licenses.asl20; + hydraPlatforms = lib.platforms.none; }) {}; "portray-diff-quickcheck" = callPackage @@ -224098,6 +224103,7 @@ self: { ]; description = "QuickCheck tests with portray-diff"; license = lib.licenses.asl20; + hydraPlatforms = lib.platforms.none; }) {}; "portray-pretty" = callPackage @@ -224117,6 +224123,8 @@ self: { ]; description = "Portray backend for pretty"; license = lib.licenses.asl20; + hydraPlatforms = lib.platforms.none; + broken = true; }) {}; "portray-prettyprinter" = callPackage @@ -224141,6 +224149,8 @@ self: { ]; description = "Portray backend for prettyprinter"; license = lib.licenses.asl20; + hydraPlatforms = lib.platforms.none; + broken = true; }) {}; "ports" = callPackage @@ -237084,6 +237094,8 @@ self: { ]; description = "Recursively defined values"; license = lib.licenses.bsd2; + hydraPlatforms = lib.platforms.none; + broken = true; }) {}; "rec-smallarray" = callPackage @@ -244336,6 +244348,8 @@ self: { ]; description = "A data type of run-length-encoded lists"; license = lib.licenses.asl20; + hydraPlatforms = lib.platforms.none; + broken = true; }) {}; "rlglue" = callPackage @@ -254232,7 +254246,6 @@ self: { ]; description = "Utilities for using servant in a polysemy stack"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; }) {}; "servant-pool" = callPackage @@ -260153,6 +260166,8 @@ self: { ]; description = "Nat singletons represented by Int"; license = lib.licenses.asl20; + hydraPlatforms = lib.platforms.none; + broken = true; }) {}; "siphash" = callPackage @@ -279471,7 +279486,6 @@ self: { ]; description = "Bleeding edge prelude"; license = lib.licenses.mit; - hydraPlatforms = lib.platforms.none; }) {}; "technique" = callPackage @@ -280269,6 +280283,8 @@ self: { ]; description = "Functors et al. over arity-1 type constructors"; license = lib.licenses.asl20; + hydraPlatforms = lib.platforms.none; + broken = true; }) {}; "ten-lens" = callPackage @@ -280282,6 +280298,7 @@ self: { libraryHaskellDepends = [ base lens profunctors some ten ]; description = "Lenses for the types in the ten package"; license = lib.licenses.asl20; + hydraPlatforms = lib.platforms.none; }) {}; "ten-unordered-containers" = callPackage @@ -280307,6 +280324,7 @@ self: { ]; description = "Higher-kinded hash containers"; license = lib.licenses.asl20; + hydraPlatforms = lib.platforms.none; }) {}; "tensor" = callPackage @@ -287333,6 +287351,8 @@ self: { ]; description = "Alternative parser for TOML values produced by the toml-reader package"; license = lib.licenses.asl20; + hydraPlatforms = lib.platforms.none; + broken = true; }) {}; "tomland" = callPackage -- cgit 1.4.1 From febe17fd070266973d1d541af0fb31e268454e38 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 27 Sep 2022 16:23:26 +0200 Subject: haskellPackages.hs-mesos: remove stale override pkgs.mesos was finally removed and the package hasn't been able to be built for a while. --- pkgs/development/haskell-modules/configuration-nix.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 6e341278b6e..78e19a901b6 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -154,11 +154,6 @@ self: super: builtins.intersectAttrs super { # Add necessary reference to gtk3 package gi-dbusmenugtk3 = addPkgconfigDepend pkgs.gtk3 super.gi-dbusmenugtk3; - hs-mesos = overrideCabal (drv: { - # Pass _only_ mesos; the correct protobuf is propagated. - extraLibraries = [ pkgs.mesos ]; - preConfigure = "sed -i -e /extra-lib-dirs/d -e 's|, /usr/include, /usr/local/include/mesos||' hs-mesos.cabal"; - }) super.hs-mesos; # These packages try to access the network. amqp = dontCheck super.amqp; -- cgit 1.4.1 From dcf7d06e393e35591a38d67bb71db3c6be443328 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 27 Sep 2022 17:04:20 +0200 Subject: haskellPackages.nix-serve-ng: fix build * Workaround missing files in sdist * Add missing undeclared boost dependency --- pkgs/development/haskell-modules/configuration-nix.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 78e19a901b6..c0bfaee1b65 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -154,6 +154,18 @@ self: super: builtins.intersectAttrs super { # Add necessary reference to gtk3 package gi-dbusmenugtk3 = addPkgconfigDepend pkgs.gtk3 super.gi-dbusmenugtk3; + # Doesn't declare boost dependency + nix-serve-ng = overrideSrc { + src = assert super.nix-serve-ng.version == "1.0.0"; + # Workaround missing files in sdist + # https://github.com/aristanetworks/nix-serve-ng/issues/10 + pkgs.fetchFromGitHub { + repo = "nix-serve-ng"; + owner = "aristanetworks"; + rev = "433f70f4daae156b84853f5aaa11987aa5ce7277"; + sha256 = "0mqp67z5mi8rsjahdh395n7ppf0b65k8rd3pvnl281g02rbr69y2"; + }; + } (addPkgconfigDepend pkgs.boost.dev super.nix-serve-ng); # These packages try to access the network. amqp = dontCheck super.amqp; -- cgit 1.4.1 From f57b8bd640d676598c0eb0b6ea35b7c26e15e10e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 27 Sep 2022 19:51:37 +0200 Subject: cloudfox: init at 1.7.1 --- pkgs/tools/security/cloudfox/default.nix | 28 ++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/tools/security/cloudfox/default.nix diff --git a/pkgs/tools/security/cloudfox/default.nix b/pkgs/tools/security/cloudfox/default.nix new file mode 100644 index 00000000000..b4781ba7c0b --- /dev/null +++ b/pkgs/tools/security/cloudfox/default.nix @@ -0,0 +1,28 @@ +{ lib +, buildGoModule +, fetchFromGitHub +}: + +buildGoModule rec { + pname = "cloudfox"; + version = "1.7.1"; + + src = fetchFromGitHub { + owner = "BishopFox"; + repo = pname; + rev = "v${version}"; + hash = "sha256-JwSXm75CC1GBbQ7kZJXyDXf2997owRaGcB2m7q+BrEs="; + }; + + vendorSha256 = "sha256-KrJR5YZxP6psHphY0BhYFu14PaDi5k1ngFfYPSzOYK4="; + + # Some tests are failing because of wrong filename/path + doCheck = false; + + meta = with lib; { + description = "Tool for situational awareness of cloud penetration tests"; + homepage = "https://github.com/BishopFox/cloudfox"; + license = licenses.mit; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 119702effa3..1f51daa6e5c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2362,6 +2362,8 @@ with pkgs; cloud-sql-proxy = callPackage ../tools/misc/cloud-sql-proxy { }; + cloudfox = callPackage ../tools/security/cloudfox { }; + cloudsmith-cli = callPackage ../development/tools/cloudsmith-cli { }; codeql = callPackage ../development/tools/analysis/codeql { }; -- cgit 1.4.1 From 89a429baa6acc519c2189f4a2f2902687109248e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 27 Sep 2022 21:05:16 +0000 Subject: python310Packages.emcee: 3.1.2 -> 3.1.3 --- pkgs/development/python-modules/emcee/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/emcee/default.nix b/pkgs/development/python-modules/emcee/default.nix index c79adccc41f..b72c14c482e 100644 --- a/pkgs/development/python-modules/emcee/default.nix +++ b/pkgs/development/python-modules/emcee/default.nix @@ -8,13 +8,13 @@ buildPythonPackage rec { pname = "emcee"; - version = "3.1.2"; + version = "3.1.3"; src = fetchFromGitHub { owner = "dfm"; repo = pname; rev = "refs/tags/v${version}"; - sha256 = "sha256-MguhnLLo1zeNuMca8vWpxwysh9YJDD+IzvGQDbScK2M="; + sha256 = "sha256-HAuwWFNL63BlvHomQx+hWw4et7kRYd3zhH2FAj632Lg="; }; SETUPTOOLS_SCM_PRETEND_VERSION = version; -- cgit 1.4.1 From f483ef90d5eb1bbd52f00b29d75eb96295ea2264 Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Wed, 28 Sep 2022 07:59:59 +1000 Subject: gdu: 5.18.1 -> 5.19.0 https://github.com/dundee/gdu/releases/tag/v5.19.0 --- pkgs/tools/system/gdu/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/system/gdu/default.nix b/pkgs/tools/system/gdu/default.nix index 21052ecf663..b55d8636158 100644 --- a/pkgs/tools/system/gdu/default.nix +++ b/pkgs/tools/system/gdu/default.nix @@ -7,16 +7,16 @@ buildGoModule rec { pname = "gdu"; - version = "5.18.1"; + version = "5.19.0"; src = fetchFromGitHub { owner = "dundee"; repo = pname; rev = "v${version}"; - sha256 = "sha256-Bz7oiW8UEnin3Wd8nYrqk5WI7EbRHSCsoxpuWXzHK5c="; + sha256 = "sha256-876O7LdKqmg3oWNoboGId5jcdiGND1HyIMefy1uYu/g="; }; - vendorSha256 = "sha256-rppVLeX1VDOW+eUHSM77DgY2KjOrUHdyqGWRAYRIbUE="; + vendorSha256 = "sha256-UP6IdJLc93gRP4vwKKOJl3sNt4sOFeYXjvwk8QM+D48="; nativeBuildInputs = [ installShellFiles ]; -- cgit 1.4.1 From aed60db6ad7504de0278ee4f41b1d3d327e78544 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 27 Sep 2022 22:04:13 +0000 Subject: sqlfluff: 1.3.1 -> 1.3.2 --- pkgs/development/tools/database/sqlfluff/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/database/sqlfluff/default.nix b/pkgs/development/tools/database/sqlfluff/default.nix index 9bd6dfd75c9..e4f4676f155 100644 --- a/pkgs/development/tools/database/sqlfluff/default.nix +++ b/pkgs/development/tools/database/sqlfluff/default.nix @@ -5,13 +5,13 @@ python3.pkgs.buildPythonApplication rec { pname = "sqlfluff"; - version = "1.3.1"; + version = "1.3.2"; src = fetchFromGitHub { owner = pname; repo = pname; rev = "refs/tags/${version}"; - hash = "sha256-IUHV08X6U5GHuKsFh6yYetKX+nRf7C6PIXb+b7AD9po="; + hash = "sha256-mwGDSppOcpvwPtMNzElZtwYigIHhw3GUnza4ZXCCEvc="; }; propagatedBuildInputs = with python3.pkgs; [ -- cgit 1.4.1 From b3ce1549c9cb665fc40669cd5b8b4c0c5a843d38 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Sep 2022 01:58:03 +0200 Subject: python310Packages.emcee: disable on older Python releases --- pkgs/development/python-modules/emcee/default.nix | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/emcee/default.nix b/pkgs/development/python-modules/emcee/default.nix index b72c14c482e..80e0e7daf86 100644 --- a/pkgs/development/python-modules/emcee/default.nix +++ b/pkgs/development/python-modules/emcee/default.nix @@ -4,17 +4,21 @@ , numpy , pytestCheckHook , setuptools-scm +, pythonOlder }: buildPythonPackage rec { pname = "emcee"; version = "3.1.3"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchFromGitHub { owner = "dfm"; repo = pname; rev = "refs/tags/v${version}"; - sha256 = "sha256-HAuwWFNL63BlvHomQx+hWw4et7kRYd3zhH2FAj632Lg="; + hash = "sha256-HAuwWFNL63BlvHomQx+hWw4et7kRYd3zhH2FAj632Lg="; }; SETUPTOOLS_SCM_PRETEND_VERSION = version; @@ -31,7 +35,9 @@ buildPythonPackage rec { pytestCheckHook ]; - pythonImportsCheck = [ "emcee" ]; + pythonImportsCheck = [ + "emcee" + ]; meta = with lib; { description = "Kick ass affine-invariant ensemble MCMC sampling"; -- cgit 1.4.1 From 8538bb954a0420031dbdfe86d35c56cbc3a55006 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 27 Sep 2022 23:59:08 +0000 Subject: python310Packages.xxh: 0.8.10 -> 0.8.11 --- pkgs/tools/networking/xxh/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/networking/xxh/default.nix b/pkgs/tools/networking/xxh/default.nix index 98632f5e2a0..c033c81afc0 100644 --- a/pkgs/tools/networking/xxh/default.nix +++ b/pkgs/tools/networking/xxh/default.nix @@ -10,7 +10,7 @@ buildPythonApplication rec{ pname = "xxh"; - version = "0.8.10"; + version = "0.8.11"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -18,8 +18,8 @@ buildPythonApplication rec{ src = fetchFromGitHub { owner = pname; repo = pname; - rev = version; - hash = "sha256-2RMzgIAhM//XReCFBGlTlXn9j4WQiM/k2pLxP2iPUy8="; + rev = "refs/tags/${version}"; + hash = "sha256-xZVQamTEQpwxKZxOOhQyaDP4fX2dAI1CTNL94tHuGIw="; }; propagatedBuildInputs = [ -- cgit 1.4.1 From d6a24e574c74d8b57fc1cb267f1650c60e993493 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Sep 2022 02:01:51 +0200 Subject: cpuid: 20220812 -> 20220927 --- pkgs/os-specific/linux/cpuid/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/cpuid/default.nix b/pkgs/os-specific/linux/cpuid/default.nix index abe6f44f31a..73e38d885e7 100644 --- a/pkgs/os-specific/linux/cpuid/default.nix +++ b/pkgs/os-specific/linux/cpuid/default.nix @@ -6,11 +6,11 @@ stdenv.mkDerivation rec { pname = "cpuid"; - version = "20220812"; + version = "20220927"; src = fetchurl { url = "http://etallen.com/cpuid/${pname}-${version}.src.tar.gz"; - sha256 = "sha256-O/aPuX2UcU+QdjzK2BDfjcX3/pwfmjZSQ2SR/XVBWr8="; + sha256 = "sha256-sykaiTRIJgKGgaIoBgUpIMDzSY0Jn/3OP2P1Z6HqQOw="; }; # For pod2man during the build process. -- cgit 1.4.1 From 11c921f51aedd95ccbc3412e37d3ac6ea9d90e4a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 28 Sep 2022 00:18:46 +0000 Subject: python310Packages.iminuit: 2.16.0 -> 2.17.0 --- pkgs/development/python-modules/iminuit/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/iminuit/default.nix b/pkgs/development/python-modules/iminuit/default.nix index 246f04618f2..19c38ac3fbc 100644 --- a/pkgs/development/python-modules/iminuit/default.nix +++ b/pkgs/development/python-modules/iminuit/default.nix @@ -9,14 +9,14 @@ buildPythonPackage rec { pname = "iminuit"; - version = "2.16.0"; + version = "2.17.0"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-ECSlGdvI/VLV/So3ef1IWwm8J8QFVt74tvkWlUIxmdY="; + hash = "sha256-dfSoorrSH9p7a9Qt98oEEg+yRjbr+bVm0lmybyBEsdA="; }; nativeBuildInputs = [ -- cgit 1.4.1 From 29671d2d116f183a624355575aec8dc85eb07324 Mon Sep 17 00:00:00 2001 From: Daniel Barter Date: Tue, 27 Sep 2022 16:54:13 -0700 Subject: kanshi: 1.2.0 -> 1.3.0 --- pkgs/tools/wayland/kanshi/default.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/wayland/kanshi/default.nix b/pkgs/tools/wayland/kanshi/default.nix index 0b906f0aa98..f372ee5dae7 100644 --- a/pkgs/tools/wayland/kanshi/default.nix +++ b/pkgs/tools/wayland/kanshi/default.nix @@ -1,23 +1,24 @@ { lib , stdenv -, fetchFromGitHub +, fetchFromSourcehut , meson , ninja , pkg-config , scdoc , wayland , wayland-scanner +, libvarlink }: stdenv.mkDerivation rec { pname = "kanshi"; - version = "1.2.0"; + version = "1.3.0"; - src = fetchFromGitHub { - owner = "emersion"; + src = fetchFromSourcehut { + owner = "~emersion"; repo = "kanshi"; rev = "v${version}"; - sha256 = "sha256-RVMeS2qEjTYK6r7IwMeFSqfRpKR8di2eQXhewfhTnYI="; + sha256 = "kqTRJhLd9vLGAPO5U5cWeZgzWzne+0Cr4TIS0ciZSGk="; }; strictDeps = true; @@ -25,10 +26,10 @@ stdenv.mkDerivation rec { pkg-config ]; nativeBuildInputs = [ meson ninja pkg-config scdoc wayland-scanner ]; - buildInputs = [ wayland ]; + buildInputs = [ wayland libvarlink ]; meta = with lib; { - homepage = "https://github.com/emersion/kanshi"; + homepage = "https://sr.ht/~emersion/kanshi"; description = "Dynamic display configuration tool"; longDescription = '' kanshi allows you to define output profiles that are automatically enabled @@ -39,7 +40,7 @@ stdenv.mkDerivation rec { wlr-output-management protocol. ''; license = licenses.mit; - maintainers = with maintainers; [ balsoft ]; + maintainers = with maintainers; [ balsoft danielbarter ]; platforms = platforms.linux; }; } -- cgit 1.4.1 From 8407d056ca5a5e5ea651a39d06bc053c44795505 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 27 Sep 2022 17:25:49 +0000 Subject: netbird: 0.9.4 -> 0.9.6 --- pkgs/tools/networking/netbird/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/netbird/default.nix b/pkgs/tools/networking/netbird/default.nix index 902b33e70e9..f9bff389805 100644 --- a/pkgs/tools/networking/netbird/default.nix +++ b/pkgs/tools/networking/netbird/default.nix @@ -14,13 +14,13 @@ let in buildGoModule rec { pname = "netbird"; - version = "0.9.4"; + version = "0.9.6"; src = fetchFromGitHub { owner = "netbirdio"; repo = pname; rev = "v${version}"; - sha256 = "sha256-x5TJChvpeiAPye9YkIMJYumvCUHULUVjC371ZoaHkUM="; + sha256 = "sha256-VNKVl1C14iZROl3JFHY7+8EYbgZTuoz5rVOOBqkmmo0="; }; vendorSha256 = "sha256-VyYw8Hp2qWoRBeOFsgtxmvFN2cYzuDeYmWAwC/+vjI0="; -- cgit 1.4.1 From 0ede411efe3e195580aa199e045d7c7d4e790e8d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 15 Sep 2022 15:33:23 +0000 Subject: cubiomes-viewer: 2.3.3 -> 2.4.1 --- pkgs/applications/misc/cubiomes-viewer/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/cubiomes-viewer/default.nix b/pkgs/applications/misc/cubiomes-viewer/default.nix index 19dac91c307..2243a8d0937 100644 --- a/pkgs/applications/misc/cubiomes-viewer/default.nix +++ b/pkgs/applications/misc/cubiomes-viewer/default.nix @@ -9,13 +9,13 @@ stdenv.mkDerivation rec { pname = "cubiomes-viewer"; - version = "2.3.3"; + version = "2.4.1"; src = fetchFromGitHub { owner = "Cubitect"; repo = pname; rev = version; - sha256 = "sha256-QNNKfL2pLdOqbjd6t7SLaLcHmyEmmB7vFvj1g6FSTBo="; + sha256 = "sha256-vneX3Wo1DUK1WIwBP3nMUDV26EN2A7XIqMcTZQ4UI4A="; fetchSubmodules = true; }; -- cgit 1.4.1 From 46e368bf54238b88c95e2ffa84074f816037da9f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 24 Sep 2022 09:37:49 +0000 Subject: bloat: unstable-2022-05-10 -> unstable-2022-09-23 --- pkgs/servers/bloat/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/bloat/default.nix b/pkgs/servers/bloat/default.nix index 2d0dbde74d5..f9239dbb180 100644 --- a/pkgs/servers/bloat/default.nix +++ b/pkgs/servers/bloat/default.nix @@ -6,12 +6,12 @@ buildGoModule { pname = "bloat"; - version = "unstable-2022-05-10"; + version = "unstable-2022-09-23"; src = fetchgit { url = "git://git.freesoftwareextremist.com/bloat"; - rev = "1661219ab6e3c12b29d676d57ce452feb81d0dd9"; - sha256 = "sha256-Vb0WTRYPv0+g0by+h09sDDMVCjRYF28PwbXJNkdX6NA="; + rev = "68698a9e1afce43ef807d6b5f892ca1c0f905b8a"; + sha256 = "sha256-gxSHxMdiIWsJb/qM3W7Eon/ST15l2wkJqyjxEU8RlCQ="; }; vendorSha256 = null; -- cgit 1.4.1 From 2616f6b7c60a3536cdb03c5e4cb8717aceda536f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 27 Sep 2022 17:04:00 +0000 Subject: mold: 1.4.2 -> 1.5.0 --- pkgs/development/tools/mold/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/mold/default.nix b/pkgs/development/tools/mold/default.nix index 1d4a64d4467..d23a3790f12 100644 --- a/pkgs/development/tools/mold/default.nix +++ b/pkgs/development/tools/mold/default.nix @@ -12,13 +12,13 @@ stdenv.mkDerivation rec { pname = "mold"; - version = "1.4.2"; + version = "1.5.0"; src = fetchFromGitHub { owner = "rui314"; repo = pname; rev = "v${version}"; - hash = "sha256-omi4vx8KDpgZ/y3MvE5c/9MxSLXIA4IHJAMue3XpfD8="; + hash = "sha256-mCuKNVWjll9+xYPR6DnwkzPxbn4gR+x+DaCCTI9BXiE="; }; nativeBuildInputs = [ cmake ninja ]; -- cgit 1.4.1 From 0e4ae15b65ba24be412021f6bab1b77a71e3fe97 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 27 Sep 2022 14:49:44 +0000 Subject: kyverno: 1.7.3 -> 1.7.4 --- pkgs/applications/networking/cluster/kyverno/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/kyverno/default.nix b/pkgs/applications/networking/cluster/kyverno/default.nix index f240550d115..d00b1b38b2e 100644 --- a/pkgs/applications/networking/cluster/kyverno/default.nix +++ b/pkgs/applications/networking/cluster/kyverno/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "kyverno"; - version = "1.7.3"; + version = "1.7.4"; src = fetchFromGitHub { owner = "kyverno"; repo = "kyverno"; rev = "v${version}"; - sha256 = "sha256-lxfDbsBldMuF++Bb7rXsz+etLC78nTmWAaGbs6mcnBo="; + sha256 = "sha256-EzPd4D+pK9mFSoJx9gEWEw9izXum2NgACiBuQ6uTYGo="; }; ldflags = [ -- cgit 1.4.1 From bacda55ef60bcd8888cfe704c96209683edb8aa9 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 27 Sep 2022 16:28:49 +0000 Subject: minigalaxy: 1.2.1 -> 1.2.2 --- pkgs/applications/misc/minigalaxy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/minigalaxy/default.nix b/pkgs/applications/misc/minigalaxy/default.nix index 6604368b7d7..c33e0d6a576 100644 --- a/pkgs/applications/misc/minigalaxy/default.nix +++ b/pkgs/applications/misc/minigalaxy/default.nix @@ -16,13 +16,13 @@ python3Packages.buildPythonApplication rec { pname = "minigalaxy"; - version = "1.2.1"; + version = "1.2.2"; src = fetchFromGitHub { owner = "sharkwouter"; repo = pname; rev = "refs/tags/${version}"; - sha256 = "sha256-KTbur9UhV08Wy3Eg/UboG0fZ/6nzNABAildnhe64FEs="; + sha256 = "sha256-bpNtdMYBl2dJ4PQsxkhm/Y+3A0dD/Y2XC0VaUYyRhvM="; }; checkPhase = '' -- cgit 1.4.1 From 97116b9f7cf954e2a1556471530d3d571a7f3528 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 27 Sep 2022 13:13:52 +0000 Subject: pyradio: 0.8.9.27 -> 0.8.9.28 --- pkgs/applications/audio/pyradio/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/pyradio/default.nix b/pkgs/applications/audio/pyradio/default.nix index ba9320037e4..ef31c2a6ee9 100644 --- a/pkgs/applications/audio/pyradio/default.nix +++ b/pkgs/applications/audio/pyradio/default.nix @@ -2,13 +2,13 @@ python3Packages.buildPythonApplication rec { pname = "pyradio"; - version = "0.8.9.27"; + version = "0.8.9.28"; src = fetchFromGitHub { owner = "coderholic"; repo = pname; rev = "refs/tags/${version}"; - sha256 = "sha256-KqSpyDiRhp7DdbFsPor+munMQg+0vv0qF2VI3gkR04Y="; + sha256 = "sha256-0j0AQZk+WEkcRTL/peAxzRw23gThlGtMnqoms2aUCrc="; }; nativeBuildInputs = [ installShellFiles ]; -- cgit 1.4.1 From bae1cc020796bf318cb03f8f6628d49033087af0 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 27 Sep 2022 09:28:43 +0000 Subject: boulder: 2022-09-19 -> 2022-09-26 --- pkgs/tools/admin/boulder/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/admin/boulder/default.nix b/pkgs/tools/admin/boulder/default.nix index 1b6f85b3abc..83a209d6630 100644 --- a/pkgs/tools/admin/boulder/default.nix +++ b/pkgs/tools/admin/boulder/default.nix @@ -7,7 +7,7 @@ buildGoModule rec { pname = "boulder"; - version = "2022-09-19"; + version = "2022-09-26"; src = fetchFromGitHub { owner = "letsencrypt"; @@ -19,7 +19,7 @@ buildGoModule rec { git rev-parse --short=8 HEAD 2>/dev/null >$out/COMMIT find "$out" -name .git -print0 | xargs -0 rm -rf ''; - hash = "sha256-hiE6Cdpn/NVLAsTxw3EaIzbwRSpG/yYCsAAeBDCG6m8="; + hash = "sha256-/JOUBgTDb4wCathg3nnOnnXh+Q/Zpeegg5MuPOaHowE="; }; vendorHash = null; -- cgit 1.4.1 From f6b1f7c61584fdad86642aa59597c06a8c54e8e4 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 27 Sep 2022 06:34:30 +0000 Subject: dwm-status: 1.7.3 -> 1.8.0 --- pkgs/applications/window-managers/dwm/dwm-status.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/window-managers/dwm/dwm-status.nix b/pkgs/applications/window-managers/dwm/dwm-status.nix index 1b83e28309e..a1b790b33da 100644 --- a/pkgs/applications/window-managers/dwm/dwm-status.nix +++ b/pkgs/applications/window-managers/dwm/dwm-status.nix @@ -9,19 +9,19 @@ in rustPlatform.buildRustPackage rec { pname = "dwm-status"; - version = "1.7.3"; + version = "1.8.0"; src = fetchFromGitHub { owner = "Gerschtli"; repo = pname; rev = version; - sha256 = "sha256-dkVo9NpGt3G6by9Of1kOlXaZn7xsVSvfNXq7KPO6HE4="; + sha256 = "sha256-BCnEnBB0OCUwvhh4XEI2eOzfy34VHNFzbqqW26X6If0="; }; nativeBuildInputs = [ makeWrapper pkg-config ]; buildInputs = [ dbus gdk-pixbuf libnotify xorg.libX11 ]; - cargoSha256 = "sha256-QPnr7dUsq/RzuNLpbTRQbGB3zU6lNuPPPM9FmH4ydzY="; + cargoSha256 = "sha256-ylB0XGmIPW7Dbc6eDS8FZsq1AOOqntx1byaH3XIal0I="; postInstall = lib.optionalString (bins != []) '' wrapProgram $out/bin/dwm-status --prefix "PATH" : "${lib.makeBinPath bins}" -- cgit 1.4.1 From d2b9d9c1658e543971520bf3ff2e84cc8b974c61 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 27 Sep 2022 03:35:07 +0000 Subject: velero: 1.9.1 -> 1.9.2 --- pkgs/applications/networking/cluster/velero/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/velero/default.nix b/pkgs/applications/networking/cluster/velero/default.nix index e587a671368..49d9700feac 100644 --- a/pkgs/applications/networking/cluster/velero/default.nix +++ b/pkgs/applications/networking/cluster/velero/default.nix @@ -2,14 +2,14 @@ buildGoModule rec { pname = "velero"; - version = "1.9.1"; + version = "1.9.2"; src = fetchFromGitHub { owner = "vmware-tanzu"; repo = "velero"; rev = "v${version}"; - sha256 = "sha256-zGk5Bo1n2VV33wzozgYWbrwd/D3lcSWsqb+s3U3kmus="; + sha256 = "sha256-xhsHFb3X1oM68xnYiVEa0eZr7VFdUCkNzeyvci6wb9g="; }; ldflags = [ -- cgit 1.4.1 From 27c9a9bb845db1acdad879301558018c197c4f10 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 26 Sep 2022 22:37:49 +0000 Subject: pocketbase: 0.7.5 -> 0.7.6 --- pkgs/servers/pocketbase/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/pocketbase/default.nix b/pkgs/servers/pocketbase/default.nix index d3da831851d..14c88e9d04f 100644 --- a/pkgs/servers/pocketbase/default.nix +++ b/pkgs/servers/pocketbase/default.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "pocketbase"; - version = "0.7.5"; + version = "0.7.6"; src = fetchFromGitHub { owner = "pocketbase"; repo = pname; rev = "v${version}"; - sha256 = "sha256-4UTAY7yGMYM84NNjzhnXNjPGyO2hOoINE925M4LLgJk="; + sha256 = "sha256-03CvpAATd8HSKaMY17Sl7v08xzTxrQsoBchkYZ5pz14="; }; - vendorSha256 = "sha256-Ty06TegTT4BILgH0MpnxINxBQMW0zi0ItptHmDqKW1k="; + vendorSha256 = "sha256-i3CRba2HA7dOEh4PU1rNZUl05pZqIm946lIjP7ZcFEc="; # This is the released subpackage from upstream repo subPackages = [ "examples/base" ]; -- cgit 1.4.1 From d2b86be46b372aa75559fe89c6061ecca0a31994 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 27 Sep 2022 03:45:56 +0000 Subject: werf: 1.2.174 -> 1.2.175 --- pkgs/applications/networking/cluster/werf/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/werf/default.nix b/pkgs/applications/networking/cluster/werf/default.nix index 47553f953db..6c057133217 100644 --- a/pkgs/applications/networking/cluster/werf/default.nix +++ b/pkgs/applications/networking/cluster/werf/default.nix @@ -10,13 +10,13 @@ buildGoModule rec { pname = "werf"; - version = "1.2.174"; + version = "1.2.175"; src = fetchFromGitHub { owner = "werf"; repo = "werf"; rev = "v${version}"; - hash = "sha256-8TuAreXWKCXThyiWwiSi5kDVHJKeMB8lpltWbVqGY34="; + hash = "sha256-p60+IBy9f31BfmKdYlaHPO93mpIpWeOrDa6vFYrL1eQ="; }; vendorHash = "sha256-NHRPl38/R7yS8Hht118mBc+OBPwfYiHOaGIwryNK8Mo="; -- cgit 1.4.1 From f56fbbc085eb860b7e7311a8a723648583649212 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 26 Sep 2022 15:13:22 +0000 Subject: gcsfuse: 0.41.6 -> 0.41.7 --- pkgs/tools/filesystems/gcsfuse/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/filesystems/gcsfuse/default.nix b/pkgs/tools/filesystems/gcsfuse/default.nix index 4f1f4bfb8ea..3086a8c0a6e 100644 --- a/pkgs/tools/filesystems/gcsfuse/default.nix +++ b/pkgs/tools/filesystems/gcsfuse/default.nix @@ -2,13 +2,13 @@ buildGoModule rec { pname = "gcsfuse"; - version = "0.41.6"; + version = "0.41.7"; src = fetchFromGitHub { owner = "googlecloudplatform"; repo = "gcsfuse"; rev = "v${version}"; - sha256 = "sha256-yJVeR2e1i7f1LDhm415ukuC2OZRy1jS+/5oQ+fhhj8Q="; + sha256 = "sha256-hqT1X78g1Mg7xWHrVTwN41P+wgkrjfYrX2vHmwxZoCQ="; }; vendorSha256 = null; -- cgit 1.4.1 From c73061682ceb426189afb84b5db2f29b89135ef8 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 26 Sep 2022 08:24:45 +0000 Subject: iaito: 5.7.2 -> 5.7.4 --- pkgs/tools/security/iaito/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/iaito/default.nix b/pkgs/tools/security/iaito/default.nix index d8bfc9e4747..cd45f9a58b6 100644 --- a/pkgs/tools/security/iaito/default.nix +++ b/pkgs/tools/security/iaito/default.nix @@ -17,13 +17,13 @@ stdenv.mkDerivation rec { pname = "iaito"; - version = "5.7.2"; + version = "5.7.4"; src = fetchFromGitHub { owner = "radareorg"; repo = pname; rev = version; - sha256 = "sha256-5/G5wfdc6aua90XLP3B7Ruy8F3NTXzWfQE6yVDZ0rX8="; + sha256 = "sha256-T9+YQQDcXHFogD7FVkippsde7+0bKodwwABCqrKjcH4="; }; nativeBuildInputs = [ meson ninja pkg-config python3 qttools wrapQtAppsHook ]; -- cgit 1.4.1 From 5c44d5e4f08ffa762bc00f523d5b0f9de48a08a5 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 24 Sep 2022 19:58:02 +0000 Subject: roxctl: 3.71.0 -> 3.72.0 --- pkgs/applications/networking/cluster/roxctl/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/roxctl/default.nix b/pkgs/applications/networking/cluster/roxctl/default.nix index 44e96e8c486..ed1f510ca0b 100644 --- a/pkgs/applications/networking/cluster/roxctl/default.nix +++ b/pkgs/applications/networking/cluster/roxctl/default.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "roxctl"; - version = "3.71.0"; + version = "3.72.0"; src = fetchFromGitHub { owner = "stackrox"; repo = "stackrox"; rev = version; - sha256 = "sha256-svoSc9cT12nPYbyYz+Uv2edJAt/dJjcqe3E6cKII0KY="; + sha256 = "sha256-KsG6L3tQFuA0oTbzgLTChrBIe4a77bygJSIne/D4qiI="; }; - vendorSha256 = "sha256-zz8v9HkJPnk4QDRa9eVgI5uvqQLhemq8vOZ0qc9u8es="; + vendorSha256 = "sha256-FmpnRgU3w2zthgUJuAG5AqLl2UxMb0yywN5Sk9WoWBI="; nativeBuildInputs = [ installShellFiles ]; -- cgit 1.4.1 From 90fa265b6f672e6a911006cfa1096617fba5f200 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 24 Sep 2022 06:21:47 +0000 Subject: appgate-sdp: 6.0.1 -> 6.0.2 --- pkgs/applications/networking/appgate-sdp/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/appgate-sdp/default.nix b/pkgs/applications/networking/appgate-sdp/default.nix index a5bc03596d4..b93fcc1903b 100644 --- a/pkgs/applications/networking/appgate-sdp/default.nix +++ b/pkgs/applications/networking/appgate-sdp/default.nix @@ -87,11 +87,11 @@ let in stdenv.mkDerivation rec { pname = "appgate-sdp"; - version = "6.0.1"; + version = "6.0.2"; src = fetchurl { url = "https://bin.appgate-sdp.com/${versions.majorMinor version}/client/appgate-sdp_${version}_amd64.deb"; - sha256 = "sha256-dVVOUdGJDmStS1ZXqPOFpeWhLgimv4lHBS/OOEDrtM0="; + sha256 = "sha256-ut5a/tpWEQX1Jug9IZksnxbQ/rs2pGNh8zBb2a43KUE="; }; # just patch interpreter -- cgit 1.4.1 From aae4790ef952fec69813c3caa9d669160488ac6c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 24 Sep 2022 06:50:31 +0000 Subject: bitwig-studio: 4.3.4 -> 4.3.8 --- pkgs/applications/audio/bitwig-studio/bitwig-studio4.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/bitwig-studio/bitwig-studio4.nix b/pkgs/applications/audio/bitwig-studio/bitwig-studio4.nix index 401b759016a..4752ca174f1 100644 --- a/pkgs/applications/audio/bitwig-studio/bitwig-studio4.nix +++ b/pkgs/applications/audio/bitwig-studio/bitwig-studio4.nix @@ -6,11 +6,11 @@ stdenv.mkDerivation rec { pname = "bitwig-studio"; - version = "4.3.4"; + version = "4.3.8"; src = fetchurl { url = "https://downloads.bitwig.com/stable/${version}/${pname}-${version}.deb"; - sha256 = "sha256-2CCxpQPZB5F5jwJCux1OqGuxCuFZus5vlCrmStmI0F8="; + sha256 = "sha256-mJIzlY1m/r56e7iw5Hm+u2EbpHn5JqOMaRjpbCe8HHw="; }; nativeBuildInputs = [ dpkg makeWrapper wrapGAppsHook ]; -- cgit 1.4.1 From 2f3ac56b362522de118533f1eaf0ef9fdcefb249 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 15 Sep 2022 06:34:41 +0000 Subject: alfaview: 8.52.0 -> 8.53.1 --- pkgs/applications/networking/instant-messengers/alfaview/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/alfaview/default.nix b/pkgs/applications/networking/instant-messengers/alfaview/default.nix index e4813cbbf34..b8995aa8759 100644 --- a/pkgs/applications/networking/instant-messengers/alfaview/default.nix +++ b/pkgs/applications/networking/instant-messengers/alfaview/default.nix @@ -5,11 +5,11 @@ stdenv.mkDerivation rec { pname = "alfaview"; - version = "8.52.0"; + version = "8.53.1"; src = fetchurl { url = "https://production-alfaview-assets.alfaview.com/stable/linux/${pname}_${version}.deb"; - sha256 = "sha256-Taw/qMrqgxFWmRTSed8xINDBGTWx7kteN637Fjrzn44="; + sha256 = "sha256-nohChte0jtqIlDulxUi+S04unR4xqeg8DCuYfHwMzP4="; }; nativeBuildInputs = [ -- cgit 1.4.1 From da879a3e4cb46a5df4f3f334857cc5789056c95f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Mon, 26 Sep 2022 05:34:42 +0000 Subject: qpwgraph: 0.3.5 -> 0.3.6 --- pkgs/applications/audio/qpwgraph/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/qpwgraph/default.nix b/pkgs/applications/audio/qpwgraph/default.nix index f09de4001b1..e9b6e76368e 100644 --- a/pkgs/applications/audio/qpwgraph/default.nix +++ b/pkgs/applications/audio/qpwgraph/default.nix @@ -5,14 +5,14 @@ mkDerivation rec { pname = "qpwgraph"; - version = "0.3.5"; + version = "0.3.6"; src = fetchFromGitLab { domain = "gitlab.freedesktop.org"; owner = "rncbc"; repo = "qpwgraph"; rev = "v${version}"; - sha256 = "sha256-ZpVQjlqz1aPpf04qHMsN06s1n5msf32oB7cJYZf6xAU="; + sha256 = "sha256-uN3SAmpurINV+7vw51fWdwnuW2yBxnedY6BXdwn/S2s="; }; nativeBuildInputs = [ cmake pkg-config ]; -- cgit 1.4.1 From 0244d67891c1e3d19227aa56e80012e1d3ac8e7f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 25 Sep 2022 16:25:39 +0000 Subject: octosql: 0.9.3 -> 0.10.0 --- pkgs/tools/misc/octosql/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/octosql/default.nix b/pkgs/tools/misc/octosql/default.nix index 8a31ab58fa8..2dbe6c7eb98 100644 --- a/pkgs/tools/misc/octosql/default.nix +++ b/pkgs/tools/misc/octosql/default.nix @@ -5,13 +5,13 @@ buildGoModule rec { pname = "octosql"; - version = "0.9.3"; + version = "0.10.0"; src = fetchFromGitHub { owner = "cube2222"; repo = pname; rev = "v${version}"; - sha256 = "sha256-Y6kKYW79415nCJkcIKQjcBQiFZrRCJ8If65lV9wmNFA="; + sha256 = "sha256-qeF34GBR/OtvWBN5mcLMJGzOI/3DzbScJVM0pvlTvyw="; }; vendorSha256 = "sha256-ukNjLk1tTdw0bwXaYAEDuHfzxHuAX1xyqRqC6wmW/H4="; -- cgit 1.4.1 From a3a20468a64ab98c51611826550acf084c6acde1 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 28 Sep 2022 02:56:09 +0000 Subject: python310Packages.pontos: 22.9.1 -> 22.9.3 --- pkgs/development/python-modules/pontos/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pontos/default.nix b/pkgs/development/python-modules/pontos/default.nix index c2e6bd2842e..358af52ef70 100644 --- a/pkgs/development/python-modules/pontos/default.nix +++ b/pkgs/development/python-modules/pontos/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "pontos"; - version = "22.9.1"; + version = "22.9.3"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "greenbone"; repo = pname; rev = "refs/tags/v${version}"; - hash = "sha256-W0WubsulnMtNbW/KP1Sp1ChEb3ie1s+Oxu23jpnB/Nc="; + hash = "sha256-YqOeeivOscH1YtYXu348ozY25vHFkD9q1OFJ/jfZJLk="; }; nativeBuildInputs = [ -- cgit 1.4.1 From 868658f9268c2c8f19c815efd39cae08fc89db59 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 28 Sep 2022 03:12:21 +0000 Subject: python310Packages.pulumi-aws: 5.14.0 -> 5.16.0 --- pkgs/development/python-modules/pulumi-aws/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pulumi-aws/default.nix b/pkgs/development/python-modules/pulumi-aws/default.nix index e6aaa0cd202..11b58e65d0e 100644 --- a/pkgs/development/python-modules/pulumi-aws/default.nix +++ b/pkgs/development/python-modules/pulumi-aws/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "pulumi-aws"; # Version is independant of pulumi's. - version = "5.14.0"; + version = "5.16.0"; format = "setuptools"; disabled = pythonOlder "3.7"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "pulumi"; repo = "pulumi-aws"; rev = "refs/tags/v${version}"; - hash = "sha256-ZdmPpjuc9z76wnNImX9BhNNAFDw1EDEZV8IAm01hfss="; + hash = "sha256-SyRSRcKCIIaoyLdWYfFERjRp3pyXHGn35WXMqjOe3DY="; }; sourceRoot = "${src.name}/sdk/python"; -- cgit 1.4.1 From 4cdac93a5d1b0726aaeb2a1306c04031b244e80d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 28 Sep 2022 05:33:52 +0000 Subject: python310Packages.pytest-testmon: 1.3.6 -> 1.3.7 --- pkgs/development/python-modules/pytest-testmon/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pytest-testmon/default.nix b/pkgs/development/python-modules/pytest-testmon/default.nix index 5d6117d35e2..4e3001ea623 100644 --- a/pkgs/development/python-modules/pytest-testmon/default.nix +++ b/pkgs/development/python-modules/pytest-testmon/default.nix @@ -8,14 +8,14 @@ buildPythonPackage rec { pname = "pytest-testmon"; - version = "1.3.6"; + version = "1.3.7"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-KcDVOKAuQ5iVKgK3o1Vnc+LUVsI1izTnkOmByiyCJ1E="; + hash = "sha256-tjdu4mEslRl7QGnNGg7ATaQCipwF5/XSpFPq3E3A/Vo="; }; buildInputs = [ -- cgit 1.4.1 From 7f91be123709ee30d218bfc5b0ce4ebb4dd0f3af Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 28 Sep 2022 03:33:05 +0000 Subject: python310Packages.psd-tools: 1.9.22 -> 1.9.23 --- pkgs/development/python-modules/psd-tools/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/psd-tools/default.nix b/pkgs/development/python-modules/psd-tools/default.nix index a4be2b11d5e..96be2af48b1 100644 --- a/pkgs/development/python-modules/psd-tools/default.nix +++ b/pkgs/development/python-modules/psd-tools/default.nix @@ -14,13 +14,13 @@ buildPythonPackage rec { pname = "psd-tools"; - version = "1.9.22"; + version = "1.9.23"; src = fetchFromGitHub { owner = "psd-tools"; repo = pname; rev = "refs/tags/v${version}"; - sha256 = "sha256-T3/KLirU69Mdu7pQ6NFEVzhesaYhYsdK6DjTJQivPBQ="; + sha256 = "sha256-pJUf5rE5QMnfNytU1P0Zbj1iztrK5xrX4CJ/WvIG8mY="; }; nativeBuildInputs = [ cython ]; -- cgit 1.4.1 From 18621744d6e9b3e79b6e8235f093501761e70231 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 28 Sep 2022 03:43:13 +0000 Subject: python310Packages.pyvo: 1.3 -> 1.4 --- pkgs/development/python-modules/pyvo/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyvo/default.nix b/pkgs/development/python-modules/pyvo/default.nix index c04c70ebc60..35da20d648d 100644 --- a/pkgs/development/python-modules/pyvo/default.nix +++ b/pkgs/development/python-modules/pyvo/default.nix @@ -13,13 +13,13 @@ buildPythonPackage rec { pname = "pyvo"; - version = "1.3"; + version = "1.4"; disabled = pythonOlder "3.8"; # according to setup.cfg src = fetchPypi { inherit pname version; - sha256 = "846a54a05a8ddb47a8c2cc3077434779b0e4ccc1b74a7a5408593cb673307d67"; + sha256 = "sha256-R2ttLoFd6Ic0KZl49dzN5NtWAqPpXRaeki6X8CRGsCw="; }; SETUPTOOLS_SCM_PRETEND_VERSION = version; -- cgit 1.4.1 From 4fafb2c018034cac64e1244406c7b6ae3ff6fb25 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 28 Sep 2022 05:41:01 +0000 Subject: python310Packages.python-gitlab: 3.9.0 -> 3.10.0 --- pkgs/development/python-modules/python-gitlab/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/python-gitlab/default.nix b/pkgs/development/python-modules/python-gitlab/default.nix index eb431698973..09dade7107a 100644 --- a/pkgs/development/python-modules/python-gitlab/default.nix +++ b/pkgs/development/python-modules/python-gitlab/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "python-gitlab"; - version = "3.9.0"; + version = "3.10.0"; format = "setuptools"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-X8Xoj4HzZuEYUcuLS5pbgnSRziC6dYVEa3TJsJdya6M="; + sha256 = "sha256-FJMKFv3X829nuTc+fU1HIOjjdIAAKDgCidszBun3RhQ="; }; propagatedBuildInputs = [ -- cgit 1.4.1 From 932ca1db3da602646f2721d31628e8c617b91d3f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 28 Sep 2022 03:53:06 +0000 Subject: python310Packages.pyfuse3: 3.2.1 -> 3.2.2 --- pkgs/development/python-modules/pyfuse3/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pyfuse3/default.nix b/pkgs/development/python-modules/pyfuse3/default.nix index 07ba27c0ef7..e7b545d2a5e 100644 --- a/pkgs/development/python-modules/pyfuse3/default.nix +++ b/pkgs/development/python-modules/pyfuse3/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "pyfuse3"; - version = "3.2.1"; + version = "3.2.2"; disabled = pythonOlder "3.5"; @@ -23,8 +23,8 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "libfuse"; repo = "pyfuse3"; - rev = "release-${version}"; - hash = "sha256-JGbp2bSI/Rvyys1xMd2o34KlqqBsV6B9LhuuNopayYA="; + rev = "refs/tags/${version}"; + hash = "sha256-Y9Haz3MMhTXkvYFOGNWJnoGNnvoK6wiQ+s3AwJhBD8Q="; }; postPatch = '' -- cgit 1.4.1 From 5774027416784eaa0d2419dfdab4bf0f4f8ef345 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 28 Sep 2022 05:41:40 +0000 Subject: python310Packages.python-gvm: 22.7.0 -> 22.9.1 --- pkgs/development/python-modules/python-gvm/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/python-gvm/default.nix b/pkgs/development/python-modules/python-gvm/default.nix index cc3d8667073..0a7af2f40d8 100644 --- a/pkgs/development/python-modules/python-gvm/default.nix +++ b/pkgs/development/python-modules/python-gvm/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "python-gvm"; - version = "22.7.0"; + version = "22.9.1"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "greenbone"; repo = pname; rev = "refs/tags/v${version}"; - sha256 = "sha256-0dshBFcZ0DLa6SXxzWyfzmgPPxTIiKq00OKCJfk0vKY="; + sha256 = "sha256-V9xfPYwDDoCGJPstzYsC/ikUp45uiaZE0Bg4i9tRNhU="; }; nativeBuildInputs = [ -- cgit 1.4.1 From 98f590d6771663718a33c605a960e59ded49ac2e Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 28 Sep 2022 00:35:51 +0000 Subject: python310Packages.jc: 1.21.2 -> 1.22.0 --- pkgs/development/python-modules/jc/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/jc/default.nix b/pkgs/development/python-modules/jc/default.nix index 7cce5dca7aa..f0c808459d2 100644 --- a/pkgs/development/python-modules/jc/default.nix +++ b/pkgs/development/python-modules/jc/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "jc"; - version = "1.21.2"; + version = "1.22.0"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "kellyjonbrazil"; repo = pname; - rev = "v${version}"; - sha256 = "sha256-gzxN2ZbnZw7EE5oVeSpugzl/paAbyKKQlxVs/8n3Hzw="; + rev = "refs/tags/v${version}"; + sha256 = "sha256-cRa52rFZlSH0D5u9L7NcWbQGCNdOlRE2koRi8VgVpAo="; }; propagatedBuildInputs = [ ruamel-yaml xmltodict pygments ]; -- cgit 1.4.1 From aaac522df6842594690cd090359c889f52ff1506 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 28 Sep 2022 01:10:25 +0000 Subject: python310Packages.limnoria: 2022.8.7 -> 2022.9.20 --- pkgs/development/python-modules/limnoria/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/limnoria/default.nix b/pkgs/development/python-modules/limnoria/default.nix index 7f95f4ae138..2acb735052b 100644 --- a/pkgs/development/python-modules/limnoria/default.nix +++ b/pkgs/development/python-modules/limnoria/default.nix @@ -15,14 +15,14 @@ buildPythonPackage rec { pname = "limnoria"; - version = "2022.8.7"; + version = "2022.9.20"; format = "setuptools"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - hash = "sha256-TRTqhWQSVhjJkd9FLJk1lDwdzyzkeih9zHPSOvTf2oQ="; + hash = "sha256-db+JKQXDffMm5dcyMVtYNj1YFKHSlvYAoyZi86tqoiA="; }; propagatedBuildInputs = [ -- cgit 1.4.1 From b1b6551b95d4bde3ba8186286ba4de07486022a3 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 28 Sep 2022 00:34:38 +0000 Subject: python310Packages.jarowinkler: 1.2.2 -> 1.2.3 --- pkgs/development/python-modules/jarowinkler/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/jarowinkler/default.nix b/pkgs/development/python-modules/jarowinkler/default.nix index 03e32e56af3..b71187c9fea 100644 --- a/pkgs/development/python-modules/jarowinkler/default.nix +++ b/pkgs/development/python-modules/jarowinkler/default.nix @@ -15,7 +15,7 @@ buildPythonPackage rec { pname = "jarowinkler"; - version = "1.2.2"; + version = "1.2.3"; disabled = pythonOlder "3.6"; @@ -25,7 +25,7 @@ buildPythonPackage rec { owner = "maxbachmann"; repo = "JaroWinkler"; rev = "refs/tags/v${version}"; - hash = "sha256-1jImgRvGQ2x3Swkq43gq0IhgZTzIBtedoqN11hvDGns="; + hash = "sha256-j+ZabVsiVitNkTPhGjDg72XogjvPaL453lTW45ITm90="; }; nativeBuildInputs = [ -- cgit 1.4.1 From 5a3df78d7894258b5f34a419f082d455985f3cac Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 28 Sep 2022 02:17:42 +0000 Subject: python310Packages.oci: 2.83.0 -> 2.84.0 --- pkgs/development/python-modules/oci/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/oci/default.nix b/pkgs/development/python-modules/oci/default.nix index c81821b9eb1..3377d44ae93 100644 --- a/pkgs/development/python-modules/oci/default.nix +++ b/pkgs/development/python-modules/oci/default.nix @@ -12,7 +12,7 @@ buildPythonPackage rec { pname = "oci"; - version = "2.83.0"; + version = "2.84.0"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -21,7 +21,7 @@ buildPythonPackage rec { owner = "oracle"; repo = "oci-python-sdk"; rev = "refs/tags/v${version}"; - hash = "sha256-Wwq2o4A8UK4Gj5PvqQqQLYpCLRHTkhS4eygToTAIOwU="; + hash = "sha256-nG8bml9mTlKz48PhQjrLmAYYznb1qlrEI+XgvpM9zlk="; }; propagatedBuildInputs = [ -- cgit 1.4.1 From 0cef916f2cb6418eebf67949a4d682c3fce8a9d4 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Sep 2022 02:03:55 +0200 Subject: python310Packages.archinfo: 9.2.19 -> 9.2.20 --- pkgs/development/python-modules/archinfo/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/archinfo/default.nix b/pkgs/development/python-modules/archinfo/default.nix index 0e32aec5df2..0ef8a492a63 100644 --- a/pkgs/development/python-modules/archinfo/default.nix +++ b/pkgs/development/python-modules/archinfo/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "archinfo"; - version = "9.2.19"; + version = "9.2.20"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -16,7 +16,7 @@ buildPythonPackage rec { owner = "angr"; repo = pname; rev = "v${version}"; - hash = "sha256-zfDOIkXwt393tu9QPXz/ADyIK3mJCQ6oSgKcaMipHLg="; + hash = "sha256-JitAp536AM0EnE+LWlKceoYIk/gYxnbOUPtX7CK5SiM="; }; checkInputs = [ -- cgit 1.4.1 From 5d4a329889777a00488601fcf333655e2b1ceb0c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Sep 2022 02:03:58 +0200 Subject: python310Packages.ailment: 9.2.19 -> 9.2.20 --- pkgs/development/python-modules/ailment/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/ailment/default.nix b/pkgs/development/python-modules/ailment/default.nix index c43efdccb6f..7063ba63387 100644 --- a/pkgs/development/python-modules/ailment/default.nix +++ b/pkgs/development/python-modules/ailment/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "ailment"; - version = "9.2.19"; + version = "9.2.20"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -16,7 +16,7 @@ buildPythonPackage rec { owner = "angr"; repo = pname; rev = "v${version}"; - hash = "sha256-nm8vumylqNefSN+RE/3nUB+fzwznnkefDlXeQGQdfEw="; + hash = "sha256-dfogVQZ6RP1GyuoiTEC/VLancb+ZmdM1xPSngLbcmYs="; }; propagatedBuildInputs = [ -- cgit 1.4.1 From 873b1e97a8749eb790502ec762a83deddbbc7ced Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Sep 2022 02:04:03 +0200 Subject: python310Packages.pyvex: 9.2.19 -> 9.2.20 --- pkgs/development/python-modules/pyvex/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pyvex/default.nix b/pkgs/development/python-modules/pyvex/default.nix index 9d3abfa1f66..586b2bf29ee 100644 --- a/pkgs/development/python-modules/pyvex/default.nix +++ b/pkgs/development/python-modules/pyvex/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "pyvex"; - version = "9.2.19"; + version = "9.2.20"; format = "pyproject"; disabled = pythonOlder "3.8"; src = fetchPypi { inherit pname version; - hash = "sha256-f/Oc5IOVkOqCkpWnNclQ8eC4YZU9Iz/q4kfcTkP5x0o="; + hash = "sha256-qMWJk+vq8JyHjkEScpnlfRG7NzmyH6VyoZLNMAz6BWI="; }; propagatedBuildInputs = [ -- cgit 1.4.1 From 4404c287304b952aa9e6a63407de4cc274de9de7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Sep 2022 02:04:06 +0200 Subject: python310Packages.claripy: 9.2.19 -> 9.2.20 --- pkgs/development/python-modules/claripy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/claripy/default.nix b/pkgs/development/python-modules/claripy/default.nix index cc2eaa9576a..e516e7eac8f 100644 --- a/pkgs/development/python-modules/claripy/default.nix +++ b/pkgs/development/python-modules/claripy/default.nix @@ -14,7 +14,7 @@ buildPythonPackage rec { pname = "claripy"; - version = "9.2.19"; + version = "9.2.20"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -23,7 +23,7 @@ buildPythonPackage rec { owner = "angr"; repo = pname; rev = "v${version}"; - hash = "sha256-amCt7ccAKXNicCHvhu0pLUKXPlkrD8UpLO94D78OGAk="; + hash = "sha256-G4Tes9X7dz+bBTJCdbr3o4nTlN2c4Ixtl6iwZv0XYvA="; }; propagatedBuildInputs = [ -- cgit 1.4.1 From 4a3f62329ea8ba32fafb0dc1d194077e087e5e27 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Sep 2022 02:04:09 +0200 Subject: python310Packages.cle: 9.2.19 -> 9.2.20 --- pkgs/development/python-modules/cle/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/cle/default.nix b/pkgs/development/python-modules/cle/default.nix index 7ac00249b43..0b6326fc4ef 100644 --- a/pkgs/development/python-modules/cle/default.nix +++ b/pkgs/development/python-modules/cle/default.nix @@ -15,7 +15,7 @@ let # The binaries are following the argr projects release cycle - version = "9.2.19"; + version = "9.2.20"; # Binary files from https://github.com/angr/binaries (only used for testing and only here) binaries = fetchFromGitHub { @@ -37,7 +37,7 @@ buildPythonPackage rec { owner = "angr"; repo = pname; rev = "v${version}"; - hash = "sha256-uwCSgq7l5VByN1YPuqdnvj2ImV/rb8Xn7dz1p7EvrdQ="; + hash = "sha256-ORNlmdkAlMj1CaWj5pDve0yJe3TEv9IfKOwqRd+gVH4="; }; propagatedBuildInputs = [ -- cgit 1.4.1 From fcd37ca748b89745754d775c3ec1f6a3890e03d6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Sep 2022 02:04:13 +0200 Subject: python310Packages.angr: 9.2.19 -> 9.2.20 --- pkgs/development/python-modules/angr/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/angr/default.nix b/pkgs/development/python-modules/angr/default.nix index c57ec4de6e1..9a841aae8fd 100644 --- a/pkgs/development/python-modules/angr/default.nix +++ b/pkgs/development/python-modules/angr/default.nix @@ -46,7 +46,7 @@ in buildPythonPackage rec { pname = "angr"; - version = "9.2.19"; + version = "9.2.20"; format = "pyproject"; disabled = pythonOlder "3.8"; @@ -55,7 +55,7 @@ buildPythonPackage rec { owner = pname; repo = pname; rev = "v${version}"; - hash = "sha256-3hgEWmP8uwSGE5gh5HAs7xMJnnzY1hlwE8UqW/dzk7c="; + hash = "sha256-MQT9iebGVGM89QybQ/GcjfPHrp0ZeNsjYrXV9ITNSsM="; }; propagatedBuildInputs = [ -- cgit 1.4.1 From d050bc18737ea3ad80f573b369d91861dafed69b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 27 Sep 2022 20:47:36 +0000 Subject: python310Packages.dnslib: 0.9.21 -> 0.9.22 --- pkgs/development/python-modules/dnslib/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/dnslib/default.nix b/pkgs/development/python-modules/dnslib/default.nix index 2d70c00579e..272581e5439 100644 --- a/pkgs/development/python-modules/dnslib/default.nix +++ b/pkgs/development/python-modules/dnslib/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "dnslib"; - version = "0.9.21"; + version = "0.9.22"; src = fetchPypi { inherit pname version; - sha256 = "sha256-IXabARWP5wvokSF1Q0nyg13M3yHVwBHOyfoopI+lVdQ="; + sha256 = "sha256-EK/JT2pfHLiziCTgQuJeVBTh+q7f05s0iujZdyKSGoY="; }; checkPhase = "VERSIONS=${python.interpreter} ./run_tests.sh"; -- cgit 1.4.1 From b43a371f2a368d5ab1446630463cdf2e5fb2602f Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Sep 2022 01:55:00 +0200 Subject: python310Packages.dnslib: add pythonImportsCheck - update meta - disable on older Python releases --- pkgs/development/python-modules/dnslib/default.nix | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/dnslib/default.nix b/pkgs/development/python-modules/dnslib/default.nix index 272581e5439..11f387d2469 100644 --- a/pkgs/development/python-modules/dnslib/default.nix +++ b/pkgs/development/python-modules/dnslib/default.nix @@ -1,20 +1,34 @@ -{ lib, python, buildPythonPackage, fetchPypi }: +{ lib +, python +, buildPythonPackage +, fetchPypi +, pythonOlder +}: buildPythonPackage rec { pname = "dnslib"; version = "0.9.22"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-EK/JT2pfHLiziCTgQuJeVBTh+q7f05s0iujZdyKSGoY="; + hash = "sha256-EK/JT2pfHLiziCTgQuJeVBTh+q7f05s0iujZdyKSGoY="; }; - checkPhase = "VERSIONS=${python.interpreter} ./run_tests.sh"; + checkPhase = '' + VERSIONS=${python.interpreter} ./run_tests.sh + ''; + + pythonImportsCheck = [ + "dnslib" + ]; meta = with lib; { description = "Simple library to encode/decode DNS wire-format packets"; + homepage = "https://github.com/paulc/dnslib"; license = licenses.bsd2; - homepage = "https://bitbucket.org/paulc/dnslib/"; maintainers = with maintainers; [ delroth ]; }; } -- cgit 1.4.1 From 3905b8f8e1e0e0d04535e8c869c6e715bddc6ac5 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 28 Sep 2022 00:50:12 +0000 Subject: python310Packages.jupyter_server: 1.18.1 -> 1.19.1 --- pkgs/development/python-modules/jupyter_server/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/jupyter_server/default.nix b/pkgs/development/python-modules/jupyter_server/default.nix index 657e7a9ce30..f031528db3e 100644 --- a/pkgs/development/python-modules/jupyter_server/default.nix +++ b/pkgs/development/python-modules/jupyter_server/default.nix @@ -30,12 +30,12 @@ buildPythonPackage rec { pname = "jupyter_server"; - version = "1.18.1"; + version = "1.19.1"; disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-K3L8WVvMrikiYKrYFXoOrY2ixwPsauG7ezbbrQ4mfqc="; + sha256 = "sha256-0cw1lpRYSXQrw+7fBpn+61CtbGBF6+8CqSmLfxPCfp8="; }; propagatedBuildInputs = [ -- cgit 1.4.1 From 7d226b5d12965b214d299d553fff6a3db7e4202a Mon Sep 17 00:00:00 2001 From: illustris Date: Wed, 28 Sep 2022 11:18:56 +0530 Subject: python310Packages.skein: 0.8.1 -> 0.8.2 --- pkgs/development/python-modules/skein/default.nix | 6 +++--- pkgs/development/python-modules/skein/skeinjar.nix | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/skein/default.nix b/pkgs/development/python-modules/skein/default.nix index 8dc3391e9e9..703cc2332a1 100644 --- a/pkgs/development/python-modules/skein/default.nix +++ b/pkgs/development/python-modules/skein/default.nix @@ -14,13 +14,13 @@ buildPythonPackage rec { pname = "skein"; - version = "0.8.1"; + version = "0.8.2"; src = fetchPypi { inherit pname version; - sha256 = "04208b4be9df2dc68ac5b3e3ae51fd9b589add95ea1b67222a8de754d17b1efa"; + hash = "sha256-nXTqsJNX/LwAglPcPZkmdYPfF+vDLN+nNdZaDFTrHzE="; }; # Update this hash if bumping versions - jarHash = "sha256-UGiEoTZ17IhLG72FZ18Zb+Ej4T8z9rMIMDUxzSZGZyY="; + jarHash = "sha256-x2KH6tnoG7sogtjrJvUaxy0PCEA8q/zneuI969oBOKo="; skeinJar = callPackage ./skeinjar.nix { inherit pname version jarHash; }; propagatedBuildInputs = [ cryptography grpcio pyyaml ]; diff --git a/pkgs/development/python-modules/skein/skeinjar.nix b/pkgs/development/python-modules/skein/skeinjar.nix index d559f237bf7..1cec80fa933 100644 --- a/pkgs/development/python-modules/skein/skeinjar.nix +++ b/pkgs/development/python-modules/skein/skeinjar.nix @@ -6,6 +6,8 @@ stdenv.mkDerivation rec { src = fetchPypi { inherit pname version; format = "wheel"; + python = "py3"; + dist = "py3"; hash = jarHash; }; @@ -15,6 +17,6 @@ stdenv.mkDerivation rec { installPhase = '' unzip ${src} - mv ./skein/java/skein.jar $out + install -D ./skein/java/skein.jar $out ''; } -- cgit 1.4.1 From 87ea5229dca5f8996d6eb6c40c18f30aa74d52dc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Sep 2022 09:16:51 +0200 Subject: python310Packages.dbus-fast: 1.15.1 -> 1.17.0 --- pkgs/development/python-modules/dbus-fast/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/dbus-fast/default.nix b/pkgs/development/python-modules/dbus-fast/default.nix index f95da372a4b..623ee4a7888 100644 --- a/pkgs/development/python-modules/dbus-fast/default.nix +++ b/pkgs/development/python-modules/dbus-fast/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "dbus-fast"; - version = "1.15.1"; + version = "1.17.0"; format = "pyproject"; disabled = pythonOlder "3.7"; @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = "Bluetooth-Devices"; repo = pname; rev = "v${version}"; - hash = "sha256-Uq+f0l9/W6PjP9MczF3VJNJicDgOnMrfXpOkHp7frVY="; + hash = "sha256-HbjeO+imWocc5bL62gdWHf8kBR6HNWwEu+KqO4ldHe4="; }; nativeBuildInputs = [ -- cgit 1.4.1 From be9579d6834b676f182d590718a3d6b8addee151 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Sep 2022 09:19:24 +0200 Subject: python310Packages.aiopyarr: 22.7.0 -> 22.9.0 --- pkgs/development/python-modules/aiopyarr/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aiopyarr/default.nix b/pkgs/development/python-modules/aiopyarr/default.nix index a2e66b42af7..e9dec57f4d1 100644 --- a/pkgs/development/python-modules/aiopyarr/default.nix +++ b/pkgs/development/python-modules/aiopyarr/default.nix @@ -10,7 +10,7 @@ buildPythonPackage rec { pname = "aiopyarr"; - version = "22.7.0"; + version = "22.9.0"; format = "setuptools"; disabled = pythonOlder "3.9"; @@ -19,7 +19,7 @@ buildPythonPackage rec { owner = "tkdrob"; repo = pname; rev = version; - hash = "sha256-ALFaWy/wY8PTuMixHEWaXXmKNSLf9Cm2pgffVHnAWLg="; + hash = "sha256-nJjqpk4GcgXJhFZd4E3vSmyNP+RkOASEd4Ipemx6cAc="; }; propagatedBuildInputs = [ -- cgit 1.4.1 From 7ebc5c2ddfc7830c535353b4a4a429b4e185ab07 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Sep 2022 09:20:22 +0200 Subject: python310Packages.yalexs: 1.2.1 -> 1.2.3 --- pkgs/development/python-modules/yalexs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/yalexs/default.nix b/pkgs/development/python-modules/yalexs/default.nix index 8a320eb103a..638e5002885 100644 --- a/pkgs/development/python-modules/yalexs/default.nix +++ b/pkgs/development/python-modules/yalexs/default.nix @@ -17,7 +17,7 @@ buildPythonPackage rec { pname = "yalexs"; - version = "1.2.1"; + version = "1.2.3"; format = "setuptools"; disabled = pythonOlder "3.6"; @@ -26,7 +26,7 @@ buildPythonPackage rec { owner = "bdraco"; repo = pname; rev = "v${version}"; - sha256 = "sha256-7+4Icg3E6xrWmxObNzNuDc+MXJ9rnbgBHMK4uPBJeuY="; + sha256 = "sha256-O7a94UC7AB7MiTTpf68PWfim9anfYEWbvgsQsTV74VA="; }; propagatedBuildInputs = [ -- cgit 1.4.1 From f40a2a70cd818fe91c85186bf989fc177e486dea Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 28 Sep 2022 08:10:22 +0000 Subject: checkSSLCert: 2.48.0 -> 2.49.0 --- pkgs/servers/monitoring/nagios/plugins/check_ssl_cert.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/monitoring/nagios/plugins/check_ssl_cert.nix b/pkgs/servers/monitoring/nagios/plugins/check_ssl_cert.nix index e248e3fbbd1..7fd79a6e6f8 100644 --- a/pkgs/servers/monitoring/nagios/plugins/check_ssl_cert.nix +++ b/pkgs/servers/monitoring/nagios/plugins/check_ssl_cert.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation rec { pname = "check_ssl_cert"; - version = "2.48.0"; + version = "2.49.0"; src = fetchFromGitHub { owner = "matteocorti"; repo = "check_ssl_cert"; rev = "v${version}"; - hash = "sha256-uaDeg7Dph99NWN0pKHrffBYOOzN8/1fW2YBEE8vnYMs="; + hash = "sha256-V6NahQvHrDna7II6GbUadiq5IBrEVTW2EQ6+FxV5zQQ="; }; nativeBuildInputs = [ -- cgit 1.4.1 From 6bb249e65a857e05378161097790cc8460cb495b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 28 Sep 2022 10:11:40 +0200 Subject: python310Packages.hmmlearn: disable on older Python releases --- .../python-modules/hmmlearn/default.nix | 50 +++++++++++++++++----- 1 file changed, 39 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/hmmlearn/default.nix b/pkgs/development/python-modules/hmmlearn/default.nix index 153c582b7cf..ea39c432456 100644 --- a/pkgs/development/python-modules/hmmlearn/default.nix +++ b/pkgs/development/python-modules/hmmlearn/default.nix @@ -1,27 +1,55 @@ -{ lib, fetchurl, buildPythonPackage -, numpy, scikit-learn, pybind11, setuptools-scm, cython -, pytestCheckHook }: +{ lib +, fetchurl +, buildPythonPackage +, numpy +, scikit-learn +, pybind11 +, setuptools-scm +, cython +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { pname = "hmmlearn"; version = "0.2.8"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchurl { url = "mirror://pypi/h/hmmlearn/${pname}-${version}.tar.gz"; - sha256 = "sha256-aWkx49zmgBzJt4xin1QwYd1+tnpxFVsD0bOeoXKipfk="; + hash = "sha256-aWkx49zmgBzJt4xin1QwYd1+tnpxFVsD0bOeoXKipfk="; }; - buildInputs = [ setuptools-scm cython pybind11 ]; - propagatedBuildInputs = [ numpy scikit-learn ]; - checkInputs = [ pytestCheckHook ]; + buildInputs = [ + setuptools-scm + cython + pybind11 + ]; + + propagatedBuildInputs = [ + numpy + scikit-learn + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "hmmlearn" + ]; - pythonImportsCheck = [ "hmmlearn" ]; - pytestFlagsArray = [ "--pyargs" "hmmlearn" ]; + pytestFlagsArray = [ + "--pyargs" + "hmmlearn" + ]; meta = with lib; { description = "Hidden Markov Models in Python with scikit-learn like API"; - homepage = "https://github.com/hmmlearn/hmmlearn"; - license = licenses.bsd3; + homepage = "https://github.com/hmmlearn/hmmlearn"; + license = licenses.bsd3; maintainers = with maintainers; [ abbradar ]; }; } -- cgit 1.4.1 From d2356bf415cce09b2c716489e419128285c4cacf Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 27 Sep 2022 09:45:48 +0200 Subject: onnxruntime: add Python support --- pkgs/development/libraries/onnxruntime/default.nix | 31 ++++++++++++++++++---- pkgs/top-level/python-packages.nix | 5 ++++ 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/onnxruntime/default.nix b/pkgs/development/libraries/onnxruntime/default.nix index 77730cb8820..e297f835f32 100644 --- a/pkgs/development/libraries/onnxruntime/default.nix +++ b/pkgs/development/libraries/onnxruntime/default.nix @@ -5,7 +5,7 @@ , fetchurl , pkg-config , cmake -, python3 +, python3Packages , libpng , zlib , eigen @@ -15,6 +15,9 @@ , boost , oneDNN , gtest +, pythonSupport ? true +, nsync +, flatbuffers }: let @@ -49,9 +52,13 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake pkg-config - python3 + python3Packages.python gtest - ]; + ] ++ lib.optionals pythonSupport (with python3Packages; [ + setuptools + wheel + pip + ]); buildInputs = [ libpng @@ -61,10 +68,16 @@ stdenv.mkDerivation rec { nlohmann_json boost oneDNN - ]; + ] ++ lib.optionals pythonSupport ([ + flatbuffers + nsync + ] ++ (with python3Packages; [ + numpy + pybind11 + ])); # TODO: build server, and move .so's to lib output - outputs = [ "out" "dev" ]; + outputs = [ "out" "dev" ] ++ lib.optionals pythonSupport [ "python" ]; enableParallelBuilding = true; @@ -79,6 +92,8 @@ stdenv.mkDerivation rec { "-Donnxruntime_USE_MPI=ON" "-Deigen_SOURCE_PATH=${eigen.src}" "-Donnxruntime_USE_DNNL=YES" + ] ++ lib.optionals pythonSupport [ + "-Donnxruntime_ENABLE_PYTHON=ON" ]; doCheck = true; @@ -91,12 +106,18 @@ stdenv.mkDerivation rec { --replace '$'{prefix}/@CMAKE_INSTALL_ @CMAKE_INSTALL_ ''; + postBuild = lib.optionalString pythonSupport '' + ${python3Packages.python.interpreter} ../setup.py bdist_wheel + ''; + postInstall = '' # perform parts of `tools/ci_build/github/linux/copy_strip_binary.sh` install -m644 -Dt $out/include \ ../include/onnxruntime/core/framework/provider_options.h \ ../include/onnxruntime/core/providers/cpu/cpu_provider_factory.h \ ../include/onnxruntime/core/session/onnxruntime_*.h + '' + lib.optionalString pythonSupport '' + pip install dist/*.whl --no-index --no-warn-script-location --prefix="$python" --no-cache --no-deps ''; meta = with lib; { diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9a57da59836..f2ce500f808 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6388,6 +6388,11 @@ in { onnx = callPackage ../development/python-modules/onnx { }; + onnxruntime = (toPythonModule (pkgs.onnxruntime.override { + python3Packages = self; + pythonSupport = true; + })).python; + onvif-zeep-async = callPackage ../development/python-modules/onvif-zeep-async { }; oocsi = callPackage ../development/python-modules/oocsi { }; -- cgit 1.4.1 From 18f7d4c992a49b30d76e459a8639b90521581ca3 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 27 Sep 2022 13:47:25 +0200 Subject: python3Packages.onnxconverter-common: init at 1.12.2 --- .../onnxconverter-common/default.nix | 48 ++++++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 50 insertions(+) create mode 100644 pkgs/development/python-modules/onnxconverter-common/default.nix diff --git a/pkgs/development/python-modules/onnxconverter-common/default.nix b/pkgs/development/python-modules/onnxconverter-common/default.nix new file mode 100644 index 00000000000..89fefb38dee --- /dev/null +++ b/pkgs/development/python-modules/onnxconverter-common/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, numpy +, packaging +, protobuf +, onnx +, unittestCheckHook +, onnxruntime +}: + +buildPythonPackage { + pname = "onnxconverter-common"; + version = "1.12.2"; # Upstream no longer seems to push tags + + format = "setuptools"; + + src = fetchFromGitHub { + owner = "microsoft"; + repo = "onnxconverter-common"; + rev = "814cdf494d987900d30b16971c0e8334aaca9ae6"; + hash = "sha256-XA/kl8aT1wLthl1bMihtv/1ELOW1sGO/It5XfJtD+sY="; + }; + + propagatedBuildInputs = [ + numpy + packaging # undeclared dependency + protobuf + onnx + ]; + + checkInputs = [ + onnxruntime + unittestCheckHook + ]; + + unittestFlagsArray = [ "-s" "tests" ]; + + # Failing tests + # https://github.com/microsoft/onnxconverter-common/issues/242 + doCheck = false; + + meta = { + description = "ONNX Converter and Optimization Tools"; + maintainers = with lib.maintainers; [ fridh ]; + license = with lib.licenses; [ mit ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f2ce500f808..e16e0d339f5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6388,6 +6388,8 @@ in { onnx = callPackage ../development/python-modules/onnx { }; + onnxconverter-common = callPackage ../development/python-modules/onnxconverter-common { }; + onnxruntime = (toPythonModule (pkgs.onnxruntime.override { python3Packages = self; pythonSupport = true; -- cgit 1.4.1 From d5f27c97b835571dc1ab48e1a006f46d01fea7f6 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 27 Sep 2022 16:05:13 +0200 Subject: python3Packages.skl2onnx: init at 1.13 --- .../python-modules/skl2onnx/default.nix | 49 ++++++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/skl2onnx/default.nix diff --git a/pkgs/development/python-modules/skl2onnx/default.nix b/pkgs/development/python-modules/skl2onnx/default.nix new file mode 100644 index 00000000000..4e8f9586311 --- /dev/null +++ b/pkgs/development/python-modules/skl2onnx/default.nix @@ -0,0 +1,49 @@ +{ lib +, buildPythonPackage +, fetchPypi +, numpy +, scipy +, protobuf +, onnx +, scikit-learn +, onnxconverter-common +, onnxruntime +, pandas +, unittestCheckHook +}: + +buildPythonPackage rec { + pname = "skl2onnx"; + version = "1.13"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-XzUva5uFX/rGMFpwfwLH1Db0Nok47pBJCSqVo1ZcJz0="; + }; + + propagatedBuildInputs = [ + numpy + scipy + protobuf + onnx + scikit-learn + onnxconverter-common + ]; + + checkInputs = [ + onnxruntime + pandas + unittestCheckHook + ]; + + unittestFlagsArray = [ "-s" "tests" ]; + + # Core dump + doCheck = false; + + meta = { + description = "Convert scikit-learn models to ONNX"; + maintainers = with lib.maintainers; [ fridh ]; + license = with lib.licenses; [ asl20 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e16e0d339f5..617c08bedfb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10167,6 +10167,8 @@ in { skidl = callPackage ../development/python-modules/skidl { }; + skl2onnx = callPackage ../development/python-modules/skl2onnx { }; + sklearn-deap = callPackage ../development/python-modules/sklearn-deap { }; skodaconnect = callPackage ../development/python-modules/skodaconnect { }; -- cgit 1.4.1 From 46e8398474ac3b1b7bb198bf9097fc213bbf59b1 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 28 Sep 2022 02:13:39 -0700 Subject: python310Packages.google-cloud-spanner: 3.21.0 -> 3.22.0 (#193252) Co-authored-by: Fabian Affolter --- pkgs/development/python-modules/google-cloud-spanner/default.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/google-cloud-spanner/default.nix b/pkgs/development/python-modules/google-cloud-spanner/default.nix index 2b31f280621..eddd412a4c6 100644 --- a/pkgs/development/python-modules/google-cloud-spanner/default.nix +++ b/pkgs/development/python-modules/google-cloud-spanner/default.nix @@ -10,15 +10,19 @@ , pytestCheckHook , pytest-asyncio , sqlparse +, pythonOlder }: buildPythonPackage rec { pname = "google-cloud-spanner"; - version = "3.21.0"; + version = "3.22.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-47fR2Pwwl9HJ5pIqf8H0QjmrVYy5NgN5sdk3nH4yf/Q="; + hash = "sha256-3EZMUyF9Se+DD3EK0/srYODRJo8OQkAr5RilTbMTHIo="; }; propagatedBuildInputs = [ -- cgit 1.4.1 From dec0fefd52d56dcec9350b39b29afe211527e13a Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Wed, 28 Sep 2022 12:07:55 +0200 Subject: haskellPackages.disco: run offline tests only --- pkgs/development/haskell-modules/configuration-nix.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index c0bfaee1b65..dc25fdb6c3a 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -956,6 +956,19 @@ self: super: builtins.intersectAttrs super { ''; }) super.fourmolu_0_8_2_0; + # Test suite needs to execute 'disco' binary + disco = overrideCabal (drv: { + preCheck = drv.preCheck or "" + '' + export PATH="$PWD/dist/build/disco:$PATH" + ''; + testFlags = drv.testFlags or [] ++ [ + # Needs network access + "-p" "!/oeis/" + ]; + # disco-examples needs network access + testTarget = "disco-tests"; + }) super.disco; + # Apply a patch which hardcodes the store path of graphviz instead of using # whatever graphviz is in PATH. graphviz = overrideCabal (drv: { -- cgit 1.4.1 From 12c22babecb92d08e3ce5f8aa98ec21a029893fa Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Wed, 28 Sep 2022 12:11:01 +0200 Subject: haskellPackages.servant-polysemy: mark as broken --- pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml | 1 + pkgs/development/haskell-modules/hackage-packages.nix | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index baaf69a88e2..19ce347c467 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -4529,6 +4529,7 @@ broken-packages: - servant-namedargs - servant-nix - servant-pandoc + - servant-polysemy - servant-pool - servant-proto-lens - servant-purescript diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 6d4d247ecc7..63331bf7949 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -254246,6 +254246,8 @@ self: { ]; description = "Utilities for using servant in a polysemy stack"; license = lib.licenses.bsd3; + hydraPlatforms = lib.platforms.none; + broken = true; }) {}; "servant-pool" = callPackage -- cgit 1.4.1 From 9480b59b457af0143f6b02ccc3271380d780c8dc Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 23 Sep 2022 14:39:06 +0100 Subject: nixosTests.rabbitmq: Test config decryption (fails) --- nixos/tests/rabbitmq.nix | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/nixos/tests/rabbitmq.nix b/nixos/tests/rabbitmq.nix index f8e8e61c47d..040679e68d9 100644 --- a/nixos/tests/rabbitmq.nix +++ b/nixos/tests/rabbitmq.nix @@ -1,6 +1,12 @@ # This test runs rabbitmq and checks if rabbitmq is up and running. -import ./make-test-python.nix ({ pkgs, ... }: { +import ./make-test-python.nix ({ pkgs, ... }: +let + # in real life, you would keep this out of your repo and deploy it to a safe + # location using safe means. + configKeyPath = pkgs.writeText "fake-config-key" "hOjWzSEn2Z7cHzKOcf6i183O2NdjurSuoMDIIv01"; +in +{ name = "rabbitmq"; meta = with pkgs.lib.maintainers; { maintainers = [ eelco offline ]; @@ -10,6 +16,29 @@ import ./make-test-python.nix ({ pkgs, ... }: { services.rabbitmq = { enable = true; managementPlugin.enable = true; + + # To encrypt: + # rabbitmqctl --quiet encode --cipher blowfish_cfb64 --hash sha256 \ + # --iterations 10000 '<<"dJT8isYu6t0Xb6u56rPglSj1vK51SlNVlXfwsRxw">>' \ + # "hOjWzSEn2Z7cHzKOcf6i183O2NdjurSuoMDIIv01" ; + config = '' + [ { rabbit + , [ {default_user, <<"alice">>} + , { default_pass + , {encrypted,<<"oKKxyTze9PYmsEfl6FG1MxIUhxY7WPQL7HBoMPRC/1ZOdOZbtr9+DxjWW3e1D5SL48n3D9QOsGD0cOgYG7Qdvb7Txrepw8w=">>} + } + , {config_entry_decoder + , [ {passphrase, {file, <<"${configKeyPath}">>}} + , {cipher, blowfish_cfb64} + , {hash, sha256} + , {iterations, 10000} + ] + } + % , {rabbitmq_management, [{path_prefix, "/_queues"}]} + ] + } + ]. + ''; }; # Ensure there is sufficient extra disk space for rabbitmq to be happy virtualisation.diskSize = 1024; @@ -23,5 +52,10 @@ import ./make-test-python.nix ({ pkgs, ... }: { 'su -s ${pkgs.runtimeShell} rabbitmq -c "rabbitmqctl status"' ) machine.wait_for_open_port(15672) + + # The password is the plaintext that was encrypted with rabbitmqctl encode above. + machine.wait_until_succeeds( + '${pkgs.rabbitmq-java-client}/bin/PerfTest --time 10 --uri amqp://alice:dJT8isYu6t0Xb6u56rPglSj1vK51SlNVlXfwsRxw@localhost' + ) ''; }) -- cgit 1.4.1 From 6200d85eb4cd357253d6d2b7f4be7c8860039c23 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 23 Sep 2022 14:41:37 +0100 Subject: rabbitmq-server: Use openssl_1_1 to fix config decryption Fixes #192499, nixosTests.rabbitmq Reverts the openssl upgrade introduced in 0565276a075531b6dad21171de459473dd5e6a27 --- pkgs/top-level/all-packages.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a4920769fdb..68f2f4da435 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23864,6 +23864,7 @@ with pkgs; rabbitmq-server = callPackage ../servers/amqp/rabbitmq-server { inherit (darwin.apple_sdk.frameworks) AppKit Carbon Cocoa; elixir = elixir_1_12; + erlang = erlang.override { opensslPackage = openssl_1_1; }; }; radicale2 = callPackage ../servers/radicale/2.x.nix { }; -- cgit 1.4.1 From b6fe86fd453702d76a8a14d0c1f94ecee28d9cbb Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Fri, 23 Sep 2022 14:43:22 +0100 Subject: rabbitmq-server: Remove unused builder variable --- pkgs/servers/amqp/rabbitmq-server/default.nix | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/pkgs/servers/amqp/rabbitmq-server/default.nix b/pkgs/servers/amqp/rabbitmq-server/default.nix index 77e5cdaa4e6..b38a3147b58 100644 --- a/pkgs/servers/amqp/rabbitmq-server/default.nix +++ b/pkgs/servers/amqp/rabbitmq-server/default.nix @@ -25,6 +25,17 @@ , nixosTests }: +let + runtimePath = lib.makeBinPath ([ + erlang + getconf # for getting memory limits + socat + procps + gnused + coreutils # used by helper scripts + ] ++ lib.optionals stdenv.isLinux [ systemd ]); # for systemd unit activation check +in + stdenv.mkDerivation rec { pname = "rabbitmq-server"; version = "3.10.8"; @@ -48,15 +59,6 @@ stdenv.mkDerivation rec { export LANG=C.UTF-8 # fix elixir locale warning ''; - runtimePath = lib.makeBinPath ([ - erlang - getconf # for getting memory limits - socat - procps - gnused - coreutils # used by helper scripts - ] ++ lib.optionals stdenv.isLinux [ systemd ]); # for systemd unit activation check - postInstall = '' # rabbitmq-env calls to sed/coreutils, so provide everything early sed -i $out/sbin/rabbitmq-env -e '2s|^|PATH=${runtimePath}\''${PATH:+:}\$PATH/\n|' -- cgit 1.4.1 From 8f98a6d39bc9bfd4bde8d9cd692ca7ef92111809 Mon Sep 17 00:00:00 2001 From: aszlig Date: Wed, 28 Sep 2022 12:15:24 +0200 Subject: check-meta: Add isHydraChannel This is needed in order to mark a certain derivation containing a Nix expression tarball to Hydra so that it is recognised as a channel. When I first got an evaluation error due to using this meta attribute, I was under the impression that nobody outside of Vuizvui[1] is using this feature and that we don't have any occurrence of isHydraChannel in Nixpkgs. However, when working around[2] the issue I assumed that it's not something that should be included in Nixpkgs because we're not using it there. It turned out that my assumption was wrong and we *do* use the attribute in Nixpkgs, namely via releaseTools.channel, which is similar to what we're doing in Vuizvui. Since we already include a bunch of undocumented attributes in metaTypes, it only makes sense to add isHydraChannel as well since it's actually documented in the Hydra documentation[3]. [1]: https://github.com/openlab-aux/vuizvui [2]: https://github.com/openlab-aux/vuizvui/commit/e0685e81b3fdc43a272f0 [3]: https://github.com/NixOS/hydra/blob/53335323ae79ca1a42643f58e520b376898ce641/doc/manual/src/jobs.md#meta-fields Signed-off-by: aszlig --- pkgs/stdenv/generic/check-meta.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix index 85a9c9c4d41..7b06692ac8c 100644 --- a/pkgs/stdenv/generic/check-meta.nix +++ b/pkgs/stdenv/generic/check-meta.nix @@ -285,6 +285,10 @@ let }); timeout = int; + # Needed for Hydra to expose channel tarballs: + # https://github.com/NixOS/hydra/blob/53335323ae79ca1a42643f58e520b376898ce641/doc/manual/src/jobs.md#meta-fields + isHydraChannel = bool; + # Weirder stuff that doesn't appear in the documentation? maxSilent = int; knownVulnerabilities = listOf str; -- cgit 1.4.1 From a89b27942c225980fce2977d4ffd8ea832215252 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Wed, 28 Sep 2022 14:28:56 +0200 Subject: electrum: 4.3.1 -> 4.3.2 --- pkgs/applications/misc/electrum/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix index 01e872dd882..46ea57c6193 100644 --- a/pkgs/applications/misc/electrum/default.nix +++ b/pkgs/applications/misc/electrum/default.nix @@ -20,7 +20,7 @@ }: let - version = "4.3.1"; + version = "4.3.2"; libsecp256k1_name = if stdenv.isLinux then "libsecp256k1.so.0" @@ -37,7 +37,7 @@ let owner = "spesmilo"; repo = "electrum"; rev = version; - sha256 = "wYblwD+ej65TVkYS7u5MiB37Ka8jENI3aoHi64xAFtU="; + sha256 = "sha256-z2/UamKmBq/5a0PTbHdAqGK617Lc8xRhHRpbCc7jeZo="; postFetch = '' mv $out ./all @@ -53,7 +53,7 @@ python3.pkgs.buildPythonApplication { src = fetchurl { url = "https://download.electrum.org/${version}/Electrum-${version}.tar.gz"; - sha256 = "pAhsHKIMCB3OutJTrgGNT9PKfTcXcgxUj/x16uBK2Is="; + sha256 = "sha256-vTZArTwbKcf6/vPQOvjubPecsg+h+QlZ6rdbl6qNfs0="; }; postUnpack = '' -- cgit 1.4.1 From e2cc8bdf3020dea444d677e24b87c172817e0434 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Wed, 28 Sep 2022 14:57:47 +0200 Subject: ipfs-cluster: 1.0.2 -> 1.0.4 (#191671) --- pkgs/applications/networking/ipfs-cluster/default.nix | 6 +++--- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/ipfs-cluster/default.nix b/pkgs/applications/networking/ipfs-cluster/default.nix index 49483ff7eb8..43bc47b17af 100644 --- a/pkgs/applications/networking/ipfs-cluster/default.nix +++ b/pkgs/applications/networking/ipfs-cluster/default.nix @@ -2,15 +2,15 @@ buildGoModule rec { pname = "ipfs-cluster"; - version = "1.0.2"; + version = "1.0.4"; - vendorSha256 = "sha256-4pCJnQ/X5bvlgyHcRVZ8LyOexaKmz+1xAntMpZCpvd0="; + vendorSha256 = "sha256-krjTtH8C1SGhaKMCtsbA2S9ognImof6mwD+vJ/qbyrM="; src = fetchFromGitHub { owner = "ipfs-cluster"; repo = "ipfs-cluster"; rev = "v${version}"; - sha256 = "sha256-Mbq4NzMNIGGFOWuHlToGmel/Oa/K6xzpZTVuXnKHq1M="; + sha256 = "sha256-LdcCGUbrS6te03y8R7XJJOcG1j6uU0v8uEMeUHLeidg="; }; meta = with lib; { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 68f2f4da435..670af1827a5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7804,7 +7804,9 @@ with pkgs; ipfs = callPackage ../applications/networking/ipfs { openssl = openssl_1_1; }; - ipfs-cluster = callPackage ../applications/networking/ipfs-cluster { }; + ipfs-cluster = callPackage ../applications/networking/ipfs-cluster { + buildGoModule = buildGo119Module; + }; ipfs-migrator-all-fs-repo-migrations = callPackage ../applications/networking/ipfs-migrator/all-migrations.nix { }; ipfs-migrator-unwrapped = callPackage ../applications/networking/ipfs-migrator/unwrapped.nix { }; -- cgit 1.4.1 From d1f0a6d97265c72dd5148af08894f776a357957c Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 28 Sep 2022 16:03:39 +0200 Subject: nixos/systemd/oomd: mdDoc fix --- nixos/modules/system/boot/systemd/oomd.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/modules/system/boot/systemd/oomd.nix b/nixos/modules/system/boot/systemd/oomd.nix index a2afc4d7ce2..fad755e278c 100644 --- a/nixos/modules/system/boot/systemd/oomd.nix +++ b/nixos/modules/system/boot/systemd/oomd.nix @@ -4,20 +4,20 @@ in { options.systemd.oomd = { - enable = lib.mkEnableOption "the systemd-oomd OOM killer" // { default = true; }; + enable = lib.mkEnableOption (lib.mdDoc "the `systemd-oomd` OOM killer") // { default = true; }; # Fedora enables the first and third option by default. See the 10-oomd-* files here: # https://src.fedoraproject.org/rpms/systemd/tree/acb90c49c42276b06375a66c73673ac351025597 - enableRootSlice = lib.mkEnableOption "oomd on the root slice (-.slice)"; - enableSystemSlice = lib.mkEnableOption "oomd on the system slice (system.slice)"; - enableUserServices = lib.mkEnableOption "oomd on all user services (user@.service)"; + enableRootSlice = lib.mkEnableOption (lib.mdDoc "oomd on the root slice (`-.slice`)"); + enableSystemSlice = lib.mkEnableOption (lib.mdDoc "oomd on the system slice (`system.slice`)"); + enableUserServices = lib.mkEnableOption (lib.mdDoc "oomd on all user services (`user@.service`)"); extraConfig = lib.mkOption { type = with lib.types; attrsOf (oneOf [ str int bool ]); default = {}; example = lib.literalExpression ''{ DefaultMemoryPressureDurationSec = "20s"; }''; - description = '' - Extra config options for systemd-oomd. See man oomd.conf + description = lib.mdDoc '' + Extra config options for `systemd-oomd`. See {command}`man oomd.conf` for available options. ''; }; -- cgit 1.4.1 From 5700835116530e8655b5da0b35f4e3ec891c0722 Mon Sep 17 00:00:00 2001 From: polygon Date: Fri, 23 Sep 2022 17:23:18 +0200 Subject: siril: 1.0.3 -> 1.0.5 --- pkgs/applications/science/astronomy/siril/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/astronomy/siril/default.nix b/pkgs/applications/science/astronomy/siril/default.nix index a9980afdc44..7e59c2865e5 100644 --- a/pkgs/applications/science/astronomy/siril/default.nix +++ b/pkgs/applications/science/astronomy/siril/default.nix @@ -6,13 +6,13 @@ stdenv.mkDerivation rec { pname = "siril"; - version = "1.0.3"; + version = "1.0.5"; src = fetchFromGitLab { owner = "free-astro"; repo = pname; rev = version; - sha256 = "sha256-Y5ED2LuNapaq+FkKg3m8t4sgoh2TGXO1VX0p5gwlJjQ="; + sha256 = "sha256-1NPMTHPbYKPmaG+xRyKFU4/4Iio2ptn+HOvnsg4hoFE="; }; nativeBuildInputs = [ -- cgit 1.4.1 From 11ec6f92e77cfcd86981affe371255c8d2bb6a67 Mon Sep 17 00:00:00 2001 From: Philipp Date: Wed, 28 Sep 2022 16:42:30 +0200 Subject: element-{web,desktop}: 1.11.5 -> 1.11.7 --- .../networking/instant-messengers/element/pin.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/element/pin.json b/pkgs/applications/networking/instant-messengers/element/pin.json index 6896b1b41f5..d77b9958fc3 100644 --- a/pkgs/applications/networking/instant-messengers/element/pin.json +++ b/pkgs/applications/networking/instant-messengers/element/pin.json @@ -1,7 +1,7 @@ { - "version": "1.11.5", - "desktopSrcHash": "JbkB+J2KgHcT8rYv8ovC1r325U5NIHo8Wkh0BogLB+w=", - "desktopYarnHash": "1bfpd4a0xrlhm7zq2xz5f184mfp6w4glgyfm4r0y3bi06i4my8vc", - "webSrcHash": "XOFgJGnQ85bvkqnwke5Hww658bpBXkUspk46cqvf5AY=", - "webYarnHash": "0ab49y2xj8cy4ibcckvd6xhhvkv3fa8kwwlmhxvas2racx51wfnh" + "version": "1.11.7", + "desktopSrcHash": "0UwcA+i4vmtrmF50O+8Bfzc9n5i1O+/iQYHG3lLerUY=", + "desktopYarnHash": "105xj2xwc9g8cfiby0x93gy8w8w5c76mzzxck5mgvawcc6qpvmrc", + "webSrcHash": "nJo60QJWhmkyrkHo3VpNspoPvmq+lpRwhNelieqrzto=", + "webYarnHash": "1lar5bqkl1d33625phz91r9yxn5hxpf2wg850xzym58kcsdyp1ci" } -- cgit 1.4.1 From 166962b72e8e47f90d083d9a0cd6cea3f78d243b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 28 Sep 2022 13:30:11 +0000 Subject: mimir: 2.3.0 -> 2.3.1 --- pkgs/servers/monitoring/mimir/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/monitoring/mimir/default.nix b/pkgs/servers/monitoring/mimir/default.nix index 6e161b44b73..3a499716a88 100644 --- a/pkgs/servers/monitoring/mimir/default.nix +++ b/pkgs/servers/monitoring/mimir/default.nix @@ -1,13 +1,13 @@ { lib, buildGoModule, fetchFromGitHub, nixosTests }: buildGoModule rec { pname = "mimir"; - version = "2.3.0"; + version = "2.3.1"; src = fetchFromGitHub { rev = "${pname}-${version}"; owner = "grafana"; repo = pname; - sha256 = "sha256-lLrDgt4WYxyMkwjS8TLTy1agPAo/Z0BtqY9hIYSDyGI="; + sha256 = "sha256-2Gg2SYH2cqSKXePEfUAwW4AXpiMGso3FeGTmHRNxtaU="; }; vendorSha256 = null; -- cgit 1.4.1 From 0d5a365f61189821222939716d44f461b31bdc00 Mon Sep 17 00:00:00 2001 From: David Warde-Farley Date: Sat, 1 Jan 2022 18:13:48 +0000 Subject: caddy: Omit `--adapter` from invocations if empty string supplied This allows specifying configuration in the natively processed Caddy JSON format. Fixes #153142. --- .../modules/services/web-servers/caddy/default.nix | 24 ++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/web-servers/caddy/default.nix b/nixos/modules/services/web-servers/caddy/default.nix index e364cb33be3..4bd58d9116f 100644 --- a/nixos/modules/services/web-servers/caddy/default.nix +++ b/nixos/modules/services/web-servers/caddy/default.nix @@ -165,10 +165,19 @@ in See for the full list. - ::: {.note} - Any value other than `caddyfile` is only valid when - providing your own {option}`configFile`. - ::: + If the empty string is specified, the --adapter + argument is omitted when starting or restarting Caddy. Notably, this + allows specification of a configuration file in Caddy's native JSON + format, as long as the filename does not start with + Caddyfile (in which case the + caddyfile adapter is implicitly enabled). See + + for details. + + + Any value other than caddyfile is only valid when + providing your own . + ''; }; @@ -295,10 +304,9 @@ in serviceConfig = { # https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStart= # If the empty string is assigned to this option, the list of commands to start is reset, prior assignments of this option will have no effect. - ExecStart = [ "" "${cfg.package}/bin/caddy run --config ${cfg.configFile} --adapter ${cfg.adapter} ${optionalString cfg.resume "--resume"}" ]; - ExecReload = [ "" "${cfg.package}/bin/caddy reload --config ${cfg.configFile} --adapter ${cfg.adapter} --force" ]; - - ExecStartPre = "${cfg.package}/bin/caddy validate --config ${cfg.configFile} --adapter ${cfg.adapter}"; + ExecStart = [ "" ''${cfg.package}/bin/caddy run --config ${cfg.configFile} ${optionalString (cfg.adapter != "") "--adapter ${cfg.adapter}"} ${optionalString cfg.resume "--resume"}'' ]; + ExecReload = [ "" ''${cfg.package}/bin/caddy reload --config ${cfg.configFile} ${optionalString (cfg.adapter != "") "--adapter ${cfg.adapter}"} --force'' ]; + ExecStartPre = ''${cfg.package}/bin/caddy validate --config ${cfg.configFile} ${optionalString (cfg.adapter != "") "--adapter ${cfg.adapter}"}''; User = cfg.user; Group = cfg.group; ReadWriteDirectories = cfg.dataDir; -- cgit 1.4.1 From c3e75d49314f262d8a9f15aa0070ea6c1794cd18 Mon Sep 17 00:00:00 2001 From: David Warde-Farley Date: Mon, 26 Sep 2022 02:23:45 +0100 Subject: Use `null` instead of empty string. Per @aanderse in 7556fd7. --- .../modules/services/web-servers/caddy/default.nix | 31 +++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/nixos/modules/services/web-servers/caddy/default.nix b/nixos/modules/services/web-servers/caddy/default.nix index 4bd58d9116f..d92fe698c5f 100644 --- a/nixos/modules/services/web-servers/caddy/default.nix +++ b/nixos/modules/services/web-servers/caddy/default.nix @@ -26,7 +26,7 @@ let configFile = let - Caddyfile = pkgs.writeText "Caddyfile" '' + Caddyfile = pkgs.writeTextDir "Caddyfile" '' { ${cfg.globalConfig} } @@ -34,10 +34,11 @@ let ''; Caddyfile-formatted = pkgs.runCommand "Caddyfile-formatted" { nativeBuildInputs = [ cfg.package ]; } '' - ${cfg.package}/bin/caddy fmt ${Caddyfile} > $out + mkdir -p $out + ${cfg.package}/bin/caddy fmt ${Caddyfile}/Caddyfile > $out/Caddyfile ''; in - if pkgs.stdenv.buildPlatform == pkgs.stdenv.hostPlatform then Caddyfile-formatted else Caddyfile; + "${if pkgs.stdenv.buildPlatform == pkgs.stdenv.hostPlatform then Caddyfile-formatted else Caddyfile}/Caddyfile"; acmeHosts = unique (catAttrs "useACMEHost" acmeVHosts); @@ -142,7 +143,7 @@ in default = configFile; defaultText = "A Caddyfile automatically generated by values from services.caddy.*"; example = literalExpression '' - pkgs.writeText "Caddyfile" ''' + pkgs.writeTextDir "Caddyfile" ''' example.com root * /var/www/wordpress @@ -157,15 +158,15 @@ in }; adapter = mkOption { - default = "caddyfile"; + default = null; example = "nginx"; - type = types.str; - description = lib.mdDoc '' + type = with types; nullOr str; + description = '' Name of the config adapter to use. See for the full list. - If the empty string is specified, the --adapter + If null is specified, the --adapter argument is omitted when starting or restarting Caddy. Notably, this allows specification of a configuration file in Caddy's native JSON format, as long as the filename does not start with @@ -175,8 +176,8 @@ in for details. - Any value other than caddyfile is only valid when - providing your own . + Any value other than null or caddyfile + is only valid when providing your own . ''; }; @@ -273,8 +274,8 @@ in config = mkIf cfg.enable { assertions = [ - { assertion = cfg.adapter != "caddyfile" -> cfg.configFile != configFile; - message = "Any value other than 'caddyfile' is only valid when providing your own `services.caddy.configFile`"; + { assertion = cfg.configFile == configFile -> cfg.adapter == "caddyfile" || cfg.adapter == null; + message = "To specify an adapter other than 'caddyfile' please provide your own configuration via `services.caddy.configFile`"; } ] ++ map (name: mkCertOwnershipAssertion { inherit (cfg) group user; @@ -304,9 +305,9 @@ in serviceConfig = { # https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStart= # If the empty string is assigned to this option, the list of commands to start is reset, prior assignments of this option will have no effect. - ExecStart = [ "" ''${cfg.package}/bin/caddy run --config ${cfg.configFile} ${optionalString (cfg.adapter != "") "--adapter ${cfg.adapter}"} ${optionalString cfg.resume "--resume"}'' ]; - ExecReload = [ "" ''${cfg.package}/bin/caddy reload --config ${cfg.configFile} ${optionalString (cfg.adapter != "") "--adapter ${cfg.adapter}"} --force'' ]; - ExecStartPre = ''${cfg.package}/bin/caddy validate --config ${cfg.configFile} ${optionalString (cfg.adapter != "") "--adapter ${cfg.adapter}"}''; + ExecStart = [ "" ''${cfg.package}/bin/caddy run --config ${cfg.configFile} ${optionalString (cfg.adapter != null) "--adapter ${cfg.adapter}"} ${optionalString cfg.resume "--resume"}'' ]; + ExecReload = [ "" ''${cfg.package}/bin/caddy reload --config ${cfg.configFile} ${optionalString (cfg.adapter != null) "--adapter ${cfg.adapter}"} --force'' ]; + ExecStartPre = ''${cfg.package}/bin/caddy validate --config ${cfg.configFile} ${optionalString (cfg.adapter != null) "--adapter ${cfg.adapter}"}''; User = cfg.user; Group = cfg.group; ReadWriteDirectories = cfg.dataDir; -- cgit 1.4.1 From a81954b818177fc140ebf703572a486944e3187b Mon Sep 17 00:00:00 2001 From: David Warde-Farley Date: Mon, 26 Sep 2022 03:00:16 +0100 Subject: Fix docs. --- .../modules/services/web-servers/caddy/default.nix | 26 ++++++++++------------ 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/nixos/modules/services/web-servers/caddy/default.nix b/nixos/modules/services/web-servers/caddy/default.nix index d92fe698c5f..e1456091717 100644 --- a/nixos/modules/services/web-servers/caddy/default.nix +++ b/nixos/modules/services/web-servers/caddy/default.nix @@ -159,26 +159,24 @@ in adapter = mkOption { default = null; - example = "nginx"; + example = literalExpression "nginx"; type = with types; nullOr str; - description = '' + description = lib.mdDoc '' Name of the config adapter to use. See for the full list. - If null is specified, the --adapter - argument is omitted when starting or restarting Caddy. Notably, this - allows specification of a configuration file in Caddy's native JSON - format, as long as the filename does not start with - Caddyfile (in which case the - caddyfile adapter is implicitly enabled). See - - for details. + If `null` is specified, the `--adapter` argument is omitted when + starting or restarting Caddy. Notably, this allows specification of a + configuration file in Caddy's native JSON format, as long as the + filename does not start with `Caddyfile` (in which case the `caddyfile` + adapter is implicitly enabled). See + for details. - - Any value other than null or caddyfile - is only valid when providing your own . - + ::: {.note} + Any value other than `null` or `caddyfile` is only valid when providing + your own `configFile`. + ::: ''; }; -- cgit 1.4.1