From 376b2ef2b83be9671c4f24b7ff4ded335d5352d4 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Braun Date: Tue, 12 Feb 2019 16:38:23 +0100 Subject: [PATCH 001/377] nixos/qemu-vm: declarative drives Adds `virtualisation.qemu.drives` option to specify drives to be used by qemu. Also fix boot when `virtualisation.useBootLoader` is set to true. Since the boot disk is second qemu doesn't boot on it. Added `bootindex=1` to the boot disk device. --- nixos/modules/virtualisation/qemu-vm.nix | 135 +++++++++++++++++------ 1 file changed, 99 insertions(+), 36 deletions(-) diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix index ed3431554be..e313d2b411b 100644 --- a/nixos/modules/virtualisation/qemu-vm.nix +++ b/nixos/modules/virtualisation/qemu-vm.nix @@ -23,24 +23,56 @@ let cfg = config.virtualisation; - qemuGraphics = lib.optionalString (!cfg.graphics) "-nographic"; - consoles = lib.concatMapStringsSep " " (c: "console=${c}") cfg.qemu.consoles; - # XXX: This is very ugly and in the future we really should use attribute - # sets to build ALL of the QEMU flags instead of this mixed mess of Nix - # expressions and shell script stuff. - mkDiskIfaceDriveFlag = idx: driveArgs: let - inherit (cfg.qemu) diskInterface; - # The drive identifier created by incrementing the index by one using the - # shell. - drvId = "drive$((${idx} + 1))"; - # NOTE: DO NOT shell escape, because this may contain shell variables. - commonArgs = "index=${idx},id=${drvId},${driveArgs}"; - isSCSI = diskInterface == "scsi"; - devArgs = "${diskInterface}-hd,drive=${drvId}"; - args = "-drive ${commonArgs},if=none -device lsi53c895a -device ${devArgs}"; - in if isSCSI then args else "-drive ${commonArgs},if=${diskInterface}"; + driveOpts = { ... }: { + + options = { + + file = mkOption { + type = types.str; + description = "The file image used for this drive."; + }; + + driveExtraOpts = mkOption { + type = types.attrsOf types.str; + default = {}; + description = "Extra options passed to drive flag."; + }; + + deviceExtraOpts = mkOption { + type = types.attrsOf types.str; + default = {}; + description = "Extra options passed to device flag."; + }; + + }; + + }; + + driveCmdline = idx: { file, driveExtraOpts, deviceExtraOpts, ... }: + let + drvId = "drive${toString idx}"; + mkKeyValue = generators.mkKeyValueDefault {} "="; + mkOpts = opts: concatStringsSep "," (mapAttrsToList mkKeyValue opts); + driveOpts = mkOpts (driveExtraOpts // { + index = idx; + id = drvId; + "if" = "none"; + inherit file; + }); + deviceOpts = mkOpts (deviceExtraOpts // { + drive = drvId; + }); + device = + if cfg.qemu.diskInterface == "scsi" then + "-device lsi53c895a -device scsi-hd,${deviceOpts}" + else + "-device virtio-blk-pci,${deviceOpts}"; + in + "-drive ${driveOpts} ${device}"; + + drivesCmdLine = drives: concatStringsSep " " (imap1 driveCmdline drives); # Shell script to start the VM. startVM = @@ -77,13 +109,11 @@ let ''} cd $TMPDIR - idx=2 - extraDisks="" + idx=0 ${flip concatMapStrings cfg.emptyDiskImages (size: '' if ! test -e "empty$idx.qcow2"; then ${qemu}/bin/qemu-img create -f qcow2 "empty$idx.qcow2" "${toString size}M" fi - extraDisks="$extraDisks ${mkDiskIfaceDriveFlag "$idx" "file=$(pwd)/empty$idx.qcow2,werror=report"}" idx=$((idx + 1)) '')} @@ -97,21 +127,7 @@ let -virtfs local,path=/nix/store,security_model=none,mount_tag=store \ -virtfs local,path=$TMPDIR/xchg,security_model=none,mount_tag=xchg \ -virtfs local,path=''${SHARED_DIR:-$TMPDIR/xchg},security_model=none,mount_tag=shared \ - ${if cfg.useBootLoader then '' - ${mkDiskIfaceDriveFlag "0" "file=$NIX_DISK_IMAGE,cache=writeback,werror=report"} \ - ${mkDiskIfaceDriveFlag "1" "file=$TMPDIR/disk.img,media=disk"} \ - ${if cfg.useEFIBoot then '' - -pflash $TMPDIR/bios.bin \ - '' else '' - ''} - '' else '' - ${mkDiskIfaceDriveFlag "0" "file=$NIX_DISK_IMAGE,cache=writeback,werror=report"} \ - -kernel ${config.system.build.toplevel}/kernel \ - -initrd ${config.system.build.toplevel}/initrd \ - -append "$(cat ${config.system.build.toplevel}/kernel-params) init=${config.system.build.toplevel}/init regInfo=${regInfo}/registration ${consoles} $QEMU_KERNEL_PARAMS" \ - ''} \ - $extraDisks \ - ${qemuGraphics} \ + ${drivesCmdLine config.virtualisation.qemu.drives} \ ${toString config.virtualisation.qemu.options} \ $QEMU_OPTS \ "$@" @@ -367,6 +383,12 @@ in ''; }; + drives = + mkOption { + type = types.listOf (types.submodule driveOpts); + description = "Drives passed to qemu."; + }; + diskInterface = mkOption { default = "virtio"; @@ -476,8 +498,49 @@ in # FIXME: Consolidate this one day. virtualisation.qemu.options = mkMerge [ - (mkIf (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) [ "-vga std" "-usb" "-device usb-tablet,bus=usb-bus.0" ]) - (mkIf (pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64) [ "-device virtio-gpu-pci" "-device usb-ehci,id=usb0" "-device usb-kbd" "-device usb-tablet" ]) + (mkIf (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) [ + "-vga std" "-usb" "-device usb-tablet,bus=usb-bus.0" + ]) + (mkIf (pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64) [ + "-device virtio-gpu-pci" "-device usb-ehci,id=usb0" "-device usb-kbd" "-device usb-tablet" + ]) + (mkIf (!cfg.useBootLoader) [ + "-kernel ${config.system.build.toplevel}/kernel" + "-initrd ${config.system.build.toplevel}/initrd" + ''-append "$(cat ${config.system.build.toplevel}/kernel-params) init=${config.system.build.toplevel}/init regInfo=${regInfo}/registration ${consoles} $QEMU_KERNEL_PARAMS"'' + ]) + (mkIf cfg.useEFIBoot [ + "-pflash $TMPDIR/bios.bin" + ]) + (mkIf (!cfg.graphics) [ + "-nographic" + ]) + ]; + + virtualisation.qemu.drives = mkMerge [ + (mkIf cfg.useBootLoader [ + { + file = "$NIX_DISK_IMAGE"; + driveExtraOpts.cache = "writeback"; + driveExtraOpts.werror = "report"; + } + { + file = "$TMPDIR/disk.img"; + driveExtraOpts.media = "disk"; + deviceExtraOpts.bootindex = "1"; + } + ]) + (mkIf (!cfg.useBootLoader) [ + { + file = "$NIX_DISK_IMAGE"; + driveExtraOpts.cache = "writeback"; + driveExtraOpts.werror = "report"; + } + ]) + (imap0 (idx: _: { + file = "$(pwd)/empty${toString idx}.qcow2"; + driveExtraOpts.werror = "report"; + }) cfg.emptyDiskImages) ]; # Mount the host filesystem via 9P, and bind-mount the Nix store From 4a3e7f83f7a210e3b57320e80d900f1f25b59ea8 Mon Sep 17 00:00:00 2001 From: David Guibert Date: Thu, 13 Jun 2019 13:19:24 +0200 Subject: [PATCH 002/377] cudatoolkit: add 10.1.243 --- .../compilers/cudatoolkit/default.nix | 44 ++++++++++++++----- pkgs/top-level/all-packages.nix | 3 +- 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/pkgs/development/compilers/cudatoolkit/default.nix b/pkgs/development/compilers/cudatoolkit/default.nix index 8aab9580232..1c7a566c35e 100644 --- a/pkgs/development/compilers/cudatoolkit/default.nix +++ b/pkgs/development/compilers/cudatoolkit/default.nix @@ -53,22 +53,25 @@ let unpackPhase = '' sh $src --keep --noexec - cd pkg/run_files - sh cuda-linux*.run --keep --noexec - sh cuda-samples*.run --keep --noexec - mv pkg ../../$(basename $src) - cd ../.. - rm -rf pkg + ${lib.optionalString (lib.versionOlder version "10.1") '' + cd pkg/run_files + sh cuda-linux*.run --keep --noexec + sh cuda-samples*.run --keep --noexec + mv pkg ../../$(basename $src) + cd ../.. + rm -rf pkg - for patch in $runPatches; do - sh $patch --keep --noexec - mv pkg $(basename $patch) - done + for patch in $runPatches; do + sh $patch --keep --noexec + mv pkg $(basename $patch) + done + ''} ''; installPhase = '' runHook preInstall mkdir $out + ${lib.optionalString (lib.versionOlder version "10.1") '' cd $(basename $src) export PERL5LIB=. perl ./install-linux.pl --prefix="$out" @@ -78,14 +81,22 @@ let perl ./install_patch.pl --silent --accept-eula --installdir="$out" cd .. done + ''} + ${lib.optionalString (lib.versionAtLeast version "10.1") '' + cd pkg/builds/cuda-toolkit + mv * $out/ + ''} rm $out/tools/CUDA_Occupancy_Calculator.xls # FIXME: why? + ${lib.optionalString (lib.versionOlder version "10.1") '' # let's remove the 32-bit libraries, they confuse the lib64->lib mover rm -rf $out/lib + ''} # Remove some cruft. - ${lib.optionalString (lib.versionAtLeast version "7.0") "rm $out/bin/uninstall*"} + ${lib.optionalString ((lib.versionAtLeast version "7.0") && (lib.versionOlder version "10.1")) + "rm $out/bin/uninstall*"} # Fixup path to samples (needed for cuda 6.5 or else nsight will not find them) if [ -d "$out"/cuda-samples ]; then @@ -109,6 +120,9 @@ let # Remove OpenCL libraries as they are provided by ocl-icd and driver. rm -f $out/lib64/libOpenCL* + ${lib.optionalString (lib.versionAtLeast version "10.1") '' + mv $out/lib64 $out/lib + ''} # Set compiler for NVCC. wrapProgram $out/bin/nvcc \ @@ -304,5 +318,13 @@ in rec { gcc = gcc7; }; + cudatoolkit_10_1 = common { + version = "10.1.243"; + url = "https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.243_418.87.00_linux.run"; + sha256 = "0caxhlv2bdq863dfp6wj7nad66ml81vasq2ayf11psvq2b12vhp7"; + + gcc = gcc7; + }; + cudatoolkit_10 = cudatoolkit_10_0; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 85e441b58c7..6d68ea75083 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2473,7 +2473,8 @@ in cudatoolkit_9_1 cudatoolkit_9_2 cudatoolkit_10 - cudatoolkit_10_0; + cudatoolkit_10_0 + cudatoolkit_10_1; cudatoolkit = cudatoolkit_9; From 92690a89376f6f57136f93053308588eebd86dec Mon Sep 17 00:00:00 2001 From: David Guibert Date: Tue, 17 Sep 2019 14:22:02 +0200 Subject: [PATCH 003/377] cuddn: add 10.1 (version 7.6.3) --- .../libraries/science/math/cudnn/default.nix | 11 +++++++++-- pkgs/top-level/all-packages.nix | 3 ++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/science/math/cudnn/default.nix b/pkgs/development/libraries/science/math/cudnn/default.nix index a33e3ec2009..8cd74939959 100644 --- a/pkgs/development/libraries/science/math/cudnn/default.nix +++ b/pkgs/development/libraries/science/math/cudnn/default.nix @@ -1,4 +1,4 @@ -{ callPackage, cudatoolkit_7, cudatoolkit_7_5, cudatoolkit_8, cudatoolkit_9_0, cudatoolkit_9_1, cudatoolkit_9_2, cudatoolkit_10_0 }: +{ callPackage, cudatoolkit_7, cudatoolkit_7_5, cudatoolkit_8, cudatoolkit_9_0, cudatoolkit_9_1, cudatoolkit_9_2, cudatoolkit_10_0, cudatoolkit_10_1 }: let generic = args: callPackage (import ./generic.nix (removeAttrs args ["cudatoolkit"])) { @@ -65,5 +65,12 @@ in rec { sha256 = "18ys0apiz9afid2s6lvy9qbyi8g66aimb2a7ikl1f3dm09mciprf"; }; - cudnn_cudatoolkit_10 = cudnn_cudatoolkit_10_0; + cudnn_cudatoolkit_10_1 = generic rec { + version = "7.6.3"; + cudatoolkit = cudatoolkit_10_1; + srcName = "cudnn-${cudatoolkit.majorVersion}-linux-x64-v7.6.3.30.tgz"; + sha256 = "0qc9f1xpyfibwqrpqxxq2v9h6w90j0dbx564akwy44c1dls5f99m"; + }; + + cudnn_cudatoolkit_10 = cudnn_cudatoolkit_10_1; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6d68ea75083..a3f224a8f97 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2488,7 +2488,8 @@ in cudnn_cudatoolkit_9_1 cudnn_cudatoolkit_9_2 cudnn_cudatoolkit_10 - cudnn_cudatoolkit_10_0; + cudnn_cudatoolkit_10_0 + cudnn_cudatoolkit_10_1; cudnn = cudnn_cudatoolkit_9; From 78aff37ff1132c80b4db5e9551ff4404889cf0f4 Mon Sep 17 00:00:00 2001 From: David Guibert Date: Tue, 17 Sep 2019 14:22:38 +0200 Subject: [PATCH 004/377] cudatolkit,cuddn: make 10_1 as default --- pkgs/development/compilers/cudatoolkit/default.nix | 2 +- pkgs/top-level/all-packages.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/cudatoolkit/default.nix b/pkgs/development/compilers/cudatoolkit/default.nix index 1c7a566c35e..62b965c44a7 100644 --- a/pkgs/development/compilers/cudatoolkit/default.nix +++ b/pkgs/development/compilers/cudatoolkit/default.nix @@ -326,5 +326,5 @@ in rec { gcc = gcc7; }; - cudatoolkit_10 = cudatoolkit_10_0; + cudatoolkit_10 = cudatoolkit_10_1; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a3f224a8f97..481f8870026 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2476,7 +2476,7 @@ in cudatoolkit_10_0 cudatoolkit_10_1; - cudatoolkit = cudatoolkit_9; + cudatoolkit = cudatoolkit_10; inherit (callPackages ../development/libraries/science/math/cudnn { }) cudnn_cudatoolkit_7 @@ -2491,7 +2491,7 @@ in cudnn_cudatoolkit_10_0 cudnn_cudatoolkit_10_1; - cudnn = cudnn_cudatoolkit_9; + cudnn = cudnn_cudatoolkit_10; curlFull = curl.override { idnSupport = true; From 22191298883e9be626d45d4d3948a9dd9999e4b2 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Thu, 3 Oct 2019 19:01:59 +0300 Subject: [PATCH 005/377] matrix-synapse service: blacklist local IPv6 addresses by default --- nixos/modules/services/misc/matrix-synapse.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/modules/services/misc/matrix-synapse.nix b/nixos/modules/services/misc/matrix-synapse.nix index 018fac38616..5eac3c27690 100644 --- a/nixos/modules/services/misc/matrix-synapse.nix +++ b/nixos/modules/services/misc/matrix-synapse.nix @@ -402,6 +402,9 @@ in { "192.168.0.0/16" "100.64.0.0/10" "169.254.0.0/16" + "::1/128" + "fe80::/64" + "fc00::/7" ]; description = '' List of IP address CIDR ranges that the URL preview spider is denied From 5ddd4dbb124bee11bf84b79547900a0e6499cfaf Mon Sep 17 00:00:00 2001 From: Troels Henriksen Date: Wed, 9 Oct 2019 12:16:55 +0200 Subject: [PATCH 006/377] ispc: add x86_64-darwin to platforms. --- pkgs/development/compilers/ispc/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/ispc/default.nix b/pkgs/development/compilers/ispc/default.nix index 762d1233bb6..d07bf6b5733 100644 --- a/pkgs/development/compilers/ispc/default.nix +++ b/pkgs/development/compilers/ispc/default.nix @@ -67,7 +67,7 @@ stdenv.mkDerivation rec { homepage = https://ispc.github.io/ ; description = "Intel 'Single Program, Multiple Data' Compiler, a vectorised language"; license = licenses.bsd3; - platforms = ["x86_64-linux"]; # TODO: buildable on more platforms? + platforms = ["x86_64-linux" "x86_64-darwin"]; # TODO: buildable on more platforms? maintainers = [ maintainers.aristid ]; }; } From 8120184bf176fc34707f4504c8d1d91716d1e22d Mon Sep 17 00:00:00 2001 From: Philip Potter Date: Mon, 14 Oct 2019 20:45:28 +0100 Subject: [PATCH 007/377] ssh-agent: add agentPKCS11Whitelist option If you want to be able to use OpenSC with ssh-agent, you need to be able to add it to the ssh-agent whitelist. This adds an option, agentPKCS11Whitelist, that exposes the option. Note that I currently work around this by injecting the parameter into the agentTimeout option: programs.ssh.agentTimeout = "1h -P ${pkgs.opensc}/lib/opensc-pkcs11.so"; but I feel that a proper option would be better :) --- nixos/modules/programs/ssh.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nixos/modules/programs/ssh.nix b/nixos/modules/programs/ssh.nix index 733b8f7636f..703975fd06c 100644 --- a/nixos/modules/programs/ssh.nix +++ b/nixos/modules/programs/ssh.nix @@ -115,6 +115,16 @@ in ''; }; + agentPKCS11Whitelist = mkOption { + type = types.nullOr types.str; + default = null; + example = "\${pkgs.opensc}/lib/opensc-pkcs11.so"; + description = '' + A pattern-list of acceptable paths for PKCS#11 shared libraries + that may be used with the -s option to ssh-add. + ''; + }; + package = mkOption { type = types.package; default = pkgs.openssh; @@ -241,6 +251,7 @@ in ExecStart = "${cfg.package}/bin/ssh-agent " + optionalString (cfg.agentTimeout != null) ("-t ${cfg.agentTimeout} ") + + optionalString (cfg.agentPKCS11Whitelist != null) ("-P ${cfg.agentPKCS11Whitelist} ") "-a %t/ssh-agent"; StandardOutput = "null"; Type = "forking"; From f7ab5d985f633df9c1d433b9954004950f0739f9 Mon Sep 17 00:00:00 2001 From: Philip Potter Date: Wed, 16 Oct 2019 22:03:58 +0100 Subject: [PATCH 008/377] gnupg-pkcs11-scd: init at 0.9.2 This adds gnupg-pkcs11-scd, a smart card daemon for GnuPG that supports PKCS#11 smartcards (such as the Yubikey PIV module). You can use it by adding something like this to your ~/.gnupg/gpg-agent.conf: scdaemon-program /home//.nix-profile/bin/gnupg-pkcs11-scd You will also need to install `opensc` and have a ~/.gnupg/gnupg-pkcs11-scd.conf with something like the following: providers opensc provider-opensc-library /home/philandstuff/.nix-profile/lib/pkcs11/opensc-pkcs11.so Then `gpg` smartcard operations will access your PKCS#11-capable smartcard. --- .../security/gnupg-pkcs11-scd/default.nix | 33 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/tools/security/gnupg-pkcs11-scd/default.nix diff --git a/pkgs/tools/security/gnupg-pkcs11-scd/default.nix b/pkgs/tools/security/gnupg-pkcs11-scd/default.nix new file mode 100644 index 00000000000..77537f1bfeb --- /dev/null +++ b/pkgs/tools/security/gnupg-pkcs11-scd/default.nix @@ -0,0 +1,33 @@ +{ stdenv, fetchurl, libgpgerror, libassuan, libgcrypt, pkcs11helper, + pkgconfig, openssl }: + +stdenv.mkDerivation rec { + pname = "gnupg-pkcs11-scd"; + version = "0.9.2"; + + src = fetchurl { + url = "https://github.com/alonbl/${pname}/releases/download/${pname}-${version}/${pname}-${version}.tar.bz2"; + sha256 = "sha256:1mfh9zjbahjd788rq1mzx009pd7p1sq62sbz586rd7szif7pkpgx"; + }; + + buildInputs = [ pkcs11helper pkgconfig openssl ]; + + configureFlags = [ + "--with-libgpg-error-prefix=${libgpgerror.dev}" + "--with-libassuan-prefix=${libassuan.dev}" + "--with-libgcrypt-prefix=${libgcrypt.dev}" + ]; + + meta = with stdenv.lib; { + description = "A smart-card daemon to enable the use of PKCS#11 tokens with GnuPG"; + longDescription = '' + gnupg-pkcs11 is a project to implement a BSD-licensed smart-card + daemon to enable the use of PKCS#11 tokens with GnuPG. + ''; + homepage = http://gnupg-pkcs11.sourceforge.net/; + license = licenses.bsd3; + maintainers = with maintainers; [ philandstuff ]; + platforms = platforms.unix; + }; +} + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f6a3bd68294..7ca55ed818b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3506,6 +3506,8 @@ in }; gnupg = gnupg22; + gnupg-pkcs11-scd = callPackage ../tools/security/gnupg-pkcs11-scd { }; + gnuplot = libsForQt5.callPackage ../tools/graphics/gnuplot { }; gnuplot_qt = gnuplot.override { withQt = true; }; From 1ced63da766965bdda53675a12627401c42a50cc Mon Sep 17 00:00:00 2001 From: Nathan Yong Date: Fri, 18 Oct 2019 09:26:28 +1100 Subject: [PATCH 009/377] p4v: explicitly depend on openssl 1.0 series The 2017.3 version of p4v is linked against `libssl.so.1.0.0`. Since the default openssl in NixOS 2019.09 has been changed to openssl 1.1, the p4v package must now import the openssl_1_0_2 derivation. --- pkgs/applications/version-management/p4v/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/version-management/p4v/default.nix b/pkgs/applications/version-management/p4v/default.nix index 0020c8c2189..317cbfde85b 100644 --- a/pkgs/applications/version-management/p4v/default.nix +++ b/pkgs/applications/version-management/p4v/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, lib, qtbase, qtmultimedia, qtscript, qtsensors, qtwebkit, openssl, xkeyboard_config, wrapQtAppsHook }: +{ stdenv, fetchurl, lib, qtbase, qtmultimedia, qtscript, qtsensors, qtwebkit, openssl_1_0_2, xkeyboard_config, wrapQtAppsHook }: stdenv.mkDerivation rec { pname = "p4v"; @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { qtscript qtsensors qtwebkit - openssl + openssl_1_0_2 ]; dontWrapQtApps = true; @@ -43,6 +43,6 @@ stdenv.mkDerivation rec { homepage = https://www.perforce.com; license = stdenv.lib.licenses.unfreeRedistributable; platforms = [ "x86_64-linux" ]; - maintainers = [ stdenv.lib.maintainers.nioncode ]; + maintainers = with stdenv.lib.maintainers; [ nathyong nioncode ]; }; } From cfb0c10d839470f6d894cd1582a9062ad3cd18f2 Mon Sep 17 00:00:00 2001 From: Lily Ballard Date: Fri, 4 Oct 2019 13:31:32 -0700 Subject: [PATCH 010/377] cocoapods: 1.8.1 -> 1.8.4 --- pkgs/development/mobile/cocoapods/Gemfile.lock | 10 +++++----- pkgs/development/mobile/cocoapods/gemset.nix | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pkgs/development/mobile/cocoapods/Gemfile.lock b/pkgs/development/mobile/cocoapods/Gemfile.lock index e2de7cb0bf1..958f36192f9 100644 --- a/pkgs/development/mobile/cocoapods/Gemfile.lock +++ b/pkgs/development/mobile/cocoapods/Gemfile.lock @@ -12,10 +12,10 @@ GEM json (>= 1.5.1) atomos (0.1.3) claide (1.0.3) - cocoapods (1.8.1) + cocoapods (1.8.4) activesupport (>= 4.0.2, < 5) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.8.1) + cocoapods-core (= 1.8.4) cocoapods-deintegrate (>= 1.0.3, < 2.0) cocoapods-downloader (>= 1.2.2, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) @@ -31,7 +31,7 @@ GEM nap (~> 1.0) ruby-macho (~> 1.4) xcodeproj (>= 1.11.1, < 2.0) - cocoapods-core (1.8.1) + cocoapods-core (1.8.4) activesupport (>= 4.0.2, < 6) algoliasearch (~> 1.0) concurrent-ruby (~> 1.1) @@ -57,7 +57,7 @@ GEM i18n (0.9.5) concurrent-ruby (~> 1.0) json (2.2.0) - minitest (5.12.0) + minitest (5.12.2) molinillo (0.6.6) nanaimo (0.2.6) nap (1.1.0) @@ -66,7 +66,7 @@ GEM thread_safe (0.3.6) tzinfo (1.2.5) thread_safe (~> 0.1) - xcodeproj (1.12.0) + xcodeproj (1.13.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) diff --git a/pkgs/development/mobile/cocoapods/gemset.nix b/pkgs/development/mobile/cocoapods/gemset.nix index 2eb630e0f93..2f268a60c94 100644 --- a/pkgs/development/mobile/cocoapods/gemset.nix +++ b/pkgs/development/mobile/cocoapods/gemset.nix @@ -55,10 +55,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "108zj698l44wnc0jgx81gxra86c7mrzyqrx6rxssalrc5rviadw7"; + sha256 = "007ssx75588ji2d8l8s6c95dng1c7b6yacng8nngpy7maijzjgzc"; type = "gem"; }; - version = "1.8.1"; + version = "1.8.4"; }; cocoapods-core = { dependencies = ["activesupport" "algoliasearch" "concurrent-ruby" "fuzzy_match" "nap"]; @@ -66,10 +66,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "15bcc7771jws4p3n3sd26faxslah0yvqgpb0y8gh6d0dwjdygmk0"; + sha256 = "0zcisqb404828n5d3lbk9y2yyx8v2yr6rk1l8y9a4i1hp743fiad"; type = "gem"; }; - version = "1.8.1"; + version = "1.8.4"; }; cocoapods-deintegrate = { groups = ["default"]; @@ -223,10 +223,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1kj5m8gg643w8jh8nsdy15bpddmnnafhyzhjx7gp28l1acb4fik7"; + sha256 = "0zjm24aiz42i9n37mcw8lydd7n0y7wfk27by06jx77ypcld3qvkw"; type = "gem"; }; - version = "5.12.0"; + version = "5.12.2"; }; molinillo = { source = { @@ -293,9 +293,9 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "162gwhrl7ppj6hlmnpp1scvy1ylcv5xqk51826v075sckdqjp8c8"; + sha256 = "1c69yrhqd92q6nnpyhvnqyw9l7axnc91gnbd2gai8f5njdisd8wx"; type = "gem"; }; - version = "1.12.0"; + version = "1.13.0"; }; } \ No newline at end of file From 8c15284aeb9bd1c6c5b9adba878dff9c90f6c76d Mon Sep 17 00:00:00 2001 From: Lily Ballard Date: Fri, 4 Oct 2019 13:31:42 -0700 Subject: [PATCH 011/377] cocoapods-beta: 1.8.1 -> 1.8.4 --- .../mobile/cocoapods/Gemfile-beta.lock | 10 +++++----- .../development/mobile/cocoapods/gemset-beta.nix | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pkgs/development/mobile/cocoapods/Gemfile-beta.lock b/pkgs/development/mobile/cocoapods/Gemfile-beta.lock index 5a30e40293e..5b7288ad4f7 100644 --- a/pkgs/development/mobile/cocoapods/Gemfile-beta.lock +++ b/pkgs/development/mobile/cocoapods/Gemfile-beta.lock @@ -12,10 +12,10 @@ GEM json (>= 1.5.1) atomos (0.1.3) claide (1.0.3) - cocoapods (1.8.1) + cocoapods (1.8.4) activesupport (>= 4.0.2, < 5) claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.8.1) + cocoapods-core (= 1.8.4) cocoapods-deintegrate (>= 1.0.3, < 2.0) cocoapods-downloader (>= 1.2.2, < 2.0) cocoapods-plugins (>= 1.0.0, < 2.0) @@ -31,7 +31,7 @@ GEM nap (~> 1.0) ruby-macho (~> 1.4) xcodeproj (>= 1.11.1, < 2.0) - cocoapods-core (1.8.1) + cocoapods-core (1.8.4) activesupport (>= 4.0.2, < 6) algoliasearch (~> 1.0) concurrent-ruby (~> 1.1) @@ -57,7 +57,7 @@ GEM i18n (0.9.5) concurrent-ruby (~> 1.0) json (2.2.0) - minitest (5.12.0) + minitest (5.12.2) molinillo (0.6.6) nanaimo (0.2.6) nap (1.1.0) @@ -66,7 +66,7 @@ GEM thread_safe (0.3.6) tzinfo (1.2.5) thread_safe (~> 0.1) - xcodeproj (1.12.0) + xcodeproj (1.13.0) CFPropertyList (>= 2.3.3, < 4.0) atomos (~> 0.1.3) claide (>= 1.0.2, < 2.0) diff --git a/pkgs/development/mobile/cocoapods/gemset-beta.nix b/pkgs/development/mobile/cocoapods/gemset-beta.nix index f5f95db3ced..b94bc461944 100644 --- a/pkgs/development/mobile/cocoapods/gemset-beta.nix +++ b/pkgs/development/mobile/cocoapods/gemset-beta.nix @@ -57,10 +57,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "108zj698l44wnc0jgx81gxra86c7mrzyqrx6rxssalrc5rviadw7"; + sha256 = "007ssx75588ji2d8l8s6c95dng1c7b6yacng8nngpy7maijzjgzc"; type = "gem"; }; - version = "1.8.1"; + version = "1.8.4"; }; cocoapods-core = { dependencies = ["activesupport" "algoliasearch" "concurrent-ruby" "fuzzy_match" "nap"]; @@ -68,10 +68,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "15bcc7771jws4p3n3sd26faxslah0yvqgpb0y8gh6d0dwjdygmk0"; + sha256 = "0zcisqb404828n5d3lbk9y2yyx8v2yr6rk1l8y9a4i1hp743fiad"; type = "gem"; }; - version = "1.8.1"; + version = "1.8.4"; }; cocoapods-deintegrate = { groups = ["default"]; @@ -241,10 +241,10 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "1kj5m8gg643w8jh8nsdy15bpddmnnafhyzhjx7gp28l1acb4fik7"; + sha256 = "0zjm24aiz42i9n37mcw8lydd7n0y7wfk27by06jx77ypcld3qvkw"; type = "gem"; }; - version = "5.12.0"; + version = "5.12.2"; }; molinillo = { groups = ["default"]; @@ -323,9 +323,9 @@ platforms = []; source = { remotes = ["https://rubygems.org"]; - sha256 = "162gwhrl7ppj6hlmnpp1scvy1ylcv5xqk51826v075sckdqjp8c8"; + sha256 = "1c69yrhqd92q6nnpyhvnqyw9l7axnc91gnbd2gai8f5njdisd8wx"; type = "gem"; }; - version = "1.12.0"; + version = "1.13.0"; }; } \ No newline at end of file From 922b4f786f9988471d83f4c9daa0afd4fa21e618 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Mon, 21 Oct 2019 20:40:08 -0400 Subject: [PATCH 012/377] kdevelop, kdev-php, kdev-python: 5.4.2 -> 5.4.3 --- pkgs/applications/editors/kdevelop5/kdev-php.nix | 4 ++-- pkgs/applications/editors/kdevelop5/kdev-python.nix | 4 ++-- pkgs/applications/editors/kdevelop5/kdevelop.nix | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/editors/kdevelop5/kdev-php.nix b/pkgs/applications/editors/kdevelop5/kdev-php.nix index e367b586f30..7805234a70c 100644 --- a/pkgs/applications/editors/kdevelop5/kdev-php.nix +++ b/pkgs/applications/editors/kdevelop5/kdev-php.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "kdev-php"; - version = "5.4.2"; + version = "5.4.3"; src = fetchurl { url = "https://github.com/KDE/${pname}/archive/v${version}.tar.gz"; - sha256 = "1ilazq2y671wifcrh7pa0zf9yqymqxwj1m2kd389ik2p6wm68jx8"; + sha256 = "0nf9nlykdq40yxdda0as16pd0c5rahwba1fbwni8g19w8mf2y3h5"; }; nativeBuildInputs = [ cmake extra-cmake-modules ]; diff --git a/pkgs/applications/editors/kdevelop5/kdev-python.nix b/pkgs/applications/editors/kdevelop5/kdev-python.nix index 1052c5e1ba3..50740e24aca 100644 --- a/pkgs/applications/editors/kdevelop5/kdev-python.nix +++ b/pkgs/applications/editors/kdevelop5/kdev-python.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "kdev-python"; - version = "5.4.2"; + version = "5.4.3"; src = fetchurl { url = "https://github.com/KDE/${pname}/archive/v${version}.tar.gz"; - sha256 = "1nnspa1mixdb5z0a8m4nbpsk6c4s81iwrirhrl7091hsw02bsx3f"; + sha256 = "16928a0p5m5mm38j39sxzfqy6rx9pv01aihk2kscdd93z7001b81"; }; cmakeFlags = [ diff --git a/pkgs/applications/editors/kdevelop5/kdevelop.nix b/pkgs/applications/editors/kdevelop5/kdevelop.nix index 4c2011b5b03..1f28c2a4af2 100644 --- a/pkgs/applications/editors/kdevelop5/kdevelop.nix +++ b/pkgs/applications/editors/kdevelop5/kdevelop.nix @@ -1,3 +1,4 @@ + { mkDerivation, lib, fetchurl, cmake, gettext, pkgconfig, extra-cmake-modules , qtquickcontrols, qtwebkit, qttools, kde-cli-tools, qtbase , kconfig, kdeclarative, kdoctools, kiconthemes, ki18n, kitemmodels, kitemviews @@ -9,11 +10,11 @@ mkDerivation rec { pname = "kdevelop"; - version = "5.4.2"; + version = "5.4.3"; src = fetchurl { url = "mirror://kde/stable/${pname}/${version}/src/${pname}-${version}.tar.xz"; - sha256 = "1i665m4jd1r5bl77pcfybpn9szxzccrajs4m0prqwhlj93d57qjj"; + sha256 = "0h07gdmg24d517im40b9kl1kzkkzwc9ig4crbl3y9iy0mbpm0hv8"; }; nativeBuildInputs = [ From 4e3aa7b7b85d95e12deaa2a04425a5c1b97baf63 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 22 Oct 2019 16:30:14 +0200 Subject: [PATCH 013/377] mpd: restart always Signed-off-by: Matthias Beyer --- nixos/modules/services/audio/mpd.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/services/audio/mpd.nix b/nixos/modules/services/audio/mpd.nix index 0df8f9688d2..56dc858b640 100644 --- a/nixos/modules/services/audio/mpd.nix +++ b/nixos/modules/services/audio/mpd.nix @@ -181,6 +181,7 @@ in { ProtectKernelModules = true; RestrictAddressFamilies = "AF_INET AF_INET6 AF_UNIX AF_NETLINK"; RestrictNamespaces = true; + Restart = "always"; }; }; From b4ce8c3642c271db8e8ef290becd2478ab87f904 Mon Sep 17 00:00:00 2001 From: Puck Meerburg Date: Wed, 23 Oct 2019 11:33:13 +0000 Subject: [PATCH 014/377] SDL_Pango: init at 0.1.2 --- .../libraries/SDL_Pango/default.nix | 32 ++++ .../libraries/SDL_Pango/fixes.patch | 148 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 182 insertions(+) create mode 100644 pkgs/development/libraries/SDL_Pango/default.nix create mode 100644 pkgs/development/libraries/SDL_Pango/fixes.patch diff --git a/pkgs/development/libraries/SDL_Pango/default.nix b/pkgs/development/libraries/SDL_Pango/default.nix new file mode 100644 index 00000000000..e330ccef611 --- /dev/null +++ b/pkgs/development/libraries/SDL_Pango/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchpatch, fetchurl, SDL, autoreconfHook, pango, pkgconfig }: + +stdenv.mkDerivation rec { + pname = "SDL_Pango"; + version = "0.1.2"; + + src = fetchurl { + url = "mirror://sourceforge/sdlpango/${pname}-${version}.tar.gz"; + sha256 = "197baw1dsg0p4pljs5k0fshbyki00r4l49m1drlpqw6ggawx6xbz"; + }; + + patches = [ + (fetchpatch { + url = https://sources.debian.org/data/main/s/sdlpango/0.1.2-6/debian/patches/api_additions.patch; + sha256 = "00p5ry5gd3ixm257p9i2c4jg0qj8ipk8nf56l7c9fma8id3zxyld"; + }) + ./fixes.patch + ]; + + preConfigure = "autoreconf -i -f"; + + nativeBuildInputs = [ pkgconfig autoreconfHook ]; + buildInputs = [ SDL pango ]; + + meta = with stdenv.lib; { + description = "Connects the Pango rendering engine to SDL"; + license = licenses.lgpl21Plus; + platforms = platforms.all; + homepage = http://sdlpango.sourceforge.net/; + maintainers = with maintainers; [ puckipedia ]; + }; +} diff --git a/pkgs/development/libraries/SDL_Pango/fixes.patch b/pkgs/development/libraries/SDL_Pango/fixes.patch new file mode 100644 index 00000000000..9703c0d4918 --- /dev/null +++ b/pkgs/development/libraries/SDL_Pango/fixes.patch @@ -0,0 +1,148 @@ +diff --git a/SDL_Pango.pc.in b/SDL_Pango.pc.in +index 750d091..3af38ff 100644 +--- a/SDL_Pango.pc.in ++++ b/SDL_Pango.pc.in +@@ -6,6 +6,6 @@ includedir=@includedir@ + Name: SDL_Pango + Description: SDL library for internationalized text rendering + Version: @VERSION@ +-Requires: pango ++Requires: pango pangoft2 + Libs: -L${libdir} -lSDL_Pango + Cflags: -I${includedir} +\ No newline at end of file +diff --git a/src/SDL_Pango.c b/src/SDL_Pango.c +index b969bc1..cc2c3f5 100644 +--- a/src/SDL_Pango.c ++++ b/src/SDL_Pango.c +@@ -231,6 +231,41 @@ + + #include "SDL_Pango.h" + ++const SDLPango_Matrix _MATRIX_WHITE_BACK ++ = {255, 0, 0, 0, ++ 255, 0, 0, 0, ++ 255, 0, 0, 0, ++ 255, 255, 0, 0,}; ++const SDLPango_Matrix *MATRIX_WHITE_BACK = &_MATRIX_WHITE_BACK; ++ ++const SDLPango_Matrix _MATRIX_BLACK_BACK ++ = {0, 255, 0, 0, ++ 0, 255, 0, 0, ++ 0, 255, 0, 0, ++ 255, 255, 0, 0,}; ++const SDLPango_Matrix *MATRIX_BLACK_BACK = &_MATRIX_BLACK_BACK; ++ ++const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_BLACK_LETTER ++ = {0, 0, 0, 0, ++ 0, 0, 0, 0, ++ 0, 0, 0, 0, ++ 0, 255, 0, 0,}; ++const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER = &_MATRIX_TRANSPARENT_BACK_BLACK_LETTER; ++ ++const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_WHITE_LETTER ++ = {255, 255, 0, 0, ++ 255, 255, 0, 0, ++ 255, 255, 0, 0, ++ 0, 255, 0, 0,}; ++const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER = &_MATRIX_TRANSPARENT_BACK_WHITE_LETTER; ++ ++const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER ++ = {255, 255, 0, 0, ++ 255, 255, 0, 0, ++ 255, 255, 0, 0, ++ 0, 0, 0, 0,}; ++const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER = &_MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER; ++ + //! non-zero if initialized + static int IS_INITIALIZED = 0; + +diff --git a/src/SDL_Pango.h b/src/SDL_Pango.h +index 6ebdf78..b7e5e58 100644 +--- a/src/SDL_Pango.h ++++ b/src/SDL_Pango.h +@@ -47,57 +47,32 @@ typedef struct _SDLPango_Matrix { + Uint8 m[4][4]; /*! Matrix variables */ + } SDLPango_Matrix; + +-const SDLPango_Matrix _MATRIX_WHITE_BACK +- = {255, 0, 0, 0, +- 255, 0, 0, 0, +- 255, 0, 0, 0, +- 255, 255, 0, 0,}; + + /*! + Specifies white back and black letter. + */ +-const SDLPango_Matrix *MATRIX_WHITE_BACK = &_MATRIX_WHITE_BACK; ++extern const SDLPango_Matrix *MATRIX_WHITE_BACK; + +-const SDLPango_Matrix _MATRIX_BLACK_BACK +- = {0, 255, 0, 0, +- 0, 255, 0, 0, +- 0, 255, 0, 0, +- 255, 255, 0, 0,}; + /*! + Specifies black back and white letter. + */ +-const SDLPango_Matrix *MATRIX_BLACK_BACK = &_MATRIX_BLACK_BACK; ++extern const SDLPango_Matrix *MATRIX_BLACK_BACK; + +-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_BLACK_LETTER +- = {0, 0, 0, 0, +- 0, 0, 0, 0, +- 0, 0, 0, 0, +- 0, 255, 0, 0,}; + /*! + Specifies transparent back and black letter. + */ +-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER = &_MATRIX_TRANSPARENT_BACK_BLACK_LETTER; ++extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_BLACK_LETTER; + +-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_WHITE_LETTER +- = {255, 255, 0, 0, +- 255, 255, 0, 0, +- 255, 255, 0, 0, +- 0, 255, 0, 0,}; + /*! + Specifies transparent back and white letter. + */ +-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER = &_MATRIX_TRANSPARENT_BACK_WHITE_LETTER; ++extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_WHITE_LETTER; + +-const SDLPango_Matrix _MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER +- = {255, 255, 0, 0, +- 255, 255, 0, 0, +- 255, 255, 0, 0, +- 0, 0, 0, 0,}; + /*! + Specifies transparent back and transparent letter. + This is useful for KARAOKE like rendering. + */ +-const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER = &_MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER; ++extern const SDLPango_Matrix *MATRIX_TRANSPARENT_BACK_TRANSPARENT_LETTER; + + /*! + Specifies direction of text. See Pango reference for detail +@@ -186,7 +161,8 @@ extern DECLSPEC void SDLCALL SDLPango_SetBaseDirection( + SDLPango_Direction direction); + + +-#ifdef __FT2_BUILD_UNIX_H__ ++ ++#ifdef __PANGO_H__ + + extern DECLSPEC void SDLCALL SDLPango_CopyFTBitmapToSurface( + const FT_Bitmap *bitmap, +@@ -194,11 +170,8 @@ extern DECLSPEC void SDLCALL SDLPango_CopyFTBitmapToSurface( + const SDLPango_Matrix *matrix, + SDL_Rect *rect); + +-#endif /* __FT2_BUILD_UNIX_H__ */ + + +-#ifdef __PANGO_H__ +- + extern DECLSPEC PangoFontMap* SDLCALL SDLPango_GetPangoFontMap( + SDLPango_Context *context); + diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b12fe4966ad..9f33a4d82f5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13645,6 +13645,8 @@ in SDL_net = callPackage ../development/libraries/SDL_net { }; + SDL_Pango = callPackage ../development/libraries/SDL_Pango {}; + SDL_sound = callPackage ../development/libraries/SDL_sound { }; SDL_stretch= callPackage ../development/libraries/SDL_stretch { }; From 1038cd5ad8fcd80cf3293e80a2a7ab88838055cd Mon Sep 17 00:00:00 2001 From: Puck Meerburg Date: Wed, 23 Oct 2019 11:46:47 +0000 Subject: [PATCH 015/377] SDL: Add library paths of all SDL sub-packages to sdl-config Because of how nixpkgs works, all the SDL-umbrella libraries are in different folders. On a usual system, when using `sdl-config --libs`, this means that SDL_gfx would also be on the linker path. Some packages seem to depend on this being the case. --- .../libraries/SDL/find-headers.patch | 20 ++++++++++++++----- pkgs/development/libraries/SDL/setup-hook.sh | 1 + 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/SDL/find-headers.patch b/pkgs/development/libraries/SDL/find-headers.patch index 5f75ae9e830..fd498117fd6 100644 --- a/pkgs/development/libraries/SDL/find-headers.patch +++ b/pkgs/development/libraries/SDL/find-headers.patch @@ -1,7 +1,8 @@ -diff -ru3 SDL-1.2.15/sdl-config.in SDL-1.2.15-new/sdl-config.in ---- SDL-1.2.15/sdl-config.in 2012-01-19 10:30:06.000000000 +0400 -+++ SDL-1.2.15-new/sdl-config.in 2016-08-22 05:32:52.716397920 +0300 -@@ -42,7 +42,11 @@ +diff --git a/sdl-config.in b/sdl-config.in +index e0fcc0c..bf7928a 100644 +--- a/sdl-config.in ++++ b/sdl-config.in +@@ -42,14 +42,18 @@ while test $# -gt 0; do echo @SDL_VERSION@ ;; --cflags) @@ -13,4 +14,13 @@ diff -ru3 SDL-1.2.15/sdl-config.in SDL-1.2.15-new/sdl-config.in + echo $SDL_CFLAGS @SDL_CFLAGS@ ;; @ENABLE_SHARED_TRUE@ --libs) - @ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@ +-@ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@ ++@ENABLE_SHARED_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_LIBS@ $SDL_LIB_PATH + @ENABLE_SHARED_TRUE@ ;; + @ENABLE_STATIC_TRUE@@ENABLE_SHARED_TRUE@ --static-libs) + @ENABLE_STATIC_TRUE@@ENABLE_SHARED_FALSE@ --libs|--static-libs) +-@ENABLE_STATIC_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_STATIC_LIBS@ ++@ENABLE_STATIC_TRUE@ echo -L@libdir@ @SDL_RLD_FLAGS@ @SDL_STATIC_LIBS@ $SDL_LIB_PATH + @ENABLE_STATIC_TRUE@ ;; + *) + echo "${usage}" 1>&2 diff --git a/pkgs/development/libraries/SDL/setup-hook.sh b/pkgs/development/libraries/SDL/setup-hook.sh index 20382f18f52..e8f96fdd1ac 100644 --- a/pkgs/development/libraries/SDL/setup-hook.sh +++ b/pkgs/development/libraries/SDL/setup-hook.sh @@ -1,6 +1,7 @@ addSDLPath () { if [ -e "$1/include/SDL" ]; then export SDL_PATH="$SDL_PATH $1/include/SDL" + export SDL_LIB_PATH="$SDL_LIB_PATH -L$1/lib" fi } From 4b918e3e8afe801fff569854d459bce93094f375 Mon Sep 17 00:00:00 2001 From: Puck Meerburg Date: Wed, 23 Oct 2019 12:08:27 +0000 Subject: [PATCH 016/377] perlPackages.TextPatch: init at 1.8 --- pkgs/top-level/perl-packages.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index bc7deb91327..2b9c6c980b9 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -18614,6 +18614,20 @@ let }; }; + TextPatch = buildPerlPackage { + pname = "Text-Patch"; + version = "1.8"; + src = fetchurl { + url = "mirror://cpan/authors/id/C/CA/CADE/Text-Patch-1.8.tar.gz"; + sha256 = "eaf18e61ba6a3e143846a7cc66f08ce58a0c4fbda92acb31aede25cb3b5c3dcc"; + }; + propagatedBuildInputs = [ TextDiff ]; + meta = { + description = "Patches text with given patch"; + license = stdenv.lib.licenses.gpl2; + }; + }; + TextPDF = buildPerlPackage { pname = "Text-PDF"; version = "0.31"; From a261de272513f625ac00b8c858116a0848c9b9bc Mon Sep 17 00:00:00 2001 From: Puck Meerburg Date: Wed, 23 Oct 2019 12:08:52 +0000 Subject: [PATCH 017/377] perlPackages.TieSimple: init at 1.04 --- pkgs/top-level/perl-packages.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 2b9c6c980b9..b7159d5d430 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -19083,6 +19083,19 @@ let }; }; + TieSimple = buildPerlPackage { + pname = "Tie-Simple"; + version = "1.04"; + src = fetchurl { + url = "mirror://cpan/authors/id/H/HA/HANENKAMP/Tie-Simple-1.04.tar.gz"; + sha256 = "29e9e2133951046c78f205f1b3e8df62c90e114f0e08fa06b817766a0f808b12"; + }; + meta = { + description = "Variable ties made much easier: much, much, much easier.."; + license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; + }; + }; + TieSub = buildPerlPackage { pname = "Tie-Sub"; version = "1.001"; From f04dd341b74e91da7c33d5bfe1748f8023755add Mon Sep 17 00:00:00 2001 From: Puck Meerburg Date: Wed, 23 Oct 2019 12:09:13 +0000 Subject: [PATCH 018/377] perlPackages.AlienSDL: init at 1.446 --- pkgs/development/perl-modules/alien-sdl.patch | 30 +++++++++++++++++++ pkgs/top-level/perl-packages.nix | 21 +++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/perl-modules/alien-sdl.patch diff --git a/pkgs/development/perl-modules/alien-sdl.patch b/pkgs/development/perl-modules/alien-sdl.patch new file mode 100644 index 00000000000..b00f7dcce81 --- /dev/null +++ b/pkgs/development/perl-modules/alien-sdl.patch @@ -0,0 +1,30 @@ +diff --git a/inc/My/Builder/Unix.pm b/inc/My/Builder/Unix.pm +index 15291d5..5c5ab24 100644 +--- a/inc/My/Builder/Unix.pm ++++ b/inc/My/Builder/Unix.pm +@@ -48,7 +48,7 @@ sub get_additional_libs { + + sub can_build_binaries_from_sources { + my $self = shift; +- return 1; # yes we can ++ return 0; # no we can't + } + + sub build_binaries { +diff --git a/t/004_get_header_version.t b/t/004_get_header_version.t +index d4146ff..27f53ea 100644 +--- a/t/004_get_header_version.t ++++ b/t/004_get_header_version.t +@@ -1,8 +1,11 @@ + # t/004_config.t + +-use Test::More tests => 1; ++use Test::More; + use Alien::SDL; + ++Test::More::plan( skip_all => 'NixOS doesn\'t have SDL headers in this location' ); ++ ++ + like( Alien::SDL->get_header_version('SDL_version.h'), qr/([0-9]+\.)*[0-9]+/, "Testing SDL_version.h" ); + #like( Alien::SDL->get_header_version('SDL_net.h'), qr/([0-9]+\.)*[0-9]+/, "Testing SDL_net.h" ); + #like( Alien::SDL->get_header_version('SDL_image.h'), qr/([0-9]+\.)*[0-9]+/, "Testing SDL_image.h" ); diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index b7159d5d430..764225fb5e7 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -210,6 +210,27 @@ let }; }; + AlienSDL = buildPerlModule { + pname = "Alien-SDL"; + version = "1.446"; + src = fetchurl { + url = "mirror://cpan/authors/id/F/FR/FROGGS/Alien-SDL-1.446.tar.gz"; + sha256 = "c9aa2c9dc3c63d89773c7d7203f2a46d1b924d0c72d9f801af147a3dc8bc512a"; + }; + patches = [ ../development/perl-modules/alien-sdl.patch ]; + + installPhase = "./Build install --prefix $out"; + + SDL_INST_DIR = pkgs.SDL.dev; + buildInputs = [ ArchiveExtract ArchiveZip TextPatch pkgs.SDL ]; + propagatedBuildInputs = [ CaptureTiny FileShareDir FileWhich ]; + + meta = { + description = "Get, Build and Use SDL libraries"; + license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; + }; + }; + AlienTidyp = buildPerlModule { pname = "Alien-Tidyp"; version = "1.4.7"; From 0b3a34f4bb9ea46f88c880646b67b2a384163efb Mon Sep 17 00:00:00 2001 From: Puck Meerburg Date: Wed, 23 Oct 2019 12:13:00 +0000 Subject: [PATCH 019/377] perlPackages.SDL: init at 2.548 --- pkgs/top-level/perl-packages.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 764225fb5e7..cc44d41f0f2 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -15355,6 +15355,24 @@ let }; }; + SDL = buildPerlModule { + pname = "SDL"; + version = "2.548"; + src = fetchurl { + url = "mirror://cpan/authors/id/F/FR/FROGGS/SDL-2.548.tar.gz"; + sha256 = "252a192bfa9c2070a4883707d139c3a45d9c4518ccd66a1e699b5b7959bd4fb5"; + }; + perlPreHook = "export LD=$CC"; + preCheck = "rm t/core_audiospec.t"; + buildInputs = [ AlienSDL CaptureTiny TestDeep TestDifferences TestException TestMost TestWarn ] + ++ (with pkgs; [ SDL SDL_gfx SDL_mixer SDL_image SDL_ttf SDL_Pango SDL_net ] ); + propagatedBuildInputs = [ FileShareDir TieSimple ]; + meta = { + description = "SDL bindings to Perl"; + license = stdenv.lib.licenses.lgpl21Plus; + }; + }; + SerealDecoder = buildPerlPackage { pname = "Sereal-Decoder"; version = "4.007"; From 9f52dabf79724980bf91e6b8fcbafb6db605c2f2 Mon Sep 17 00:00:00 2001 From: Puck Meerburg Date: Wed, 23 Oct 2019 12:48:02 +0000 Subject: [PATCH 020/377] frozen-bubble: init at 2.212 --- pkgs/games/frozen-bubble/default.nix | 25 ++++++++++++++ .../games/frozen-bubble/fix-compilation.patch | 33 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 3 files changed, 60 insertions(+) create mode 100644 pkgs/games/frozen-bubble/default.nix create mode 100644 pkgs/games/frozen-bubble/fix-compilation.patch diff --git a/pkgs/games/frozen-bubble/default.nix b/pkgs/games/frozen-bubble/default.nix new file mode 100644 index 00000000000..3b562ee44f2 --- /dev/null +++ b/pkgs/games/frozen-bubble/default.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchurl, perlPackages, pkgconfig, SDL, SDL_mixer, SDL_Pango, glib }: + +perlPackages.buildPerlModule { + pname = "frozen-bubble"; + version = "2.212"; + + src = fetchurl { + url = "mirror://cpan/authors/id/K/KT/KTHAKORE/Games-FrozenBubble-2.212.tar.gz"; + sha256 = "721e04ff69c5233060656bfbf4002aa1aeadd96c95351f0c57bb85b6da35a305"; + }; + patches = [ ./fix-compilation.patch ]; + + nativeBuildInputs = [ pkgconfig ]; + + buildInputs = [ glib SDL SDL_mixer SDL_Pango perlPackages.SDL perlPackages.FileSlurp ]; + propagatedBuildInputs = with perlPackages; [ AlienSDL CompressBzip2 FileShareDir FileWhich IPCSystemSimple LocaleMaketextLexicon ]; + + perlPreHook = "export LD=$CC"; + + meta = { + description = "Puzzle with Bubbles"; + license = stdenv.lib.licenses.gpl2; + maintainers = with stdenv.lib.maintainers; [ puckipedia ]; + }; +} diff --git a/pkgs/games/frozen-bubble/fix-compilation.patch b/pkgs/games/frozen-bubble/fix-compilation.patch new file mode 100644 index 00000000000..e87dd0668dc --- /dev/null +++ b/pkgs/games/frozen-bubble/fix-compilation.patch @@ -0,0 +1,33 @@ +diff --git a/Build.PL b/Build.PL +index b029d1e..8737395 100644 +--- a/Build.PL ++++ b/Build.PL +@@ -16,13 +16,14 @@ use Games::FrozenBubble; + my $prefix = Alien::SDL->config('prefix'); + my $cflags = '-I' + . File::Spec->catfile( $prefix, 'include' ) ++ . ' ' . `pkg-config --cflags SDL_mixer` + ; + $cflags .= ' -fnested-functions' if $^O =~ /darwin/; + ###!!! this looks strange, you perhaps meant "$cflags .= ..." + ###!!! I intended Alien::SDL to add -I$prefix/include automatically, please tell me when it does not work (kmx) + my $devnull = File::Spec->devnull(); + my @cflags = ExtUtils::CBuilder->new->split_like_shell( $cflags ); +-my @linkers = ( ExtUtils::CBuilder->new->split_like_shell( Alien::SDL->config('libs', '-lSDL_mixer', '-lSDL_Pango') ) ); ++my @linkers = ( ExtUtils::CBuilder->new->split_like_shell( Alien::SDL->config('libs', '-lSDL_Pango',`pkg-config --libs SDL_mixer`) ) ); + push @linkers, '-liconv' + if $^O =~ /win/i; ###!!! really only Win needs this? ; BEWARE this matches also 'darwin', 'cygwin'!!!! + +diff --git a/inc/My/Builder.pm b/inc/My/Builder.pm +index 2ebaf91..c420b9a 100644 +--- a/inc/My/Builder.pm ++++ b/inc/My/Builder.pm +@@ -123,7 +123,7 @@ sub ACTION_server { + push @ofiles, $cbuilder->compile( + source => catfile($server_directory, $cfile), + extra_compiler_flags => [ +- qw(-g -Wall -Werror -pipe), # verbatim from Makefile ++ qw(-g -pipe), # verbatim from Makefile + '-I' . $server_directory, # does not seem to be necessary + $cbuilder->split_like_shell(`pkg-config glib-2.0 --cflags`), + $cbuilder->split_like_shell(`pkg-config glib-2.0 --libs`), diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9f33a4d82f5..243402591a4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22332,6 +22332,8 @@ in frogatto = callPackage ../games/frogatto { }; + frozen-bubble = callPackage ../games/frozen-bubble { }; + fsg = callPackage ../games/fsg { wxGTK = wxGTK28.override { unicode = false; }; }; From ad034104cc97f7d7c4b1f20627f77d9d61f5b182 Mon Sep 17 00:00:00 2001 From: Martin Milata Date: Tue, 16 Jul 2019 01:06:19 +0200 Subject: [PATCH 021/377] nixos/moin: init --- nixos/modules/module-list.nix | 1 + nixos/modules/services/web-apps/moinmoin.nix | 303 +++++++++++++++++++ nixos/tests/all-tests.nix | 1 + nixos/tests/moinmoin.nix | 24 ++ 4 files changed, 329 insertions(+) create mode 100644 nixos/modules/services/web-apps/moinmoin.nix create mode 100644 nixos/tests/moinmoin.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 5214126ff7e..652d7b4472d 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -804,6 +804,7 @@ ./services/web-apps/nexus.nix ./services/web-apps/pgpkeyserver-lite.nix ./services/web-apps/matomo.nix + ./services/web-apps/moinmoin.nix ./services/web-apps/restya-board.nix ./services/web-apps/tt-rss.nix ./services/web-apps/selfoss.nix diff --git a/nixos/modules/services/web-apps/moinmoin.nix b/nixos/modules/services/web-apps/moinmoin.nix new file mode 100644 index 00000000000..0fee64be0bb --- /dev/null +++ b/nixos/modules/services/web-apps/moinmoin.nix @@ -0,0 +1,303 @@ +{ config, lib, pkgs, ... }: +with lib; + +let + cfg = config.services.moinmoin; + python = pkgs.python27; + pkg = python.pkgs.moinmoin; + dataDir = "/var/lib/moin"; + usingGunicorn = cfg.webServer == "nginx-gunicorn" || cfg.webServer == "gunicorn"; + usingNginx = cfg.webServer == "nginx-gunicorn"; + user = "moin"; + group = "moin"; + + uLit = s: ''u"${s}"''; + indentLines = n: str: concatMapStrings (line: "${fixedWidthString n " " " "}${line}\n") (splitString "\n" str); + + moinCliWrapper = wikiIdent: pkgs.writeShellScriptBin "moin-${wikiIdent}" '' + ${pkgs.su}/bin/su -s ${pkgs.runtimeShell} -c "${pkg}/bin/moin --config-dir=/var/lib/moin/${wikiIdent}/config $*" ${user} + ''; + + wikiConfig = wikiIdent: w: '' + # -*- coding: utf-8 -*- + + from MoinMoin.config import multiconfig, url_prefix_static + + class Config(multiconfig.DefaultConfig): + ${optionalString (w.webLocation != "/") '' + url_prefix_static = '${w.webLocation}' + url_prefix_static + ''} + + sitename = u'${w.siteName}' + page_front_page = u'${w.frontPage}' + + data_dir = '${dataDir}/${wikiIdent}/data' + data_underlay_dir = '${dataDir}/${wikiIdent}/underlay' + + language_default = u'${w.languageDefault}' + ${optionalString (w.superUsers != []) '' + superuser = [${concatMapStringsSep ", " uLit w.superUsers}] + ''} + + ${indentLines 4 w.extraConfig} + ''; + wikiConfigFile = name: wiki: pkgs.writeText "${name}.py" (wikiConfig name wiki); + +in +{ + options.services.moinmoin = with types; { + enable = mkEnableOption "MoinMoin Wiki Engine"; + + webServer = mkOption { + type = enum [ "nginx-gunicorn" "gunicorn" "none" ]; + default = "nginx-gunicorn"; + example = "none"; + description = '' + Which web server to use to serve the wiki. + Use none if you want to configure this yourself. + ''; + }; + + gunicorn.workers = mkOption { + type = ints.positive; + default = 3; + example = 10; + description = '' + The number of worker processes for handling requests. + ''; + }; + + wikis = mkOption { + type = attrsOf (submodule ({ name, ... }: { + options = { + siteName = mkOption { + type = str; + default = "Untitled Wiki"; + example = "ExampleWiki"; + description = '' + Short description of your wiki site, displayed below the logo on each page, and + used in RSS documents as the channel title. + ''; + }; + + webHost = mkOption { + type = str; + description = "Host part of the wiki URL. If undefined, the name of the attribute set will be used."; + example = "wiki.example.org"; + }; + + webLocation = mkOption { + type = str; + default = "/"; + example = "/moin"; + description = "Location part of the wiki URL."; + }; + + frontPage = mkOption { + type = str; + default = "LanguageSetup"; + example = "FrontPage"; + description = '' + Front page name. Set this to something like FrontPage once languages are + configured. + ''; + }; + + superUsers = mkOption { + type = listOf str; + default = []; + example = [ "elvis" ]; + description = '' + List of trusted user names with wiki system administration super powers. + + Please note that accounts for these users need to be created using the moin command-line utility, e.g.: + moin-WIKINAME account create --name=NAME --email=EMAIL --password=PASSWORD. + ''; + }; + + languageDefault = mkOption { + type = str; + default = "en"; + example = "de"; + description = "The ISO-639-1 name of the main wiki language. Languages that MoinMoin does not support are ignored."; + }; + + extraConfig = mkOption { + type = lines; + default = ""; + example = '' + show_hosts = True + search_results_per_page = 100 + acl_rights_default = u"Known:read,write,delete,revert All:read" + logo_string = u"

\U0001f639

" + theme_default = u"modernized" + + user_checkbox_defaults = {'show_page_trail': 0, 'edit_on_doubleclick': 0} + navi_bar = [u'SomePage'] + multiconfig.DefaultConfig.navi_bar + actions_excluded = multiconfig.DefaultConfig.actions_excluded + ['newaccount'] + + mail_smarthost = "mail.example.org" + mail_from = u"Example.Org Wiki " + ''; + description = '' + Additional configuration to be appended verbatim to this wiki's config. + + See for documentation. + ''; + }; + + }; + config = { + webHost = mkDefault name; + }; + })); + example = literalExample '' + { + "mywiki" = { + siteName = "Example Wiki"; + webHost = "wiki.example.org"; + superUsers = [ "admin" ]; + frontPage = "Index"; + extraConfig = "page_category_regex = ur'(?P(Category|Kategorie)(?P(?!Template)\S+))'" + }; + } + ''; + description = '' + Configurations of the individual wikis. Attribute names must be valid Python + identifiers of the form [A-Za-z_][A-Za-z0-9_]*. + + For every attribute WIKINAME, a helper script + moin-WIKINAME is created which runs the + moin command under the moin user (to avoid + file ownership issues) and with the right configuration directory passed to it. + ''; + }; + }; + + config = mkIf cfg.enable { + assertions = forEach (attrNames cfg.wikis) (wname: + { assertion = builtins.match "[A-Za-z_][A-Za-z0-9_]*" wname != null; + message = "${wname} is not valid Python identifier"; + } + ); + + users.users = { + moin = { + description = "MoinMoin wiki"; + home = dataDir; + group = group; + isSystemUser = true; + }; + }; + + users.groups = { + moin = { + members = mkIf usingNginx [ config.services.nginx.user ]; + }; + }; + + environment.systemPackages = [ pkg ] ++ map moinCliWrapper (attrNames cfg.wikis); + + systemd.services = mkIf usingGunicorn + (flip mapAttrs' cfg.wikis (wikiIdent: wiki: + nameValuePair "moin-${wikiIdent}" + { + description = "MoinMoin wiki ${wikiIdent} - gunicorn process"; + wantedBy = [ "multi-user.target" ]; + after = [ "network.target" ]; + restartIfChanged = true; + restartTriggers = [ (wikiConfigFile wikiIdent wiki) ]; + + environment = let + penv = python.buildEnv.override { + # setuptools: https://github.com/benoitc/gunicorn/issues/1716 + extraLibs = [ python.pkgs.gevent python.pkgs.setuptools pkg ]; + }; + in { + PYTHONPATH = "${dataDir}/${wikiIdent}/config:${penv}/${python.sitePackages}"; + }; + + preStart = '' + umask 0007 + rm -rf ${dataDir}/${wikiIdent}/underlay + cp -r ${pkg}/share/moin/underlay ${dataDir}/${wikiIdent}/ + chmod -R u+w ${dataDir}/${wikiIdent}/underlay + ''; + + serviceConfig = { + User = user; + Group = group; + WorkingDirectory = "${dataDir}/${wikiIdent}"; + ExecStart = ''${python.pkgs.gunicorn}/bin/gunicorn moin_wsgi \ + --name gunicorn-${wikiIdent} \ + --workers ${toString cfg.gunicorn.workers} \ + --worker-class gevent \ + --bind unix:/run/moin/${wikiIdent}/gunicorn.sock + ''; + + Restart = "on-failure"; + RestartSec = "2s"; + StartLimitIntervalSec = "30s"; + + StateDirectory = "moin/${wikiIdent}"; + StateDirectoryMode = "0750"; + RuntimeDirectory = "moin/${wikiIdent}"; + RuntimeDirectoryMode = "0750"; + + NoNewPrivileges = true; + ProtectSystem = "strict"; + ProtectHome = true; + PrivateTmp = true; + PrivateDevices = true; + PrivateNetwork = true; + ProtectKernelTunables = true; + ProtectKernelModules = true; + ProtectControlGroups = true; + RestrictAddressFamilies = [ "AF_UNIX" "AF_INET" "AF_INET6" ]; + RestrictNamespaces = true; + LockPersonality = true; + MemoryDenyWriteExecute = true; + RestrictRealtime = true; + }; + } + )); + + services.nginx = mkIf usingNginx { + enable = true; + virtualHosts = flip mapAttrs' cfg.wikis (name: w: nameValuePair w.webHost { + forceSSL = mkDefault true; + enableACME = mkDefault true; + locations."${w.webLocation}" = { + extraConfig = '' + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Server $host; + + proxy_pass http://unix:/run/moin/${name}/gunicorn.sock; + ''; + }; + }); + }; + + systemd.tmpfiles.rules = [ + "d /run/moin 0750 ${user} ${group} - -" + "d ${dataDir} 0550 ${user} ${group} - -" + ] + ++ (concatLists (flip mapAttrsToList cfg.wikis (wikiIdent: wiki: [ + "d ${dataDir}/${wikiIdent} 0750 ${user} ${group} - -" + "d ${dataDir}/${wikiIdent}/config 0550 ${user} ${group} - -" + "L+ ${dataDir}/${wikiIdent}/config/wikiconfig.py - - - - ${wikiConfigFile wikiIdent wiki}" + # needed in order to pass module name to gunicorn + "L+ ${dataDir}/${wikiIdent}/config/moin_wsgi.py - - - - ${pkg}/share/moin/server/moin.wsgi" + # seed data files + "C ${dataDir}/${wikiIdent}/data 0770 ${user} ${group} - ${pkg}/share/moin/data" + # fix nix store permissions + "Z ${dataDir}/${wikiIdent}/data 0770 ${user} ${group} - -" + ]))); + }; + + meta.maintainers = with lib.maintainers; [ b42 ]; +} diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index e94c9712cbf..50a60049a18 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -166,6 +166,7 @@ in minio = handleTest ./minio.nix {}; minidlna = handleTest ./minidlna.nix {}; misc = handleTest ./misc.nix {}; + moinmoin = handleTest ./moinmoin.nix {}; mongodb = handleTest ./mongodb.nix {}; moodle = handleTest ./moodle.nix {}; morty = handleTest ./morty.nix {}; diff --git a/nixos/tests/moinmoin.nix b/nixos/tests/moinmoin.nix new file mode 100644 index 00000000000..2662b79aa09 --- /dev/null +++ b/nixos/tests/moinmoin.nix @@ -0,0 +1,24 @@ +import ./make-test.nix ({ pkgs, lib, ... }: { + name = "moinmoin"; + meta.maintainers = [ ]; # waiting for https://github.com/NixOS/nixpkgs/pull/65397 + + machine = + { ... }: + { services.moinmoin.enable = true; + services.moinmoin.wikis.ExampleWiki.superUsers = [ "admin" ]; + services.moinmoin.wikis.ExampleWiki.webHost = "localhost"; + + services.nginx.virtualHosts.localhost.enableACME = false; + services.nginx.virtualHosts.localhost.forceSSL = false; + }; + + testScript = '' + startAll; + + $machine->waitForUnit('moin-ExampleWiki.service'); + $machine->waitForUnit('nginx.service'); + $machine->waitForFile('/run/moin/ExampleWiki/gunicorn.sock'); + $machine->succeed('curl -L http://localhost/') =~ /If you have just installed/ or die; + $machine->succeed('moin-ExampleWiki account create --name=admin --email=admin@example.com --password=foo 2>&1') =~ /status success/ or die; + ''; +}) From 50e5139893f8a79e3555a8f66cbb7c21dc80500d Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Mon, 21 Oct 2019 21:09:56 -0400 Subject: [PATCH 022/377] redmine: drop 3.4.x package --- nixos/modules/services/misc/redmine.nix | 15 +- nixos/tests/redmine.nix | 13 +- .../version-management/redmine/4.x/Gemfile | 72 -- .../redmine/4.x/Gemfile.lock | 203 ------ .../redmine/4.x/default.nix | 44 -- .../version-management/redmine/4.x/gemset.nix | 614 ------------------ .../version-management/redmine/Gemfile | 43 +- .../version-management/redmine/Gemfile.lock | 222 ++++--- .../version-management/redmine/default.nix | 4 +- .../version-management/redmine/gemset.nix | 287 ++++---- pkgs/top-level/all-packages.nix | 3 +- 11 files changed, 278 insertions(+), 1242 deletions(-) delete mode 100644 pkgs/applications/version-management/redmine/4.x/Gemfile delete mode 100644 pkgs/applications/version-management/redmine/4.x/Gemfile.lock delete mode 100644 pkgs/applications/version-management/redmine/4.x/default.nix delete mode 100644 pkgs/applications/version-management/redmine/4.x/gemset.nix diff --git a/nixos/modules/services/misc/redmine.nix b/nixos/modules/services/misc/redmine.nix index 24b9e27ac2d..bf9a6914a48 100644 --- a/nixos/modules/services/misc/redmine.nix +++ b/nixos/modules/services/misc/redmine.nix @@ -62,20 +62,11 @@ in services.redmine = { enable = mkEnableOption "Redmine"; - # default to the 4.x series not forcing major version upgrade of those on the 3.x series package = mkOption { type = types.package; - default = if versionAtLeast config.system.stateVersion "19.03" - then pkgs.redmine_4 - else pkgs.redmine - ; - defaultText = "pkgs.redmine"; - description = '' - Which Redmine package to use. This defaults to version 3.x if - system.stateVersion < 19.03 and version 4.x - otherwise. - ''; - example = "pkgs.redmine_4.override { ruby = pkgs.ruby_2_4; }"; + default = pkgs.redmine; + description = "Which Redmine package to use."; + example = "pkgs.redmine.override { ruby = pkgs.ruby_2_4; }"; }; user = mkOption { diff --git a/nixos/tests/redmine.nix b/nixos/tests/redmine.nix index 2d4df288b05..f0f4cbf6a21 100644 --- a/nixos/tests/redmine.nix +++ b/nixos/tests/redmine.nix @@ -64,18 +64,13 @@ let }; in { - v3-mysql = mysqlTest pkgs.redmine // { - name = "v3-mysql"; + mysql = mysqlTest pkgs.redmine // { + name = "mysql"; meta.maintainers = [ maintainers.aanderse ]; }; - v4-mysql = mysqlTest pkgs.redmine_4 // { - name = "v4-mysql"; - meta.maintainers = [ maintainers.aanderse ]; - }; - - v4-pgsql = pgsqlTest pkgs.redmine_4 // { - name = "v4-pgsql"; + pgsql = pgsqlTest pkgs.redmine // { + name = "pgsql"; meta.maintainers = [ maintainers.aanderse ]; }; } diff --git a/pkgs/applications/version-management/redmine/4.x/Gemfile b/pkgs/applications/version-management/redmine/4.x/Gemfile deleted file mode 100644 index 343c7b3a547..00000000000 --- a/pkgs/applications/version-management/redmine/4.x/Gemfile +++ /dev/null @@ -1,72 +0,0 @@ -source 'https://rubygems.org' - -gem "bundler", ">= 1.5.0" - -gem "rails", "5.2.3" -gem "rouge", "~> 3.3.0" -gem "request_store", "1.0.5" -gem "mini_mime", "~> 1.0.1" -gem "actionpack-xml_parser" -gem "roadie-rails", "~> 1.3.0" -gem "mimemagic" -gem "mail", "~> 2.7.1" -gem "csv", "~> 3.0.1" if RUBY_VERSION >= "2.3" && RUBY_VERSION < "2.6" - -gem "nokogiri", (RUBY_VERSION >= "2.3" ? "~> 1.10.0" : "~> 1.9.1") -gem "i18n", "~> 0.7.0" -gem "xpath", "< 3.2.0" if RUBY_VERSION < "2.3" - -# Windows does not include zoneinfo files, so bundle the tzinfo-data gem -gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin] -gem "rbpdf", "~> 1.19.6" - -# Optional gem for LDAP authentication -group :ldap do - gem "net-ldap", "~> 0.16.0" -end - -# Optional gem for OpenID authentication -group :openid do - gem "ruby-openid", "~> 2.3.0", :require => "openid" - gem "rack-openid" -end - -platforms :mri, :mingw, :x64_mingw do - # Optional gem for exporting the gantt to a PNG file, not supported with jruby - group :rmagick do - gem "rmagick", "~> 2.16.0" - end - - # Optional Markdown support, not for JRuby - group :markdown do - gem "redcarpet", "~> 3.4.0" - end -end - -# Include database gems for the database adapters NixOS supports -gem "mysql2", "~> 0.5.0", :platforms => [:mri, :mingw, :x64_mingw] -gem "pg", "~> 1.1.4", :platforms => [:mri, :mingw, :x64_mingw] - -group :development do - gem "yard" -end - -group :test do - gem "rails-dom-testing" - gem "mocha" - gem "simplecov", "~> 0.14.1", :require => false - # For running system tests - gem 'puma', '~> 3.7' - gem "capybara", '~> 2.13' - gem "selenium-webdriver" -end - -local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local") -if File.exists?(local_gemfile) - eval_gemfile local_gemfile -end - -# Load plugins' Gemfiles -Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file| - eval_gemfile file -end diff --git a/pkgs/applications/version-management/redmine/4.x/Gemfile.lock b/pkgs/applications/version-management/redmine/4.x/Gemfile.lock deleted file mode 100644 index 671d2bb4ac1..00000000000 --- a/pkgs/applications/version-management/redmine/4.x/Gemfile.lock +++ /dev/null @@ -1,203 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - actioncable (5.2.3) - actionpack (= 5.2.3) - nio4r (~> 2.0) - websocket-driver (>= 0.6.1) - actionmailer (5.2.3) - actionpack (= 5.2.3) - actionview (= 5.2.3) - activejob (= 5.2.3) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 2.0) - actionpack (5.2.3) - actionview (= 5.2.3) - activesupport (= 5.2.3) - rack (~> 2.0) - rack-test (>= 0.6.3) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionpack-xml_parser (2.0.1) - actionpack (>= 5.0) - railties (>= 5.0) - actionview (5.2.3) - activesupport (= 5.2.3) - builder (~> 3.1) - erubi (~> 1.4) - rails-dom-testing (~> 2.0) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.2.3) - activesupport (= 5.2.3) - globalid (>= 0.3.6) - activemodel (5.2.3) - activesupport (= 5.2.3) - activerecord (5.2.3) - activemodel (= 5.2.3) - activesupport (= 5.2.3) - arel (>= 9.0) - activestorage (5.2.3) - actionpack (= 5.2.3) - activerecord (= 5.2.3) - marcel (~> 0.3.1) - activesupport (5.2.3) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - addressable (2.6.0) - public_suffix (>= 2.0.2, < 4.0) - arel (9.0.0) - builder (3.2.3) - capybara (2.18.0) - addressable - mini_mime (>= 0.1.3) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - xpath (>= 2.0, < 4.0) - childprocess (1.0.1) - rake (< 13.0) - concurrent-ruby (1.1.5) - crass (1.0.4) - css_parser (1.7.0) - addressable - csv (3.0.9) - docile (1.1.5) - erubi (1.8.0) - globalid (0.4.2) - activesupport (>= 4.2.0) - htmlentities (4.3.4) - i18n (0.7.0) - json (2.2.0) - loofah (2.2.3) - crass (~> 1.0.2) - nokogiri (>= 1.5.9) - mail (2.7.1) - mini_mime (>= 0.1.1) - marcel (0.3.3) - mimemagic (~> 0.3.2) - metaclass (0.0.4) - method_source (0.9.2) - mimemagic (0.3.3) - mini_mime (1.0.1) - mini_portile2 (2.4.0) - minitest (5.11.3) - mocha (1.8.0) - metaclass (~> 0.0.1) - mysql2 (0.5.2) - net-ldap (0.16.1) - nio4r (2.3.1) - nokogiri (1.10.3) - mini_portile2 (~> 2.4.0) - pg (1.1.4) - public_suffix (3.1.0) - puma (3.12.1) - rack (2.0.7) - rack-openid (1.4.2) - rack (>= 1.1.0) - ruby-openid (>= 2.1.8) - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails (5.2.3) - actioncable (= 5.2.3) - actionmailer (= 5.2.3) - actionpack (= 5.2.3) - actionview (= 5.2.3) - activejob (= 5.2.3) - activemodel (= 5.2.3) - activerecord (= 5.2.3) - activestorage (= 5.2.3) - activesupport (= 5.2.3) - bundler (>= 1.3.0) - railties (= 5.2.3) - sprockets-rails (>= 2.0.0) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) - nokogiri (>= 1.6) - rails-html-sanitizer (1.0.4) - loofah (~> 2.2, >= 2.2.2) - railties (5.2.3) - actionpack (= 5.2.3) - activesupport (= 5.2.3) - method_source - rake (>= 0.8.7) - thor (>= 0.19.0, < 2.0) - rake (12.3.2) - rbpdf (1.19.8) - htmlentities - rbpdf-font (~> 1.19.0) - rbpdf-font (1.19.1) - redcarpet (3.4.0) - request_store (1.0.5) - rmagick (2.16.0) - roadie (3.5.0) - css_parser (~> 1.4) - nokogiri (~> 1.8) - roadie-rails (1.3.0) - railties (>= 3.0, < 5.3) - roadie (~> 3.1) - rouge (3.3.0) - ruby-openid (2.3.0) - rubyzip (1.2.3) - selenium-webdriver (3.142.3) - childprocess (>= 0.5, < 2.0) - rubyzip (~> 1.2, >= 1.2.2) - simplecov (0.14.1) - docile (~> 1.1.0) - json (>= 1.8, < 3) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.2) - sprockets (3.7.2) - concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (3.2.1) - actionpack (>= 4.0) - activesupport (>= 4.0) - sprockets (>= 3.0.0) - thor (0.20.3) - thread_safe (0.3.6) - tzinfo (1.2.5) - thread_safe (~> 0.1) - websocket-driver (0.7.1) - websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.4) - xpath (3.2.0) - nokogiri (~> 1.8) - yard (0.9.19) - -PLATFORMS - ruby - -DEPENDENCIES - actionpack-xml_parser - bundler (>= 1.5.0) - capybara (~> 2.13) - csv (~> 3.0.1) - i18n (~> 0.7.0) - mail (~> 2.7.1) - mimemagic - mini_mime (~> 1.0.1) - mocha - mysql2 (~> 0.5.0) - net-ldap (~> 0.16.0) - nokogiri (~> 1.10.0) - pg (~> 1.1.4) - puma (~> 3.7) - rack-openid - rails (= 5.2.3) - rails-dom-testing - rbpdf (~> 1.19.6) - redcarpet (~> 3.4.0) - request_store (= 1.0.5) - rmagick (~> 2.16.0) - roadie-rails (~> 1.3.0) - rouge (~> 3.3.0) - ruby-openid (~> 2.3.0) - selenium-webdriver - simplecov (~> 0.14.1) - tzinfo-data - yard - -BUNDLED WITH - 1.16.3 diff --git a/pkgs/applications/version-management/redmine/4.x/default.nix b/pkgs/applications/version-management/redmine/4.x/default.nix deleted file mode 100644 index a3ba418a146..00000000000 --- a/pkgs/applications/version-management/redmine/4.x/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ stdenv, fetchurl, bundlerEnv, ruby }: - -let - version = "4.0.4"; - rubyEnv = bundlerEnv { - name = "redmine-env-${version}"; - - inherit ruby; - gemdir = ./.; - groups = [ "ldap" "openid" ]; - }; -in - stdenv.mkDerivation rec { - pname = "redmine"; - inherit version; - - src = fetchurl { - url = "https://www.redmine.org/releases/${pname}-${version}.tar.gz"; - sha256 = "0i5bmgdi3mahbis9hn0hk53rnz4ihp9yij4b4i07ny9vf3n4kp1a"; - }; - - buildInputs = [ rubyEnv rubyEnv.wrappedRuby rubyEnv.bundler ]; - - buildPhase = '' - mv config config.dist - mv public/themes public/themes.dist - ''; - - installPhase = '' - mkdir -p $out/share - cp -r . $out/share/redmine - for i in config files log plugins public/plugin_assets public/themes tmp; do - rm -rf $out/share/redmine/$i - ln -fs /run/redmine/$i $out/share/redmine/$i - done - ''; - - meta = with stdenv.lib; { - homepage = http://www.redmine.org/; - platforms = platforms.linux; - maintainers = [ maintainers.aanderse ]; - license = licenses.gpl2; - }; - } diff --git a/pkgs/applications/version-management/redmine/4.x/gemset.nix b/pkgs/applications/version-management/redmine/4.x/gemset.nix deleted file mode 100644 index 34e459111f8..00000000000 --- a/pkgs/applications/version-management/redmine/4.x/gemset.nix +++ /dev/null @@ -1,614 +0,0 @@ -{ - actioncable = { - dependencies = ["actionpack" "nio4r" "websocket-driver"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "04wd9rf8sglrqc8jz49apqcxbi51gdj7l1apf5qr4i86iddk6pkm"; - type = "gem"; - }; - version = "5.2.3"; - }; - actionmailer = { - dependencies = ["actionpack" "actionview" "activejob" "mail" "rails-dom-testing"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "15laym06zcm2021qdhlyr6y9jn1marw436i89hcxqg14a8zvyvwa"; - type = "gem"; - }; - version = "5.2.3"; - }; - actionpack = { - dependencies = ["actionview" "activesupport" "rack" "rack-test" "rails-dom-testing" "rails-html-sanitizer"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1s2iay17i2k0xx36cmnpbrmr5w6x70jk7fq1d8w70xcdw5chm0w1"; - type = "gem"; - }; - version = "5.2.3"; - }; - actionpack-xml_parser = { - dependencies = ["actionpack" "railties"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1rnm6jrw3mzcf2g3q498igmhsn0kfkxq79w0nm532iclx4g4djs0"; - type = "gem"; - }; - version = "2.0.1"; - }; - actionview = { - dependencies = ["activesupport" "builder" "erubi" "rails-dom-testing" "rails-html-sanitizer"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1v49rgf8305grqf6gq7qa47qhamr369igyy0giycz60x86afyr4h"; - type = "gem"; - }; - version = "5.2.3"; - }; - activejob = { - dependencies = ["activesupport" "globalid"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "17vizibxbsli5yppgrvmw13wj7a9xy19s5nqxf1k23bbk2s5b87s"; - type = "gem"; - }; - version = "5.2.3"; - }; - activemodel = { - dependencies = ["activesupport"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0mghh9di8011ara9h1r5a216yzk1vjm9r3p0gdvdi8j1zmkl6k6h"; - type = "gem"; - }; - version = "5.2.3"; - }; - activerecord = { - dependencies = ["activemodel" "activesupport" "arel"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0d6036f592803iyvp6bw98p3sg638mia5dbw19lvachx6jgzfvpw"; - type = "gem"; - }; - version = "5.2.3"; - }; - activestorage = { - dependencies = ["actionpack" "activerecord" "marcel"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "04is6ipjqw1f337i8pm8w5bd99rpygqfd0fzzxkr7jd308ggmsjk"; - type = "gem"; - }; - version = "5.2.3"; - }; - activesupport = { - dependencies = ["concurrent-ruby" "i18n" "minitest" "tzinfo"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "110vp4frgkw3mpzlmshg2f2ig09cknls2w68ym1r1s39d01v0mi8"; - type = "gem"; - }; - version = "5.2.3"; - }; - addressable = { - dependencies = ["public_suffix"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0bcm2hchn897xjhqj9zzsxf3n9xhddymj4lsclz508f4vw3av46l"; - type = "gem"; - }; - version = "2.6.0"; - }; - arel = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1jk7wlmkr61f6g36w9s2sn46nmdg6wn2jfssrhbhirv5x9n95nk0"; - type = "gem"; - }; - version = "9.0.0"; - }; - builder = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0qibi5s67lpdv1wgcj66wcymcr04q6j4mzws6a479n0mlrmh5wr1"; - type = "gem"; - }; - version = "3.2.3"; - }; - capybara = { - dependencies = ["addressable" "mini_mime" "nokogiri" "rack" "rack-test" "xpath"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0yv77rnsjlvs8qpfn9n5vf1h6b9agxwhxw09gssbiw9zn9j20jh8"; - type = "gem"; - }; - version = "2.18.0"; - }; - childprocess = { - dependencies = ["rake"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1d2gasf988jh2k3fjb7i54c68rq6ni6jf9w0gnsfhrq94a6mprkz"; - type = "gem"; - }; - version = "1.0.1"; - }; - concurrent-ruby = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1x07r23s7836cpp5z9yrlbpljcxpax14yw4fy4bnp6crhr6x24an"; - type = "gem"; - }; - version = "1.1.5"; - }; - crass = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0bpxzy6gjw9ggjynlxschbfsgmx8lv3zw1azkjvnb8b9i895dqfi"; - type = "gem"; - }; - version = "1.0.4"; - }; - css_parser = { - dependencies = ["addressable"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1y4vc018b5mzp7winw4pbb22jk0dpxp22pzzxq7w0rgvfxzi89pd"; - type = "gem"; - }; - version = "1.7.0"; - }; - csv = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "097rl10ivzlya5640530ayls2f1vid2mfgjy9ngd789qmp0j6x4b"; - type = "gem"; - }; - version = "3.0.9"; - }; - docile = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0m8j31whq7bm5ljgmsrlfkiqvacrw6iz9wq10r3gwrv5785y8gjx"; - type = "gem"; - }; - version = "1.1.5"; - }; - erubi = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1kagnf6ziahj0d781s6ryy6fwqwa3ad4xbzzj84p9m4nv4c2jir1"; - type = "gem"; - }; - version = "1.8.0"; - }; - globalid = { - dependencies = ["activesupport"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1zkxndvck72bfw235bd9nl2ii0lvs5z88q14706cmn702ww2mxv1"; - type = "gem"; - }; - version = "0.4.2"; - }; - htmlentities = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1nkklqsn8ir8wizzlakncfv42i32wc0w9hxp00hvdlgjr7376nhj"; - type = "gem"; - }; - version = "4.3.4"; - }; - i18n = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1i5z1ykl8zhszsxcs8mzl8d0dxgs3ylz8qlzrw74jb0gplkx6758"; - type = "gem"; - }; - version = "0.7.0"; - }; - json = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0sx97bm9by389rbzv8r1f43h06xcz8vwi3h5jv074gvparql7lcx"; - type = "gem"; - }; - version = "2.2.0"; - }; - loofah = { - dependencies = ["crass" "nokogiri"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1ccsid33xjajd0im2xv941aywi58z7ihwkvaf1w2bv89vn5bhsjg"; - type = "gem"; - }; - version = "2.2.3"; - }; - mail = { - dependencies = ["mini_mime"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "00wwz6ys0502dpk8xprwcqfwyf3hmnx6lgxaiq6vj43mkx43sapc"; - type = "gem"; - }; - version = "2.7.1"; - }; - marcel = { - dependencies = ["mimemagic"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1nxbjmcyg8vlw6zwagf17l9y2mwkagmmkg95xybpn4bmf3rfnksx"; - type = "gem"; - }; - version = "0.3.3"; - }; - metaclass = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0hp99y2b1nh0nr8pc398n3f8lakgci6pkrg4bf2b2211j1f6hsc5"; - type = "gem"; - }; - version = "0.0.4"; - }; - method_source = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1pviwzvdqd90gn6y7illcdd9adapw8fczml933p5vl739dkvl3lq"; - type = "gem"; - }; - version = "0.9.2"; - }; - mimemagic = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "04cp5sfbh1qx82yqxn0q75c7hlcx8y1dr5g3kyzwm4mx6wi2gifw"; - type = "gem"; - }; - version = "0.3.3"; - }; - mini_mime = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1q4pshq387lzv9m39jv32vwb8wrq3wc4jwgl4jk209r4l33v09d3"; - type = "gem"; - }; - version = "1.0.1"; - }; - mini_portile2 = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy"; - type = "gem"; - }; - version = "2.4.0"; - }; - minitest = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0icglrhghgwdlnzzp4jf76b0mbc71s80njn5afyfjn4wqji8mqbq"; - type = "gem"; - }; - version = "5.11.3"; - }; - mocha = { - dependencies = ["metaclass"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "12aglpiq1h18j5a4rlwvnsvnsi2f3407v5xm59lgcg3ymlyak4al"; - type = "gem"; - }; - version = "1.8.0"; - }; - mysql2 = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1a2kdjgzwh1p2rkcmxaawy6ibi32b04wbdd5d4wr8i342pq76di4"; - type = "gem"; - }; - version = "0.5.2"; - }; - net-ldap = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "016igqz81a8zcwqzp5bbhryqmb2skmyf57ij3nb5z8sxwhw22jgh"; - type = "gem"; - }; - version = "0.16.1"; - }; - nio4r = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1a41ca1kpdmrypjp9xbgvckpy8g26zxphkja9vk7j5wl4n8yvlyr"; - type = "gem"; - }; - version = "2.3.1"; - }; - nokogiri = { - dependencies = ["mini_portile2"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "02bjydih0j515szfv9mls195cvpyidh6ixm7dwbl3s2sbaxxk5s4"; - type = "gem"; - }; - version = "1.10.3"; - }; - pg = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0fmnyxcyrvgdbgq7m09whgn9i8rwfybk0w8aii1nc4g5kqw0k2jy"; - type = "gem"; - }; - version = "1.1.4"; - }; - public_suffix = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1c7c5xxkx91hwj4572hbnyvxmydb90q69wlpr2l0dxrmwx2p365l"; - type = "gem"; - }; - version = "3.1.0"; - }; - puma = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1pkrbvak6rlf147qpd4zss031qrwwh53g8s6017037iwg0436kv3"; - type = "gem"; - }; - version = "3.12.1"; - }; - rack = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0z90vflxbgjy2n84r7mbyax3i2vyvvrxxrf86ljzn5rw65jgnn2i"; - type = "gem"; - }; - version = "2.0.7"; - }; - rack-openid = { - dependencies = ["rack" "ruby-openid"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0sg85yn981j3a0iri3ch4znzdwscvz29l7vrk3dafqw4fdg31llc"; - type = "gem"; - }; - version = "1.4.2"; - }; - rack-test = { - dependencies = ["rack"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0rh8h376mx71ci5yklnpqqn118z3bl67nnv5k801qaqn1zs62h8m"; - type = "gem"; - }; - version = "1.1.0"; - }; - rails = { - dependencies = ["actioncable" "actionmailer" "actionpack" "actionview" "activejob" "activemodel" "activerecord" "activestorage" "activesupport" "railties" "sprockets-rails"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1p7cszi3n9ksxchxnccmz61pd1i3rjg4813dsdinsm8xm5k1pdgr"; - type = "gem"; - }; - version = "5.2.3"; - }; - rails-dom-testing = { - dependencies = ["activesupport" "nokogiri"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1lfq2a7kp2x64dzzi5p4cjcbiv62vxh9lyqk2f0rqq3fkzrw8h5i"; - type = "gem"; - }; - version = "2.0.3"; - }; - rails-html-sanitizer = { - dependencies = ["loofah"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1gv7vr5d9g2xmgpjfq4nxsqr70r9pr042r9ycqqnfvw5cz9c7jwr"; - type = "gem"; - }; - version = "1.0.4"; - }; - railties = { - dependencies = ["actionpack" "activesupport" "method_source" "rake" "thor"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1gn9fwb5wm08fbj7zpilqgblfl315l5b7pg4jsvxlizvrzg8h8q4"; - type = "gem"; - }; - version = "5.2.3"; - }; - rake = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1sy5a7nh6xjdc9yhcw31jji7ssrf9v5806hn95gbrzr998a2ydjn"; - type = "gem"; - }; - version = "12.3.2"; - }; - rbpdf = { - dependencies = ["htmlentities" "rbpdf-font"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0fnhcn4z2zz6ic1yvl5hmhwmkdnybh8f8fnk1ni7bvl2s4ig5195"; - type = "gem"; - }; - version = "1.19.8"; - }; - rbpdf-font = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0pxlr0l4vf785qpy55m439dyii63a26l0sd0yyhbwwcy9zm9hd1v"; - type = "gem"; - }; - version = "1.19.1"; - }; - redcarpet = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0h9qz2hik4s9knpmbwrzb3jcp3vc5vygp9ya8lcpl7f1l9khmcd7"; - type = "gem"; - }; - version = "3.4.0"; - }; - request_store = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1ky19wb6mpq6dxb81a0h4hnzx7a4ka99n9ay2syi68djbr4bkbbh"; - type = "gem"; - }; - version = "1.0.5"; - }; - rmagick = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0m9x15cdlkcb9826s3s2jd97hxf50hln22p94x8hcccxi1lwklq6"; - type = "gem"; - }; - version = "2.16.0"; - }; - roadie = { - dependencies = ["css_parser" "nokogiri"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0b2qgr725hnscz3ldb607gwgjkr47ncs1jjnk6zh0h70p5dxrk2d"; - type = "gem"; - }; - version = "3.5.0"; - }; - roadie-rails = { - dependencies = ["railties" "roadie"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "02km0ama85mkw7kkn6qif86b781pglfdmqrwx5s6hwjlzk16qih3"; - type = "gem"; - }; - version = "1.3.0"; - }; - rouge = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1digsi2s8wyzx8vsqcxasw205lg6s7izx8jypl8rrpjwshmv83ql"; - type = "gem"; - }; - version = "3.3.0"; - }; - ruby-openid = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0yzaf2c1i88757554wk38rxqmj0xzgmwk2zx7gi98w2zx42d17pn"; - type = "gem"; - }; - version = "2.3.0"; - }; - rubyzip = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1w9gw28ly3zyqydnm8phxchf4ymyjl2r7zf7c12z8kla10cpmhlc"; - type = "gem"; - }; - version = "1.2.3"; - }; - selenium-webdriver = { - dependencies = ["childprocess" "rubyzip"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0i0jr4qrcvg5isc11ivjw7f9gywbimnz613k82bfcrnlzdf90mxy"; - type = "gem"; - }; - version = "3.142.3"; - }; - simplecov = { - dependencies = ["docile" "json" "simplecov-html"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1r9fnsnsqj432cmrpafryn8nif3x0qg9mdnvrcf0wr01prkdlnww"; - type = "gem"; - }; - version = "0.14.1"; - }; - simplecov-html = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1lihraa4rgxk8wbfl77fy9sf0ypk31iivly8vl3w04srd7i0clzn"; - type = "gem"; - }; - version = "0.10.2"; - }; - sprockets = { - dependencies = ["concurrent-ruby" "rack"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "182jw5a0fbqah5w9jancvfmjbk88h8bxdbwnl4d3q809rpxdg8ay"; - type = "gem"; - }; - version = "3.7.2"; - }; - sprockets-rails = { - dependencies = ["actionpack" "activesupport" "sprockets"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0ab42pm8p5zxpv3sfraq45b9lj39cz9mrpdirm30vywzrwwkm5p1"; - type = "gem"; - }; - version = "3.2.1"; - }; - thor = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1yhrnp9x8qcy5vc7g438amd5j9sw83ih7c30dr6g6slgw9zj3g29"; - type = "gem"; - }; - version = "0.20.3"; - }; - thread_safe = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0nmhcgq6cgz44srylra07bmaw99f5271l0dpsvl5f75m44l0gmwy"; - type = "gem"; - }; - version = "0.3.6"; - }; - tzinfo = { - dependencies = ["thread_safe"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1fjx9j327xpkkdlxwmkl3a8wqj7i4l4jwlrv3z13mg95z9wl253z"; - type = "gem"; - }; - version = "1.2.5"; - }; - websocket-driver = { - dependencies = ["websocket-extensions"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1bxamwqldmy98hxs5pqby3andws14hl36ch78g0s81gaz9b91nj2"; - type = "gem"; - }; - version = "0.7.1"; - }; - websocket-extensions = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "00i624ng1nvkz1yckj3f8yxxp6hi7xaqf40qh9q3hj2n1l9i8g6m"; - type = "gem"; - }; - version = "0.1.4"; - }; - xpath = { - dependencies = ["nokogiri"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0bh8lk9hvlpn7vmi6h4hkcwjzvs2y0cmkk3yjjdr8fxvj6fsgzbd"; - type = "gem"; - }; - version = "3.2.0"; - }; - yard = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1w0i13a0vsw4jmlj59xn64rdsqcsl9r3rmjjgdca5i51m1q4ix6v"; - type = "gem"; - }; - version = "0.9.19"; - }; -} \ No newline at end of file diff --git a/pkgs/applications/version-management/redmine/Gemfile b/pkgs/applications/version-management/redmine/Gemfile index 5a0283e20ed..343c7b3a547 100644 --- a/pkgs/applications/version-management/redmine/Gemfile +++ b/pkgs/applications/version-management/redmine/Gemfile @@ -1,38 +1,28 @@ source 'https://rubygems.org' -gem "bundler", ">= 1.5.0", "< 2.0.0" +gem "bundler", ">= 1.5.0" -gem "rails", "4.2.11.1" -gem "addressable", "2.4.0" if RUBY_VERSION < "2.0" -if RUBY_VERSION < "2.1" - gem "public_suffix", (RUBY_VERSION < "2.0" ? "~> 1.4" : "~> 2.0.5") -end -gem "jquery-rails", "~> 3.1.4" -gem "coderay", "~> 1.1.1" +gem "rails", "5.2.3" +gem "rouge", "~> 3.3.0" gem "request_store", "1.0.5" -gem "mime-types", (RUBY_VERSION >= "2.0" ? "~> 3.0" : "~> 2.99") -gem "protected_attributes" +gem "mini_mime", "~> 1.0.1" gem "actionpack-xml_parser" -gem "roadie-rails", "~> 1.1.1" -gem "roadie", "~> 3.2.1" +gem "roadie-rails", "~> 1.3.0" gem "mimemagic" -gem "mail", "~> 2.6.4" +gem "mail", "~> 2.7.1" +gem "csv", "~> 3.0.1" if RUBY_VERSION >= "2.3" && RUBY_VERSION < "2.6" -gem "nokogiri", (RUBY_VERSION >= "2.1" ? "~> 1.8.1" : "~> 1.6.8") +gem "nokogiri", (RUBY_VERSION >= "2.3" ? "~> 1.10.0" : "~> 1.9.1") gem "i18n", "~> 0.7.0" -gem "ffi", "1.9.14", :platforms => :mingw if RUBY_VERSION < "2.0" gem "xpath", "< 3.2.0" if RUBY_VERSION < "2.3" -# Request at least rails-html-sanitizer 1.0.3 because of security advisories -gem "rails-html-sanitizer", ">= 1.0.3" - # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin] gem "rbpdf", "~> 1.19.6" # Optional gem for LDAP authentication group :ldap do - gem "net-ldap", "~> 0.12.0" + gem "net-ldap", "~> 0.16.0" end # Optional gem for OpenID authentication @@ -54,24 +44,21 @@ platforms :mri, :mingw, :x64_mingw do end # Include database gems for the database adapters NixOS supports -gem "mysql2", "~> 0.4.6", :platforms => [:mri, :mingw, :x64_mingw] -gem "pg", "~> 0.18.1", :platforms => [:mri, :mingw, :x64_mingw] +gem "mysql2", "~> 0.5.0", :platforms => [:mri, :mingw, :x64_mingw] +gem "pg", "~> 1.1.4", :platforms => [:mri, :mingw, :x64_mingw] group :development do - gem "rdoc", "~> 4.3" gem "yard" end group :test do - gem "minitest" gem "rails-dom-testing" gem "mocha" - gem "simplecov", "~> 0.9.1", :require => false - # TODO: remove this after upgrading to Rails 5 - gem "test_after_commit", "~> 0.4.2" - # For running UI tests + gem "simplecov", "~> 0.14.1", :require => false + # For running system tests + gem 'puma', '~> 3.7' gem "capybara", '~> 2.13' - gem "selenium-webdriver", "~> 2.53.4" + gem "selenium-webdriver" end local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local") diff --git a/pkgs/applications/version-management/redmine/Gemfile.lock b/pkgs/applications/version-management/redmine/Gemfile.lock index 21296d343b4..671d2bb4ac1 100644 --- a/pkgs/applications/version-management/redmine/Gemfile.lock +++ b/pkgs/applications/version-management/redmine/Gemfile.lock @@ -1,45 +1,53 @@ GEM remote: https://rubygems.org/ specs: - actionmailer (4.2.11.1) - actionpack (= 4.2.11.1) - actionview (= 4.2.11.1) - activejob (= 4.2.11.1) + actioncable (5.2.3) + actionpack (= 5.2.3) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailer (5.2.3) + actionpack (= 5.2.3) + actionview (= 5.2.3) + activejob (= 5.2.3) mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.11.1) - actionview (= 4.2.11.1) - activesupport (= 4.2.11.1) - rack (~> 1.6) - rack-test (~> 0.6.2) - rails-dom-testing (~> 1.0, >= 1.0.5) + rails-dom-testing (~> 2.0) + actionpack (5.2.3) + actionview (= 5.2.3) + activesupport (= 5.2.3) + rack (~> 2.0) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionpack-xml_parser (1.0.2) - actionpack (>= 4.0.0, < 5) - actionview (4.2.11.1) - activesupport (= 4.2.11.1) + actionpack-xml_parser (2.0.1) + actionpack (>= 5.0) + railties (>= 5.0) + actionview (5.2.3) + activesupport (= 5.2.3) builder (~> 3.1) - erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (4.2.11.1) - activesupport (= 4.2.11.1) - globalid (>= 0.3.0) - activemodel (4.2.11.1) - activesupport (= 4.2.11.1) - builder (~> 3.1) - activerecord (4.2.11.1) - activemodel (= 4.2.11.1) - activesupport (= 4.2.11.1) - arel (~> 6.0) - activesupport (4.2.11.1) - i18n (~> 0.7) + activejob (5.2.3) + activesupport (= 5.2.3) + globalid (>= 0.3.6) + activemodel (5.2.3) + activesupport (= 5.2.3) + activerecord (5.2.3) + activemodel (= 5.2.3) + activesupport (= 5.2.3) + arel (>= 9.0) + activestorage (5.2.3) + actionpack (= 5.2.3) + activerecord (= 5.2.3) + marcel (~> 0.3.1) + activesupport (5.2.3) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) addressable (2.6.0) public_suffix (>= 2.0.2, < 4.0) - arel (6.0.4) + arel (9.0.0) builder (3.2.3) capybara (2.18.0) addressable @@ -48,103 +56,98 @@ GEM rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (>= 2.0, < 4.0) - childprocess (0.9.0) - ffi (~> 1.0, >= 1.0.11) - coderay (1.1.2) + childprocess (1.0.1) + rake (< 13.0) concurrent-ruby (1.1.5) crass (1.0.4) css_parser (1.7.0) addressable + csv (3.0.9) docile (1.1.5) - erubis (2.7.0) - ffi (1.11.1) + erubi (1.8.0) globalid (0.4.2) activesupport (>= 4.2.0) htmlentities (4.3.4) i18n (0.7.0) - jquery-rails (3.1.5) - railties (>= 3.0, < 5.0) - thor (>= 0.14, < 2.0) + json (2.2.0) loofah (2.2.3) crass (~> 1.0.2) nokogiri (>= 1.5.9) - mail (2.6.6) - mime-types (>= 1.16, < 4) + mail (2.7.1) + mini_mime (>= 0.1.1) + marcel (0.3.3) + mimemagic (~> 0.3.2) metaclass (0.0.4) - mime-types (3.2.2) - mime-types-data (~> 3.2015) - mime-types-data (3.2019.0331) + method_source (0.9.2) mimemagic (0.3.3) mini_mime (1.0.1) - mini_portile2 (2.3.0) + mini_portile2 (2.4.0) minitest (5.11.3) mocha (1.8.0) metaclass (~> 0.0.1) - multi_json (1.13.1) - mysql2 (0.4.10) - net-ldap (0.12.1) - nokogiri (1.8.5) - mini_portile2 (~> 2.3.0) - pg (0.18.4) - protected_attributes (1.1.4) - activemodel (>= 4.0.1, < 5.0) + mysql2 (0.5.2) + net-ldap (0.16.1) + nio4r (2.3.1) + nokogiri (1.10.3) + mini_portile2 (~> 2.4.0) + pg (1.1.4) public_suffix (3.1.0) - rack (1.6.11) + puma (3.12.1) + rack (2.0.7) rack-openid (1.4.2) rack (>= 1.1.0) ruby-openid (>= 2.1.8) - rack-test (0.6.3) - rack (>= 1.0) - rails (4.2.11.1) - actionmailer (= 4.2.11.1) - actionpack (= 4.2.11.1) - actionview (= 4.2.11.1) - activejob (= 4.2.11.1) - activemodel (= 4.2.11.1) - activerecord (= 4.2.11.1) - activesupport (= 4.2.11.1) - bundler (>= 1.3.0, < 2.0) - railties (= 4.2.11.1) - sprockets-rails - rails-deprecated_sanitizer (1.0.3) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.9) - activesupport (>= 4.2.0, < 5.0) - nokogiri (~> 1.6) - rails-deprecated_sanitizer (>= 1.0.1) + rack-test (1.1.0) + rack (>= 1.0, < 3) + rails (5.2.3) + actioncable (= 5.2.3) + actionmailer (= 5.2.3) + actionpack (= 5.2.3) + actionview (= 5.2.3) + activejob (= 5.2.3) + activemodel (= 5.2.3) + activerecord (= 5.2.3) + activestorage (= 5.2.3) + activesupport (= 5.2.3) + bundler (>= 1.3.0) + railties (= 5.2.3) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) rails-html-sanitizer (1.0.4) loofah (~> 2.2, >= 2.2.2) - railties (4.2.11.1) - actionpack (= 4.2.11.1) - activesupport (= 4.2.11.1) + railties (5.2.3) + actionpack (= 5.2.3) + activesupport (= 5.2.3) + method_source rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) + thor (>= 0.19.0, < 2.0) rake (12.3.2) rbpdf (1.19.8) htmlentities rbpdf-font (~> 1.19.0) rbpdf-font (1.19.1) - rdoc (4.3.0) redcarpet (3.4.0) request_store (1.0.5) rmagick (2.16.0) - roadie (3.2.2) + roadie (3.5.0) css_parser (~> 1.4) - nokogiri (~> 1.5) - roadie-rails (1.1.1) - railties (>= 3.0, < 5.1) + nokogiri (~> 1.8) + roadie-rails (1.3.0) + railties (>= 3.0, < 5.3) roadie (~> 3.1) + rouge (3.3.0) ruby-openid (2.3.0) rubyzip (1.2.3) - selenium-webdriver (2.53.4) - childprocess (~> 0.5) - rubyzip (~> 1.0) - websocket (~> 1.0) - simplecov (0.9.2) + selenium-webdriver (3.142.3) + childprocess (>= 0.5, < 2.0) + rubyzip (~> 1.2, >= 1.2.2) + simplecov (0.14.1) docile (~> 1.1.0) - multi_json (~> 1.0) - simplecov-html (~> 0.9.0) - simplecov-html (0.9.0) + json (>= 1.8, < 3) + simplecov-html (~> 0.10.0) + simplecov-html (0.10.2) sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) @@ -152,13 +155,13 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - test_after_commit (0.4.2) - activerecord (>= 3.2) thor (0.20.3) thread_safe (0.3.6) tzinfo (1.2.5) thread_safe (~> 0.1) - websocket (1.2.8) + websocket-driver (0.7.1) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.4) xpath (3.2.0) nokogiri (~> 1.8) yard (0.9.19) @@ -168,36 +171,31 @@ PLATFORMS DEPENDENCIES actionpack-xml_parser - bundler (>= 1.5.0, < 2.0.0) + bundler (>= 1.5.0) capybara (~> 2.13) - coderay (~> 1.1.1) + csv (~> 3.0.1) i18n (~> 0.7.0) - jquery-rails (~> 3.1.4) - mail (~> 2.6.4) - mime-types (~> 3.0) + mail (~> 2.7.1) mimemagic - minitest + mini_mime (~> 1.0.1) mocha - mysql2 (~> 0.4.6) - net-ldap (~> 0.12.0) - nokogiri (~> 1.8.1) - pg (~> 0.18.1) - protected_attributes + mysql2 (~> 0.5.0) + net-ldap (~> 0.16.0) + nokogiri (~> 1.10.0) + pg (~> 1.1.4) + puma (~> 3.7) rack-openid - rails (= 4.2.11.1) + rails (= 5.2.3) rails-dom-testing - rails-html-sanitizer (>= 1.0.3) rbpdf (~> 1.19.6) - rdoc (~> 4.3) redcarpet (~> 3.4.0) request_store (= 1.0.5) rmagick (~> 2.16.0) - roadie (~> 3.2.1) - roadie-rails (~> 1.1.1) + roadie-rails (~> 1.3.0) + rouge (~> 3.3.0) ruby-openid (~> 2.3.0) - selenium-webdriver (~> 2.53.4) - simplecov (~> 0.9.1) - test_after_commit (~> 0.4.2) + selenium-webdriver + simplecov (~> 0.14.1) tzinfo-data yard diff --git a/pkgs/applications/version-management/redmine/default.nix b/pkgs/applications/version-management/redmine/default.nix index 0b1f64b58a1..a3ba418a146 100644 --- a/pkgs/applications/version-management/redmine/default.nix +++ b/pkgs/applications/version-management/redmine/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, bundlerEnv, ruby }: let - version = "3.4.11"; + version = "4.0.4"; rubyEnv = bundlerEnv { name = "redmine-env-${version}"; @@ -16,7 +16,7 @@ in src = fetchurl { url = "https://www.redmine.org/releases/${pname}-${version}.tar.gz"; - sha256 = "14987sd9ff2n3982qlfwd4m0g1m10w8jyv791nica3wppvnrxh0r"; + sha256 = "0i5bmgdi3mahbis9hn0hk53rnz4ihp9yij4b4i07ny9vf3n4kp1a"; }; buildInputs = [ rubyEnv rubyEnv.wrappedRuby rubyEnv.bundler ]; diff --git a/pkgs/applications/version-management/redmine/gemset.nix b/pkgs/applications/version-management/redmine/gemset.nix index 4ef4bd40427..34e459111f8 100644 --- a/pkgs/applications/version-management/redmine/gemset.nix +++ b/pkgs/applications/version-management/redmine/gemset.nix @@ -1,75 +1,93 @@ { + actioncable = { + dependencies = ["actionpack" "nio4r" "websocket-driver"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "04wd9rf8sglrqc8jz49apqcxbi51gdj7l1apf5qr4i86iddk6pkm"; + type = "gem"; + }; + version = "5.2.3"; + }; actionmailer = { dependencies = ["actionpack" "actionview" "activejob" "mail" "rails-dom-testing"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "18wwlj4f7jffv3vxm80d2z36nwza95l5xfcqc401hvvrls4xzhsy"; + sha256 = "15laym06zcm2021qdhlyr6y9jn1marw436i89hcxqg14a8zvyvwa"; type = "gem"; }; - version = "4.2.11.1"; + version = "5.2.3"; }; actionpack = { dependencies = ["actionview" "activesupport" "rack" "rack-test" "rails-dom-testing" "rails-html-sanitizer"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "0rmldsk3a4lwxk0lrp6x1nz1v1r2xmbm3300l4ghgfygv3grdwjh"; + sha256 = "1s2iay17i2k0xx36cmnpbrmr5w6x70jk7fq1d8w70xcdw5chm0w1"; type = "gem"; }; - version = "4.2.11.1"; + version = "5.2.3"; }; actionpack-xml_parser = { - dependencies = ["actionpack"]; + dependencies = ["actionpack" "railties"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "17am4nd7x6g8x7f8i35rzzv2qrxlkc230rbgzg98af0yf50j8gka"; + sha256 = "1rnm6jrw3mzcf2g3q498igmhsn0kfkxq79w0nm532iclx4g4djs0"; type = "gem"; }; - version = "1.0.2"; + version = "2.0.1"; }; actionview = { - dependencies = ["activesupport" "builder" "erubis" "rails-dom-testing" "rails-html-sanitizer"]; + dependencies = ["activesupport" "builder" "erubi" "rails-dom-testing" "rails-html-sanitizer"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "0x7vjn8q6blzyf7j3kwg0ciy7vnfh28bjdkd1mp9k4ghp9jn0g9p"; + sha256 = "1v49rgf8305grqf6gq7qa47qhamr369igyy0giycz60x86afyr4h"; type = "gem"; }; - version = "4.2.11.1"; + version = "5.2.3"; }; activejob = { dependencies = ["activesupport" "globalid"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "0jy1c1r6syjqpa0sh9f1p4iaxzvp6qg4n6zs774j9z27q7h407mj"; + sha256 = "17vizibxbsli5yppgrvmw13wj7a9xy19s5nqxf1k23bbk2s5b87s"; type = "gem"; }; - version = "4.2.11.1"; + version = "5.2.3"; }; activemodel = { - dependencies = ["activesupport" "builder"]; + dependencies = ["activesupport"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "1c1x0rd6wnk1f0gsmxs6x3gx7yf6fs9qqkdv7r4hlbcdd849in33"; + sha256 = "0mghh9di8011ara9h1r5a216yzk1vjm9r3p0gdvdi8j1zmkl6k6h"; type = "gem"; }; - version = "4.2.11.1"; + version = "5.2.3"; }; activerecord = { dependencies = ["activemodel" "activesupport" "arel"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "07ixiwi0zzs9skqarvpfamsnay7npfswymrn28ngxaf8hi279q5p"; + sha256 = "0d6036f592803iyvp6bw98p3sg638mia5dbw19lvachx6jgzfvpw"; type = "gem"; }; - version = "4.2.11.1"; + version = "5.2.3"; }; - activesupport = { - dependencies = ["i18n" "minitest" "thread_safe" "tzinfo"]; + activestorage = { + dependencies = ["actionpack" "activerecord" "marcel"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "1vbq7a805bfvyik2q3kl9s3r418f5qzvysqbz2cwy4hr7m2q4ir6"; + sha256 = "04is6ipjqw1f337i8pm8w5bd99rpygqfd0fzzxkr7jd308ggmsjk"; type = "gem"; }; - version = "4.2.11.1"; + version = "5.2.3"; + }; + activesupport = { + dependencies = ["concurrent-ruby" "i18n" "minitest" "tzinfo"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "110vp4frgkw3mpzlmshg2f2ig09cknls2w68ym1r1s39d01v0mi8"; + type = "gem"; + }; + version = "5.2.3"; }; addressable = { dependencies = ["public_suffix"]; @@ -83,10 +101,10 @@ arel = { source = { remotes = ["https://rubygems.org"]; - sha256 = "0nfcrdiys6q6ylxiblky9jyssrw2xj96fmxmal7f4f0jj3417vj4"; + sha256 = "1jk7wlmkr61f6g36w9s2sn46nmdg6wn2jfssrhbhirv5x9n95nk0"; type = "gem"; }; - version = "6.0.4"; + version = "9.0.0"; }; builder = { source = { @@ -106,21 +124,13 @@ version = "2.18.0"; }; childprocess = { - dependencies = ["ffi"]; + dependencies = ["rake"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "0a61922kmvcxyj5l70fycapr87gz1dzzlkfpq85rfqk5vdh3d28p"; + sha256 = "1d2gasf988jh2k3fjb7i54c68rq6ni6jf9w0gnsfhrq94a6mprkz"; type = "gem"; }; - version = "0.9.0"; - }; - coderay = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "15vav4bhcc2x3jmi3izb11l4d9f3xv8hp2fszb7iqmpsccv1pz4y"; - type = "gem"; - }; - version = "1.1.2"; + version = "1.0.1"; }; concurrent-ruby = { source = { @@ -147,6 +157,14 @@ }; version = "1.7.0"; }; + csv = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "097rl10ivzlya5640530ayls2f1vid2mfgjy9ngd789qmp0j6x4b"; + type = "gem"; + }; + version = "3.0.9"; + }; docile = { source = { remotes = ["https://rubygems.org"]; @@ -155,21 +173,13 @@ }; version = "1.1.5"; }; - erubis = { + erubi = { source = { remotes = ["https://rubygems.org"]; - sha256 = "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3"; + sha256 = "1kagnf6ziahj0d781s6ryy6fwqwa3ad4xbzzj84p9m4nv4c2jir1"; type = "gem"; }; - version = "2.7.0"; - }; - ffi = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "06mvxpjply8qh4j3fj9wh08kdzwkbnvsiysh0vrhlk5cwxzjmblh"; - type = "gem"; - }; - version = "1.11.1"; + version = "1.8.0"; }; globalid = { dependencies = ["activesupport"]; @@ -196,14 +206,13 @@ }; version = "0.7.0"; }; - jquery-rails = { - dependencies = ["railties" "thor"]; + json = { source = { remotes = ["https://rubygems.org"]; - sha256 = "1lk7xqmms45czylxs22kv5khlbm7a0yqcchqijxb9m10zsqc6lp5"; + sha256 = "0sx97bm9by389rbzv8r1f43h06xcz8vwi3h5jv074gvparql7lcx"; type = "gem"; }; - version = "3.1.5"; + version = "2.2.0"; }; loofah = { dependencies = ["crass" "nokogiri"]; @@ -215,13 +224,22 @@ version = "2.2.3"; }; mail = { - dependencies = ["mime-types"]; + dependencies = ["mini_mime"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "0d7lhj2dw52ycls6xigkfz6zvfhc6qggply9iycjmcyj9760yvz9"; + sha256 = "00wwz6ys0502dpk8xprwcqfwyf3hmnx6lgxaiq6vj43mkx43sapc"; type = "gem"; }; - version = "2.6.6"; + version = "2.7.1"; + }; + marcel = { + dependencies = ["mimemagic"]; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1nxbjmcyg8vlw6zwagf17l9y2mwkagmmkg95xybpn4bmf3rfnksx"; + type = "gem"; + }; + version = "0.3.3"; }; metaclass = { source = { @@ -231,22 +249,13 @@ }; version = "0.0.4"; }; - mime-types = { - dependencies = ["mime-types-data"]; + method_source = { source = { remotes = ["https://rubygems.org"]; - sha256 = "0fjxy1jm52ixpnv3vg9ld9pr9f35gy0jp66i1njhqjvmnvq0iwwk"; + sha256 = "1pviwzvdqd90gn6y7illcdd9adapw8fczml933p5vl739dkvl3lq"; type = "gem"; }; - version = "3.2.2"; - }; - mime-types-data = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1m00pg19cm47n1qlcxgl91ajh2yq0fszvn1vy8fy0s1jkrp9fw4a"; - type = "gem"; - }; - version = "3.2019.0331"; + version = "0.9.2"; }; mimemagic = { source = { @@ -267,10 +276,10 @@ mini_portile2 = { source = { remotes = ["https://rubygems.org"]; - sha256 = "13d32jjadpjj6d2wdhkfpsmy68zjx90p49bgf8f7nkpz86r1fr11"; + sha256 = "15zplpfw3knqifj9bpf604rb3wc1vhq6363pd6lvhayng8wql5vy"; type = "gem"; }; - version = "2.3.0"; + version = "2.4.0"; }; minitest = { source = { @@ -289,52 +298,43 @@ }; version = "1.8.0"; }; - multi_json = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1rl0qy4inf1mp8mybfk56dfga0mvx97zwpmq5xmiwl5r770171nv"; - type = "gem"; - }; - version = "1.13.1"; - }; mysql2 = { source = { remotes = ["https://rubygems.org"]; - sha256 = "0qjd97w6a0w9aldsrhb2y6jrc4wnnlbj5j8kcl7pp7vviwa0r5iq"; + sha256 = "1a2kdjgzwh1p2rkcmxaawy6ibi32b04wbdd5d4wr8i342pq76di4"; type = "gem"; }; - version = "0.4.10"; + version = "0.5.2"; }; net-ldap = { source = { remotes = ["https://rubygems.org"]; - sha256 = "0z1j0zklbbx3vi91zcd2v0fnkfgkvq3plisa6hxaid8sqndyak46"; + sha256 = "016igqz81a8zcwqzp5bbhryqmb2skmyf57ij3nb5z8sxwhw22jgh"; type = "gem"; }; - version = "0.12.1"; + version = "0.16.1"; + }; + nio4r = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1a41ca1kpdmrypjp9xbgvckpy8g26zxphkja9vk7j5wl4n8yvlyr"; + type = "gem"; + }; + version = "2.3.1"; }; nokogiri = { dependencies = ["mini_portile2"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "0byyxrazkfm29ypcx5q4syrv126nvjnf7z6bqi01sqkv4llsi4qz"; + sha256 = "02bjydih0j515szfv9mls195cvpyidh6ixm7dwbl3s2sbaxxk5s4"; type = "gem"; }; - version = "1.8.5"; + version = "1.10.3"; }; pg = { source = { remotes = ["https://rubygems.org"]; - sha256 = "07dv4ma9xd75xpsnnwwg1yrpwpji7ydy0q1d9dl0yfqbzpidrw32"; - type = "gem"; - }; - version = "0.18.4"; - }; - protected_attributes = { - dependencies = ["activemodel"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "18lvrvmcwjvjr2mrn20vaf68a0q6mg4cy9f0m1i7x83p0ljhhyar"; + sha256 = "0fmnyxcyrvgdbgq7m09whgn9i8rwfybk0w8aii1nc4g5kqw0k2jy"; type = "gem"; }; version = "1.1.4"; @@ -347,13 +347,21 @@ }; version = "3.1.0"; }; + puma = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1pkrbvak6rlf147qpd4zss031qrwwh53g8s6017037iwg0436kv3"; + type = "gem"; + }; + version = "3.12.1"; + }; rack = { source = { remotes = ["https://rubygems.org"]; - sha256 = "1g9926ln2lw12lfxm4ylq1h6nl0rafl10za3xvjzc87qvnqic87f"; + sha256 = "0z90vflxbgjy2n84r7mbyax3i2vyvvrxxrf86ljzn5rw65jgnn2i"; type = "gem"; }; - version = "1.6.11"; + version = "2.0.7"; }; rack-openid = { dependencies = ["rack" "ruby-openid"]; @@ -368,37 +376,28 @@ dependencies = ["rack"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "0h6x5jq24makgv2fq5qqgjlrk74dxfy62jif9blk43llw8ib2q7z"; + sha256 = "0rh8h376mx71ci5yklnpqqn118z3bl67nnv5k801qaqn1zs62h8m"; type = "gem"; }; - version = "0.6.3"; + version = "1.1.0"; }; rails = { - dependencies = ["actionmailer" "actionpack" "actionview" "activejob" "activemodel" "activerecord" "activesupport" "railties" "sprockets-rails"]; + dependencies = ["actioncable" "actionmailer" "actionpack" "actionview" "activejob" "activemodel" "activerecord" "activestorage" "activesupport" "railties" "sprockets-rails"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "1ywvis59dd3v8qapi9ix6743zgk07l21x1cd6nb1ddpahxhm7dml"; + sha256 = "1p7cszi3n9ksxchxnccmz61pd1i3rjg4813dsdinsm8xm5k1pdgr"; type = "gem"; }; - version = "4.2.11.1"; - }; - rails-deprecated_sanitizer = { - dependencies = ["activesupport"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "0qxymchzdxww8bjsxj05kbf86hsmrjx40r41ksj0xsixr2gmhbbj"; - type = "gem"; - }; - version = "1.0.3"; + version = "5.2.3"; }; rails-dom-testing = { - dependencies = ["activesupport" "nokogiri" "rails-deprecated_sanitizer"]; + dependencies = ["activesupport" "nokogiri"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "0wssfqpn00byhvp2372p99mphkcj8qx6pf6646avwr9ifvq0q1x6"; + sha256 = "1lfq2a7kp2x64dzzi5p4cjcbiv62vxh9lyqk2f0rqq3fkzrw8h5i"; type = "gem"; }; - version = "1.0.9"; + version = "2.0.3"; }; rails-html-sanitizer = { dependencies = ["loofah"]; @@ -410,13 +409,13 @@ version = "1.0.4"; }; railties = { - dependencies = ["actionpack" "activesupport" "rake" "thor"]; + dependencies = ["actionpack" "activesupport" "method_source" "rake" "thor"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "1bjf21z9maiiazc1if56nnh9xmgbkcqlpznv34f40a1hsvgk1d1m"; + sha256 = "1gn9fwb5wm08fbj7zpilqgblfl315l5b7pg4jsvxlizvrzg8h8q4"; type = "gem"; }; - version = "4.2.11.1"; + version = "5.2.3"; }; rake = { source = { @@ -443,14 +442,6 @@ }; version = "1.19.1"; }; - rdoc = { - source = { - remotes = ["https://rubygems.org"]; - sha256 = "13ba2mhqqcsp3k97x3iz9x29xk26rv4561lfzzzibcy41vvj1n4c"; - type = "gem"; - }; - version = "4.3.0"; - }; redcarpet = { source = { remotes = ["https://rubygems.org"]; @@ -479,19 +470,27 @@ dependencies = ["css_parser" "nokogiri"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "0frp5yb07ib9y1k43shd4xjkb9a6wavhqq892l8yi9y73qi2cqbc"; + sha256 = "0b2qgr725hnscz3ldb607gwgjkr47ncs1jjnk6zh0h70p5dxrk2d"; type = "gem"; }; - version = "3.2.2"; + version = "3.5.0"; }; roadie-rails = { dependencies = ["railties" "roadie"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "1hxgl5marq2hi6lcc73f7g6afd7dz4w893rrgrbh7m3k8zrwjyk1"; + sha256 = "02km0ama85mkw7kkn6qif86b781pglfdmqrwx5s6hwjlzk16qih3"; type = "gem"; }; - version = "1.1.1"; + version = "1.3.0"; + }; + rouge = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1digsi2s8wyzx8vsqcxasw205lg6s7izx8jypl8rrpjwshmv83ql"; + type = "gem"; + }; + version = "3.3.0"; }; ruby-openid = { source = { @@ -510,30 +509,30 @@ version = "1.2.3"; }; selenium-webdriver = { - dependencies = ["childprocess" "rubyzip" "websocket"]; + dependencies = ["childprocess" "rubyzip"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "15qyf7b9fa2nxhhwp551b9fjj82kb3wmy65559yrrcwpdadqvcs4"; + sha256 = "0i0jr4qrcvg5isc11ivjw7f9gywbimnz613k82bfcrnlzdf90mxy"; type = "gem"; }; - version = "2.53.4"; + version = "3.142.3"; }; simplecov = { - dependencies = ["docile" "multi_json" "simplecov-html"]; + dependencies = ["docile" "json" "simplecov-html"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "1a3wy9zlmfwl3f47cibnxyxrgfz16y6fmy0dj1vyidzyys4mvy12"; + sha256 = "1r9fnsnsqj432cmrpafryn8nif3x0qg9mdnvrcf0wr01prkdlnww"; type = "gem"; }; - version = "0.9.2"; + version = "0.14.1"; }; simplecov-html = { source = { remotes = ["https://rubygems.org"]; - sha256 = "0jv9pmpaxihrcsgcf6mgl3qg7rhf9scl5l2k67d768w9cz63xgvc"; + sha256 = "1lihraa4rgxk8wbfl77fy9sf0ypk31iivly8vl3w04srd7i0clzn"; type = "gem"; }; - version = "0.9.0"; + version = "0.10.2"; }; sprockets = { dependencies = ["concurrent-ruby" "rack"]; @@ -553,15 +552,6 @@ }; version = "3.2.1"; }; - test_after_commit = { - dependencies = ["activerecord"]; - source = { - remotes = ["https://rubygems.org"]; - sha256 = "1fzg8qan6f0n0ynr594bld2k0rwwxj99yzhiga2f3pkj9ina1abb"; - type = "gem"; - }; - version = "0.4.2"; - }; thor = { source = { remotes = ["https://rubygems.org"]; @@ -587,13 +577,22 @@ }; version = "1.2.5"; }; - websocket = { + websocket-driver = { + dependencies = ["websocket-extensions"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "0f11rcn4qgffb1rq4kjfwi7di79w8840x9l74pkyif5arp0mb08x"; + sha256 = "1bxamwqldmy98hxs5pqby3andws14hl36ch78g0s81gaz9b91nj2"; type = "gem"; }; - version = "1.2.8"; + version = "0.7.1"; + }; + websocket-extensions = { + source = { + remotes = ["https://rubygems.org"]; + sha256 = "00i624ng1nvkz1yckj3f8yxxp6hi7xaqf40qh9q3hj2n1l9i8g6m"; + type = "gem"; + }; + version = "0.1.4"; }; xpath = { dependencies = ["nokogiri"]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f51bcb00eee..8a06c8601c2 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5842,9 +5842,8 @@ in redir = callPackage ../tools/networking/redir { }; - redmine = callPackage ../applications/version-management/redmine { ruby = pkgs.ruby_2_4; }; # failed to build websocket-driver gem with ruby 2.6, so sticking to 2.5 for now - redmine_4 = callPackage ../applications/version-management/redmine/4.x { ruby = pkgs.ruby_2_5; }; + redmine = callPackage ../applications/version-management/redmine { ruby = pkgs.ruby_2_5; }; redsocks = callPackage ../tools/networking/redsocks { }; From 9ec808ae62a992c4d72f97270f0fe64b631f618d Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Mon, 21 Oct 2019 21:13:30 -0400 Subject: [PATCH 023/377] redmine: 4.0.4 -> 4.0.5 --- .../version-management/redmine/Gemfile | 5 +- .../version-management/redmine/Gemfile.lock | 48 ++++++------ .../version-management/redmine/default.nix | 4 +- .../version-management/redmine/gemset.nix | 73 +++++++++---------- 4 files changed, 66 insertions(+), 64 deletions(-) diff --git a/pkgs/applications/version-management/redmine/Gemfile b/pkgs/applications/version-management/redmine/Gemfile index 343c7b3a547..b51096d16f3 100644 --- a/pkgs/applications/version-management/redmine/Gemfile +++ b/pkgs/applications/version-management/redmine/Gemfile @@ -16,6 +16,9 @@ gem "nokogiri", (RUBY_VERSION >= "2.3" ? "~> 1.10.0" : "~> 1.9.1") gem "i18n", "~> 0.7.0" gem "xpath", "< 3.2.0" if RUBY_VERSION < "2.3" +# TODO: Remove the following line when #32223 is fixed +gem "sprockets", "~> 3.7.2" + # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :x64_mingw, :mswin] gem "rbpdf", "~> 1.19.6" @@ -27,7 +30,7 @@ end # Optional gem for OpenID authentication group :openid do - gem "ruby-openid", "~> 2.3.0", :require => "openid" + gem "ruby-openid", "~> 2.9.2", :require => "openid" gem "rack-openid" end diff --git a/pkgs/applications/version-management/redmine/Gemfile.lock b/pkgs/applications/version-management/redmine/Gemfile.lock index 671d2bb4ac1..aa434465b02 100644 --- a/pkgs/applications/version-management/redmine/Gemfile.lock +++ b/pkgs/applications/version-management/redmine/Gemfile.lock @@ -45,8 +45,8 @@ GEM i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - addressable (2.6.0) - public_suffix (>= 2.0.2, < 4.0) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) arel (9.0.0) builder (3.2.3) capybara (2.18.0) @@ -56,21 +56,20 @@ GEM rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (>= 2.0, < 4.0) - childprocess (1.0.1) - rake (< 13.0) + childprocess (3.0.0) concurrent-ruby (1.1.5) - crass (1.0.4) + crass (1.0.5) css_parser (1.7.0) addressable csv (3.0.9) docile (1.1.5) - erubi (1.8.0) + erubi (1.9.0) globalid (0.4.2) activesupport (>= 4.2.0) htmlentities (4.3.4) i18n (0.7.0) json (2.2.0) - loofah (2.2.3) + loofah (2.3.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) @@ -80,18 +79,18 @@ GEM metaclass (0.0.4) method_source (0.9.2) mimemagic (0.3.3) - mini_mime (1.0.1) + mini_mime (1.0.2) mini_portile2 (2.4.0) - minitest (5.11.3) - mocha (1.8.0) + minitest (5.12.2) + mocha (1.9.0) metaclass (~> 0.0.1) mysql2 (0.5.2) net-ldap (0.16.1) - nio4r (2.3.1) - nokogiri (1.10.3) + nio4r (2.5.2) + nokogiri (1.10.4) mini_portile2 (~> 2.4.0) pg (1.1.4) - public_suffix (3.1.0) + public_suffix (4.0.1) puma (3.12.1) rack (2.0.7) rack-openid (1.4.2) @@ -115,15 +114,15 @@ GEM rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.0.4) - loofah (~> 2.2, >= 2.2.2) + rails-html-sanitizer (1.3.0) + loofah (~> 2.3) railties (5.2.3) actionpack (= 5.2.3) activesupport (= 5.2.3) method_source rake (>= 0.8.7) thor (>= 0.19.0, < 2.0) - rake (12.3.2) + rake (13.0.0) rbpdf (1.19.8) htmlentities rbpdf-font (~> 1.19.0) @@ -131,18 +130,18 @@ GEM redcarpet (3.4.0) request_store (1.0.5) rmagick (2.16.0) - roadie (3.5.0) + roadie (3.5.1) css_parser (~> 1.4) nokogiri (~> 1.8) roadie-rails (1.3.0) railties (>= 3.0, < 5.3) roadie (~> 3.1) rouge (3.3.0) - ruby-openid (2.3.0) - rubyzip (1.2.3) - selenium-webdriver (3.142.3) - childprocess (>= 0.5, < 2.0) - rubyzip (~> 1.2, >= 1.2.2) + ruby-openid (2.9.2) + rubyzip (2.0.0) + selenium-webdriver (3.142.6) + childprocess (>= 0.5, < 4.0) + rubyzip (>= 1.2.2) simplecov (0.14.1) docile (~> 1.1.0) json (>= 1.8, < 3) @@ -164,7 +163,7 @@ GEM websocket-extensions (0.1.4) xpath (3.2.0) nokogiri (~> 1.8) - yard (0.9.19) + yard (0.9.20) PLATFORMS ruby @@ -193,9 +192,10 @@ DEPENDENCIES rmagick (~> 2.16.0) roadie-rails (~> 1.3.0) rouge (~> 3.3.0) - ruby-openid (~> 2.3.0) + ruby-openid (~> 2.9.2) selenium-webdriver simplecov (~> 0.14.1) + sprockets (~> 3.7.2) tzinfo-data yard diff --git a/pkgs/applications/version-management/redmine/default.nix b/pkgs/applications/version-management/redmine/default.nix index a3ba418a146..e70850e8821 100644 --- a/pkgs/applications/version-management/redmine/default.nix +++ b/pkgs/applications/version-management/redmine/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, bundlerEnv, ruby }: let - version = "4.0.4"; + version = "4.0.5"; rubyEnv = bundlerEnv { name = "redmine-env-${version}"; @@ -16,7 +16,7 @@ in src = fetchurl { url = "https://www.redmine.org/releases/${pname}-${version}.tar.gz"; - sha256 = "0i5bmgdi3mahbis9hn0hk53rnz4ihp9yij4b4i07ny9vf3n4kp1a"; + sha256 = "1s39qd3j27ryn3p01501iavbkyvikdxl3165nk8i8pgxcxlbxsk4"; }; buildInputs = [ rubyEnv rubyEnv.wrappedRuby rubyEnv.bundler ]; diff --git a/pkgs/applications/version-management/redmine/gemset.nix b/pkgs/applications/version-management/redmine/gemset.nix index 34e459111f8..e969d2bfee0 100644 --- a/pkgs/applications/version-management/redmine/gemset.nix +++ b/pkgs/applications/version-management/redmine/gemset.nix @@ -93,10 +93,10 @@ dependencies = ["public_suffix"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "0bcm2hchn897xjhqj9zzsxf3n9xhddymj4lsclz508f4vw3av46l"; + sha256 = "1fvchp2rhp2rmigx7qglf69xvjqvzq7x0g49naliw29r2bz656sy"; type = "gem"; }; - version = "2.6.0"; + version = "2.7.0"; }; arel = { source = { @@ -124,13 +124,12 @@ version = "2.18.0"; }; childprocess = { - dependencies = ["rake"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "1d2gasf988jh2k3fjb7i54c68rq6ni6jf9w0gnsfhrq94a6mprkz"; + sha256 = "1ic028k8xgm2dds9mqnvwwx3ibaz32j8455zxr9f4bcnviyahya5"; type = "gem"; }; - version = "1.0.1"; + version = "3.0.0"; }; concurrent-ruby = { source = { @@ -143,10 +142,10 @@ crass = { source = { remotes = ["https://rubygems.org"]; - sha256 = "0bpxzy6gjw9ggjynlxschbfsgmx8lv3zw1azkjvnb8b9i895dqfi"; + sha256 = "030sc98kjrb36rh7g21qsbdfxrj6knsjkx0mn3b7gig8zknwhp2f"; type = "gem"; }; - version = "1.0.4"; + version = "1.0.5"; }; css_parser = { dependencies = ["addressable"]; @@ -176,10 +175,10 @@ erubi = { source = { remotes = ["https://rubygems.org"]; - sha256 = "1kagnf6ziahj0d781s6ryy6fwqwa3ad4xbzzj84p9m4nv4c2jir1"; + sha256 = "1nwzxnqhr31fn7nbqmffcysvxjdfl3bhxi0bld5qqhcnfc1xd13x"; type = "gem"; }; - version = "1.8.0"; + version = "1.9.0"; }; globalid = { dependencies = ["activesupport"]; @@ -218,10 +217,10 @@ dependencies = ["crass" "nokogiri"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "1ccsid33xjajd0im2xv941aywi58z7ihwkvaf1w2bv89vn5bhsjg"; + sha256 = "06kfq90vi38gv6i128f4zg462kj32szs5vsgm25hxgw9zd12pj9x"; type = "gem"; }; - version = "2.2.3"; + version = "2.3.0"; }; mail = { dependencies = ["mini_mime"]; @@ -268,10 +267,10 @@ mini_mime = { source = { remotes = ["https://rubygems.org"]; - sha256 = "1q4pshq387lzv9m39jv32vwb8wrq3wc4jwgl4jk209r4l33v09d3"; + sha256 = "1axm0rxyx3ss93wbmfkm78a6x03l8y4qy60rhkkiq0aza0vwq3ha"; type = "gem"; }; - version = "1.0.1"; + version = "1.0.2"; }; mini_portile2 = { source = { @@ -284,19 +283,19 @@ minitest = { source = { remotes = ["https://rubygems.org"]; - sha256 = "0icglrhghgwdlnzzp4jf76b0mbc71s80njn5afyfjn4wqji8mqbq"; + sha256 = "0zjm24aiz42i9n37mcw8lydd7n0y7wfk27by06jx77ypcld3qvkw"; type = "gem"; }; - version = "5.11.3"; + version = "5.12.2"; }; mocha = { dependencies = ["metaclass"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "12aglpiq1h18j5a4rlwvnsvnsi2f3407v5xm59lgcg3ymlyak4al"; + sha256 = "1s56iivmwpv4979hd25v3ghwwgy8ah15nh378lrj8czlh4kf5k5s"; type = "gem"; }; - version = "1.8.0"; + version = "1.9.0"; }; mysql2 = { source = { @@ -317,19 +316,19 @@ nio4r = { source = { remotes = ["https://rubygems.org"]; - sha256 = "1a41ca1kpdmrypjp9xbgvckpy8g26zxphkja9vk7j5wl4n8yvlyr"; + sha256 = "0gnmvbryr521r135yz5bv8354m7xn6miiapfgpg1bnwsvxz8xj6c"; type = "gem"; }; - version = "2.3.1"; + version = "2.5.2"; }; nokogiri = { dependencies = ["mini_portile2"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "02bjydih0j515szfv9mls195cvpyidh6ixm7dwbl3s2sbaxxk5s4"; + sha256 = "0nmdrqqz1gs0fwkgzxjl4wr554gr8dc1fkrqjc2jpsvwgm41rygv"; type = "gem"; }; - version = "1.10.3"; + version = "1.10.4"; }; pg = { source = { @@ -342,10 +341,10 @@ public_suffix = { source = { remotes = ["https://rubygems.org"]; - sha256 = "1c7c5xxkx91hwj4572hbnyvxmydb90q69wlpr2l0dxrmwx2p365l"; + sha256 = "0xnfv2j2bqgdpg2yq9i2rxby0w2sc9h5iyjkpaas2xknwrgmhdb0"; type = "gem"; }; - version = "3.1.0"; + version = "4.0.1"; }; puma = { source = { @@ -403,10 +402,10 @@ dependencies = ["loofah"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "1gv7vr5d9g2xmgpjfq4nxsqr70r9pr042r9ycqqnfvw5cz9c7jwr"; + sha256 = "1icpqmxbppl4ynzmn6dx7wdil5hhq6fz707m9ya6d86c7ys8sd4f"; type = "gem"; }; - version = "1.0.4"; + version = "1.3.0"; }; railties = { dependencies = ["actionpack" "activesupport" "method_source" "rake" "thor"]; @@ -420,10 +419,10 @@ rake = { source = { remotes = ["https://rubygems.org"]; - sha256 = "1sy5a7nh6xjdc9yhcw31jji7ssrf9v5806hn95gbrzr998a2ydjn"; + sha256 = "05l80mgaabdipkjsnjlffn9gc1wx9fi629d2kfbz8628cx3m6686"; type = "gem"; }; - version = "12.3.2"; + version = "13.0.0"; }; rbpdf = { dependencies = ["htmlentities" "rbpdf-font"]; @@ -470,10 +469,10 @@ dependencies = ["css_parser" "nokogiri"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "0b2qgr725hnscz3ldb607gwgjkr47ncs1jjnk6zh0h70p5dxrk2d"; + sha256 = "1zihd316bkbnrinz5s1s7pg7s0cadhhj6qs7wmc713j0g6ai1k9r"; type = "gem"; }; - version = "3.5.0"; + version = "3.5.1"; }; roadie-rails = { dependencies = ["railties" "roadie"]; @@ -495,27 +494,27 @@ ruby-openid = { source = { remotes = ["https://rubygems.org"]; - sha256 = "0yzaf2c1i88757554wk38rxqmj0xzgmwk2zx7gi98w2zx42d17pn"; + sha256 = "190p1m0bxd9xkfk1j6cpcv3x5c367g36nsglg4m1fcwqdd13k3kz"; type = "gem"; }; - version = "2.3.0"; + version = "2.9.2"; }; rubyzip = { source = { remotes = ["https://rubygems.org"]; - sha256 = "1w9gw28ly3zyqydnm8phxchf4ymyjl2r7zf7c12z8kla10cpmhlc"; + sha256 = "1gz0ri0pa2xr7b6bf66yjc2wfvk51f4gi6yk7bklwl1nr65zc4gz"; type = "gem"; }; - version = "1.2.3"; + version = "2.0.0"; }; selenium-webdriver = { dependencies = ["childprocess" "rubyzip"]; source = { remotes = ["https://rubygems.org"]; - sha256 = "0i0jr4qrcvg5isc11ivjw7f9gywbimnz613k82bfcrnlzdf90mxy"; + sha256 = "11abil34dr8p1kw7hlaqd6kr430v4srmhzf72zzqvhcimlfvm4yb"; type = "gem"; }; - version = "3.142.3"; + version = "3.142.6"; }; simplecov = { dependencies = ["docile" "json" "simplecov-html"]; @@ -606,9 +605,9 @@ yard = { source = { remotes = ["https://rubygems.org"]; - sha256 = "1w0i13a0vsw4jmlj59xn64rdsqcsl9r3rmjjgdca5i51m1q4ix6v"; + sha256 = "0rxqwry3h2hjz069f0kfr140wgx1khgljnqf112dk5x9rm4l0xny"; type = "gem"; }; - version = "0.9.19"; + version = "0.9.20"; }; } \ No newline at end of file From 0be3118f7eb47dc544bbd16a9d0eb25860b85d03 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 28 Oct 2019 01:43:53 -0500 Subject: [PATCH 024/377] radiotray-ng: 0.2.6 -> 0.2.7 https://github.com/ebruck/radiotray-ng/releases/tag/v0.2.7 --- pkgs/applications/audio/radiotray-ng/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/audio/radiotray-ng/default.nix b/pkgs/applications/audio/radiotray-ng/default.nix index c0186a146be..a2e24a42ba7 100644 --- a/pkgs/applications/audio/radiotray-ng/default.nix +++ b/pkgs/applications/audio/radiotray-ng/default.nix @@ -40,13 +40,13 @@ let in stdenv.mkDerivation rec { pname = "radiotray-ng"; - version = "0.2.6"; + version = "0.2.7"; src = fetchFromGitHub { owner = "ebruck"; - repo = "radiotray-ng"; + repo = pname; rev = "v${version}"; - sha256 = "0khrfxjas2ldh0kksq7l811srqy16ahjxchvz0hhykx5hykymxlb"; + sha256 = "1v2nsz7s0jj0wmqabzk6akcf1353rachm1lfq77hxbq9z5pw8pgb"; }; nativeBuildInputs = [ cmake pkgconfig wrapGAppsHook makeWrapper ]; From 86eedaf1ca351c44a520fc0014161b596576451c Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 28 Oct 2019 01:49:08 -0500 Subject: [PATCH 025/377] radiotray-ng: python3 --- pkgs/applications/audio/radiotray-ng/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/radiotray-ng/default.nix b/pkgs/applications/audio/radiotray-ng/default.nix index a2e24a42ba7..a64e407b39b 100644 --- a/pkgs/applications/audio/radiotray-ng/default.nix +++ b/pkgs/applications/audio/radiotray-ng/default.nix @@ -21,7 +21,7 @@ # User-agent info , lsb-release # rt2rtng -, python2 +, python3 # Testing , gtest # Fixup @@ -36,7 +36,7 @@ let gst-libav ]; # For the rt2rtng utility for converting bookmark file to -ng format - pythonInputs = with python2.pkgs; [ python2 lxml ]; + pythonInputs = with python3.pkgs; [ python lxml ]; in stdenv.mkDerivation rec { pname = "radiotray-ng"; From 3e8981be239ecc9a3738df6569bcef02099390a4 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Mon, 28 Oct 2019 18:50:03 +0100 Subject: [PATCH 026/377] perlPackages.MojoSQLite: 3.002 -> 3.003 --- pkgs/top-level/perl-packages.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 06fe3aa2cfe..ce02f36b93c 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -11670,10 +11670,10 @@ let MojoSQLite = buildPerlModule { pname = "Mojo-SQLite"; - version = "3.002"; + version = "3.003"; src = fetchurl { - url = "mirror://cpan/authors/id/D/DB/DBOOK/Mojo-SQLite-3.002.tar.gz"; - sha256 = "16dn0p14i6r4c8aspvkp7rfry3zy7kr2ffcmncj0pqygk62miinp"; + url = "mirror://cpan/authors/id/D/DB/DBOOK/Mojo-SQLite-3.003.tar.gz"; + sha256 = "d96c00dcf45e2becc8e8181df074853d42616f2a660703455d0e0a2741478092"; }; buildInputs = [ ModuleBuildTiny ]; propagatedBuildInputs = [ DBDSQLite Mojolicious SQLAbstract URIdb ]; From 10d7313c013604b045fce4ab86debdb3263ad98f Mon Sep 17 00:00:00 2001 From: Philip Potter Date: Mon, 28 Oct 2019 20:57:49 +0000 Subject: [PATCH 027/377] gnupg-pkcs11-scd: add @lschuermann as maintainer --- pkgs/tools/security/gnupg-pkcs11-scd/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/tools/security/gnupg-pkcs11-scd/default.nix b/pkgs/tools/security/gnupg-pkcs11-scd/default.nix index 77537f1bfeb..bc7cff99dc2 100644 --- a/pkgs/tools/security/gnupg-pkcs11-scd/default.nix +++ b/pkgs/tools/security/gnupg-pkcs11-scd/default.nix @@ -26,7 +26,7 @@ stdenv.mkDerivation rec { ''; homepage = http://gnupg-pkcs11.sourceforge.net/; license = licenses.bsd3; - maintainers = with maintainers; [ philandstuff ]; + maintainers = with maintainers; [ lschuermann philandstuff ]; platforms = platforms.unix; }; } From 605a7b31d78711a19f05796ef24cba1f4d22352f Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Mon, 28 Oct 2019 23:51:17 +0000 Subject: [PATCH 028/377] pythonPackages.koji: 1.13.0 -> 1.14.3 (security) Addressing CVE-2019-17109 Also added missing description, homepage & license. Re-disabled for py3k as the kojira executable doesn't seem to be happy with it. --- pkgs/development/python-modules/koji/default.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/koji/default.nix b/pkgs/development/python-modules/koji/default.nix index 033ab821135..47c42a1df45 100644 --- a/pkgs/development/python-modules/koji/default.nix +++ b/pkgs/development/python-modules/koji/default.nix @@ -1,19 +1,19 @@ -{ stdenv, fetchurl, buildPythonPackage, pycurl, six, rpm, dateutil }: +{ stdenv, fetchurl, buildPythonPackage, isPy3k, pycurl, six, rpm, dateutil }: buildPythonPackage rec { pname = "koji"; - version = "1.13.0"; + version = "1.14.3"; format = "other"; src = fetchurl { url = "https://releases.pagure.org/koji/${pname}-${version}.tar.bz2"; - sha256 = "18b18rcbdqqw33g7h20hf5bpbci2ixdi05yda1fvpv30c1kkzd8w"; + sha256 = "0a3kn3qvspvx15imgzzzjsbvw6bqmbk29apbliqwifa9cj7pvb40"; }; propagatedBuildInputs = [ pycurl six rpm dateutil ]; # Judging from SyntaxError - #disabled = isPy3k; + disabled = isPy3k; makeFlags = "DESTDIR=$(out)"; @@ -24,7 +24,9 @@ buildPythonPackage rec { ''; meta = { - maintainers = [ ]; + description = "An RPM-based build system"; + homepage = https://pagure.io/koji; + license = stdenv.lib.licenses.lgpl21; platforms = stdenv.lib.platforms.unix; }; } From bfdbbeb452938691e78f404a7df26521c40179c3 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Fri, 1 Nov 2019 04:20:00 -0500 Subject: [PATCH 029/377] postgresqlPackages.timescaledb: 1.4.2 -> 1.5.0 Changelog: https://github.com/timescale/timescaledb/releases/tag/1.5.0 --- pkgs/servers/sql/postgresql/ext/timescaledb.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/sql/postgresql/ext/timescaledb.nix b/pkgs/servers/sql/postgresql/ext/timescaledb.nix index ef3dc4894d7..296e7e0a41a 100644 --- a/pkgs/servers/sql/postgresql/ext/timescaledb.nix +++ b/pkgs/servers/sql/postgresql/ext/timescaledb.nix @@ -8,7 +8,7 @@ stdenv.mkDerivation rec { pname = "timescaledb"; - version = "1.4.2"; + version = "1.5.0"; nativeBuildInputs = [ cmake ]; buildInputs = [ postgresql openssl ]; @@ -17,10 +17,10 @@ stdenv.mkDerivation rec { owner = "timescale"; repo = "timescaledb"; rev = "refs/tags/${version}"; - sha256 = "06mchpfjh4kskxq5r8b84870gl37xcqdf14n96qjb4nbyw9l8xcc"; + sha256 = "0qw7yp2vh3fkx43zlnj8xsvd0d68rcmdcl3p9jpmr97hyl376xf2"; }; - cmakeFlags = [ "-DSEND_TELEMETRY_DEFAULT=OFF" ]; + cmakeFlags = [ "-DSEND_TELEMETRY_DEFAULT=OFF" "-DREGRESS_CHECKS=OFF" ]; # Fix the install phase which tries to install into the pgsql extension dir, # and cannot be manually overridden. This is rather fragile but works OK. From 0b65eaafe2d3b736328cae2c96885a00a907a629 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Fri, 1 Nov 2019 04:20:00 -0500 Subject: [PATCH 030/377] postgresqlPackages.pg_topn: 2.2.2 -> 2.3.0 --- pkgs/servers/sql/postgresql/ext/pg_topn.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/sql/postgresql/ext/pg_topn.nix b/pkgs/servers/sql/postgresql/ext/pg_topn.nix index c368929db5d..b6300f78af2 100644 --- a/pkgs/servers/sql/postgresql/ext/pg_topn.nix +++ b/pkgs/servers/sql/postgresql/ext/pg_topn.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec { pname = "pg_topn"; - version = "2.2.2"; + version = "2.3.0"; buildInputs = [ postgresql ]; @@ -10,7 +10,7 @@ stdenv.mkDerivation rec { owner = "citusdata"; repo = "postgresql-topn"; rev = "refs/tags/v${version}"; - sha256 = "1bh28nrxj06vc2cvlsxlwrwad5ff3lfj3kr5cnnggwjk2dhwbbjm"; + sha256 = "05mjzm7rz5j7byzag23526hhsqsg4dsyxxsg8q9ray1rwxjbr392"; }; installPhase = '' From a2be91ebe1718f7327ad8fd405675a97d1b66ca1 Mon Sep 17 00:00:00 2001 From: Alex Whitt Date: Thu, 8 Aug 2019 12:27:23 -0400 Subject: [PATCH 031/377] maintainers: add WhittlesJr --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 2509b3a5b0a..1c255c4dee4 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -7059,6 +7059,12 @@ email = "kirill.wedens@gmail.com"; name = "wedens"; }; + WhittlesJr = { + email = "alex.joseph.whitt@gmail.com"; + github = "WhittlesJr"; + githubId = 19174984; + name = "Alex Whitt"; + }; willibutz = { email = "willibutz@posteo.de"; github = "willibutz"; From 1f11ee1a289b134fc3998326b77a722b1e0adb63 Mon Sep 17 00:00:00 2001 From: Alex Whitt Date: Mon, 19 Aug 2019 18:07:47 -0400 Subject: [PATCH 032/377] python3Packages.poster3: init at 0.8.1 --- .../python-modules/poster3/default.nix | 36 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/python-modules/poster3/default.nix diff --git a/pkgs/development/python-modules/poster3/default.nix b/pkgs/development/python-modules/poster3/default.nix new file mode 100644 index 00000000000..175faa343ca --- /dev/null +++ b/pkgs/development/python-modules/poster3/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, fetchPypi +, isPy3k +, paste +, webob +, pyopenssl +}: + +buildPythonPackage rec { + pname = "poster3"; + version = "0.8.1"; + format = "wheel"; # only redistributable available + + disabled = !isPy3k; + + src = fetchPypi { + inherit pname version; + format = "wheel"; + python = "py3"; + sha256 = "1b27d7d63e3191e5d7238631fc828e4493590e94dcea034e386c079d853cce14"; + }; + + checkInputs = [ + paste + webob + pyopenssl + ]; + + meta = with lib; { + description = "Streaming HTTP uploads and multipart/form-data encoding"; + homepage = https://atlee.ca/software/poster/; + license = licenses.mit; + maintainers = with maintainers; [ WhittlesJr ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6b3e434074a..ac1567aacd5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1709,6 +1709,8 @@ in { proboscis = callPackage ../development/python-modules/proboscis {}; + poster3 = callPackage ../development/python-modules/poster3 { }; + py4j = callPackage ../development/python-modules/py4j { }; pyechonest = callPackage ../development/python-modules/pyechonest { }; From 8abfbb93ddd0d5b9c9fb61e61d4d398c2b2abe51 Mon Sep 17 00:00:00 2001 From: Alex Whitt Date: Mon, 19 Aug 2019 18:08:06 -0400 Subject: [PATCH 033/377] pythonPackages.easysnmp: init at 0.2.5 --- .../python-modules/easysnmp/default.nix | 56 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 5 ++ 2 files changed, 61 insertions(+) create mode 100644 pkgs/development/python-modules/easysnmp/default.nix diff --git a/pkgs/development/python-modules/easysnmp/default.nix b/pkgs/development/python-modules/easysnmp/default.nix new file mode 100644 index 00000000000..32659b520ba --- /dev/null +++ b/pkgs/development/python-modules/easysnmp/default.nix @@ -0,0 +1,56 @@ +{ stdenv +, lib +, buildPythonPackage +, pythonAtLeast +, fetchFromGitHub +, net_snmp +, openssl +, pytest +, pytestcov +, pytest-flake8 +, pytest-sugar +, termcolor +}: + +buildPythonPackage rec { + pname = "easysnmp"; + version = "0.2.5"; + + # See https://github.com/kamakazikamikaze/easysnmp/issues/108 + disabled = pythonAtLeast "3.7"; + + src = fetchFromGitHub { + owner = "kamakazikamikaze"; + repo = pname; + rev = version; + sha256 = "1si9iyxqj6z22jzn6m93lwpinsqn20lix2py3jm3g3fmwawkd735"; + }; + + checkInputs = [ + pytest + pytestcov + pytest-flake8 + pytest-sugar + termcolor + ]; + + buildInputs = [ + net_snmp + openssl + ]; + + buildPhase = '' + python setup.py build bdist_wheel --basedir=${net_snmp}/bin + ''; + + # Unable to get tests to pass, even running by hand. The pytest tests have + # become stale. + doCheck = false; + + meta = with lib; { + description = "A blazingly fast and Pythonic SNMP library based on the official Net-SNMP bindings"; + homepage = https://easysnmp.readthedocs.io/en/latest/; + license = licenses.bsd3; + maintainers = with maintainers; [ WhittlesJr ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ac1567aacd5..65590c0ff34 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1701,6 +1701,11 @@ in { dugong = callPackage ../development/python-modules/dugong {}; + easysnmp = callPackage ../development/python-modules/easysnmp { + openssl = pkgs.openssl; + net_snmp = pkgs.net_snmp; + }; + iowait = callPackage ../development/python-modules/iowait {}; responses = callPackage ../development/python-modules/responses {}; From babd3f774738c07aa399699677a1f1e07a1f78e4 Mon Sep 17 00:00:00 2001 From: Joseph Lukasik Date: Fri, 4 Oct 2019 03:47:38 +0000 Subject: [PATCH 034/377] apacheHttpdPackage.mod_tile: init at unstable-2017-01-08 --- .../http/apache-modules/mod_tile/default.nix | 35 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/servers/http/apache-modules/mod_tile/default.nix diff --git a/pkgs/servers/http/apache-modules/mod_tile/default.nix b/pkgs/servers/http/apache-modules/mod_tile/default.nix new file mode 100644 index 00000000000..397e0dfe0bb --- /dev/null +++ b/pkgs/servers/http/apache-modules/mod_tile/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchFromGitHub, autoreconfHook, apacheHttpd, apr, cairo, iniparser, mapnik }: + +stdenv.mkDerivation rec { + pname = "mod_tile"; + version = "unstable-2017-01-08"; + + src = fetchFromGitHub { + owner = "openstreetmap"; + repo = "mod_tile"; + rev = "e25bfdba1c1f2103c69529f1a30b22a14ce311f1"; + sha256 = "12c96avka1dfb9wxqmjd57j30w9h8yx4y4w34kyq6xnf6lwnkcxp"; + }; + + nativeBuildInputs = [ autoreconfHook ]; + buildInputs = [ apacheHttpd apr cairo iniparser mapnik ]; + + configureFlags = [ + "--with-apxs=${apacheHttpd.dev}/bin/apxs" + ]; + + installPhase = '' + mkdir -p $out/modules + make install-mod_tile DESTDIR=$out + mv $out${apacheHttpd}/* $out + rm -rf $out/nix + ''; + + meta = with stdenv.lib; { + homepage = "https://github.com/openstreetmap/mod_tile"; + description = "Efficiently render and serve OpenStreetMap tiles using Apache and Mapnik"; + license = licenses.gpl2; + maintainers = with maintainers; [ jglukasik ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fb906ed884a..0e9cb62caba 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14552,6 +14552,8 @@ in mod_python = callPackage ../servers/http/apache-modules/mod_python { }; + mod_tile = callPackage ../servers/http/apache-modules/mod_tile { }; + mod_wsgi = self.mod_wsgi2; mod_wsgi2 = callPackage ../servers/http/apache-modules/mod_wsgi { python = python2; ncurses = null; }; mod_wsgi3 = callPackage ../servers/http/apache-modules/mod_wsgi { python = python3; }; From 899fa1ef9360556bf1933ba26e533080a128a0a6 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 2 Nov 2019 03:14:30 -0700 Subject: [PATCH 035/377] libpwquality: 1.4.1 -> 1.4.2 --- pkgs/development/libraries/libpwquality/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libpwquality/default.nix b/pkgs/development/libraries/libpwquality/default.nix index df3595adc01..b0d5513ca0f 100644 --- a/pkgs/development/libraries/libpwquality/default.nix +++ b/pkgs/development/libraries/libpwquality/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "libpwquality"; - version = "1.4.1"; + version = "1.4.2"; src = fetchFromGitHub { owner = "libpwquality"; repo = "libpwquality"; rev = "${pname}-${version}"; - sha256 = "150gk1d0gq9cig3ylyns7fgihgm3qb1basncahgyh1kzxplrdqm7"; + sha256 = "0n4pjhm7wfivk0wizggaxq4y4mcxic876wcarjabkp5z9k14y36h"; }; nativeBuildInputs = [ autoreconfHook perl ]; From eb4dd1794df04b5d33641f36205d5beea5e3fd32 Mon Sep 17 00:00:00 2001 From: Kolby Crouch Date: Sat, 2 Nov 2019 06:16:10 -0500 Subject: [PATCH 036/377] retroarch: update cores --- pkgs/misc/emulators/retroarch/cores.nix | 664 ++++++++++++++++++++---- pkgs/top-level/all-packages.nix | 38 +- 2 files changed, 602 insertions(+), 100 deletions(-) diff --git a/pkgs/misc/emulators/retroarch/cores.nix b/pkgs/misc/emulators/retroarch/cores.nix index e55cefdd320..ced26333f4c 100644 --- a/pkgs/misc/emulators/retroarch/cores.nix +++ b/pkgs/misc/emulators/retroarch/cores.nix @@ -1,7 +1,7 @@ -{ stdenv, fetchgit, fetchFromGitLab, cmake, pkgconfig, makeWrapper, python27, retroarch +{ stdenv, fetchgit, fetchFromGitHub, fetchFromGitLab, cmake, pkgconfig, makeWrapper, python27, python37, retroarch , alsaLib, fluidsynth, curl, hidapi, libGLU_combined, gettext, glib, gtk2, portaudio, SDL , ffmpeg, pcre, libevdev, libpng, libjpeg, udev, libvorbis -, miniupnpc, sfml, xorg, zlib }: +, miniupnpc, sfml, xorg, zlib, nasm, libpcap, boost }: let @@ -11,7 +11,7 @@ let stdenv.lib.makeOverridable stdenv.mkDerivation rec { name = "libretro-${core}-${version}"; - version = "2017-06-04"; + version = "2019-09-29"; inherit src; buildInputs = [ makeWrapper retroarch zlib ] ++ a.extraBuildInputs or []; @@ -38,7 +38,6 @@ let inherit description; homepage = https://www.libretro.com/; inherit license; - inherit broken; maintainers = with maintainers; [ edwtjo hrdinka MP2E ]; platforms = platforms.unix; }; @@ -59,12 +58,83 @@ in with stdenv.lib.licenses; core = "4do"; src = fetchRetro { repo = core + "-libretro"; - rev = "52d881743dd8614d96b4de8bd153cb725b87d474"; - sha256 = "1n42f70vni2zavppayaq8xmsyx5cn40qi4zk4pgq1w3hh2q8mj72"; + rev = "b6ad4bc8548f2f3792cd929ccf26d9078b73a1c0"; + sha256 = "0j2bd9cnnd5k99l9qr4wd5q9b4ciplia6ywp90xg6422s1im2iw0"; }; description = "Port of 4DO/libfreedo to libretro"; license = "Non-commercial"; }).override { + makefile = "Makefile"; + buildPhase = "make"; + }; + + atari800 = (mkLibRetroCore rec { + core = "atari800"; + src = fetchRetro { + repo = "libretro-" + core; + rev = "efc0bc71e3cb8a4f957d07fe808cc002ed9c13b9"; + sha256 = "150hmazi4p5p18gpjmkrn1k9j719cd9gy7jn0jiy3jbk2cxxsjn6"; + }; + description = "Port of Atari800 to libretro"; + license = gpl2; + }).override { + makefile = "Makefile"; + buildPhase = "make"; + }; + + beetle-snes = (mkLibRetroCore rec { + core = "mednafen-snes"; + src = fetchRetro { + repo = "beetle-bsnes-libretro"; + rev = "6aee84d454570bb17dff5975df28febdbcb72938"; + sha256 = "0nk9xlypg3jhpbwd9z5bjbgzlkz842hy9rq14k1nwn0qz6d88kld"; + }; + description = "Port of Mednafen's SNES core to libretro"; + license = gpl2; + }).override { + makefile = "Makefile"; + buildPhase = "make"; + }; + + beetle-gba = (mkLibRetroCore rec { + core = "mednafen-gba"; + src = fetchRetro { + repo = "beetle-gba-libretro"; + rev = "135afdbb9591655a3e016b75abba07e481f6d406"; + sha256 = "0fc0x24qn4y7pz3mp1mm1ain31aj9pznp1irr0k7hvazyklzy9g3"; + }; + description = "Port of Mednafen's GameBoy Advance core to libretro"; + license = gpl2; + }).override { + makefile = "Makefile"; + buildPhase = "make"; + }; + + beetle-lynx = (mkLibRetroCore rec { + core = "mednafen-lynx"; + src = fetchRetro { + repo = "beetle-lynx-libretro"; + rev = "928f7cf5b39f0363e55667572ff455e37489998e"; + sha256 = "0f03wzdr6f0fpy889i9a2834jg5lvcriyl98pajp75m7whm9r9cc"; + }; + description = "Port of Mednafen's Lynx core to libretro"; + license = gpl2; + }).override { + makefile = "Makefile"; + buildPhase = "make"; + }; + + beetle-ngp = (mkLibRetroCore rec { + core = "mednafen-ngp"; + src = fetchRetro { + repo = "beetle-ngp-libretro"; + rev = "6130e4057c3d8f9172f0c49bb9b6c61bd1a572d5"; + sha256 = "10k7spjrhggjgzb370bwv7fgk0nb6xri9ym6cm4qvnrkcwxm7i9p"; + }; + description = "Port of Mednafen's NeoGeo Pocket core to libretro"; + license = gpl2; + }).override { + makefile = "Makefile"; buildPhase = "make"; }; @@ -72,26 +142,42 @@ in with stdenv.lib.licenses; core = "mednafen-pce-fast"; src = fetchRetro { repo = "beetle-pce-fast-libretro"; - rev = "2954e645d668ee73d93803dc30da4462fc7a459b"; - sha256 = "0p0k7kqfd6xg1qh6vgzgwp122miprb2bpzljgxd9kvigxihsl6f7"; + rev = "7bbbdf111c1ce52ab4a97e911ebdaa6836ee881a"; + sha256 = "1p0kk5a2yi05yl0hspzv9q0n96yx9riaaacbmnq76li0i3ihkf6l"; }; description = "Port of Mednafen's PC Engine core to libretro"; license = gpl2; }); in der.override { + makefile = "Makefile"; buildPhase = "make"; name = "beetle-pce-fast-${der.version}"; }; + + beetle-pcfx = (mkLibRetroCore rec { + core = "mednafen-pcfx"; + src = fetchRetro { + repo = "beetle-pcfx-libretro"; + rev = "e04f695202a7295e4b6f2122ae947279ac9df007"; + sha256 = "0pdlz05pjqxp19da13dr3wd20hgxw8z5swhflyf7ksjgvz5rxb4r"; + }; + description = "Port of Mednafen's PCFX core to libretro"; + license = gpl2; + }).override { + makefile = "Makefile"; + buildPhase = "make"; + }; beetle-psx = let der = (mkLibRetroCore { core = "mednafen-psx"; src = fetchRetro { repo = "beetle-psx-libretro"; - rev = "76862abefdde9097561e2b795e75b49247deff17"; - sha256 = "1k4b7g50ajzchjrm6d3v68hvri4k3hzvacn2l99i5yq3hxp7vs7x"; + rev = "f55db8655408104a6e20af667657423f08566c85"; + sha256 = "17iz8r2wy8zqh63j78ijwxasdnmg8dh9mmqn1qr4hvf4fj53ckk8"; }; description = "Port of Mednafen's PSX Engine core to libretro"; license = gpl2; }); in der.override { + makefile = "Makefile"; buildPhase = "make"; name = "beetle-psx-${der.version}"; }; @@ -100,27 +186,84 @@ in with stdenv.lib.licenses; core = "mednafen-saturn"; src = fetchRetro { repo = "beetle-saturn-libretro"; - rev = "3f1661b39ef249e105e6e2e655854ad0c87cd497"; - sha256 = "1d1brysynwr6inlwfgv7gwkl3i9mf4lsaxd9wm2szw86g4diyn4c"; + rev = "3313cc6760c14cffa9226e0cfd41debc11df8bdd"; + sha256 = "1z2zfn5cpsr3x6bvr562vqvmp4pjjhv5a6jcp09gfsy2gkyispr2"; }; description = "Port of Mednafen's Saturn core to libretro"; license = gpl2; }); in der.override { + makefile = "Makefile"; buildPhase = "make"; name = "beetle-saturn-${der.version}"; - meta.platforms = [ "x86_64-linux" ]; + meta.platforms = [ "x86_64-linux" "aarch64-linux" ]; + }; + + beetle-supergrafx = (mkLibRetroCore rec { + core = "mednafen-supergrafx"; + src = fetchRetro { + repo = "beetle-supergrafx-libretro"; + rev = "857e41146e3b0a51def3baea49d2eec80f18102b"; + sha256 = "0r3v4qy4rx4mnr7w4s779f6f2bjyp69m42blimacl1l9f6hmcv5h"; + }; + description = "Port of Mednafen's SuperGrafx core to libretro"; + license = gpl2; + }).override { + makefile = "Makefile"; + buildPhase = "make"; + }; + + beetle-wswan = (mkLibRetroCore rec { + core = "mednafen-wswan"; + src = fetchRetro { + repo = "beetle-wswan-libretro"; + rev = "925cb8c77af1678ceab24f04c2790cb95389def1"; + sha256 = "0kqsqn655z6nnr2s1xdbf37ds99gyhqfd7dx0wmx3sy1fshjg5wm"; + }; + description = "Port of Mednafen's WonderSwan core to libretro"; + license = gpl2; + }).override { + makefile = "Makefile"; + buildPhase = "make"; + }; + + beetle-vb = (mkLibRetroCore rec { + core = "mednafen-vb"; + src = fetchRetro { + repo = "beetle-vb-libretro"; + rev = "9066cdafa29ac054243a679baded49212661f47b"; + sha256 = "0gsniz5kk4xdiprcfyqjcss2vkrphi48wbr29gqvpf7l8gpnwx8p"; + }; + description = "Port of Mednafen's VirtualBoy core to libretro"; + license = gpl2; + }).override { + makefile = "Makefile"; + buildPhase = "make"; + }; + + bluemsx = (mkLibRetroCore rec { + core = "bluemsx"; + src = fetchRetro { + repo = core + "-libretro"; + rev = "ddd89ff1fa534816e48521bd930b721f2d39975a"; + sha256 = "0hiqhc1ckj3ydy0q1v8hwjkkyh2564f7wlqypmshjcc47n296xyf"; + }; + description = "Port of BlueMSX to libretro"; + license = gpl2; + }).override { + buildPhase = "make"; }; bsnes-mercury = let bname = "bsnes-mercury"; in (mkLibRetroCore { core = bname + "-accuracy"; src = fetchRetro { repo = bname; - rev = "e89c9a2e0a12d588366ee4f5c76b7d75139d938b"; - sha256 = "0vkn1f38vwazpp3kbvvv8c467ghak6yfx00s48wkxwvhmak74a3s"; + rev = "4a382621da58ae6da850f1bb003ace8b5f67968c"; + sha256 = "0z8psz24nx8497vpk2wya9vs451rzzw915lkw3qiq9bzlzg9r2wv"; }; description = "Fork of bsnes with HLE DSP emulation restored"; license = gpl3; }).override { + makefile = "Makefile"; buildPhase = "make && cd out"; }; @@ -128,55 +271,88 @@ in with stdenv.lib.licenses; core = "desmume"; src = fetchRetro { repo = core; - rev = "ce1f93abb4c3aa55099f56298e5438a03a3c2bbd"; - sha256 = "064gzfbr7yizmvi91ry5y6bzikj633kdqhvzycb9f1g6kspf8yyl"; + rev = "e8cf461f83eebb195f09e70090f57b07d1bcdd9f"; + sha256 = "0rc8s5226wn39jqs5yxi30jc1snc0p106sfym7kgi98hy5na8yab"; }; description = "libretro wrapper for desmume NDS emulator"; license = gpl2; + extraBuildInputs = [ libpcap libGLU_combined xorg.libX11 ]; }).override { + makefile = "desmume/src/frontend/libretro/Makefile.libretro"; + configurePhase = "cd desmume/src/frontend/libretro"; + buildPhase = "make"; + }; + + desmume2015 = (mkLibRetroCore rec { + core = "desmume2015"; + src = fetchRetro { + repo = core; + rev = "c27bb71aa28250f6da1576e069b4b8cc61986beb"; + sha256 = "1m7g1wwpnnprmki3rixknggjmxbp7d4hwxgkqr041shmrm0rhafd"; + }; + description = "libretro wrapper for desmume NDS emulator from 2015"; + license = gpl2; + extraBuildInputs = [ libpcap libGLU_combined xorg.libX11 ]; + }).override { + makefile = "desmume/Makefile.libretro"; configurePhase = "cd desmume"; + buildPhase = "make"; }; dolphin = (mkLibRetroCore { core = "dolphin"; src = fetchRetro { repo = "dolphin"; - rev = "a6ad451fdd4ac8753fd1a8e2234ec34674677754"; - sha256 = "1cshlfmhph8dl3vgvn37imvp2b7xs2cx1r1ifp5js5psvhycrbz3"; + rev = "11a7ed402c7178da1d9d57c6e5e5a05a4dc6a2c8"; + sha256 = "11jrcczkbyns01rvxb5rd22fbkbfn2h81f6pfxbhi13fl4ljim9x"; }; description = "Port of Dolphin to libretro"; license = gpl2Plus; broken = true; extraBuildInputs = [ - cmake curl libGLU_combined pcre pkgconfig sfml miniupnpc - gettext glib gtk2 hidapi + cmake curl libGLU_combined pcre pkgconfig sfml + gettext hidapi libevdev udev - ] ++ (with xorg; [ libSM libX11 libXi libpthreadstubs libxcb xcbutil libXinerama libXxf86vm ]); + ] ++ (with xorg; [ libSM libX11 libXi libpthreadstubs libxcb xcbutil libXext libXrandr libXinerama libXxf86vm ]); }).override { cmakeFlags = [ - "-DLINUX_LOCAL_DEV=true" - "-DGTK2_GDKCONFIG_INCLUDE_DIR=${gtk2.out}/lib/gtk-2.0/include" - "-DGTK2_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include" - "-DGTK2_INCLUDE_DIRS=${gtk2.dev}/include/gtk-2.0" + "-DCMAKE_BUILD_TYPE=Release" + "-DLIBRETRO=ON" + "-DLIBRETRO_STATIC=1" + "-DENABLE_QT=OFF" + "-DENABLE_LTO=OFF" + "-DUSE_UPNP=OFF" + "-DUSE_DISCORD_PRESENCE=OFF" ]; dontUseCmakeBuildDir = "yes"; - buildPhase = '' - cd Source/Core/DolphinLibretro - make - ''; + buildPhase = "make"; + }; + + dosbox = (mkLibRetroCore rec { + core = "dosbox"; + src = fetchRetro { + repo = core + "-libretro"; + rev = "e4ed503b14ed59d5d745396ef1cc7d52cf912328"; + sha256 = "13bx0ln9hwn6hy4sv0ivqmjgjbfq8svx15dsa24hwd8lkf0kakl4"; + }; + description = "Port of DOSBox to libretro"; + license = gpl2; + }).override { + buildPhase = "make"; }; fba = (mkLibRetroCore rec { core = "fba"; src = fetchRetro { repo = core + "-libretro"; - rev = "9146c18ac989c619256d1cb8954d49e728e44ea3"; - sha256 = "159dww8mxi95xz4ypw38vsn1g4k6z8sv415qqf0qriydwhw6mh2m"; + rev = "89245384c7d181e286d6f34995253419f946becb"; + sha256 = "1pg351qhbq5x8qmaq6c30v8ynic8jv3gbxy2kq5iknka80g1lkck"; }; description = "Port of Final Burn Alpha to libretro"; license = "Non-commercial"; }).override { + makefile = "svn-current/trunk/makefile.libretro"; buildPhase = '' cd svn-current/trunk \ && make -f makefile.libretro \ @@ -188,19 +364,34 @@ in with stdenv.lib.licenses; core = "fceumm"; src = fetchRetro { repo = "libretro-" + core; - rev = "45f773a1c221121746bbe2680e3aaaf92776a87e"; - sha256 = "0jnwh1338q710x47bzrx319g5xbq9ipv35kyjlbkrzhqjq1blz0b"; + rev = "0e315e0ca0093ebda06a97835cec6ad4af81db7a"; + sha256 = "12bvvxmvafjvrvwxl5gzr583g48s0isx2fgvjgkrx175vk2amaf4"; }; description = "FCEUmm libretro port"; license = gpl2; }; + flycast = (mkLibRetroCore rec { + core = "flycast"; + src = fetchRetro { + repo = core; + rev = "45a15205dfc05cfc4df2488cad7c2b4988c5aa0f"; + sha256 = "18glxd57kddq6p2bwq0qknyq6bv8dxklqks4w2jy2yccvwxdxy2i"; + }; + description = "Flycast libretro port"; + license = gpl2; + extraBuildInputs = [ libGLU_combined ]; + }).override { + makefile = "Makefile"; + buildPhase = "make"; + }; + gambatte = mkLibRetroCore rec { core = "gambatte"; src = fetchRetro { repo = core + "-libretro"; - rev = "db7af6cf6ea39fd5e39eea137ff752649599a4e4"; - sha256 = "0h7hyj630nk1s32wx02y4q9x2lp6wbnh6nkc9ihf4pygcsignmwr"; + rev = "4d9ad7b29946ec0a914b2d6a735b6c2704ed1f23"; + sha256 = "156pvvlch5izbgbw4ddxhiwgzpp52irr3nqaz813i5f02fiq5wya"; }; description = "Gambatte libretro port"; license = gpl2; @@ -210,13 +401,56 @@ in with stdenv.lib.licenses; core = "genesis-plus-gx"; src = fetchRetro { repo = "Genesis-Plus-GX"; - rev = "365a28c7349b691e6aaa3ad59b055261c42bd130"; - sha256 = "0s11ddpnb44q4xjkl7dylldhi9y5zqywqavpk0bbwyj84r1cbz3c"; + rev = "0e4357bd64533d7fd93b5f01620b92595025fab5"; + sha256 = "1nryy00844h3ra97j40g38lj7036ibm2l8002qid7r5r9kggclqx"; }; description = "Enhanced Genesis Plus libretro port"; license = "Non-commercial"; }; + gpsp = (mkLibRetroCore rec { + core = "gpsp"; + src = fetchRetro { + repo = core; + rev = "24af89596e6484ff5a7a08efecfa8288cfbc02f3"; + sha256 = "1jc5i70cab5f23yc9sfv8iyvmwmc4sb33f413il2vlhsfdxklyk7"; + }; + description = "Port of gpSP to libretro"; + license = gpl2; + }).override { + makefile = "Makefile"; + buildPhase = "make"; + }; + + handy = (mkLibRetroCore rec { + core = "handy"; + src = fetchRetro { + repo = "libretro-" + core; + rev = "6b19a4fad1b394f6a1351c88f60991d4878ff05b"; + sha256 = "0lhkrwh3rirdidxb8kfcg8wk9gjsc7g6qpkv74h6f09rb4y75w1y"; + }; + description = "Port of Handy to libretro"; + license = "Handy-License"; + }).override { + makefile = "Makefile"; + buildPhase = "make"; + }; + + hatari = (mkLibRetroCore rec { + core = "hatari"; + src = fetchRetro { + repo = core; + rev = "ec1b59c4b6c7ca7d0d23d60cfe2cb61911b11173"; + sha256 = "1pm821s2cz93xr7qx7dv0imr44bi4pvdvlnjl486p83vff9yawfg"; + }; + description = "Port of Hatari to libretro"; + license = gpl2; + extraBuildInputs = [ cmake SDL ]; + }).override { + makefile = "Makefile.libretro"; + buildPhase = "make"; + }; + higan-sfc = (mkLibRetroCore { core = "higan-sfc"; src = fetchFromGitLab { @@ -227,6 +461,8 @@ in with stdenv.lib.licenses; }; description = "Accurate SNES / Super Famicom emulator"; license = gpl3; + broken = true; + }).override { makefile = "GNUmakefile"; buildPhase = "cd higan && make compiler=g++ target=libretro binary=library && cd out"; @@ -236,8 +472,8 @@ in with stdenv.lib.licenses; core = "mame"; src = fetchRetro { repo = "mame"; - rev = "9f9e6b6c9bde4d50c72e9a5c80496a1fec6b8aa9"; - sha256 = "0lfj8bjchkcvyb5x0x29cg10fkfklxndk80947k4qfysclijxpkv"; + rev = "f4aac49f3d56fbd653628ac456c23ac9a6b857ae"; + sha256 = "1pjpnwdj73319hgcjhganzrcz2zn4fnjydah989haqh3id5j3zam"; }; description = "Port of MAME to libretro"; license = gpl2Plus; @@ -249,68 +485,205 @@ in with stdenv.lib.licenses; # make -C 3rdparty/genie/build/gmake.linux -f genie.make obj/Release/src/host/lua-5.3.0/src/lgc.o mkdir -p 3rdparty/genie/build/gmake.linux/obj/Release/src/host/lua-5.3.0/src ''; + buildPhase = "make -f Makefile.libretro"; + }; + + mame2000 = (mkLibRetroCore rec { + core = "mame2000"; + src = fetchRetro { + repo = core + "-libretro"; + rev = "0a8a174f5e755cdd476895207003c5d07cfa6af2"; + sha256 = "03k0cfgd4wfl31dv5xb6xjd4h7sh0k0qw6wbspwi0lgswmhz97bb"; + }; + description = "Port of MAME ~2000 to libretro"; + license = gpl2Plus; + }).override { + makefile = "Makefile"; + buildPhase = "make"; + }; + + mame2003 = (mkLibRetroCore rec { + core = "mame2003"; + src = fetchRetro { + repo = core + "-libretro"; + rev = "170d5b6490953d40edc39defe69945d005f8ec03"; + sha256 = "0slsf59sn5lijr1mrx5ffc9z81ra1wcw7810mb52djqyvm15r9zl"; + }; + description = "Port of MAME ~2003 to libretro"; + license = gpl2Plus; + }).override { + makefile = "Makefile"; + buildPhase = "make"; + }; + + mame2003-plus = (mkLibRetroCore rec { + core = "mame2003-plus"; + src = fetchRetro { + repo = core + "-libretro"; + rev = "d9a56a3af908ae9100b4c9feebff4b918363f241"; + sha256 = "1c16chfs4b2j1x1bmrklh8ssqki850k787qwq7b95dyxksj2bpx1"; + }; + description = "Port of MAME ~2003+ to libretro"; + license = gpl2Plus; + }).override { + makefile = "Makefile"; + buildPhase = "make"; + }; + + mame2010 = (mkLibRetroCore rec { + core = "mame2010"; + src = fetchRetro { + repo = core + "-libretro"; + rev = "4ced2c31f1100eefc7f4483b474b8a680a3b3f2b"; + sha256 = "1a8ijj0sixr6xrqfgimna0ipfj2bb2kvj4mb45hb8a18mwn6y0mc"; + }; + description = "Port of MAME ~2010 to libretro"; + license = gpl2Plus; + }).override { + makefile = "Makefile"; + buildPhase = "make"; + }; + + mame2015 = (mkLibRetroCore rec { + core = "mame2015"; + src = fetchRetro { + repo = core + "-libretro"; + rev = "e3a28398f54cd6b2c24b7165d215b046b79c10f5"; + sha256 = "1fgwi37zgp2s92bkz03gch3ivgyjgdi3xycrd8z7x87gi20a79x9"; + }; + description = "Port of MAME ~2015 to libretro"; + license = gpl2Plus; + extraBuildInputs = [ python27 alsaLib ]; + }).override { + makefile = "Makefile"; + buildPhase = "make"; + }; + + mame2016 = (mkLibRetroCore rec { + core = "mame2016"; + src = fetchRetro { + repo = core + "-libretro"; + rev = "ea4c1ffa75eb3fb0096158b71706b8b84d86d12c"; + sha256 = "1qyvdymmjv5q0k3najgfdxzf1yr6bnysnsl19v753yj29xs4hwzp"; + }; + description = "Port of MAME ~2016 to libretro"; + license = gpl2Plus; + extraBuildInputs = [ python27 alsaLib ]; + }).override { + postPatch = '' + # Prevent the failure during the parallel building of: + # make -C 3rdparty/genie/build/gmake.linux -f genie.make obj/Release/src/host/lua-5.3.0/src/lgc.o + mkdir -p 3rdparty/genie/build/gmake.linux/obj/Release/src/host/lua-5.3.0/src + ''; + buildPhase = "make -f Makefile.libretro"; + }; + + mesen = (mkLibRetroCore rec { + core = "mesen"; + src = fetchFromGitHub { + owner = "SourMesen"; + repo = core; + rev = "942633dd3dbb73cc3abd748f6d5440c78abbea09"; + sha256 = "0a95wd64vnblksacapxwxla9j2iw8a5hbdm111cldrni12q87iq2"; + }; + description = "Port of Mesen to libretro"; + license = gpl3; + }).override { + makefile = "Libretro/Makefile"; + buildPhase = "cd Libretro && make"; }; mgba = mkLibRetroCore rec { core = "mgba"; src = fetchRetro { repo = core; - rev = "fdaaaee661e59f28c94c7cfa4e82e70b71e24a9d"; - sha256 = "1b30sa861r4bhbqkx6vkklh4iy625bpzki2ks4ivvjns1ijczvc7"; + rev = "4865aaabc2a46c635f218f7b51f8fc5cc2c4c8ac"; + sha256 = "1mdzwcsl5bafmgqfh0a1bgfgilisffxsygcby0igsq2bgkal47mm"; }; description = "Port of mGBA to libretro"; license = mpl20; }; mupen64plus = (mkLibRetroCore rec { - core = "mupen64plus"; + core = "mupen64plus-next"; src = fetchRetro { - repo = core + "-libretro"; - rev = "407bcd40b3a42bff6b856a6d6f88a7d5d670bf9e"; - sha256 = "0q5kvjz7rpk7mp75cdywqjgmy10c0h7ky26hh1x90d39y94idcd8"; + repo = "mupen64plus-libretro-nx"; # + "-libretro-nx"; + rev = "f77c16f9f1dd911fd2254becc8a28adcdafe8aa1"; + sha256 = "0j6vrkwch9lwmlhyz7fp1ha0bby54gvbwk91hwbv35f6dvs0aw0d"; }; description = "Libretro port of Mupen64 Plus, GL only"; license = gpl2; - extraBuildInputs = [ libGLU_combined libpng ]; + extraBuildInputs = [ libGLU_combined libpng nasm xorg.libX11 ]; }).override { - buildPhase = "make WITH_DYNAREC=${if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" else "x86"}"; + makefile = "Makefile"; + buildPhase = "make"; }; nestopia = (mkLibRetroCore rec { core = "nestopia"; src = fetchRetro { repo = core; - rev = "ecfa170a582e5b8ec11225ca645843fa064955ca"; - sha256 = "17ac7dhasch6f4lpill8c5scsvaix0jvbf1cp797qbll4hk84f2q"; + rev = "7f48c211c281880d122981da119a4455a9bebbde"; + sha256 = "05p3a559633dzw222rs1fh48v657mdyirl1qfqzkhqiar9rxf31g"; }; description = "nestopia undead libretro port"; license = gpl2; }).override { + makefile = "libretro/Makefile"; buildPhase = "cd libretro && make"; }; - + + o2em = (mkLibRetroCore rec { + core = "o2em"; + src = fetchRetro { + repo = "libretro-" + core; + rev = "d6731b9b2592654ce4f1b64c1b1da17b32e7c94c"; + sha256 = "0809qw16y7ablxfayf0lbzvq7wqdmjp0afdb0vcgv193vvhhp58q"; + }; + description = "Port of O2EM to libretro"; + license = artistic1; + }).override { + makefile = "Makefile"; + buildPhase = "make"; + }; + parallel-n64 = (mkLibRetroCore rec { core = "parallel-n64"; src = fetchRetro { repo = core; - rev = "3276db27547bf7ca85896427f0b82d4658694d88"; - sha256 = "19396v50azrb52ifjk298zgcbxn8dvfvp6zwrnzsk6mp8ff7qcqw"; + rev = "30f4fd3c2456145763eb76aead7485a1b86ba6bd"; + sha256 = "0kbyzmscmfi6f842clzaff4k6xcb5410fwhv8n6vv42xk6ljfvgh"; }; description = "Parallel Mupen64plus rewrite for libretro."; license = gpl2; extraBuildInputs = [ libGLU_combined libpng ]; }).override { - buildPhase = "make WITH_DYNAREC=${if stdenv.hostPlatform.system == "x86_64-linux" then "x86_64" else "x86"}"; + makefile = "Makefile"; + buildPhase = "make"; }; + pcsx_rearmed = (mkLibRetroCore rec { + core = "pcsx_rearmed"; + src = fetchRetro { + repo = core; + rev = "eb6943ee04b0f30a6f1cebfe399a94bacd1dfb45"; + sha256 = "0xikdirvjal4mdr5y9dl9gcxhdilqzq43f909b0z8vc069vj1wjz"; + }; + description = "Port of PCSX ReARMed to libretro"; + license = gpl2; + }).override { + configurePhase = "rm configure"; + buildPhase = "make -f Makefile.libretro"; + }; + picodrive = (mkLibRetroCore rec { core = "picodrive"; src = fetchRetro { repo = core; - rev = "cbc93b68dca1d72882d07b54bbe1ef25b980558a"; - sha256 = "0fl9r6jj2x9231md5zc4scra79j5hfn1n2z67scff1375xg1k64h"; + rev = "28dcfd6f43434e6828ee647223a0576bfe858c24"; + sha256 = "19a1b6q8fhf7wxzyf690va1ixzlxlzyslv1zxm0ll5pfsqf2y3gx"; }; description = "Fast MegaDrive/MegaCD/32X emulator"; license = "MAME"; @@ -321,18 +694,38 @@ in with stdenv.lib.licenses; configurePhase = "./configure"; }; + play = (mkLibRetroCore rec { + core = "play"; + src = fetchRetro { + repo = "play-"; + rev = "fedc1e1c2918a7490a881cdb4ec951a828c19671"; + sha256 = "0hwxx7h61gd29a2gagwjbvxk2hgwdk1wxg4nx90zrizb8nczwnl6"; + }; + description = "Port of Play! to libretro"; + license = bsd2; + extraBuildInputs = [ cmake boost ]; + }).override { + cmakeFlags = [ "-DBUILD_PLAY=OFF -DBUILD_LIBRETRO_CORE=ON" ]; + buildPhase = "make"; + }; + ppsspp = (mkLibRetroCore rec { core = "ppsspp"; - src = fetchRetro { - repo = "libretro-" + core; - rev = "5f7bcf7bfc15f83d405bcecd7a163a55ad1e7573"; - sha256 = "06k1gzmypz61dslynrw4b5i161rhj43y6wnr2nhbzvwcv5bw8w8r"; + src = fetchgit { + url = "https://github.com/hrydgard/ppsspp"; + rev = "bf1777f7d3702e6a0f71c7ec1fc51976e23c2327"; + sha256 = "17sym0vk72lzbh9a1501mhw98c78x1gq7k1fpy69nvvb119j37wa"; }; description = "ppsspp libretro port"; license = gpl2; - extraBuildInputs = [ libGLU_combined ffmpeg ]; + extraBuildInputs = [ cmake libGLU_combined ffmpeg python37 xorg.libX11 ]; }).override { - buildPhase = "cd libretro && make"; + cmakeFlags = "-DLIBRETRO=ON"; + makefile = "Makefile"; + buildPhase = '' + make \ + && mv lib/ppsspp_libretro${stdenv.hostPlatform.extensions.sharedLibrary} ppsspp_libretro${stdenv.hostPlatform.extensions.sharedLibrary} + ''; }; prboom = (mkLibRetroCore rec { @@ -348,30 +741,31 @@ in with stdenv.lib.licenses; buildPhase = "make"; }; - quicknes = (mkLibRetroCore { + prosystem = (mkLibRetroCore rec { + core = "prosystem"; + src = fetchRetro { + repo = core + "-libretro"; + rev = "cb4aa3ee72f98b0891a7bac5c9dac458cdba4d34"; + sha256 = "0yvzmks9zz1hf7mv6cd2qin1p3yx00dbrcxlm0yysy5q5jiigblg"; + }; + description = "Port of ProSystem to libretro"; + license = gpl2; + }).override { + makefile = "Makefile"; + buildPhase = "make"; + }; + + quicknes = (mkLibRetroCore rec { core = "quicknes"; src = fetchRetro { repo = "QuickNES_Core"; - rev = "8613b48cee97f1472145bbafa76e543854b2bbd5"; - sha256 = "18lizdb9zjlfhh8ibvmcscldlf3mw4aj8nds3pah68cd2lw170w1"; + rev = "cd302d998d102c9461a924b81817e48b9ea1518f"; + sha256 = "1sczs1jqcbhpkb5xpcqqdcnxlz7bqmanm4gdnnc12c19snl7999b"; }; description = "QuickNES libretro port"; license = lgpl21Plus; }).override { - buildPhase = "make"; - }; - - reicast = (mkLibRetroCore rec { - core = "reicast"; - src = fetchRetro { - repo = core + "-emulator"; - rev = "40d4e8af2dd67a3f317c14224873c8ec0e1f9d11"; - sha256 = "0d8wzpv7pcyh437gmvi439vim26wyrjmi5hj97wvyvggywjwrx8m"; - }; - description = "Reicast libretro port"; - license = gpl2; - extraBuildInputs = [ libGLU_combined ]; - }).override { + makefile = "Makefile"; buildPhase = "make"; }; @@ -379,13 +773,14 @@ in with stdenv.lib.licenses; core = "scummvm"; src = fetchRetro { repo = core; - rev = "de8d7e58caa23f071ce9d1bc5133f45d16c3ff1c"; - sha256 = "097i2dq3hw14hicsplrs36j1qa3r45vhzny5v4aw6qw4aj34hksy"; + rev = "e07a6ede61c364fb87630fa7507a4f8482d882e0"; + sha256 = "0i88z53q28lwzmadxincab4m66qbzcbmasgildybj8db0z2z8jm0"; }; description = "Libretro port of ScummVM"; license = gpl2; extraBuildInputs = [ fluidsynth libjpeg libvorbis libGLU_combined SDL ]; }).override { + makefile = "backends/platform/libretro/build/Makefile"; buildPhase = "cd backends/platform/libretro/build && make"; }; @@ -393,50 +788,85 @@ in with stdenv.lib.licenses; core = "snes9x"; src = fetchRetro { repo = core; - rev = "db4bfaba3b0d5a067fe9aea323503656837a8d9a"; - sha256 = "02f04ss45km32lp68diyfkix1gryx89qy8cc80189ipwnx80pgip"; + rev = "29b78df8c9f0f48ed4605d08a187a134b3b316d6"; + sha256 = "004h1pkxvbn4zlh8bqs6z17k04jw5wzbwklpgvmb7hbxshsi4qid"; }; description = "Port of SNES9x git to libretro"; license = "Non-commercial"; }).override { + makefile = "libretro/Makefile"; buildPhase = "cd libretro && make"; }; - snes9x-next = (mkLibRetroCore rec { - core = "snes9x-next"; + snes9x2002 = (mkLibRetroCore rec { + core = "snes9x2002"; src = fetchRetro { repo = core; - rev = "b2a69de0df1eb39ed362806f9c9633f4544272af"; - sha256 = "1vhgsrg9l562nincfvpj2h2dqkkblg1qmh0v47jqlqgmgl2b1zij"; + rev = "354bcb5acea0aa45b56ae553e0b2b4f10792dfeb"; + sha256 = "05gvjjxy6ci5pax3frd9g8k9mkqskab5g6rvfjab7cc4zrxrg23f"; + }; + description = "Optimized port/rewrite of SNES9x 1.39 to Libretro"; + license = "Non-commercial"; + }).override { + makefile = "Makefile"; + buildPhase = "make"; + }; + + snes9x2005 = (mkLibRetroCore rec { + core = "snes9x2005"; + src = fetchRetro { + repo = core; + rev = "e5cadd2f21fb64e8c7194ad006b39e6f555c4a5b"; + sha256 = "1q0xrw3f8zm2k19sva8cz28yx815w8a6y1xsl0i6bb3cai3q1hyx"; + }; + description = "Optimized port/rewrite of SNES9x 1.43 to Libretro"; + license = "Non-commercial"; + }).override { + makefile = "Makefile"; + buildPhase = '' + make USE_BLARGG_APU=1 \ + && mv snes9x2005_plus_libretro${stdenv.hostPlatform.extensions.sharedLibrary} snes9x2005_libretro${stdenv.hostPlatform.extensions.sharedLibrary} + ''; + }; + + snes9x2010 = (mkLibRetroCore rec { + core = "snes9x2010"; + src = fetchRetro { + repo = core; + rev = "e945cbae0f8c472e1567a319817c9228b775dd71"; + sha256 = "1pj5p4a2hy7hk90bzy4vnkz3b6nc8n1niqibgwhyfsc22xlxqsfr"; }; description = "Optimized port/rewrite of SNES9x 1.52+ to Libretro"; license = "Non-commercial"; }).override { buildPhase = '' make -f Makefile.libretro - mv snes9x2010_libretro${stdenv.hostPlatform.extensions.sharedLibrary} snes9x_next_libretro${stdenv.hostPlatform.extensions.sharedLibrary} ''; }; stella = (mkLibRetroCore rec { core = "stella"; src = fetchRetro { - repo = core + "-libretro"; - rev = "bbe65db0e344dcb38905586bd853076b65963e5a"; - sha256 = "18r1yyfzvjq2hq04d94y37kzsq6aywh1aim69a3imk8kh46gwrh0"; + repo = core + "2014-libretro"; + rev = "6d74ad9a0fd779145108cf1213229798d409ed37"; + sha256 = "0b1nsk92rr64xxj8jc9vpjqgrmm3554096zl031ymr94j5cc87q9"; }; description = "Port of Stella to libretro"; license = gpl2; }).override { - buildPhase = "make"; + makefile = "Makefile"; + buildPhase = '' + make \ + && mv stella2014_libretro${stdenv.hostPlatform.extensions.sharedLibrary} stella_libretro${stdenv.hostPlatform.extensions.sharedLibrary} + ''; }; vba-next = mkLibRetroCore rec { core = "vba-next"; src = fetchRetro { repo = core; - rev = "e7734756d228ea604f8fa872cea1bba987780791"; - sha256 = "03s4rh7dbbhbfc4pfdvr9jcbxrp4ijg8yp49s1xhr7sxsblj2vpv"; + rev = "3580ae6acb1a90c4e982e57597458da07eca4f41"; + sha256 = "0fz8z04kf9g1i5x5slyvx5kb07garzxvhcqnwmqn5j574xh1lc6d"; }; description = "VBA-M libretro port with modifications for speed"; license = gpl2; @@ -446,13 +876,55 @@ in with stdenv.lib.licenses; core = "vbam"; src = fetchRetro { repo = core + "-libretro"; - rev = "1b82fc2d761f027567632692f787482d1e287ec2"; - sha256 = "043djmqvh2grc25hwjw4b5kfx57b89ryp6fcl8v632sm35l3dd6z"; + rev = "9ccdeac3aa9db00720bb80eff5c9924362144efa"; + sha256 = "0rq89i9f483j93shhp2p3vqsnb2abpwz6wdnsycfwxgblczmi22y"; }; description = "vanilla VBA-M libretro port"; license = gpl2; }).override { + makefile = "src/libretro/Makefile"; buildPhase = "cd src/libretro && make"; }; + vecx = (mkLibRetroCore rec { + core = "vecx"; + src = fetchRetro { + repo = "libretro-" + core; + rev = "26585ee701499550e484c11f005db18e926827d9"; + sha256 = "0vz2aksc8mqnw55f2bvvawj21mxf60fp93r0sr55hdccn9h7355k"; + }; + description = "Port of Vecx to libretro"; + license = gpl3; + }).override { + buildPhase = "make"; + }; + + virtualjaguar = (mkLibRetroCore rec { + core = "virtualjaguar"; + src = fetchRetro { + repo = core + "-libretro"; + rev = "7bdd8658880b53bf2bcbae0741323fe18f9041f5"; + sha256 = "0zbrsfhvx293ijazy1w19qha19hprsi0zv8295sa0gq8kyh0xhyw"; + }; + description = "Port of VirtualJaguar to libretro"; + license = gpl3; + }).override { + makefile = "Makefile"; + buildPhase = "make"; + }; + + yabause = (mkLibRetroCore rec { + core = "yabause"; + src = fetchRetro { + repo = core; + rev = "08d09cb88a69ee4c2986693fb813e0eb58d71481"; + sha256 = "0z55yam1l7m21kbjwn44sp4md9g7p95b27vcxr7i0v08gnkwwvv1"; + }; + description = "Port of Yabause to libretro"; + license = gpl2; + }).override { + makefile = "yabause/src/libretro/Makefile"; + buildPhase = "cd yabause/src/libretro && make"; + }; + } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 764333fd122..b1b5ea4300b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21669,34 +21669,64 @@ in in with libretro; ([ ] ++ optional (cfg.enable4do or false) _4do + ++ optional (cfg.enableAtari800 or false) atari800 + ++ optional (cfg.enableBeetleGBA or false) beetle-gba + ++ optional (cfg.enableBeetleLynx or false) beetle-lynx + ++ optional (cfg.enableBeetleNGP or false) beetle-ngp ++ optional (cfg.enableBeetlePCEFast or false) beetle-pce-fast + ++ optional (cfg.enableBeetlePCFX or false) beetle-pcfx ++ optional (cfg.enableBeetlePSX or false) beetle-psx ++ optional (cfg.enableBeetleSaturn or false) beetle-saturn + ++ optional (cfg.enableBeetleSNES or false) beetle-snes + ++ optional (cfg.enableBeetleSuperGrafx or false) beetle-supergrafx + ++ optional (cfg.enableBeetleWswan or false) beetle-wswan + ++ optional (cfg.enableBeetleVB or false) beetle-vb + ++ optional (cfg.enableBlueMSX or false) bluemsx ++ optional (cfg.enableBsnesMercury or false) bsnes-mercury + ++ optional (cfg.enableDOSBox or false) dosbox ++ optional (cfg.enableDesmume or false) desmume + ++ optional (cfg.enableDesmume2015 or false) desmume2015 ++ optional (cfg.enableDolphin or false) dolphin ++ optional (cfg.enableFBA or false) fba ++ optional (cfg.enableFceumm or false) fceumm + ++ optional (cfg.enableFlycast or false) flycast ++ optional (cfg.enableGambatte or false) gambatte ++ optional (cfg.enableGenesisPlusGX or false) genesis-plus-gx + ++ optional (cfg.enableGpsp or false) gpsp + ++ optional (cfg.enableHandy or false) handy + ++ optional (cfg.enableHatari or false) hatari ++ optional (cfg.enableHiganSFC or false) higan-sfc ++ optional (cfg.enableMAME or false) mame + ++ optional (cfg.enableMAME2000 or false) mame2000 + ++ optional (cfg.enableMAME2003 or false) mame2003 + ++ optional (cfg.enableMAME2003Plus or false) mame2003-plus + ++ optional (cfg.enableMAME2010 or false) mame2010 + ++ optional (cfg.enableMAME2015 or false) mame2015 + ++ optional (cfg.enableMAME2016 or false) mame2016 + ++ optional (cfg.enableMesen or false) mesen ++ optional (cfg.enableMGBA or false) mgba ++ optional (cfg.enableMupen64Plus or false) mupen64plus ++ optional (cfg.enableNestopia or false) nestopia + ++ optional (cfg.enableO2EM or false) o2em ++ optional (cfg.enableParallelN64 or false) parallel-n64 + ++ optional (cfg.enablePCSXRearmed or false) pcsx_rearmed ++ optional (cfg.enablePicodrive or false) picodrive - ++ optional (cfg.enablePrboom or false) prboom + ++ optional (cfg.enablePlay or false) play ++ optional (cfg.enablePPSSPP or false) ppsspp + ++ optional (cfg.enablePrboom or false) prboom + ++ optional (cfg.enableProSystem or false) prosystem ++ optional (cfg.enableQuickNES or false) quicknes - ++ optional (cfg.enableReicast or false) reicast ++ optional (cfg.enableScummVM or false) scummvm ++ optional (cfg.enableSnes9x or false) snes9x - ++ optional (cfg.enableSnes9xNext or false) snes9x-next + ++ optional (cfg.enableSnes9x2002 or false) snes9x2002 + ++ optional (cfg.enableSnes9x2005 or false) snes9x2005 + ++ optional (cfg.enableSnes9x2010 or false) snes9x2010 ++ optional (cfg.enableStella or false) stella ++ optional (cfg.enableVbaNext or false) vba-next ++ optional (cfg.enableVbaM or false) vba-m - + ++ optional (cfg.enableVecx or false) vecx + ++ optional (cfg.enableVirtualJaguar or false) virtualjaguar + ++ optional (cfg.enableYabause or false) yabause # added on 2017-02-25 due #23163 ++ optional (cfg.enableMednafenPCEFast or false) (throw "nix config option enableMednafenPCEFast has been renamed to enableBeetlePCEFast") From 8011c943f0abb41d3574c8381947892e6515afb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Sat, 2 Nov 2019 08:54:33 -0300 Subject: [PATCH 037/377] lounge-gtk-theme: init at 1.22 --- pkgs/data/themes/lounge/default.nix | 35 +++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/data/themes/lounge/default.nix diff --git a/pkgs/data/themes/lounge/default.nix b/pkgs/data/themes/lounge/default.nix new file mode 100644 index 00000000000..15ec68b0757 --- /dev/null +++ b/pkgs/data/themes/lounge/default.nix @@ -0,0 +1,35 @@ +{ stdenv, fetchFromGitHub, meson, ninja, sassc, gtk3, gnome3, gdk-pixbuf, librsvg, gtk-engine-murrine }: + +stdenv.mkDerivation rec { + pname = "lounge-gtk-theme"; + version = "1.22"; + + src = fetchFromGitHub { + owner = "monday15"; + repo = pname; + rev = version; + sha256 = "1y1wkfsv2zrxqcqr53lmr9743mvzcy4swi5j6sxmk1aykx6ccs1p"; + }; + + nativeBuildInputs = [ meson ninja sassc gtk3 ]; + + buildInputs = [ gdk-pixbuf librsvg ]; + + propagatedUserEnvPkgs = [ gtk-engine-murrine ]; + + mesonFlags = [ + "-D gnome_version=${stdenv.lib.versions.majorMinor gnome3.gnome-shell.version}" + ]; + + postFixup = '' + gtk-update-icon-cache "$out"/share/icons/Lounge-aux; + ''; + + meta = with stdenv.lib; { + description = "Simple and clean GTK theme with vintage scrollbars, inspired by Absolute, based on Adwaita"; + homepage = https://github.com/monday15/lounge-gtk-theme; + license = licenses.gpl3Plus; + platforms = platforms.unix; + maintainers = [ maintainers.romildo ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 764333fd122..04117da2f5a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17195,6 +17195,8 @@ in # lohit-fonts.kashmiri lohit-fonts.konkani lohit-fonts.maithili lohit-fonts.sindhi lohit-fonts = recurseIntoAttrs ( callPackages ../data/fonts/lohit-fonts { } ); + lounge-gtk-theme = callPackage ../data/themes/lounge { }; + luculent = callPackage ../data/fonts/luculent { }; maia-icon-theme = callPackage ../data/icons/maia-icon-theme { }; From 285a8123bf5d5d27e4b7f41fd56ff1e49065d654 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo=20Malaquias?= Date: Sat, 2 Nov 2019 11:21:56 -0300 Subject: [PATCH 038/377] enlightenment.efl: 1.23.1 -> 1.23.2 --- pkgs/desktops/enlightenment/efl.nix | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/pkgs/desktops/enlightenment/efl.nix b/pkgs/desktops/enlightenment/efl.nix index 153616a3bc8..976c6b1f32b 100644 --- a/pkgs/desktops/enlightenment/efl.nix +++ b/pkgs/desktops/enlightenment/efl.nix @@ -1,19 +1,20 @@ -{ stdenv, fetchurl, meson, ninja, pkgconfig, SDL, SDL2, alsaLib, avahi, bullet, check, curl, dbus, - doxygen, expat, fontconfig, freetype, fribidi, ghostscript, giflib, - glib, gst_all_1, gtk3, harfbuzz, ibus, jbig2dec, libGL, libdrm, libinput, - libjpeg, libpng, libpulseaudio, libraw, librsvg, libsndfile, - libspectre, libtiff, libwebp, libxkbcommon, luajit, lz4, mesa, - openjpeg, openssl, poppler, python27Packages, systemd, udev, - utillinux, writeText, xorg, zlib +{ stdenv, fetchurl, meson, ninja, pkgconfig, SDL, SDL2, alsaLib, + avahi, bullet, check, curl, dbus, doxygen, expat, fontconfig, + freetype, fribidi, ghostscript, giflib, glib, gst_all_1, gtk3, + harfbuzz, ibus, jbig2dec, libGL, libdrm, libinput, libjpeg, libpng, + libpulseaudio, libraw, librsvg, libsndfile, libspectre, libtiff, + libwebp, libxkbcommon, luajit, lz4, mesa, openjpeg, openssl, + poppler, python27Packages, systemd, udev, utillinux, writeText, + xorg, zlib }: stdenv.mkDerivation rec { pname = "efl"; - version = "1.23.1"; + version = "1.23.2"; src = fetchurl { url = "http://download.enlightenment.org/rel/libs/${pname}/${pname}-${version}.tar.xz"; - sha256 = "0q9g4j7k10s1a8rv2ca9v9lydh7ml3zsrqvgncc4qhvdl76208nn"; + sha256 = "14yljnnmb89s8j6ip08ip5d01zkgzbzr1h4fr4bwk9lh8r59x3ds"; }; nativeBuildInputs = [ From 40d5e2da5e9ac408dd06b09fc1276b063f422540 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sat, 2 Nov 2019 17:09:44 +0100 Subject: [PATCH 039/377] Spotify 1.0.96.181.gf6bc1b6b-12 -> 1.1.10.546.ge08ef575-19 --- pkgs/applications/audio/spotify/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/audio/spotify/default.nix b/pkgs/applications/audio/spotify/default.nix index 3f99e22a4cb..30f3a72deec 100644 --- a/pkgs/applications/audio/spotify/default.nix +++ b/pkgs/applications/audio/spotify/default.nix @@ -1,7 +1,7 @@ { fetchurl, stdenv, squashfsTools, xorg, alsaLib, makeWrapper, openssl, freetype , glib, pango, cairo, atk, gdk-pixbuf, gtk2, cups, nspr, nss, libpng, libnotify , libgcrypt, systemd, fontconfig, dbus, expat, ffmpeg_3, curl, zlib, gnome3 -, at-spi2-atk +, at-spi2-atk, at-spi2-core }: let @@ -10,20 +10,21 @@ let # If an update breaks things, one of those might have valuable info: # https://aur.archlinux.org/packages/spotify/ # https://community.spotify.com/t5/Desktop-Linux - version = "1.0.96.181.gf6bc1b6b-12"; + version = "1.1.10.546.ge08ef575-19"; # To get the latest stable revision: # curl -H 'X-Ubuntu-Series: 16' 'https://api.snapcraft.io/api/v1/snaps/details/spotify?channel=stable' | jq '.download_url,.version,.last_updated' # To get general information: # curl -H 'Snap-Device-Series: 16' 'https://api.snapcraft.io/v2/snaps/info/spotify' | jq '.' # More examples of api usage: # https://github.com/canonical-websites/snapcraft.io/blob/master/webapp/publisher/snaps/views.py - rev = "30"; + rev = "36"; deps = [ alsaLib atk at-spi2-atk + at-spi2-core cairo cups curl @@ -73,7 +74,7 @@ stdenv.mkDerivation { # https://community.spotify.com/t5/Desktop-Linux/Redistribute-Spotify-on-Linux-Distributions/td-p/1695334 src = fetchurl { url = "https://api.snapcraft.io/api/v1/snaps/download/pOBIoZ2LrCB3rDohMxoYGnbN14EHOgD7_${rev}.snap"; - sha512 = "859730fbc80067f0828f7e13eee9a21b13b749f897a50e17c2da4ee672785cfd79e1af6336e609529d105e040dc40f61b6189524783ac93d49f991c4ea8b3c56"; + sha512 = "c49f1a86a9b737e64a475bbe62754a36f607669e908eb725a2395f0a0a6b95968e0c8ce27ab2c8b6c92fe8cbacb1ef58de11c79b92dc0f58c2c6d3a140706a1f"; }; buildInputs = [ squashfsTools makeWrapper ]; From f2860971a2722eb31faf35c352fd3a7f1d9c66fb Mon Sep 17 00:00:00 2001 From: Theodore Witkamp Date: Fri, 1 Nov 2019 15:52:40 -0700 Subject: [PATCH 040/377] muparser: add darwin support --- pkgs/development/libraries/muparser/default.nix | 8 +++++--- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/muparser/default.nix b/pkgs/development/libraries/muparser/default.nix index d058322660c..4d3fe41dff8 100644 --- a/pkgs/development/libraries/muparser/default.nix +++ b/pkgs/development/libraries/muparser/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, unzip}: +{stdenv, fetchurl, unzip, setfile}: stdenv.mkDerivation rec { pname = "muparser"; @@ -10,12 +10,14 @@ stdenv.mkDerivation rec { sha256 = "00l92k231yb49wijzkspa2l58mapn6vh2dlxnlg0pawjjfv33s6z"; }; - buildInputs = [ unzip ]; + buildInputs = [ + unzip + ] ++ stdenv.lib.optionals stdenv.isDarwin [setfile]; meta = { homepage = http://muparser.sourceforge.net; description = "An extensible high performance math expression parser library written in C++"; license = stdenv.lib.licenses.mit; - platforms = stdenv.lib.platforms.linux; + platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 24b3e1d3d23..e0ce966c662 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12973,7 +12973,9 @@ in mumlib = callPackage ../development/libraries/mumlib { }; - muparser = callPackage ../development/libraries/muparser { }; + muparser = callPackage ../development/libraries/muparser { + inherit (darwin.stubs) setfile; + }; mutest = callPackage ../development/libraries/mutest { }; From eed3a01c782107edc16f3c201dc157ac91cc69b4 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 2 Nov 2019 17:32:34 -0700 Subject: [PATCH 041/377] qbittorrent: 4.1.8 -> 4.1.9.1 --- pkgs/applications/networking/p2p/qbittorrent/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/p2p/qbittorrent/default.nix b/pkgs/applications/networking/p2p/qbittorrent/default.nix index c5142c2f9e2..aebdeda6108 100644 --- a/pkgs/applications/networking/p2p/qbittorrent/default.nix +++ b/pkgs/applications/networking/p2p/qbittorrent/default.nix @@ -10,13 +10,13 @@ with lib; mkDerivation rec { pname = "qbittorrent"; - version = "4.1.8"; + version = "4.1.9.1"; src = fetchFromGitHub { owner = "qbittorrent"; repo = "qbittorrent"; rev = "release-${version}"; - sha256 = "1mx59mazfmd5yaqdgb6cm8hr5sbp2xgzz3y3yipq1fwq85dj3r5w"; + sha256 = "19zgqlby7i1kr20wa4zd99qzd062a879xxxbmlf40rnqiqy4bhyi"; }; # NOTE: 2018-05-31: CMake is working but it is not officially supported From cc73a0b2758b6c727ae6f3359837cf745ab72f83 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 2 Nov 2019 23:32:00 -0700 Subject: [PATCH 042/377] rocksdb: 6.3.6 -> 6.4.6 --- pkgs/development/libraries/rocksdb/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/rocksdb/default.nix b/pkgs/development/libraries/rocksdb/default.nix index ab2d7778051..d2ea22b85a1 100644 --- a/pkgs/development/libraries/rocksdb/default.nix +++ b/pkgs/development/libraries/rocksdb/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "rocksdb"; - version = "6.3.6"; + version = "6.4.6"; src = fetchFromGitHub { owner = "facebook"; repo = pname; rev = "v${version}"; - sha256 = "0i993z7xxsbs595y7wxfhgm69mg5893lfkpidcbaqnzj8j0kn0ab"; + sha256 = "0s0n4p1b4jzmslz9d2xd4ajra0m6l9x26mjwlbgw0klxjggmy8qn"; }; nativeBuildInputs = [ cmake ]; From c9c0e6f5aaf4eed529e4940caf38d31145fd160b Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 3 Nov 2019 02:03:25 -0800 Subject: [PATCH 043/377] synthv1: 0.9.10 -> 0.9.11 --- pkgs/applications/audio/synthv1/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/synthv1/default.nix b/pkgs/applications/audio/synthv1/default.nix index 6d650abfb97..96aa7737b81 100644 --- a/pkgs/applications/audio/synthv1/default.nix +++ b/pkgs/applications/audio/synthv1/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "synthv1"; - version = "0.9.10"; + version = "0.9.11"; src = fetchurl { url = "mirror://sourceforge/synthv1/${pname}-${version}.tar.gz"; - sha256 = "1ssdm7aiaz908ydqwdx9khxnnd0yfacjgvbxg5p9s9xhkbqqc2f2"; + sha256 = "116k2vca9dygvsd684wvxm61p0l1xrrgdph4qrrprlsr6vj0llgm"; }; buildInputs = [ qt5.qtbase qt5.qttools libjack2 alsaLib liblo lv2 ]; From 7cacaea1db76e3e3969e12ae62a17d4399b649f4 Mon Sep 17 00:00:00 2001 From: Kirill Elagin Date: Sun, 3 Nov 2019 13:24:57 +0300 Subject: [PATCH 044/377] gnu-efi: Use their crosscompilation support correctly IIUC, previously, the cross-compilation support was done in a somewhat hacky way and was, basically, special-cased for ARM. Now we use the cross-compilation support intergrated into their own build system. Test: * nix-build --arg crossSystem '(import ).systems.examples.musl64' '' -A gnu-efi --- pkgs/development/libraries/gnu-efi/default.nix | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/gnu-efi/default.nix b/pkgs/development/libraries/gnu-efi/default.nix index af225cc50f2..6ae1f47e38c 100644 --- a/pkgs/development/libraries/gnu-efi/default.nix +++ b/pkgs/development/libraries/gnu-efi/default.nix @@ -1,4 +1,6 @@ -{ stdenv, fetchurl, pciutils }: with stdenv.lib; +{ stdenv, buildPackages, fetchurl, pciutils }: + +with stdenv.lib; stdenv.mkDerivation rec { pname = "gnu-efi"; @@ -15,14 +17,9 @@ stdenv.mkDerivation rec { makeFlags = [ "PREFIX=\${out}" - "CC=${stdenv.cc.targetPrefix}gcc" - "AS=${stdenv.cc.targetPrefix}as" - "LD=${stdenv.cc.targetPrefix}ld" - "AR=${stdenv.cc.targetPrefix}ar" - "RANLIB=${stdenv.cc.targetPrefix}ranlib" - "OBJCOPY=${stdenv.cc.targetPrefix}objcopy" - ] ++ stdenv.lib.optional stdenv.isAarch32 "ARCH=arm" - ++ stdenv.lib.optional stdenv.isAarch64 "ARCH=aarch64"; + "HOSTCC=${buildPackages.stdenv.cc.targetPrefix}cc" + "CROSS_COMPILE=${stdenv.cc.targetPrefix}" + ]; meta = with stdenv.lib; { description = "GNU EFI development toolchain"; From a881d113a98f31a1d30c4ab7a5dc1d692cf6bf77 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 31 Oct 2019 23:34:06 +0100 Subject: [PATCH 045/377] netsurf.buildsystem: build on Darwin --- pkgs/applications/misc/netsurf/buildsystem/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/misc/netsurf/buildsystem/default.nix b/pkgs/applications/misc/netsurf/buildsystem/default.nix index 36d5a70735a..0560b1d25b3 100644 --- a/pkgs/applications/misc/netsurf/buildsystem/default.nix +++ b/pkgs/applications/misc/netsurf/buildsystem/default.nix @@ -19,6 +19,6 @@ stdenv.mkDerivation rec { description = "Build system for netsurf browser"; license = licenses.gpl2; maintainers = [ maintainers.vrthra ]; - platforms = platforms.linux; + platforms = platforms.unix; }; } From fdd6153555420b0e49079977f64644fe1d72abfe Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 31 Oct 2019 22:54:09 +0100 Subject: [PATCH 046/377] netsurf.libnsgif: build on Darwin --- pkgs/applications/misc/netsurf/libnsgif/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/misc/netsurf/libnsgif/default.nix b/pkgs/applications/misc/netsurf/libnsgif/default.nix index 4de882243fe..e826dee0d25 100644 --- a/pkgs/applications/misc/netsurf/libnsgif/default.nix +++ b/pkgs/applications/misc/netsurf/libnsgif/default.nix @@ -26,6 +26,6 @@ stdenv.mkDerivation rec { description = "GIF Decoder for netsurf browser"; license = licenses.gpl2; maintainers = [ maintainers.vrthra ]; - platforms = platforms.linux; + platforms = platforms.unix; }; } From 148eae459ba2a8e977474ab886b49b84341518a0 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 3 Nov 2019 14:31:23 +0100 Subject: [PATCH 047/377] poly2tri-c: init at 0.1.0 --- .../libraries/poly2tri-c/default.nix | 42 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/libraries/poly2tri-c/default.nix diff --git a/pkgs/development/libraries/poly2tri-c/default.nix b/pkgs/development/libraries/poly2tri-c/default.nix new file mode 100644 index 00000000000..a3e42b3ae4b --- /dev/null +++ b/pkgs/development/libraries/poly2tri-c/default.nix @@ -0,0 +1,42 @@ +{ stdenv +, fetchFromGitHub +, autoreconfHook +, pkgconfig +, glib +}: + +stdenv.mkDerivation rec { + pname = "poly2tri-c"; + version = "0.1.0"; + + outputs = [ "bin" "out" "dev" ]; + + src = fetchFromGitHub { + owner = "Paul-Browne"; + repo = "poly2tri-c"; + rev = "p2tc-${version}"; + sha256 = "158vm3wqfxs22b74kqc4prlvjny38qqm3kz5wrgasmx0qciwh0g8"; + }; + + nativeBuildInputs = [ + autoreconfHook + pkgconfig + ]; + + buildInputs = [ + glib + ]; + + NIX_CFLAGS_COMPILE = [ + "--std=gnu99" + "-Wno-error" + ]; + + meta = with stdenv.lib; { + description = "Library for generating, refining and rendering 2-Dimensional Constrained Delaunay Triangulations"; + homepage = "https://code.google.com/archive/p/poly2tri-c/"; + license = licenses.bsd3; + maintainers = with stdenv.lib.maintainers; [ jtojnar ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6c9a78ab6f0..4f8303a85e8 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5670,6 +5670,8 @@ in polkit_gnome = callPackage ../tools/security/polkit-gnome { }; + poly2tri-c = callPackage ../development/libraries/poly2tri-c { }; + polysh = callPackage ../tools/networking/polysh { }; ponysay = callPackage ../tools/misc/ponysay { }; From 258f6f4437b50a69cea154c154fe5f75a56f84d7 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 25 Aug 2019 03:13:13 +0200 Subject: [PATCH 048/377] =?UTF-8?q?gegl=5F0=5F4:=200.4.16=20=E2=86=92=200.?= =?UTF-8?q?4.18?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://gitlab.gnome.org/GNOME/gegl/blob/GEGL_0_4_18/docs/NEWS.txt#L1-123 Ported to Meson, which means ton of extra dependencies used by default. Though the closure size effect appears to be minimal: 88.9M → 92.9M Also drop GTK dependency, since it is not needed any more (was it ever?) --- pkgs/desktops/gnome-3/default.nix | 3 +- pkgs/development/libraries/gegl/4.0.nix | 118 +++++++++++++++++++++--- pkgs/top-level/all-packages.nix | 6 +- 3 files changed, 108 insertions(+), 19 deletions(-) diff --git a/pkgs/desktops/gnome-3/default.nix b/pkgs/desktops/gnome-3/default.nix index aa50aa18c40..952f6eaf4f8 100644 --- a/pkgs/desktops/gnome-3/default.nix +++ b/pkgs/desktops/gnome-3/default.nix @@ -24,7 +24,6 @@ lib.makeScope pkgs.newScope (self: with self; { libsoup = pkgs.libsoup.override { gnomeSupport = true; }; libchamplain = pkgs.libchamplain.override { libsoup = libsoup; }; gnome3 = self // { recurseForDerivations = false; }; - gegl_0_4 = pkgs.gegl_0_4.override { gtk = pkgs.gtk3; }; # ISO installer # installerIso = callPackage ./installer.nix {}; @@ -359,4 +358,6 @@ lib.makeScope pkgs.newScope (self: with self; { nautilus-sendto = throw "deprecated 2019-09-17: abandoned"; inherit (pkgs) vala; # added 2019-10-10 + + inherit (pkgs) gegl_0_4; # added 2019-10-31 }) diff --git a/pkgs/development/libraries/gegl/4.0.nix b/pkgs/development/libraries/gegl/4.0.nix index 0e3f79b1814..8632035caf7 100644 --- a/pkgs/development/libraries/gegl/4.0.nix +++ b/pkgs/development/libraries/gegl/4.0.nix @@ -1,31 +1,121 @@ -{ stdenv, fetchurl, pkgconfig, glib, babl, libpng, cairo, libjpeg, which -, librsvg, pango, gtk, bzip2, json-glib, gettext, autoreconfHook, libraw -, gexiv2, libwebp, libintl }: +{ stdenv +, fetchurl +, fetchpatch +, pkgconfig +, vala +, gobject-introspection +, gtk-doc +, docbook_xsl +, docbook_xml_dtd_43 +, glib +, babl +, libpng +, cairo +, libjpeg +, librsvg +, lensfun +, libspiro +, netsurf +, pango +, poly2tri-c +, bzip2 +, json-glib +, gettext +, meson +, ninja +, libraw +, gexiv2 +, libwebp +, luajit +, openexr +}: stdenv.mkDerivation rec { pname = "gegl"; - version = "0.4.16"; + version = "0.4.18"; outputs = [ "out" "dev" "devdoc" ]; outputBin = "dev"; src = fetchurl { - url = "https://download.gimp.org/pub/gegl/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.bz2"; - sha256 = "0njydcr6qdmfzh4fxx544681qxdpf7y6b2f47jcypn810dlxy4h1"; + url = "https://download.gimp.org/pub/gegl/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "0r6akqnrkvxizyhyi8sv40mxm7j4bcwjb6mqjpxy0zzbbfsdyin9"; }; - enableParallelBuilding = true; + patches = [ + # Fix arch detection. + # https://gitlab.gnome.org/GNOME/gegl/merge_requests/53 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gegl/commit/6bcf95fd0f32cf5e8b1ddbe17b14d9ad049bded8.patch"; + sha256 = "0aqdr3y5mr47wq44jnhp97188bvpjlf56zrlmn8aazdf07r2apma"; + }) - doCheck = true; - - buildInputs = [ - libpng cairo libjpeg librsvg pango gtk bzip2 - libraw libwebp gexiv2 + # Fix Darwin build. + # https://gitlab.gnome.org/GNOME/gegl/merge_requests/54 + (fetchpatch { + url = "https://gitlab.gnome.org/GNOME/gegl/commit/2bc06bfedee4fb25f6a966c8235b75292e24e55f.patch"; + sha256 = "1psls61wsrdq5pzpvj22mrm46lpzrw3wkx6li7dv6fyb65wz2n4d"; + }) ]; - propagatedBuildInputs = [ glib json-glib babl ]; # for gegl-4.0.pc + nativeBuildInputs = [ + pkgconfig + gettext + meson + ninja + vala + gobject-introspection + gtk-doc + docbook_xsl + docbook_xml_dtd_43 + ]; - nativeBuildInputs = [ pkgconfig gettext which autoreconfHook libintl ]; + buildInputs = [ + libpng + cairo + libjpeg + librsvg + lensfun + libspiro + netsurf.libnsgif + pango + poly2tri-c + bzip2 + libraw + libwebp + gexiv2 + luajit + openexr + ]; + + # for gegl-4.0.pc + propagatedBuildInputs = [ + glib + json-glib + babl + ]; + + mesonFlags = [ + "-Ddocs=true" + "-Dmrg=disabled" # not sure what that is + "-Dsdl2=disabled" + "-Dpygobject=disabled" + "-Dlibav=disabled" + "-Dlibv4l=disabled" + "-Dlibv4l2=disabled" + "-Dumfpack=disabled" + ]; + + # TODO: Fix missing math symbols in gegl seamless clone. + # It only appears when we use packaged poly2tri-c instead of vendored one. + NIX_CFLAGS_COMPILE = [ "-lm" ]; + + postPatch = '' + chmod +x tests/opencl/opencl_test.sh tests/buffer/buffer-tests-run.sh + patchShebangs tests/ff-load-save/tests_ff_load_save.sh tests/opencl/opencl_test.sh tests/buffer/buffer-tests-run.sh tools/xml_insert.sh + ''; + + doCheck = true; meta = with stdenv.lib; { description = "Graph-based image processing framework"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4f8303a85e8..a98e59e8b6c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3513,7 +3513,7 @@ in gnome-podcasts = callPackage ../applications/audio/gnome-podcasts { }; gnome-photos = callPackage ../applications/graphics/gnome-photos { - gegl = gnome3.gegl_0_4; + gegl = gegl_0_4; }; gnokii = callPackage ../tools/misc/gnokii { }; @@ -11063,9 +11063,7 @@ in inherit (darwin.apple_sdk.frameworks) OpenGL; }; - gegl_0_4 = callPackage ../development/libraries/gegl/4.0.nix { - gtk = res.gtk2; - }; + gegl_0_4 = callPackage ../development/libraries/gegl/4.0.nix { }; geoclue2 = callPackage ../development/libraries/geoclue {}; From c75c6b588ad37c4f300ee6055938a0b5ab7ee8a7 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 31 Oct 2019 21:53:28 +0100 Subject: [PATCH 049/377] =?UTF-8?q?gimp:=202.10.12=20=E2=86=92=202.10.14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.gimp.org/news/2019/10/31/gimp-2-10-14-released/ --- pkgs/applications/graphics/gimp/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix index e3994b1b412..ef0348cbee7 100644 --- a/pkgs/applications/graphics/gimp/default.nix +++ b/pkgs/applications/graphics/gimp/default.nix @@ -9,11 +9,11 @@ let inherit (python2Packages) pygtk wrapPython python; in stdenv.mkDerivation rec { pname = "gimp"; - version = "2.10.12"; + version = "2.10.14"; src = fetchurl { url = "http://download.gimp.org/pub/gimp/v${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.bz2"; - sha256 = "0wdcr8d2ink4swn5r4v13bsiya6s3xm4ya97sdbhs4l40y7bb03x"; + sha256 = "0m6wdnfvsxyhimdd4v3351g4r1fklllnbipbwcfym3h7q88hz6yz"; }; nativeBuildInputs = [ pkgconfig intltool gettext wrapPython ]; From 43c3f471b8899eaf55e298f81b8cf79b65c0bf7d Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 31 Oct 2019 23:20:09 +0100 Subject: [PATCH 050/377] gimp: format with nixpkgs-format --- pkgs/applications/graphics/gimp/default.nix | 127 +++++++++++++++++--- 1 file changed, 107 insertions(+), 20 deletions(-) diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix index ef0348cbee7..3eff5642f11 100644 --- a/pkgs/applications/graphics/gimp/default.nix +++ b/pkgs/applications/graphics/gimp/default.nix @@ -1,9 +1,50 @@ -{ stdenv, fetchurl, substituteAll, pkgconfig, intltool, babl, gegl, gtk2, glib, gdk-pixbuf, isocodes -, pango, cairo, freetype, fontconfig, lcms, libpng, libjpeg, poppler, poppler_data, libtiff -, libmng, librsvg, libwmf, zlib, libzip, ghostscript, aalib, shared-mime-info -, python2Packages, libexif, gettext, xorg, glib-networking, libmypaint, gexiv2 -, harfbuzz, mypaint-brushes, libwebp, libheif, libgudev, openexr -, AppKit, Cocoa, gtk-mac-integration-gtk2 }: +{ stdenv +, lib +, fetchurl +, substituteAll +, pkgconfig +, intltool +, babl +, gegl +, gtk2 +, glib +, gdk-pixbuf +, isocodes +, pango +, cairo +, freetype +, fontconfig +, lcms +, libpng +, libjpeg +, poppler +, poppler_data +, libtiff +, libmng +, librsvg +, libwmf +, zlib +, libzip +, ghostscript +, aalib +, shared-mime-info +, python2Packages +, libexif +, gettext +, xorg +, glib-networking +, libmypaint +, gexiv2 +, harfbuzz +, mypaint-brushes +, libwebp +, libheif +, libgudev +, openexr +, AppKit +, Cocoa +, gtk-mac-integration-gtk2 +}: let inherit (python2Packages) pygtk wrapPython python; @@ -12,20 +53,66 @@ in stdenv.mkDerivation rec { version = "2.10.14"; src = fetchurl { - url = "http://download.gimp.org/pub/gimp/v${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.bz2"; + url = "http://download.gimp.org/pub/gimp/v${lib.versions.majorMinor version}/${pname}-${version}.tar.bz2"; sha256 = "0m6wdnfvsxyhimdd4v3351g4r1fklllnbipbwcfym3h7q88hz6yz"; }; - nativeBuildInputs = [ pkgconfig intltool gettext wrapPython ]; - propagatedBuildInputs = [ gegl ]; # needed by gimp-2.0.pc + nativeBuildInputs = [ + pkgconfig + intltool + gettext + wrapPython + ]; + buildInputs = [ - babl gegl gtk2 glib gdk-pixbuf pango cairo gexiv2 harfbuzz isocodes - freetype fontconfig lcms libpng libjpeg poppler poppler_data libtiff openexr - libmng librsvg libwmf zlib libzip ghostscript aalib shared-mime-info libwebp libheif - python pygtk libexif xorg.libXpm glib-networking libmypaint mypaint-brushes - ] ++ stdenv.lib.optionals stdenv.isDarwin [ - AppKit Cocoa gtk-mac-integration-gtk2 - ] ++ stdenv.lib.optionals stdenv.isLinux [ libgudev ]; + babl + gegl + gtk2 + glib + gdk-pixbuf + pango + cairo + gexiv2 + harfbuzz + isocodes + freetype + fontconfig + lcms + libpng + libjpeg + poppler + poppler_data + libtiff + openexr + libmng + librsvg + libwmf + zlib + libzip + ghostscript + aalib + shared-mime-info + libwebp + libheif + python + pygtk + libexif + xorg.libXpm + glib-networking + libmypaint + mypaint-brushes + ] ++ lib.optionals stdenv.isDarwin [ + AppKit + Cocoa + gtk-mac-integration-gtk2 + ] ++ lib.optionals stdenv.isLinux [ + libgudev + ]; + + # needed by gimp-2.0.pc + propagatedBuildInputs = [ + gegl + ]; pythonPath = [ pygtk ]; @@ -48,7 +135,7 @@ in stdenv.mkDerivation rec { postFixup = '' wrapPythonProgramsIn $out/lib/gimp/${passthru.majorVersion}/plug-ins/ - wrapProgram $out/bin/gimp-${stdenv.lib.versions.majorMinor version} \ + wrapProgram $out/bin/gimp-${lib.versions.majorMinor version} \ --prefix PYTHONPATH : "$PYTHONPATH" \ --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" ''; @@ -56,7 +143,7 @@ in stdenv.mkDerivation rec { passthru = rec { # The declarations for `gimp-with-plugins` wrapper, # used for determining plug-in installation paths - majorVersion = "${stdenv.lib.versions.major version}.0"; + majorVersion = "${lib.versions.major version}.0"; targetPluginDir = "lib/gimp/${majorVersion}/plug-ins"; targetScriptDir = "lib/gimp/${majorVersion}/scripts"; @@ -76,9 +163,9 @@ in stdenv.mkDerivation rec { enableParallelBuilding = true; - meta = with stdenv.lib; { + meta = with lib; { description = "The GNU Image Manipulation Program"; - homepage = https://www.gimp.org/; + homepage = "https://www.gimp.org/"; maintainers = with maintainers; [ jtojnar ]; license = licenses.gpl3Plus; platforms = platforms.unix; From ae21a2bc60bb4338e8d13899605b2378c1d89c87 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sat, 2 Nov 2019 15:42:33 +0100 Subject: [PATCH 051/377] gimp-with-plugins: fix installing custom scripts script-fu (Scheme) scripts are not actually loaded from $GIMP2_PLUGINDIR (lib/gimp/2.10) but $GIMP_DATADIR (share/gimp/2.10). --- pkgs/applications/graphics/gimp/default.nix | 2 +- pkgs/applications/graphics/gimp/wrapper.nix | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix index 3eff5642f11..e53deb99b5b 100644 --- a/pkgs/applications/graphics/gimp/default.nix +++ b/pkgs/applications/graphics/gimp/default.nix @@ -145,7 +145,7 @@ in stdenv.mkDerivation rec { # used for determining plug-in installation paths majorVersion = "${lib.versions.major version}.0"; targetPluginDir = "lib/gimp/${majorVersion}/plug-ins"; - targetScriptDir = "lib/gimp/${majorVersion}/scripts"; + targetScriptDir = "share/gimp/${majorVersion}/scripts"; # probably its a good idea to use the same gtk in plugins ? gtk = gtk2; diff --git a/pkgs/applications/graphics/gimp/wrapper.nix b/pkgs/applications/graphics/gimp/wrapper.nix index d58dc375cb9..841728d3a29 100644 --- a/pkgs/applications/graphics/gimp/wrapper.nix +++ b/pkgs/applications/graphics/gimp/wrapper.nix @@ -17,6 +17,7 @@ in symlinkJoin { for each in gimp-${versionBranch} gimp-console-${versionBranch}; do wrapProgram $out/bin/$each \ --set GIMP2_PLUGINDIR "$out/lib/gimp/2.0" \ + --set GIMP2_DATADIR "$out/share/gimp/2.0" \ --prefix GTK_PATH : "${gnome3.gnome-themes-extra}/lib/gtk-2.0" \ ${toString extraArgs} done From 8da26cc578eaea5b211d424e792408e29186c544 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 3 Nov 2019 04:35:30 +0100 Subject: [PATCH 052/377] gimp-with-plugins: install plug-ins into subdirs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GIMP 3 will require all plugins to be installed into their own subdirectories, so let’s just do that now. --- .../applications/graphics/gimp/plugins/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix index 2c520f21f84..c50d39548c9 100644 --- a/pkgs/applications/graphics/gimp/plugins/default.nix +++ b/pkgs/applications/graphics/gimp/plugins/default.nix @@ -8,22 +8,24 @@ let inherit (pkgs) stdenv fetchurl pkgconfig intltool glib fetchFromGitHub; inherit (gimp) targetPluginDir targetScriptDir; - pluginDerivation = a: stdenv.mkDerivation ({ + pluginDerivation = a: let + name = a.name or "${a.pname}-${a.version}"; + in stdenv.mkDerivation ({ prePhases = "extraLib"; extraLib = '' installScripts(){ - mkdir -p $out/${targetScriptDir}; - for p in "$@"; do cp "$p" $out/${targetScriptDir}; done + mkdir -p $out/${targetScriptDir}/${name}; + for p in "$@"; do cp "$p" -r $out/${targetScriptDir}/${name}; done } installPlugins(){ - mkdir -p $out/${targetPluginDir}; - for p in "$@"; do cp "$p" $out/${targetPluginDir}; done + mkdir -p $out/${targetPluginDir}/${name}; + for p in "$@"; do cp "$p" -r $out/${targetPluginDir}/${name}; done } ''; } // a // { - name = "gimp-plugin-${a.name or "${a.pname}-${a.version}"}"; + name = "gimp-plugin-${name}"; buildInputs = [ gimp gimp.gtk glib ] ++ (a.buildInputs or []); nativeBuildInputs = [ pkgconfig intltool ] ++ (a.nativeBuildInputs or []); } From a73ad445a9b4a96eb21b9ad51e0254f5931fe5de Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 3 Nov 2019 11:57:27 +0100 Subject: [PATCH 053/377] gimpPlugins.waveletSharpen: fix build --- pkgs/applications/graphics/gimp/plugins/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix index c50d39548c9..a1bd7eac153 100644 --- a/pkgs/applications/graphics/gimp/plugins/default.nix +++ b/pkgs/applications/graphics/gimp/plugins/default.nix @@ -133,6 +133,7 @@ stdenv.lib.makeScope pkgs.newScope (self: with self; { Filters/Enhance/Wavelet sharpen */ name = "wavelet-sharpen-0.1.2"; + NIX_LDFLAGS = [ "-lm" ]; src = fetchurl { url = http://registry.gimp.org/files/wavelet-sharpen-0.1.2.tar.gz; sha256 = "0vql1k67i21g5ivaa1jh56rg427m0icrkpryrhg75nscpirfxxqw"; From 46818a55b1c3bc06d170d2dc21686d27e6e32d34 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 3 Nov 2019 12:01:36 +0100 Subject: [PATCH 054/377] gimpPlugins.gap: fix build --- pkgs/applications/graphics/gimp/plugins/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix index a1bd7eac153..29835242193 100644 --- a/pkgs/applications/graphics/gimp/plugins/default.nix +++ b/pkgs/applications/graphics/gimp/plugins/default.nix @@ -48,6 +48,7 @@ stdenv.lib.makeScope pkgs.newScope (self: with self; { url = https://ftp.gimp.org/pub/gimp/plug-ins/v2.6/gap/gimp-gap-2.6.0.tar.bz2; sha256 = "1jic7ixcmsn4kx2cn32nc5087rk6g8xsrz022xy11yfmgvhzb0ql"; }; + NIX_LDFLAGS = [ "-lm" ]; patchPhase = '' sed -e 's,^\(GIMP_PLUGIN_DIR=\).*,\1'"$out/${gimp.name}-plugins", \ -e 's,^\(GIMP_DATA_DIR=\).*,\1'"$out/share/${gimp.name}", -i configure From e93c38ff7cc3500e771dde8488330545c660635e Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 3 Nov 2019 13:56:21 +0100 Subject: [PATCH 055/377] gimp-with-plugins: pass all script attributes to the pluginDerivation --- pkgs/applications/graphics/gimp/plugins/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix index 29835242193..c11910da568 100644 --- a/pkgs/applications/graphics/gimp/plugins/default.nix +++ b/pkgs/applications/graphics/gimp/plugins/default.nix @@ -31,10 +31,10 @@ let } ); - scriptDerivation = {name, src} : pluginDerivation { - inherit name; phases = "extraLib installPhase"; + scriptDerivation = {src, ...}@attrs : pluginDerivation ({ + phases = [ "extraLib" "installPhase" ]; installPhase = "installScripts ${src}"; - }; + } // attrs); in From f3a81474045e817192b860a45abf357d4a7c0aea Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 3 Nov 2019 13:57:25 +0100 Subject: [PATCH 056/377] gimpPlugin.exposureBlend: mark as broken It produces an error: GIMP-Error: Calling error for procedure 'gimp-image-get-active-layer': Procedure 'gimp-image-get-active-layer' has been called with an invalid ID for argument 'image'. Most likely a plug-in is trying to work on an image that doesn't exist any longer. (script-fu:25123): GLib-WARNING **: 12:41:03.500: (../glib/gerror.c:416):g_error_new_valist: runtime check failed: (domain != 0) script-fu-Warning: Error while loading /nix/store/31y1qiyg8fzn07yz6lrnkbja33298gmz-gimp-with-plugins-2.10.14/share/gimp/2.0/scripts/exposure-blend/nds9ds1m18d0wg1b01fch8wyzdwpmr8x-exposure-blend.scm: Error: (/nix/store/31y1qiyg8fzn07yz6lrnkbja33298gmz-gimp-with-plugins-2.10.14/share/gimp/2.0/scripts/exposure-blend/nds9ds1m18d0wg1b01fch8wyzdwpmr8x-exposure-blend.scm : 627) Procedure execution of gimp-image-get-active-layer failed on invalid input arguments: Procedure 'gimp-image-get-active-layer' has been called with an invalid ID for argument 'image'. Most likely a plug-in is trying to work on an image that doesn't exist any longer. --- pkgs/applications/graphics/gimp/plugins/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/graphics/gimp/plugins/default.nix b/pkgs/applications/graphics/gimp/plugins/default.nix index c11910da568..29c1445b9ce 100644 --- a/pkgs/applications/graphics/gimp/plugins/default.nix +++ b/pkgs/applications/graphics/gimp/plugins/default.nix @@ -199,6 +199,7 @@ stdenv.lib.makeScope pkgs.newScope (self: with self; { url = http://tir.astro.utoledo.edu/jdsmith/code/eb/exposure-blend.scm; sha256 = "1b6c9wzpklqras4wwsyw3y3jp6fjmhnnskqiwm5sabs8djknfxla"; }; + meta.broken = true; }; lightning = scriptDerivation { From 955d032b47fbcbf8e366a3a8cdcea4ac5f7b63d7 Mon Sep 17 00:00:00 2001 From: oxalica Date: Sun, 3 Nov 2019 13:17:33 +0800 Subject: [PATCH 057/377] lib.systems: handle mips family properly --- lib/systems/default.nix | 5 +++++ lib/systems/parse.nix | 1 + 2 files changed, 6 insertions(+) diff --git a/lib/systems/default.nix b/lib/systems/default.nix index 0c0cdf1f11b..ccb928eace7 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -79,6 +79,7 @@ rec { else if final.isAarch64 then "arm64" else if final.isx86_32 then "x86" else if final.isx86_64 then "ia64" + else if final.isMips then "mips" else final.parsed.cpu.name; qemuArch = @@ -90,6 +91,10 @@ rec { powerpcle = "ppc"; powerpc64 = "ppc64"; powerpc64le = "ppc64le"; + mips = "mips"; + mipsel = "mipsel"; + mips64 = "mips64"; + mips64el = "mips64el"; }.${final.parsed.cpu.name} or final.parsed.cpu.name; emulator = pkgs: let diff --git a/lib/systems/parse.nix b/lib/systems/parse.nix index 5e12df32ffd..e923334a11b 100644 --- a/lib/systems/parse.nix +++ b/lib/systems/parse.nix @@ -327,6 +327,7 @@ rec { } ]; }; + gnuabi64 = { abi = "64"; }; musleabi = { float = "soft"; }; musleabihf = { float = "hard"; }; From ee71de72407304dd328e6dcfab08f82d342579cd Mon Sep 17 00:00:00 2001 From: Marek Mahut Date: Fri, 1 Nov 2019 15:48:10 +0100 Subject: [PATCH 058/377] flexibee: adding flexibee-server --- pkgs/applications/office/flexibee/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/applications/office/flexibee/default.nix b/pkgs/applications/office/flexibee/default.nix index 71c69603631..223a2f2a2fe 100644 --- a/pkgs/applications/office/flexibee/default.nix +++ b/pkgs/applications/office/flexibee/default.nix @@ -16,11 +16,20 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper ]; + prePatch = '' + substituteInPlace usr/sbin/flexibee-server \ + --replace "/usr/share/flexibee" $out \ + --replace "/var/run" "/run" + ''; + + installPhase = '' runHook preInstall cp -R usr/share/flexibee/ $out/ install -Dm755 usr/bin/flexibee $out/bin/flexibee + install -Dm755 usr/sbin/flexibee-server $out/bin/flexibee-server wrapProgram $out/bin/flexibee --set JAVA_HOME "${jre}" + wrapProgram $out/bin/flexibee-server --set JAVA_HOME "${jre}" runHook postInstall ''; From 0534e9c4b3f1ec3a7c645feacf84714d62d4941b Mon Sep 17 00:00:00 2001 From: Marek Mahut Date: Fri, 1 Nov 2019 15:50:02 +0100 Subject: [PATCH 059/377] flexibee: 2019.3.0.3 -> 2019.3.0.7 --- pkgs/applications/office/flexibee/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/office/flexibee/default.nix b/pkgs/applications/office/flexibee/default.nix index 223a2f2a2fe..831d8cbcf2a 100644 --- a/pkgs/applications/office/flexibee/default.nix +++ b/pkgs/applications/office/flexibee/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, makeWrapper, jre }: let - version = "2019.3.0.3"; + version = "2019.3.0.7"; majorVersion = builtins.substring 0 6 version; in @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "http://download.flexibee.eu/download/${majorVersion}/${version}/${pname}-${version}.tar.gz"; - sha256 = "1ivhqh1rl4ll0af9nfgfm7f647vc9zk61aplinvz73xb3grb4j6f"; + sha256 = "01n2pkh17s2iab7n9xgq9vqcf1fnzmb382zmmd1lwyw3x57f5rq2"; }; nativeBuildInputs = [ makeWrapper ]; @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { cp -R usr/share/flexibee/ $out/ install -Dm755 usr/bin/flexibee $out/bin/flexibee install -Dm755 usr/sbin/flexibee-server $out/bin/flexibee-server - wrapProgram $out/bin/flexibee --set JAVA_HOME "${jre}" + wrapProgram $out/bin/flexibee --set JAVA_HOME "${jre}" wrapProgram $out/bin/flexibee-server --set JAVA_HOME "${jre}" runHook postInstall ''; From 3f2bdec5068ab5eda127ee65d407ff169cbe4e12 Mon Sep 17 00:00:00 2001 From: Alkeryn Date: Sun, 3 Nov 2019 17:02:02 +0100 Subject: [PATCH 060/377] sdrangel: 4.11.7 -> 4.11.12 --- pkgs/applications/radio/sdrangel/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/radio/sdrangel/default.nix b/pkgs/applications/radio/sdrangel/default.nix index 346c6aeed8e..7cb64f92f3f 100644 --- a/pkgs/applications/radio/sdrangel/default.nix +++ b/pkgs/applications/radio/sdrangel/default.nix @@ -39,7 +39,7 @@ let in mkDerivation rec { pname = "sdrangel"; - version = "4.11.7"; + version = "4.11.12"; src = fetchFromGitHub { owner = "f4exb"; From f3b8d9bae3589e2c6a6804295b9fc6d21eaac0db Mon Sep 17 00:00:00 2001 From: Marek Mahut Date: Sun, 3 Nov 2019 17:24:08 +0100 Subject: [PATCH 061/377] nixos/trac: service init --- nixos/modules/module-list.nix | 1 + nixos/modules/services/web-apps/trac.nix | 79 ++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 nixos/modules/services/web-apps/trac.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index df6e4dc1336..164c6dda75e 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -814,6 +814,7 @@ ./services/web-apps/matomo.nix ./services/web-apps/restya-board.nix ./services/web-apps/tt-rss.nix + ./services/web-apps/trac.nix ./services/web-apps/selfoss.nix ./services/web-apps/shiori.nix ./services/web-apps/virtlyst.nix diff --git a/nixos/modules/services/web-apps/trac.nix b/nixos/modules/services/web-apps/trac.nix new file mode 100644 index 00000000000..207fb857438 --- /dev/null +++ b/nixos/modules/services/web-apps/trac.nix @@ -0,0 +1,79 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.services.trac; + + inherit (lib) mkEnableOption mkIf mkOption types; + +in { + + options = { + + services.trac = { + enable = mkEnableOption "Trac service"; + + listen = { + ip = mkOption { + type = types.str; + default = "0.0.0.0"; + description = '' + IP address that Trac should listen on. + ''; + }; + + port = mkOption { + type = types.port; + default = 8000; + description = '' + Listen port for Trac. + ''; + }; + }; + + dataDir = mkOption { + default = "/var/lib/trac"; + type = types.path; + description = '' + The directory for storing the Trac data. + ''; + }; + + openFirewall = mkOption { + type = types.bool; + default = false; + description = '' + Open ports in the firewall for Trac. + ''; + }; + }; + + }; + + config = mkIf cfg.enable { + + systemd.services.trac = { + description = "Trac server"; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + DynamicUser = true; + StateDirectory = baseNameOf cfg.dataDir; + ExecStart = '' + ${pkgs.trac}/bin/tracd -s \ + -b ${toString cfg.listen.ip} \ + -p ${toString cfg.listen.port} \ + ${cfg.dataDir} + ''; + }; + preStart = '' + if [ ! -e ${cfg.dataDir}/VERSION ]; then + ${pkgs.trac}/bin/trac-admin ${cfg.dataDir} initenv Trac "sqlite:db/trac.db" + fi + ''; + }; + + networking.firewall = mkIf cfg.openFirewall { + allowedTCPPorts = [ cfg.listen.port ]; + }; + + }; +} From e71b1e3363831a1ae0ded2963142a853cc1e926f Mon Sep 17 00:00:00 2001 From: Marek Mahut Date: Sun, 3 Nov 2019 17:24:22 +0100 Subject: [PATCH 062/377] tests: adding trac --- nixos/tests/all-tests.nix | 1 + nixos/tests/trac.nix | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 nixos/tests/trac.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 744d7ed0f83..1b5e0f52084 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -280,6 +280,7 @@ in tinydns = handleTest ./tinydns.nix {}; tor = handleTest ./tor.nix {}; transmission = handleTest ./transmission.nix {}; + trac = handleTest ./trac.nix {}; trezord = handleTest ./trezord.nix {}; trickster = handleTest ./trickster.nix {}; udisks2 = handleTest ./udisks2.nix {}; diff --git a/nixos/tests/trac.nix b/nixos/tests/trac.nix new file mode 100644 index 00000000000..643095d947e --- /dev/null +++ b/nixos/tests/trac.nix @@ -0,0 +1,19 @@ +import ./make-test.nix ({ pkgs, ... }: { + name = "trac"; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ mmahut ]; + }; + + nodes = { + machine = { ... }: { + services.trac.enable = true; + }; + }; + + testScript = '' + startAll; + $machine->waitForUnit("trac.service"); + $machine->waitForOpenPort(8000); + $machine->waitUntilSucceeds("curl -L http://localhost:8000/ | grep 'Trac Powered'"); + ''; +}) From 1af9ccccb0ab26620df4b82e2e5f5519d5b2200c Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Sun, 3 Nov 2019 10:57:15 +0100 Subject: [PATCH 063/377] linuxPackages.digimend: init at unstable-2019-06-18 --- pkgs/os-specific/linux/digimend/default.nix | 45 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/os-specific/linux/digimend/default.nix diff --git a/pkgs/os-specific/linux/digimend/default.nix b/pkgs/os-specific/linux/digimend/default.nix new file mode 100644 index 00000000000..40f801881fc --- /dev/null +++ b/pkgs/os-specific/linux/digimend/default.nix @@ -0,0 +1,45 @@ +{ stdenv, fetchFromGitHub, kernel }: + +assert stdenv.lib.versionAtLeast kernel.version "3.5"; + +stdenv.mkDerivation rec { + pname = "digimend"; + version = "unstable-2019-06-18"; + + src = fetchFromGitHub { + owner = "digimend"; + repo = "digimend-kernel-drivers"; + rev = "8b228a755e44106c11f9baaadb30ce668eede5d4"; + sha256 = "1l54j85540386a8aypqka7p5hy1b63cwmpsscv9rmmf10f78v8mm"; + }; + + INSTALL_MOD_PATH = "\${out}"; + + postPatch = '' + sed 's/udevadm /true /' -i Makefile + sed 's/depmod /true /' -i Makefile + ''; + + nativeBuildInputs = kernel.moduleBuildDependencies; + + postInstall = '' + # Remove module reload hack. + # The hid-rebind unloads and then reloads the hid-* module to ensure that + # the extra/ module is loaded. + rm -r $out/lib/udev + ''; + + makeFlags = [ + "KVERSION=${kernel.modDirVersion}" + "KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + "DESTDIR=${placeholder "out"}" + ]; + + meta = with stdenv.lib; { + description = "DIGImend graphics tablet drivers for the Linux kernel"; + homepage = "https://digimend.github.io/"; + license = licenses.gpl2; + maintainers = with maintainers; [ gebner ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6c9a78ab6f0..2a9e38f53cf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16120,6 +16120,8 @@ in deepin-anything = callPackage ../os-specific/linux/deepin-anything { }; + digimend = callPackage ../os-specific/linux/digimend { }; + dpdk = callPackage ../os-specific/linux/dpdk { }; exfat-nofuse = callPackage ../os-specific/linux/exfat { }; From a0e4ee31116bc235cdb5430f9c253231403f0596 Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Sun, 3 Nov 2019 10:57:29 +0100 Subject: [PATCH 064/377] aggregateModules: support depmod.d configuration --- pkgs/os-specific/linux/kmod/aggregator.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/kmod/aggregator.nix b/pkgs/os-specific/linux/kmod/aggregator.nix index 4da87a557cb..cd138f1d7f5 100644 --- a/pkgs/os-specific/linux/kmod/aggregator.nix +++ b/pkgs/os-specific/linux/kmod/aggregator.nix @@ -29,7 +29,7 @@ buildEnv { # kernel version number, otherwise depmod will use `uname -r'. if test -w $out/lib/modules/$kernelVersion; then rm -f $out/lib/modules/$kernelVersion/modules.!(builtin*|order*) - ${kmod}/bin/depmod -b $out -a $kernelVersion + ${kmod}/bin/depmod -b $out -C $out/etc/depmod.d -a $kernelVersion fi ''; } From c2b54c59e804d4755407add9147e2c5108cf051e Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Sun, 3 Nov 2019 10:58:15 +0100 Subject: [PATCH 065/377] nixos/digimend: init module --- nixos/modules/module-list.nix | 1 + .../services/x11/hardware/digimend.nix | 43 +++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 nixos/modules/services/x11/hardware/digimend.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index e181cecced7..b70e732edf8 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -863,6 +863,7 @@ ./services/x11/hardware/multitouch.nix ./services/x11/hardware/synaptics.nix ./services/x11/hardware/wacom.nix + ./services/x11/hardware/digimend.nix ./services/x11/hardware/cmt.nix ./services/x11/gdk-pixbuf.nix ./services/x11/redshift.nix diff --git a/nixos/modules/services/x11/hardware/digimend.nix b/nixos/modules/services/x11/hardware/digimend.nix new file mode 100644 index 00000000000..a9f5640905a --- /dev/null +++ b/nixos/modules/services/x11/hardware/digimend.nix @@ -0,0 +1,43 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.services.xserver.digimend; + + pkg = config.boot.kernelPackages.digimend; + +in + +{ + + options = { + + services.xserver.digimend = { + + enable = mkOption { + default = false; + description = '' + Whether to enable the digimend drivers for Huion/XP-Pen/etc. tablets. + ''; + }; + + }; + + }; + + + config = mkIf cfg.enable { + + # digimend drivers use xsetwacom and wacom X11 drivers + services.xserver.wacom.enable = true; + + boot.extraModulePackages = [ pkg ]; + + environment.etc."X11/xorg.conf.d/50-digimend.conf".source = + "${pkg}/usr/share/X11/xorg.conf.d/50-digimend.conf"; + + }; + +} From 80a5dd7f0277f37b90ccf65b6a94635dd7b45311 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sun, 3 Nov 2019 18:37:39 +0100 Subject: [PATCH 066/377] gegl: fix darwin build ../gegl/opencl/cl_gl.h:37:10: fatal error: 'OpenGL/CGLDevice.h' file not found #include --- pkgs/development/libraries/gegl/4.0.nix | 6 ++++-- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/gegl/4.0.nix b/pkgs/development/libraries/gegl/4.0.nix index 8632035caf7..2edb47cb9bb 100644 --- a/pkgs/development/libraries/gegl/4.0.nix +++ b/pkgs/development/libraries/gegl/4.0.nix @@ -28,6 +28,7 @@ , libwebp , luajit , openexr +, OpenCL }: stdenv.mkDerivation rec { @@ -86,7 +87,7 @@ stdenv.mkDerivation rec { gexiv2 luajit openexr - ]; + ] ++ stdenv.lib.optional stdenv.isDarwin OpenCL; # for gegl-4.0.pc propagatedBuildInputs = [ @@ -115,7 +116,8 @@ stdenv.mkDerivation rec { patchShebangs tests/ff-load-save/tests_ff_load_save.sh tests/opencl/opencl_test.sh tests/buffer/buffer-tests-run.sh tools/xml_insert.sh ''; - doCheck = true; + # tests fail to connect to the com.apple.fonts daemon in sandboxed mode + doCheck = !stdenv.isDarwin; meta = with stdenv.lib; { description = "Graph-based image processing framework"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a98e59e8b6c..4b0d6743a7f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11063,7 +11063,9 @@ in inherit (darwin.apple_sdk.frameworks) OpenGL; }; - gegl_0_4 = callPackage ../development/libraries/gegl/4.0.nix { }; + gegl_0_4 = callPackage ../development/libraries/gegl/4.0.nix { + inherit (darwin.apple_sdk.frameworks) OpenCL; + }; geoclue2 = callPackage ../development/libraries/geoclue {}; From 83dbd38821f1bd2e76218cabbf428a4d982018e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Sun, 3 Nov 2019 18:35:55 +0100 Subject: [PATCH 067/377] libjpeg-turbo: Add flag to build static libraries as well --- pkgs/development/libraries/libjpeg-turbo/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libjpeg-turbo/default.nix b/pkgs/development/libraries/libjpeg-turbo/default.nix index cb32b22f45e..f05ac6d521b 100644 --- a/pkgs/development/libraries/libjpeg-turbo/default.nix +++ b/pkgs/development/libraries/libjpeg-turbo/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, cmake, nasm }: +{ stdenv, fetchurl, cmake, nasm, enableStatic ? false }: stdenv.mkDerivation rec { @@ -19,7 +19,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake nasm ]; cmakeFlags = [ - "-DENABLE_STATIC=0" + "-DENABLE_STATIC=${if enableStatic then "1" else "0"}" ]; doInstallCheck = true; From deb201b311f7d8b1d2818fe106cbb3ebc32df86d Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Sun, 3 Nov 2019 11:45:07 -0800 Subject: [PATCH 068/377] update-python-libraries: update usage comments --- .../python/update-python-libraries/update-python-libraries.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/python/update-python-libraries/update-python-libraries.py b/pkgs/development/interpreters/python/update-python-libraries/update-python-libraries.py index e4a79d0c428..82b2aac39a9 100755 --- a/pkgs/development/interpreters/python/update-python-libraries/update-python-libraries.py +++ b/pkgs/development/interpreters/python/update-python-libraries/update-python-libraries.py @@ -6,9 +6,9 @@ You can pass in multiple files or paths. You'll likely want to use `` - $ ./update-python-libraries ../../pkgs/development/python-modules/* + $ ./update-python-libraries ../../pkgs/development/python-modules/**/default.nix `` -to update all libraries in that folder. +to update all non-pinned libraries in that folder. """ import argparse From 4cf8729c316ecffbe43465ea97a40a83f3cd84da Mon Sep 17 00:00:00 2001 From: Daniel Duan Date: Sun, 3 Nov 2019 12:50:51 -0800 Subject: [PATCH 069/377] Add dduan as a maintainer --- maintainers/maintainer-list.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 1f2cdda41d1..724b4e0d55e 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -1563,6 +1563,12 @@ githubId = 14032; name = "Daniel Brockman"; }; + dduan = { + email = "daniel@duan.ca"; + github = "dduan"; + githubId = 75067; + name = "Daniel Duan"; + }; deepfire = { email = "_deepfire@feelingofgreen.ru"; github = "deepfire"; From fcd88c820d546ea8e30b98ae7316c2c9fac4ae5f Mon Sep 17 00:00:00 2001 From: Daniel Duan Date: Sun, 3 Nov 2019 12:51:01 -0800 Subject: [PATCH 070/377] tre: init at 0.2.2 tre is a improved version of the command `tree`. Its main additions: 1. colored output 2. ignores paths specified in .gitignore 3. editor alias for each entity listed Source/Homepage: https://github.com/dduan/tre --- pkgs/tools/system/tre-command/default.nix | 24 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/tools/system/tre-command/default.nix diff --git a/pkgs/tools/system/tre-command/default.nix b/pkgs/tools/system/tre-command/default.nix new file mode 100644 index 00000000000..6050b2a709e --- /dev/null +++ b/pkgs/tools/system/tre-command/default.nix @@ -0,0 +1,24 @@ +{ rustPlatform, fetchFromGitHub, stdenv }: + +rustPlatform.buildRustPackage rec { + pname = "tre"; + version = "0.2.2"; + + src = fetchFromGitHub { + owner = "dduan"; + repo = "tre"; + rev = "v${version}"; + sha256 = "1fazw2wn738iknbv54gv7qll7d4q2gy9bq1s3f3cv21cdv6bqral"; + }; + + cargoSha256 = "0m82zbi610zgvcza6n03xl80g31x6bfkjyrfxcxa6fyf2l5cj9pv"; + verifyCargoDeps = true; + + meta = with stdenv.lib; { + description = "Tree command, improved"; + homepage = "https://github.com/dduan/tre"; + license = licenses.mit; + maintainers = [ maintainers.dduan ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 85270623a5d..161fd3eab10 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21312,6 +21312,8 @@ in tdrop = callPackage ../applications/misc/tdrop { }; + tre-command = callPackage ../tools/system/tre-command {}; + tree = callPackage ../tools/system/tree {}; treesheets = callPackage ../applications/office/treesheets { wxGTK = wxGTK31; }; From 8593904aca8d5a7922feae828db010f4f0d900e6 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 3 Nov 2019 16:20:00 -0500 Subject: [PATCH 071/377] protobuf3_9: 3.9.1 -> 3.9.2 Changelog: https://github.com/protocolbuffers/protobuf/releases/tag/v3.9.2 --- pkgs/development/libraries/protobuf/3.9.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/protobuf/3.9.nix b/pkgs/development/libraries/protobuf/3.9.nix index a2f3e0e0164..e74d5c527b1 100644 --- a/pkgs/development/libraries/protobuf/3.9.nix +++ b/pkgs/development/libraries/protobuf/3.9.nix @@ -1,6 +1,6 @@ { callPackage, ... }: callPackage ./generic-v3.nix { - version = "3.9.1"; - sha256 = "0vv85xb65dx6fa76fsnyps13kaamvwfzd8hr6ii1payr73x4zy2h"; + version = "3.9.2"; + sha256 = "080zxa9w1pxp5y05aiwc0c8mlqkkh98wmid4l7m99cliphsd4qnn"; } From b60853cdca2c0004b692bd27b6b3d3a8ed833b32 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 3 Nov 2019 16:20:00 -0500 Subject: [PATCH 072/377] ispc: only check on Linux The test suite tries to execute `transcendentals` tests, which is not expected to work anywhere except Linux. --- pkgs/development/compilers/ispc/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/compilers/ispc/default.nix b/pkgs/development/compilers/ispc/default.nix index d07bf6b5733..0c44595b24b 100644 --- a/pkgs/development/compilers/ispc/default.nix +++ b/pkgs/development/compilers/ispc/default.nix @@ -20,7 +20,7 @@ stdenv.mkDerivation rec { # there are missing dependencies in the Makefile, causing sporadic build failures enableParallelBuilding = false; - doCheck = true; + doCheck = stdenv.isLinux; buildInputs = with llvmPackages; [ which From 7960ff7d4ea5f55e43daa10e53251d4849e92fee Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Sun, 3 Nov 2019 16:21:00 -0500 Subject: [PATCH 073/377] protobuf3_10: 3.10.0 -> 3.10.1 Changelog: https://github.com/protocolbuffers/protobuf/releases/tag/v3.10.1 --- pkgs/development/libraries/protobuf/3.10.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/protobuf/3.10.nix b/pkgs/development/libraries/protobuf/3.10.nix index 3549d7af75e..5ecb8e67f84 100644 --- a/pkgs/development/libraries/protobuf/3.10.nix +++ b/pkgs/development/libraries/protobuf/3.10.nix @@ -1,6 +1,6 @@ { callPackage, ... }: callPackage ./generic-v3.nix { - version = "3.10.0"; - sha256 = "0cjwfm9v2gv6skzrq4m7w28810p2h3m1jj4kw6df3x8vvg7q842c"; + version = "3.10.1"; + sha256 = "1kbi2i1m5c7ss02ip8h0bdzvns4dgxx30a5c0iiph8g2ns02lr33"; } From 547b5b7a73e8a780b6438cf1128388dbc51b002e Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sun, 3 Nov 2019 22:09:44 +0000 Subject: [PATCH 074/377] ruby.withPackages: preserve setup hooks (#72743) This fixes nix-shell -p 'ruby.withPackages (const [])' ruby.devdoc which otherwise wouldn't find documentation, unlike nix-shell -p ruby ruby.devdoc which would, because ruby has setup hooks to accomodate for this, that were being masked by the withPackages wrapper. --- pkgs/development/ruby-modules/with-packages/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/ruby-modules/with-packages/default.nix b/pkgs/development/ruby-modules/with-packages/default.nix index ac0a33f4561..7d49b0e0134 100644 --- a/pkgs/development/ruby-modules/with-packages/default.nix +++ b/pkgs/development/ruby-modules/with-packages/default.nix @@ -64,6 +64,8 @@ let rm -f $out/bin/$(basename "$i") makeWrapper "$i" $out/bin/$(basename "$i") --set GEM_PATH ${gemEnv}/${ruby.gemPath} done + + ln -s ${ruby}/nix-support $out/nix-support ''; passthru = { From 963fee775c05733b5ecd40fad299d551057adb86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Gaspard?= Date: Mon, 4 Nov 2019 02:31:31 +0100 Subject: [PATCH 075/377] org-packages: 9.2.3 -> 9.2.6 Note that the update-org script couldn't be used, as it is currently broken. The upgrade was thus done by hand. --- .../editors/emacs-modes/org-generated.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/editors/emacs-modes/org-generated.nix b/pkgs/applications/editors/emacs-modes/org-generated.nix index c1fad2dc865..f1833225013 100644 --- a/pkgs/applications/editors/emacs-modes/org-generated.nix +++ b/pkgs/applications/editors/emacs-modes/org-generated.nix @@ -4,10 +4,10 @@ elpaBuild { pname = "org"; ename = "org"; - version = "20190527"; + version = "20190904"; src = fetchurl { - url = "http://orgmode.org/elpa/org-20190527.tar"; - sha256 = "1fc2nyylzpikjikyb24xq2mcilridcahmjwmg0s426dqrgqpm9ij"; + url = "http://orgmode.org/elpa/org-20190904.tar"; + sha256 = "0ah5zgbxp4j3mfgriw9liamy73npp9zbkq0zrg6cfhf8l3xwbnxn"; }; packageRequires = []; meta = { @@ -19,10 +19,10 @@ elpaBuild { pname = "org-plus-contrib"; ename = "org-plus-contrib"; - version = "20190527"; + version = "20190904"; src = fetchurl { - url = "http://orgmode.org/elpa/org-plus-contrib-20190527.tar"; - sha256 = "16kf47ij25fijf6pbfxzq9xzildj1asdzhnkf5zv5pn4312pvgnq"; + url = "http://orgmode.org/elpa/org-plus-contrib-20190904.tar"; + sha256 = "08s3fk3jim0y2v00l6ah8y08ba8wbcf29z6fxqzyaxj58a5sq81a"; }; packageRequires = []; meta = { From cf8a2d0225d531b3db333aa3c6c89866f90ff4b2 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Sun, 3 Nov 2019 20:38:35 -0500 Subject: [PATCH 076/377] Revert "stdenv/check-meta: getEnv if the attribute is unset (#72376)" (#72752) This reverts commit 71184f8e157672789602d3f28bdd3c8079800687. --- pkgs/stdenv/generic/check-meta.nix | 11 +++++++---- pkgs/top-level/impure.nix | 13 +------------ 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/pkgs/stdenv/generic/check-meta.nix b/pkgs/stdenv/generic/check-meta.nix index 85a1051ceed..6bd6a9bf41e 100644 --- a/pkgs/stdenv/generic/check-meta.nix +++ b/pkgs/stdenv/generic/check-meta.nix @@ -13,7 +13,8 @@ let # for why this defaults to false, but I (@copumpkin) want to default it to true soon. shouldCheckMeta = config.checkMeta or false; - allowUnfree = config.allowUnfree or false; + allowUnfree = config.allowUnfree or false + || builtins.getEnv "NIXPKGS_ALLOW_UNFREE" == "1"; whitelist = config.whitelistedLicenses or []; blacklist = config.blacklistedLicenses or []; @@ -40,9 +41,11 @@ let hasBlacklistedLicense = assert areLicenseListsValid; attrs: hasLicense attrs && lib.lists.any (l: builtins.elem l blacklist) (lib.lists.toList attrs.meta.license); - allowBroken = config.allowBroken or false; + allowBroken = config.allowBroken or false + || builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1"; - allowUnsupportedSystem = config.allowUnsupportedSystem or false; + allowUnsupportedSystem = config.allowUnsupportedSystem or false + || builtins.getEnv "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM" == "1"; isUnfree = licenses: lib.lists.any (l: !l.free or true) licenses; @@ -70,7 +73,7 @@ let hasAllowedInsecure = attrs: (attrs.meta.knownVulnerabilities or []) == [] || allowInsecurePredicate attrs || - config.allowInsecure or false; + builtins.getEnv "NIXPKGS_ALLOW_INSECURE" == "1"; showLicense = license: toString (map (l: l.shortName or "unknown") (lib.lists.toList license)); diff --git a/pkgs/top-level/impure.nix b/pkgs/top-level/impure.nix index 9ed31077172..3ba6c08a140 100644 --- a/pkgs/top-level/impure.nix +++ b/pkgs/top-level/impure.nix @@ -10,14 +10,6 @@ let # Return ‘x’ if it evaluates, or ‘def’ if it throws an exception. try = x: def: let res = tryEval x; in if res.success then res.value else def; - defaultConfig = { - # These attributes are used in pkgs/stdenv/generic/check-meta.nix - allowBroken = builtins.getEnv "NIXPKGS_ALLOW_BROKEN" == "1"; - allowInsecure = builtins.getEnv "NIXPKGS_ALLOW_INSECURE" == "1"; - allowUnfree = builtins.getEnv "NIXPKGS_ALLOW_UNFREE" == "1"; - allowUnsupportedSystem = builtins.getEnv "NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM" == "1"; - }; - in { # We combine legacy `system` and `platform` into `localSystem`, if @@ -90,10 +82,7 @@ in assert args ? localSystem -> !(args ? system || args ? platform); import ./. (builtins.removeAttrs args [ "system" "platform" ] // { - inherit overlays crossSystem crossOverlays; - - config = defaultConfig // config; - + inherit config overlays crossSystem crossOverlays; # Fallback: Assume we are building packages on the current (build, in GNU # Autotools parlance) system. localSystem = if builtins.isString localSystem then localSystem From c98da738023ed72b78b5a4712c22f2350a7c0efb Mon Sep 17 00:00:00 2001 From: oxalica Date: Mon, 4 Nov 2019 12:13:30 +0800 Subject: [PATCH 077/377] lib.systems: remove redundant mapping --- lib/systems/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/systems/default.nix b/lib/systems/default.nix index ccb928eace7..0d51be4b23b 100644 --- a/lib/systems/default.nix +++ b/lib/systems/default.nix @@ -91,10 +91,6 @@ rec { powerpcle = "ppc"; powerpc64 = "ppc64"; powerpc64le = "ppc64le"; - mips = "mips"; - mipsel = "mipsel"; - mips64 = "mips64"; - mips64el = "mips64el"; }.${final.parsed.cpu.name} or final.parsed.cpu.name; emulator = pkgs: let From a2f7fc9a5c7edbda770cebb04a6ac92d46808b9a Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Sun, 27 Oct 2019 18:14:41 +0000 Subject: [PATCH 078/377] =?UTF-8?q?ocamlPackages.ocp-indent:=201.7.0=20?= =?UTF-8?q?=E2=86=92=201.8.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/development/tools/ocaml/ocp-indent/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/ocaml/ocp-indent/default.nix b/pkgs/development/tools/ocaml/ocp-indent/default.nix index 7ecc15da2b5..6f8d80df564 100644 --- a/pkgs/development/tools/ocaml/ocp-indent/default.nix +++ b/pkgs/development/tools/ocaml/ocp-indent/default.nix @@ -1,12 +1,12 @@ { lib, fetchzip, buildDunePackage, cmdliner }: buildDunePackage rec { - version = "1.7.0"; + version = "1.8.1"; pname = "ocp-indent"; src = fetchzip { url = "https://github.com/OCamlPro/ocp-indent/archive/${version}.tar.gz"; - sha256 = "006x3fsd61vxnxj4chlakyk3b2s10pb0bdl46g0ghf3j8h33x7hc"; + sha256 = "0h4ysh36q1fxc40inhsdq2swqpfm15lpilqqcafs5ska42pn7s68"; }; minimumOCamlVersion = "4.02"; From eb2aa009a3506117b9810763e9ed4ef5cda66bb2 Mon Sep 17 00:00:00 2001 From: Pierre Bourdon Date: Mon, 4 Nov 2019 05:26:06 +0100 Subject: [PATCH 079/377] pythonPackages.pyatmo: 2.3.2 requires requests --- pkgs/development/python-modules/pyatmo/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/python-modules/pyatmo/default.nix b/pkgs/development/python-modules/pyatmo/default.nix index bd1caba1d27..56467d1e4a5 100644 --- a/pkgs/development/python-modules/pyatmo/default.nix +++ b/pkgs/development/python-modules/pyatmo/default.nix @@ -1,6 +1,7 @@ { lib , buildPythonPackage , fetchPypi +, requests }: buildPythonPackage rec { @@ -12,6 +13,8 @@ buildPythonPackage rec { sha256 = "2c76740e5adbf8b14d8f41d4f84ce23c0e8e738b18b926dc60858c35bf2fa8f2"; }; + propagatedBuildInputs = [ requests ]; + # Upstream provides no unit tests. doCheck = false; From 8db9c3ef4523f7f60789916960892a17c5850af0 Mon Sep 17 00:00:00 2001 From: Sebastian Jordan Date: Mon, 4 Nov 2019 05:08:02 +0100 Subject: [PATCH 080/377] nix-prefetch-github: Delete redundant source, build from python3Packages instead --- .../nix-prefetch-github/default.nix | 29 ------------------- pkgs/top-level/all-packages.nix | 3 +- 2 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 pkgs/build-support/nix-prefetch-github/default.nix diff --git a/pkgs/build-support/nix-prefetch-github/default.nix b/pkgs/build-support/nix-prefetch-github/default.nix deleted file mode 100644 index 10a6daaf53f..00000000000 --- a/pkgs/build-support/nix-prefetch-github/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ python3 -, fetchFromGitHub -, stdenv -}: - -python3.pkgs.buildPythonApplication rec { - pname = "nix-prefetch-github"; - version = "2.3.1"; - - src = fetchFromGitHub { - owner = "seppeljordan"; - repo = "nix-prefetch-github"; - rev = "v${version}"; - sha256 = "13wvq13iiva97a16kahfpxar5ppb015nnbn7d4v9s9jyxdickc2c"; - }; - - propagatedBuildInputs = with python3.pkgs; [ - attrs - click - effect - jinja2 - ]; - meta = with stdenv.lib; { - description = "Prefetch sources from github"; - homepage = https://github.com/seppeljordan/nix-prefetch-github; - license = licenses.gpl3; - maintainers = [ maintainers.seppeljordan ]; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c5598f328a5..3d03ef6257c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24549,7 +24549,8 @@ in nix-prefetch = callPackage ../tools/package-management/nix-prefetch { }; - nix-prefetch-github = callPackage ../build-support/nix-prefetch-github {}; + nix-prefetch-github = with python3Packages; + toPythonApplication nix-prefetch-github; inherit (callPackages ../tools/package-management/nix-prefetch-scripts { }) nix-prefetch-bzr From d7a618ac011abba0444f1a207abea0640cefc24f Mon Sep 17 00:00:00 2001 From: Sebastian Jordan Date: Mon, 4 Nov 2019 05:10:45 +0100 Subject: [PATCH 081/377] pythonPackages.nix-prefetch-github: 2.3.1 -> 2.3.2 --- .../python-modules/nix-prefetch-github/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/nix-prefetch-github/default.nix b/pkgs/development/python-modules/nix-prefetch-github/default.nix index 71a7701c019..f73fb6dac33 100644 --- a/pkgs/development/python-modules/nix-prefetch-github/default.nix +++ b/pkgs/development/python-modules/nix-prefetch-github/default.nix @@ -9,11 +9,11 @@ buildPythonPackage rec { pname = "nix-prefetch-github"; - version = "2.3.1"; + version = "2.3.2"; src = fetchPypi { inherit pname version; - sha256 = "1jkvmj33xinff0sb47yg33n131yi93pyq86skqc78xd38j6c8q9s"; + sha256 = "18xj618zjs13ib7f996fnl0xiqig0w48yns45nvy3xab55wximdx"; }; propagatedBuildInputs = [ From b07656542939003148d3dfc1f9df5fbd1c800567 Mon Sep 17 00:00:00 2001 From: Keito Kajitani Date: Mon, 4 Nov 2019 15:21:57 +0900 Subject: [PATCH 082/377] liberation-sans-narrow: fonttools requires python3 --- pkgs/data/fonts/liberation-sans-narrow/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/data/fonts/liberation-sans-narrow/default.nix b/pkgs/data/fonts/liberation-sans-narrow/default.nix index 4a14e095cf0..51af6a20bae 100644 --- a/pkgs/data/fonts/liberation-sans-narrow/default.nix +++ b/pkgs/data/fonts/liberation-sans-narrow/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, fontforge, pythonPackages, python }: +{ stdenv, fetchFromGitHub, fontforge, python3Packages, python3 }: stdenv.mkDerivation rec { pname = "liberation-sans-narrow"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { sha256 = "1qw554jbdnqkg6pjjl4cqkgsalq3398kzvww2naw30vykcz752bm"; }; - buildInputs = [ fontforge pythonPackages.fonttools python ]; + buildInputs = [ fontforge python3Packages.fonttools python3 ]; installPhase = '' find . -name '*Narrow*.ttf' -exec install -m444 -Dt $out/share/fonts/truetype {} \; From 03f38c329f62c98c94d625a85d061cddbe130866 Mon Sep 17 00:00:00 2001 From: Johannes Schleifenbaum Date: Mon, 4 Nov 2019 09:51:09 +0100 Subject: [PATCH 083/377] dbeaver: 6.2.3 -> 6.2.4 --- pkgs/applications/misc/dbeaver/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/dbeaver/default.nix b/pkgs/applications/misc/dbeaver/default.nix index 191c6a31972..1549ab00a4f 100644 --- a/pkgs/applications/misc/dbeaver/default.nix +++ b/pkgs/applications/misc/dbeaver/default.nix @@ -7,7 +7,7 @@ stdenv.mkDerivation rec { pname = "dbeaver-ce"; - version = "6.2.3"; + version = "6.2.4"; desktopItem = makeDesktopItem { name = "dbeaver"; @@ -30,7 +30,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://dbeaver.io/files/${version}/dbeaver-ce-${version}-linux.gtk.x86_64.tar.gz"; - sha256 = "1v4sllzvaz4fj8s14ddzw11wczlghbdppv8fl5jg6xglg687sgaj"; + sha256 = "1k3aan290kfy2b53gl8r4yxvb8jas6sms1r052m3jld3i8frqgva"; }; installPhase = '' From cdc5bcdea543406814bbf12f3efefa8358065cc7 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 2 Nov 2019 19:24:55 -0700 Subject: [PATCH 084/377] rabbitmq-server: 3.8.0 -> 3.8.1 --- pkgs/servers/amqp/rabbitmq-server/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/amqp/rabbitmq-server/default.nix b/pkgs/servers/amqp/rabbitmq-server/default.nix index 12211f49698..bc83c5a8ea2 100644 --- a/pkgs/servers/amqp/rabbitmq-server/default.nix +++ b/pkgs/servers/amqp/rabbitmq-server/default.nix @@ -6,12 +6,12 @@ stdenv.mkDerivation rec { pname = "rabbitmq-server"; - version = "3.8.0"; + version = "3.8.1"; # when updating, consider bumping elixir version in all-packages.nix src = fetchurl { url = "https://github.com/rabbitmq/rabbitmq-server/releases/download/v${version}/${pname}-${version}.tar.xz"; - sha256 = "174ai8ihk50gwbqinxxxx5is6izvgmfca7skvvp4yk6fl8nbwm15"; + sha256 = "17ymzjgz3544jgf321f8f788gdxs9l252ah61nlgsglv0x8gggrh"; }; buildInputs = From e6bb21812eba789fa0818e0746a790f024d7445e Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Sun, 3 Nov 2019 21:06:04 -0500 Subject: [PATCH 085/377] vscode-extensions.ms-vscode.cpptools: 0.26.0 -> 0.26.1 --- pkgs/misc/vscode-extensions/cpptools/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/vscode-extensions/cpptools/default.nix b/pkgs/misc/vscode-extensions/cpptools/default.nix index 70d08aa18a0..08fee83d8ce 100644 --- a/pkgs/misc/vscode-extensions/cpptools/default.nix +++ b/pkgs/misc/vscode-extensions/cpptools/default.nix @@ -83,8 +83,8 @@ vscode-utils.buildVscodeMarketplaceExtension { mktplcRef = { name = "cpptools"; publisher = "ms-vscode"; - version = "0.26.0"; - sha256 = "1njclj07amj9n187k3rbjvddkhmsc4aljdbsgjxpj58fv7zdy7kq"; + version = "0.26.1"; + sha256 = "09khm0byxa9mv8qbqrikd7akz3p816ra5z8l86xqkmbm6j1k4wpc"; }; buildInputs = [ From 21529a91d98bf3fe31ee5e14b828d9f658296bda Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Sun, 3 Nov 2019 21:06:41 -0500 Subject: [PATCH 086/377] srht: 0.54.3 -> 0.54.4 --- pkgs/applications/version-management/sourcehut/core.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/core.nix b/pkgs/applications/version-management/sourcehut/core.nix index a284873f003..ef9136daefa 100644 --- a/pkgs/applications/version-management/sourcehut/core.nix +++ b/pkgs/applications/version-management/sourcehut/core.nix @@ -6,12 +6,12 @@ buildPythonPackage rec { pname = "srht"; - version = "0.54.3"; + version = "0.54.4"; src = fetchgit { url = "https://git.sr.ht/~sircmpwn/core.sr.ht"; rev = version; - sha256 = "1f4srhp5g6652anifs1vyijzi2v23l2rnfpf3x96j9r8rdap42rq"; + sha256 = "0flxvn178hqd8ljz89ddis80zfnmzgimv4506w4dg2flbwzywy7z"; }; node_modules = fetchNodeModules { From 9bc8540d86303f91163873410a6b853f803816c5 Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Sun, 3 Nov 2019 21:07:10 -0500 Subject: [PATCH 087/377] buildsrht: 0.47.9 -> 0.48.0 --- pkgs/applications/version-management/sourcehut/builds.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/builds.nix b/pkgs/applications/version-management/sourcehut/builds.nix index 9b6583d6cb8..76edc1b3e64 100644 --- a/pkgs/applications/version-management/sourcehut/builds.nix +++ b/pkgs/applications/version-management/sourcehut/builds.nix @@ -4,7 +4,7 @@ , srht, redis, celery, pyyaml, markdown }: let - version = "0.47.9"; + version = "0.48.0"; buildWorker = src: buildGoModule { inherit src version; @@ -20,7 +20,7 @@ in buildPythonPackage rec { src = fetchgit { url = "https://git.sr.ht/~sircmpwn/builds.sr.ht"; rev = version; - sha256 = "1zgaba58svhksxb1pzz8bym9p0pm7fnxsj5k6jz86095xmfijp34"; + sha256 = "1z5bxsn67cqffixqsrnska86mw0a6494650wbi6dbp10z03870bs"; }; patches = [ From 257f5d6303aaf2cdbe8298d745c576b0d827b106 Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Sun, 3 Nov 2019 21:07:15 -0500 Subject: [PATCH 088/377] dispatchsrht: 0.11.1 -> 0.12.3 --- pkgs/applications/version-management/sourcehut/dispatch.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/dispatch.nix b/pkgs/applications/version-management/sourcehut/dispatch.nix index 7172cdab402..a61f35b9ee1 100644 --- a/pkgs/applications/version-management/sourcehut/dispatch.nix +++ b/pkgs/applications/version-management/sourcehut/dispatch.nix @@ -4,12 +4,12 @@ buildPythonPackage rec { pname = "dispatchsrht"; - version = "0.11.1"; + version = "0.12.3"; src = fetchgit { url = "https://git.sr.ht/~sircmpwn/dispatch.sr.ht"; rev = version; - sha256 = "1bi7vn0yr326mf2c63f2fahdlrx2c6a8d6p6bzy2ym2835qfcc0v"; + sha256 = "0lpc8jpyz1rg3g98546wlhr27b15g32lds77hl42aixv5f5b8lc9"; }; patches = [ From 7967cb05adc8ffc2589f7169a5db266255cd16d5 Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Sun, 3 Nov 2019 21:07:22 -0500 Subject: [PATCH 089/377] gitsrht: 0.34.2 -> 0.35.6 --- pkgs/applications/version-management/sourcehut/git.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/git.nix b/pkgs/applications/version-management/sourcehut/git.nix index 9b0b5e2c8e4..39302057b1d 100644 --- a/pkgs/applications/version-management/sourcehut/git.nix +++ b/pkgs/applications/version-management/sourcehut/git.nix @@ -4,7 +4,7 @@ , srht, pygit2, scmsrht }: let - version = "0.34.2"; + version = "0.35.6"; buildDispatcher = src: buildGoModule { inherit src version; @@ -20,7 +20,7 @@ in buildPythonPackage rec { src = fetchgit { url = "https://git.sr.ht/~sircmpwn/git.sr.ht"; rev = version; - sha256 = "1z10r2d9x71n1n36g55j4cswh0dqnzmgj2qiy1h92wwgq8azpiyy"; + sha256 = "0j8caqbzdqkgc1bdhzz4k5hgh8lhsghfgwf46d19ryf83d8ggxqc"; }; patches = [ From 2269781690f5eed29a513ce6686766e100f5d892 Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Sun, 3 Nov 2019 21:07:28 -0500 Subject: [PATCH 090/377] hgsrht: 0.16.0 -> 0.16.2 --- pkgs/applications/version-management/sourcehut/hg.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/hg.nix b/pkgs/applications/version-management/sourcehut/hg.nix index dc9ced49cea..fd5c3145db0 100644 --- a/pkgs/applications/version-management/sourcehut/hg.nix +++ b/pkgs/applications/version-management/sourcehut/hg.nix @@ -4,12 +4,12 @@ buildPythonPackage rec { pname = "hgsrht"; - version = "0.16.0"; + version = "0.16.2"; src = fetchhg { url = "https://hg.sr.ht/~sircmpwn/hg.sr.ht"; rev = version; - sha256 = "0ncrj1cbls9ix2ig3qqwbzs6q6cmpqy3zs21p9fw3idfw703j3g0"; + sha256 = "02bzy31zplnlqg8rcls5n65q1h920lhy6f51w89w1kskdw7r2mhy"; }; patches = [ From eb9b2ac6a0caa52f76efe2e2bf38bb922895d12f Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Sun, 3 Nov 2019 21:07:48 -0500 Subject: [PATCH 091/377] metasrht: 0.35.3 -> 0.37.0 --- pkgs/applications/version-management/sourcehut/meta.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/meta.nix b/pkgs/applications/version-management/sourcehut/meta.nix index bac369088a6..a5458b0b864 100644 --- a/pkgs/applications/version-management/sourcehut/meta.nix +++ b/pkgs/applications/version-management/sourcehut/meta.nix @@ -5,12 +5,12 @@ buildPythonPackage rec { pname = "metasrht"; - version = "0.35.3"; + version = "0.37.0"; src = fetchgit { url = "https://git.sr.ht/~sircmpwn/meta.sr.ht"; rev = version; - sha256 = "1kcmlmdk9v59fr3r0g2q2gfkb735xza0wni9s942wh418dr66x2f"; + sha256 = "1jf3h2v27cbam8bwiw3x35319pzp0r651p8mfhw150jvskyvmkmr"; }; nativeBuildInputs = srht.nativeBuildInputs; From 0d487aef711ad30ead0e563d18d18d6718cd2e5d Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Sun, 3 Nov 2019 21:08:04 -0500 Subject: [PATCH 092/377] pastesrht: 0.7.1 -> 0.7.3 --- pkgs/applications/version-management/sourcehut/paste.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/paste.nix b/pkgs/applications/version-management/sourcehut/paste.nix index 4a86285f50d..4e397c649f9 100644 --- a/pkgs/applications/version-management/sourcehut/paste.nix +++ b/pkgs/applications/version-management/sourcehut/paste.nix @@ -4,12 +4,12 @@ buildPythonPackage rec { pname = "pastesrht"; - version = "0.7.1"; + version = "0.7.3"; src = fetchgit { url = "https://git.sr.ht/~sircmpwn/paste.sr.ht"; rev = version; - sha256 = "19y9ghhi4llyg7kd3a888gbjc698vdamin4hb8dk1j6pd2f0qmjp"; + sha256 = "15689gk37djcwdjb636d97k0il2zpdpksb95l9l4d43wipd7x5qi"; }; patches = [ From 09570b1b0c2c382a21f226abf1f22790651e6a23 Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Sun, 3 Nov 2019 21:08:12 -0500 Subject: [PATCH 093/377] todosrht: 0.51.11 -> 0.51.13 --- pkgs/applications/version-management/sourcehut/todo.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/todo.nix b/pkgs/applications/version-management/sourcehut/todo.nix index aaee9b54477..a7703bd0729 100644 --- a/pkgs/applications/version-management/sourcehut/todo.nix +++ b/pkgs/applications/version-management/sourcehut/todo.nix @@ -5,12 +5,12 @@ buildPythonPackage rec { pname = "todosrht"; - version = "0.51.11"; + version = "0.51.13"; src = fetchgit { url = "https://git.sr.ht/~sircmpwn/todo.sr.ht"; rev = version; - sha256 = "0x4aray1dappalmn2f4wqrhpa5k1idccnafbfhsnfi6nj718i33a"; + sha256 = "19gywq5j7wlpk7j2whm2ivz0z0i3j50n7k7bx29pghndl7l43c18"; }; patches = [ From 78bbf841ea7f23023e41f8b36b161f7756d96860 Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Sun, 3 Nov 2019 21:08:19 -0500 Subject: [PATCH 094/377] scmsrht: 0.15.3 -> 0.16.0 --- pkgs/applications/version-management/sourcehut/scm.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/sourcehut/scm.nix b/pkgs/applications/version-management/sourcehut/scm.nix index baccfb1b94b..c5209cee46b 100644 --- a/pkgs/applications/version-management/sourcehut/scm.nix +++ b/pkgs/applications/version-management/sourcehut/scm.nix @@ -4,12 +4,12 @@ buildPythonPackage rec { pname = "scmsrht"; - version = "0.15.3"; + version = "0.16.0"; src = fetchgit { url = "https://git.sr.ht/~sircmpwn/scm.sr.ht"; rev = version; - sha256 = "1rzm3r280211w51sjngm5a3pdlzg07c64324k99bqs1fkc2yrfy6"; + sha256 = "0jny8ihn49n7bpw5nhdrfha78yzpxp277l50y1lj142r59kwmh22"; }; nativeBuildInputs = srht.nativeBuildInputs; From 9e78d12878d3757410bfd3c9d27cadfbd3192543 Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Sun, 3 Nov 2019 21:09:23 -0500 Subject: [PATCH 095/377] pythonPackages.sqlalchemy-utils: 0.34.2 -> 0.35.0 --- pkgs/development/python-modules/sqlalchemy-utils/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/sqlalchemy-utils/default.nix b/pkgs/development/python-modules/sqlalchemy-utils/default.nix index ef30b6917a3..3db00057c90 100644 --- a/pkgs/development/python-modules/sqlalchemy-utils/default.nix +++ b/pkgs/development/python-modules/sqlalchemy-utils/default.nix @@ -5,12 +5,12 @@ buildPythonPackage rec { pname = "sqlalchemy-utils"; - version = "0.34.2"; + version = "0.35.0"; src = fetchPypi { inherit version; pname = "SQLAlchemy-Utils"; - sha256 = "126c9p8rnnb043w57ah7idqfryczbz4vi9lzsz2cgiaig6fv52b6"; + sha256 = "0phsdcnm21qvxd00zmjd6yxbm1s0i7b1q8zrgfy8cqv9xpmz1w01"; }; propagatedBuildInputs = [ From 9051e284cebd3d1dce2506d38186ef7732a87c34 Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Sun, 3 Nov 2019 21:19:05 -0500 Subject: [PATCH 096/377] sourcehut.core: fix build --- pkgs/applications/version-management/sourcehut/core.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/applications/version-management/sourcehut/core.nix b/pkgs/applications/version-management/sourcehut/core.nix index ef9136daefa..67486bd28f3 100644 --- a/pkgs/applications/version-management/sourcehut/core.nix +++ b/pkgs/applications/version-management/sourcehut/core.nix @@ -1,6 +1,7 @@ { stdenv, fetchgit, fetchNodeModules, buildPythonPackage , pgpy, flask, bleach, misaka, humanize, markdown, psycopg2, pygments, requests , sqlalchemy, flask_login, beautifulsoup4, sqlalchemy-utils, celery, alembic +, importlib-metadata , sassc, nodejs , writeText }: @@ -47,6 +48,7 @@ buildPythonPackage rec { # Unofficial runtime dependencies? celery alembic + importlib-metadata ]; PKGVER = version; From 8fea62011332f4171b24ca2aa501baa5cf7ad0b0 Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Sun, 3 Nov 2019 21:20:02 -0500 Subject: [PATCH 097/377] sourcehut.gitsrht: build git-srht-shell --- .../applications/version-management/sourcehut/git.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/version-management/sourcehut/git.nix b/pkgs/applications/version-management/sourcehut/git.nix index 39302057b1d..b580e89c747 100644 --- a/pkgs/applications/version-management/sourcehut/git.nix +++ b/pkgs/applications/version-management/sourcehut/git.nix @@ -6,9 +6,17 @@ let version = "0.35.6"; + buildShell = src: buildGoModule { + inherit src version; + pname = "git-srht-shell"; + goPackagePath = "git.sr.ht/~sircmpwn/git.sr.ht/gitsrht-shell"; + + modSha256 = "1v4npijqgv09ssrxf1y1b3syb2fs7smy7k9rcj3ynsfrn9xgfd9y"; + }; + buildDispatcher = src: buildGoModule { inherit src version; - pname = "git-sr-ht-dispatcher"; + pname = "git-srht-dispatcher"; goPackagePath = "git.sr.ht/~sircmpwn/git.sr.ht/gitsrht-dispatch"; modSha256 = "1lmgmlin460g09dph2hw6yz25d4agqwjhrjv0qqsis7df9qpf3i1"; @@ -42,6 +50,7 @@ in buildPythonPackage rec { postInstall = '' mkdir -p $out/bin + cp ${buildShell "${src}/gitsrht-shell"}/bin/gitsrht-shell $out/bin/gitsrht-shell cp ${buildDispatcher "${src}/gitsrht-dispatch"}/bin/gitsrht-dispatch $out/bin/gitsrht-dispatch ''; From c49707f50f095f8e1f4f66b48d34079a98dd49e8 Mon Sep 17 00:00:00 2001 From: Evan Stoll Date: Sat, 2 Nov 2019 18:27:34 -0400 Subject: [PATCH 098/377] cargo-geiger: init at 0.7.3 --- .../tools/rust/cargo-geiger/default.nix | 30 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 3 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/tools/rust/cargo-geiger/default.nix diff --git a/pkgs/development/tools/rust/cargo-geiger/default.nix b/pkgs/development/tools/rust/cargo-geiger/default.nix new file mode 100644 index 00000000000..7d6fc6781df --- /dev/null +++ b/pkgs/development/tools/rust/cargo-geiger/default.nix @@ -0,0 +1,30 @@ +{ stdenv, lib, fetchFromGitHub +, rustPlatform, pkgconfig +, openssl, Security }: + +rustPlatform.buildRustPackage rec { + pname = "cargo-geiger"; + version = "0.7.3"; + + src = fetchFromGitHub { + owner = "anderejd"; + repo = pname; + rev = "${pname}-${version}"; + sha256 = "1lm8dx19svdpg99zbpfcm1272n18y63sq756hf6k99zi51av17xc"; + }; + + doCheck = false; + + cargoSha256 = "16zvm2y0j7ywv6fx0piq99g8q1sayf3qipd6adrwyqyg8rbf4cw6"; + + buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; + nativeBuildInputs = [ pkgconfig ]; + + meta = with lib; { + description = "Detects usage of unsafe Rust in a Rust crate and its dependencies."; + homepage = https://github.com/anderejd/cargo-geiger; + license = with licenses; [ asl20 /* or */ mit ]; + maintainers = with maintainers; [ evanjs ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3d03ef6257c..1be6d168b03 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8526,6 +8526,9 @@ in cargo-bloat = callPackage ../development/tools/rust/cargo-bloat { }; cargo-expand = callPackage ../development/tools/rust/cargo-expand { }; cargo-fuzz = callPackage ../development/tools/rust/cargo-fuzz { }; + cargo-geiger = callPackage ../development/tools/rust/cargo-geiger { + inherit (darwin.apple_sdk.frameworks) Security; + }; cargo-inspect = callPackage ../development/tools/rust/cargo-inspect { inherit (darwin.apple_sdk.frameworks) Security; }; From c6705f54c9dc578231619505634b913c70092a4d Mon Sep 17 00:00:00 2001 From: Evan Stoll Date: Sun, 3 Nov 2019 19:13:08 -0500 Subject: [PATCH 099/377] cargo-geiger: run tests; skip tests that require network connectivity - Add note on how we might be able to run all tests in the future --- .../development/tools/rust/cargo-geiger/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-geiger/default.nix b/pkgs/development/tools/rust/cargo-geiger/default.nix index 7d6fc6781df..2512a9ec4f4 100644 --- a/pkgs/development/tools/rust/cargo-geiger/default.nix +++ b/pkgs/development/tools/rust/cargo-geiger/default.nix @@ -13,10 +13,19 @@ rustPlatform.buildRustPackage rec { sha256 = "1lm8dx19svdpg99zbpfcm1272n18y63sq756hf6k99zi51av17xc"; }; - doCheck = false; - cargoSha256 = "16zvm2y0j7ywv6fx0piq99g8q1sayf3qipd6adrwyqyg8rbf4cw6"; + # Multiple tests require internet connectivity, so they are disabled here. + # If we ever get cargo-insta (https://crates.io/crates/insta) in tree, + # we might be able to run these with something like + # `cargo insta review` in the `preCheck` phase. + checkPhase = '' + cargo test -- \ + --skip test_package::case_2 \ + --skip test_package::case_3 \ + --skip test_package::case_6 + ''; + buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; nativeBuildInputs = [ pkgconfig ]; From 062a4d4081533812592c43ddb48f6b022f2e04f5 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Sat, 2 Nov 2019 16:45:18 -0700 Subject: [PATCH 100/377] paperwork`: add missing dependency --- pkgs/applications/office/paperwork/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/office/paperwork/default.nix b/pkgs/applications/office/paperwork/default.nix index df5e495f936..3506ea8b551 100644 --- a/pkgs/applications/office/paperwork/default.nix +++ b/pkgs/applications/office/paperwork/default.nix @@ -61,7 +61,7 @@ python3Packages.buildPythonApplication rec { ''; propagatedBuildInputs = with python3Packages; [ - paperwork-backend pypillowfight gtk3 cairo pyxdg dateutil setuptools + paperwork-backend pypillowfight gtk3 cairo pyxdg dateutil setuptools pandas ]; makeWrapperArgs = [ From 2d5aa988743c417c5c548854001fc2889e29e5d3 Mon Sep 17 00:00:00 2001 From: Jos van Bakel Date: Sat, 2 Nov 2019 14:11:31 +0100 Subject: [PATCH 101/377] pythonPackages.pyglet: 1.3.2 -> 1.4.2 --- pkgs/development/python-modules/pyglet/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/pyglet/default.nix b/pkgs/development/python-modules/pyglet/default.nix index e303f3415d7..1e7beddda7f 100644 --- a/pkgs/development/python-modules/pyglet/default.nix +++ b/pkgs/development/python-modules/pyglet/default.nix @@ -43,6 +43,8 @@ buildPythonPackage rec { path = '${gtk2-x11}/lib/libgdk-x11-2.0${ext}' elif name == 'gdk_pixbuf-2.0': path = '${gdk-pixbuf}/lib/libgdk_pixbuf-2.0${ext}' + elif name == 'Xext': + path = '${xorg.libXext}/lib/libXext${ext}' if path is not None: return ctypes.cdll.LoadLibrary(path) raise Exception("Could not load library {}".format(names)) From 018f66f6d8d21eeebbd4ba0bd462982dbde9dcb9 Mon Sep 17 00:00:00 2001 From: Jos van Bakel Date: Sat, 2 Nov 2019 14:12:15 +0100 Subject: [PATCH 102/377] pythonPackages.moderngl-window: init at 1.2.0 --- .../moderngl_window/default.nix | 38 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/development/python-modules/moderngl_window/default.nix diff --git a/pkgs/development/python-modules/moderngl_window/default.nix b/pkgs/development/python-modules/moderngl_window/default.nix new file mode 100644 index 00000000000..a3c93978ff6 --- /dev/null +++ b/pkgs/development/python-modules/moderngl_window/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, isPy3k +, numpy +, moderngl +, pyglet +, pillow +, pyrr +, pytest +}: + +buildPythonPackage rec { + pname = "moderngl_window"; + version = "1.2.0"; + + src = fetchFromGitHub { + owner = "moderngl"; + repo = pname; + rev = version; + sha256 = "054w77lyc2nc0dyx76zsrbq2b3xbywdijhb62b2qqm99ldr1k1x5"; + }; + + propagatedBuildInputs = [ numpy moderngl pyglet pillow pyrr ]; + + disabled = !isPy3k; + + # Tests need a display to run. + doCheck = false; + + meta = with lib; { + homepage = "https://github.com/moderngl/moderngl_window"; + description = "Cross platform helper library for ModernGL making window creation and resource loading simple"; + license = licenses.mit; + platforms = platforms.linux; # should be mesaPlatforms, darwin build breaks. + maintainers = with maintainers; [ c0deaddict ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8fbe53f7904..6691d49137b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3893,6 +3893,8 @@ in { moderngl = callPackage ../development/python-modules/moderngl { }; + moderngl-window = callPackage ../development/python-modules/moderngl_window { }; + modestmaps = callPackage ../development/python-modules/modestmaps { }; # Needed here because moinmoin is loaded as a Python library. From e764c16083062658123d05a7c477ead616a71da0 Mon Sep 17 00:00:00 2001 From: scalavisison Date: Fri, 11 Oct 2019 23:08:15 +0200 Subject: [PATCH 103/377] pythonPackages.py2bit: init at 0.3.0 --- .../python-modules/py2bit/default.nix | 27 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/development/python-modules/py2bit/default.nix diff --git a/pkgs/development/python-modules/py2bit/default.nix b/pkgs/development/python-modules/py2bit/default.nix new file mode 100644 index 00000000000..7699ccab3a2 --- /dev/null +++ b/pkgs/development/python-modules/py2bit/default.nix @@ -0,0 +1,27 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytest +}: + +buildPythonPackage rec { + pname = "py2bit"; + version = "0.3.0"; + + checkInput = [ pytest ]; + + src = fetchPypi { + inherit pname version; + sha256 = "1vw2nvw1yrl7ikkqsqs1pg239yr5nspvd969r1x9arms1k25a1a5"; + }; + + meta = with lib; { + homepage = "https://github.com/deeptools/py2bit"; + description = "File access to 2bit files"; + longDescription = '' + A python extension, written in C, for quick access to 2bit files. The extension uses lib2bit for file access. + ''; + license = licenses.mit; + maintainers = with maintainers; [ scalavision ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6691d49137b..3876b7b48c9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4447,6 +4447,8 @@ in { pybfd = callPackage ../development/python-modules/pybfd { }; + py2bit = callPackage ../development/python-modules/py2bit { }; + pyblock = callPackage ../development/python-modules/pyblock { }; pyblosxom = callPackage ../development/python-modules/pyblosxom { }; From 1994ed8c7ee6cac8d2039945701725d95e59c16d Mon Sep 17 00:00:00 2001 From: scalavision Date: Thu, 31 Oct 2019 19:24:22 +0100 Subject: [PATCH 104/377] pythonPackages.pybigwig: init at 0.3.17 --- .../python-modules/pybigwig/default.nix | 33 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 pkgs/development/python-modules/pybigwig/default.nix diff --git a/pkgs/development/python-modules/pybigwig/default.nix b/pkgs/development/python-modules/pybigwig/default.nix new file mode 100644 index 00000000000..be54a38cd99 --- /dev/null +++ b/pkgs/development/python-modules/pybigwig/default.nix @@ -0,0 +1,33 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytest +, numpy +, zlib +}: + +buildPythonPackage rec { + pname = "pyBigWig"; + version = "0.3.17"; + + src = fetchPypi { + inherit pname version; + sha256 = "157x6v48y299zm382krf1dw08fdxg95im8lnabhp5vc94s04zxj1"; + }; + + buildInputs = [ zlib ]; + + checkInputs = [ numpy pytest ]; + + meta = with lib; { + homepage = "https://github.com/deeptools/pyBigWig"; + description = "File access to bigBed files, and read and write access to bigWig files"; + longDescription = '' + A python extension, written in C, for quick access to bigBed files + and access to and creation of bigWig files. This extension uses + libBigWig for local and remote file access. + ''; + license = licenses.mit; + maintainers = with maintainers; [ scalavision ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3876b7b48c9..ea114f2dd65 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4447,6 +4447,8 @@ in { pybfd = callPackage ../development/python-modules/pybfd { }; + pybigwig = callPackage ../development/python-modules/pybigwig { }; + py2bit = callPackage ../development/python-modules/py2bit { }; pyblock = callPackage ../development/python-modules/pyblock { }; From f3799926800dcb7f53f738e98cffafde6da3a2d9 Mon Sep 17 00:00:00 2001 From: scalavision Date: Thu, 31 Oct 2019 19:27:48 +0100 Subject: [PATCH 105/377] pythonPackages.deeptoolsIntervals: init at 0.1.9 --- .../deeptoolsintervals/default.nix | 28 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/development/python-modules/deeptoolsintervals/default.nix diff --git a/pkgs/development/python-modules/deeptoolsintervals/default.nix b/pkgs/development/python-modules/deeptoolsintervals/default.nix new file mode 100644 index 00000000000..eef8d51ae91 --- /dev/null +++ b/pkgs/development/python-modules/deeptoolsintervals/default.nix @@ -0,0 +1,28 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytest +, zlib +, lzma +}: + +buildPythonPackage rec { + pname = "deeptoolsintervals"; + version = "0.1.9"; + + src = fetchPypi { + inherit pname version; + sha256 = "1xnl80nblysj6dylj4683wgrfa425rkx4dp5k65hvwdns9pw753x"; + }; + + buildInputs = [ zlib lzma ]; + + checkInputs = [ pytest ]; + + meta = with lib; { + homepage = "https://deeptools.readthedocs.io/en/develop"; + description = "Helper library for deeptools"; + license = licenses.mit; + maintainers = with maintainers; [ scalavision ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ea114f2dd65..c4151922d62 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -521,6 +521,8 @@ in { deap = callPackage ../development/python-modules/deap { }; + deeptoolsintervals = callPackage ../development/python-modules/deeptoolsintervals { }; + dkimpy = callPackage ../development/python-modules/dkimpy { }; dictionaries = callPackage ../development/python-modules/dictionaries { }; From d9b40f6397de11c3d59001fa9a5cec226ee408c1 Mon Sep 17 00:00:00 2001 From: scalavision Date: Thu, 31 Oct 2019 19:34:05 +0100 Subject: [PATCH 106/377] deeptools: init at 3.3.1 --- .../science/biology/deeptools/default.nix | 42 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/applications/science/biology/deeptools/default.nix diff --git a/pkgs/applications/science/biology/deeptools/default.nix b/pkgs/applications/science/biology/deeptools/default.nix new file mode 100644 index 00000000000..78a6f483337 --- /dev/null +++ b/pkgs/applications/science/biology/deeptools/default.nix @@ -0,0 +1,42 @@ +{ lib +, python +}: +with python.pkgs; +buildPythonApplication rec { + pname = "deepTools"; + version = "3.3.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "08p36p9ncj5s8qf1r7h83x4rnmi63l3yk6mnr3wgpg2qgvwl0hji"; + }; + + propagatedBuildInputs = [ + numpy + numpydoc + scipy + py2bit + pybigwig + pysam + matplotlib + plotly + deeptoolsintervals + ]; + + checkInputs = [ pytest ]; + + meta = with lib; { + homepage = "https://deeptools.readthedocs.io/en/develop"; + description = "Tools for exploring deep DNA sequencing data"; + longDescription = '' + deepTools contains useful modules to process the mapped reads data for multiple + quality checks, creating normalized coverage files in standard bedGraph and bigWig + file formats, that allow comparison between different files (for example, treatment and control). + Finally, using such normalized and standardized files, deepTools can create many + publication-ready visualizations to identify enrichments and for functional + annotations of the genome. + ''; + license = licenses.gpl3; + maintainers = with maintainers; [ scalavision ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1be6d168b03..6e8fe9ac305 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -23286,6 +23286,8 @@ in dcm2niix = callPackage ../applications/science/biology/dcm2niix { }; + deeptools = callPackage ../applications/science/biology/deeptools { python = python3; }; + delly = callPackage ../applications/science/biology/delly { }; diamond = callPackage ../applications/science/biology/diamond { }; From e834edcbddaabe967f51abd4fe1fea0ba1e569ab Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 3 Nov 2019 02:37:52 -0800 Subject: [PATCH 107/377] zsh-history-substring-search: 1.0.1 -> 1.0.2 --- pkgs/shells/zsh/zsh-history-substring-search/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/shells/zsh/zsh-history-substring-search/default.nix b/pkgs/shells/zsh/zsh-history-substring-search/default.nix index b7521654667..fcd294f4dce 100644 --- a/pkgs/shells/zsh/zsh-history-substring-search/default.nix +++ b/pkgs/shells/zsh/zsh-history-substring-search/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "zsh-history-substring-search"; - version = "1.0.1"; + version = "1.0.2"; src = fetchFromGitHub { owner = "zsh-users"; repo = "zsh-history-substring-search"; rev = "v${version}"; - sha256 = "0lgmq1xcccnz5cf7vl0r0qj351hwclx9p80cl0qczxry4r2g5qaz"; + sha256 = "0y8va5kc2ram38hbk2cibkk64ffrabfv1sh4xm7pjspsba9n5p1y"; }; installPhase = '' From 9c28599bfe4e3efdabd9fbddcbed1f690a96d9a1 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Mon, 4 Nov 2019 07:32:28 -0500 Subject: [PATCH 108/377] nixos/httpd: drop stateDir option, hardcode to /run/httpd --- .../web-servers/apache-httpd/default.nix | 32 +++++++------------ 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix index 99304d0e48a..8eacb1f9a34 100644 --- a/nixos/modules/services/web-servers/apache-httpd/default.nix +++ b/nixos/modules/services/web-servers/apache-httpd/default.nix @@ -6,6 +6,8 @@ let mainCfg = config.services.httpd; + runtimeDir = "/run/httpd"; + httpd = mainCfg.package.out; httpdConf = mainCfg.configFile; @@ -98,7 +100,7 @@ let sslConf = '' - SSLSessionCache shmcb:${mainCfg.stateDir}/ssl_scache(512000) + SSLSessionCache shmcb:${runtimeDir}/ssl_scache(512000) Mutex posixsem @@ -239,13 +241,13 @@ let ServerRoot ${httpd} - DefaultRuntimeDir ${mainCfg.stateDir}/runtime + DefaultRuntimeDir ${runtimeDir}/runtime - PidFile ${mainCfg.stateDir}/httpd.pid + PidFile ${runtimeDir}/httpd.pid ${optionalString (mainCfg.multiProcessingModule != "prefork") '' # mod_cgid requires this. - ScriptSock ${mainCfg.stateDir}/cgisock + ScriptSock ${runtimeDir}/cgisock ''} @@ -337,6 +339,7 @@ in imports = [ (mkRemovedOptionModule [ "services" "httpd" "extraSubservices" ] "Most existing subservices have been ported to the NixOS module system. Please update your configuration accordingly.") + (mkRemovedOptionModule [ "services" "httpd" "stateDir" ] "The httpd module now uses /run/httpd as a runtime directory.") ]; ###### interface @@ -431,16 +434,6 @@ in ''; }; - stateDir = mkOption { - type = types.path; - default = "/run/httpd"; - description = '' - Directory for Apache's transient runtime state (such as PID - files). It is created automatically. Note that the default, - /run/httpd, is deleted at boot time. - ''; - }; - virtualHosts = mkOption { type = types.listOf (types.submodule ( { options = import ./per-server-options.nix { @@ -611,12 +604,6 @@ in preStart = '' - mkdir -m 0750 -p ${mainCfg.stateDir} - [ $(id -u) != 0 ] || chown root.${mainCfg.group} ${mainCfg.stateDir} - - mkdir -m 0750 -p "${mainCfg.stateDir}/runtime" - [ $(id -u) != 0 ] || chown root.${mainCfg.group} "${mainCfg.stateDir}/runtime" - mkdir -m 0700 -p ${mainCfg.logDir} # Get rid of old semaphores. These tend to accumulate across @@ -630,10 +617,13 @@ in serviceConfig.ExecStart = "@${httpd}/bin/httpd httpd -f ${httpdConf}"; serviceConfig.ExecStop = "${httpd}/bin/httpd -f ${httpdConf} -k graceful-stop"; serviceConfig.ExecReload = "${httpd}/bin/httpd -f ${httpdConf} -k graceful"; + serviceConfig.Group = mainCfg.group; serviceConfig.Type = "forking"; - serviceConfig.PIDFile = "${mainCfg.stateDir}/httpd.pid"; + serviceConfig.PIDFile = "${runtimeDir}/httpd.pid"; serviceConfig.Restart = "always"; serviceConfig.RestartSec = "5s"; + serviceConfig.RuntimeDirectory = "httpd httpd/runtime"; + serviceConfig.RuntimeDirectoryMode = "0750"; }; }; From d8606230a55f89c7add3eb08956eda9955b40931 Mon Sep 17 00:00:00 2001 From: Vladimir Serov Date: Mon, 4 Nov 2019 16:53:02 +0300 Subject: [PATCH 109/377] [fix] android-studio: added certificate bundle to /etc/pki This fixes Flutter SDK failing on flutter pub, due to missing certificates. Flutter does not check /etc/ssl, and can only find them in /etc/pki. --- pkgs/applications/editors/android-studio/common.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/editors/android-studio/common.nix b/pkgs/applications/editors/android-studio/common.nix index 93c9b4c04fb..05a997c62ff 100644 --- a/pkgs/applications/editors/android-studio/common.nix +++ b/pkgs/applications/editors/android-studio/common.nix @@ -3,6 +3,7 @@ { alsaLib , bash , buildFHSUserEnv +, cacert , coreutils , dbus , expat @@ -152,7 +153,16 @@ let # environment is used as a work around for that. fhsEnv = buildFHSUserEnv { name = "${drvName}-fhs-env"; - multiPkgs = pkgs: [ pkgs.ncurses5 ]; + multiPkgs = pkgs: [ + pkgs.ncurses5 + + # Flutter can only search for certs Fedora-way. + (runCommand "fedoracert" {} + '' + mkdir -p $out/etc/pki/tls/ + ln -s ${cacert}/etc/ssl/certs $out/etc/pki/tls/certs + '') + ]; }; in runCommand drvName From 59c5bfc86b75247cb48539eeaaea2a3c5f320b1d Mon Sep 17 00:00:00 2001 From: Chuck Date: Thu, 5 Sep 2019 17:29:01 -0700 Subject: [PATCH 110/377] nixos/nixos-option: Rewrite in a more suitable language Also add --all, which shows the value of all options. Diffing the --all output on either side of contemplated changes is a lovely way to better understand what's going on inside nixos. --- nixos/doc/manual/man-nixos-option.xml | 21 +- nixos/modules/installer/tools/nixos-option.sh | 327 ---------- .../tools/nixos-option/CMakeLists.txt | 8 + .../installer/tools/nixos-option/default.nix | 8 + .../tools/nixos-option/libnix-copy-paste.cc | 81 +++ .../tools/nixos-option/libnix-copy-paste.hh | 9 + .../tools/nixos-option/nixos-option.cc | 585 ++++++++++++++++++ nixos/modules/installer/tools/tools.nix | 5 +- 8 files changed, 695 insertions(+), 349 deletions(-) delete mode 100644 nixos/modules/installer/tools/nixos-option.sh create mode 100644 nixos/modules/installer/tools/nixos-option/CMakeLists.txt create mode 100644 nixos/modules/installer/tools/nixos-option/default.nix create mode 100644 nixos/modules/installer/tools/nixos-option/libnix-copy-paste.cc create mode 100644 nixos/modules/installer/tools/nixos-option/libnix-copy-paste.hh create mode 100644 nixos/modules/installer/tools/nixos-option/nixos-option.cc diff --git a/nixos/doc/manual/man-nixos-option.xml b/nixos/doc/manual/man-nixos-option.xml index 81e3739b3be..beabf020c92 100644 --- a/nixos/doc/manual/man-nixos-option.xml +++ b/nixos/doc/manual/man-nixos-option.xml @@ -19,14 +19,10 @@ - + - - - - option.name @@ -62,22 +58,11 @@ - + - This option enables verbose mode, which currently is just the Bash - set debug mode. - - - - - - - - - - This option causes the output to be rendered as XML. + Print the values of all options. diff --git a/nixos/modules/installer/tools/nixos-option.sh b/nixos/modules/installer/tools/nixos-option.sh deleted file mode 100644 index 4560e9c7403..00000000000 --- a/nixos/modules/installer/tools/nixos-option.sh +++ /dev/null @@ -1,327 +0,0 @@ -#! @shell@ -e - -# FIXME: rewrite this in a more suitable language. - -usage () { - exec man nixos-option - exit 1 -} - -##################### -# Process Arguments # -##################### - -xml=false -verbose=false -nixPath="" - -option="" -exit_code=0 - -argfun="" -for arg; do - if test -z "$argfun"; then - case $arg in - -*) - sarg="$arg" - longarg="" - while test "$sarg" != "-"; do - case $sarg in - --*) longarg=$arg; sarg="--";; - -I) argfun="include_nixpath";; - -*) usage;; - esac - # remove the first letter option - sarg="-${sarg#??}" - done - ;; - *) longarg=$arg;; - esac - for larg in $longarg; do - case $larg in - --xml) xml=true;; - --verbose) verbose=true;; - --help) usage;; - -*) usage;; - *) if test -z "$option"; then - option="$larg" - else - usage - fi;; - esac - done - else - case $argfun in - set_*) - var=$(echo $argfun | sed 's,^set_,,') - eval $var=$arg - ;; - include_nixpath) - nixPath="-I $arg $nixPath" - ;; - esac - argfun="" - fi -done - -if $verbose; then - set -x -else - set +x -fi - -############################# -# Process the configuration # -############################# - -evalNix(){ - # disable `-e` flag, it's possible that the evaluation of `nix-instantiate` fails (e.g. due to broken pkgs) - set +e - result=$(nix-instantiate ${nixPath:+$nixPath} - --eval-only "$@" 2>&1) - exit_code=$? - set -e - - if test $exit_code -eq 0; then - sed '/^warning: Nix search path/d' <&2 <" - else if strict then - if isAttrs x then mapAttrs (n: cleanOutput) x - else if isList x then map cleanOutput x - else x - else x; -in - cleanOutput value -EOF -} - -evalOpt(){ - evalAttr "option" "" "$@" -} - -evalCfg(){ - local strict="$1" - evalAttr "config" "$strict" -} - -findSources(){ - local suffix=$1 - evalNix --strict <,0,g; :inner; s/{[^\{\}]*};/0;/g; t inner;' | \ - evalNix --strict -} - -# map a simple list which contains strings or paths. -nixMap() { - local fun="$1" - local list="$2" - local elem - for elem in $list; do - test $elem = '[' -o $elem = ']' && continue; - $fun $elem - done -} - -# This duplicates the work made below, but it is useful for processing -# the output of nixos-option with other tools such as nixos-gui. -if $xml; then - evalNix --xml --no-location < /dev/null)" = '"option"'; then - echo "Value:" - evalCfg 1 - - echo - - echo "Default:" - if default=$(evalOpt "default" - 2> /dev/null); then - echo "$default" - else - echo "" - fi - echo - if example=$(evalOpt "example" - 2> /dev/null); then - echo "Example:" - echo "$example" - echo - fi - echo "Description:" - echo - echo $(evalOpt "description") - - echo $desc; - - printPath () { echo " $1"; } - - echo "Declared by:" - nixMap printPath "$(findSources "declarations")" - echo - echo "Defined by:" - nixMap printPath "$(findSources "files")" - echo - -else - # echo 1>&2 "Warning: This value is not an option." - - result=$(evalCfg "") - if [ ! -z "$result" ]; then - names=$(attrNames "$result" 2> /dev/null) - echo 1>&2 "This attribute set contains:" - escapeQuotes () { eval echo "$1"; } - nixMap escapeQuotes "$names" - else - echo 1>&2 "An error occurred while looking for attribute names. Are you sure that '$option' exists?" - fi -fi - -exit $exit_code diff --git a/nixos/modules/installer/tools/nixos-option/CMakeLists.txt b/nixos/modules/installer/tools/nixos-option/CMakeLists.txt new file mode 100644 index 00000000000..e5834598c4f --- /dev/null +++ b/nixos/modules/installer/tools/nixos-option/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required (VERSION 2.6) +project (nixos-option) + +add_executable(nixos-option nixos-option.cc libnix-copy-paste.cc) +target_link_libraries(nixos-option PRIVATE -lnixmain -lnixexpr -lnixstore -lnixutil) +target_compile_features(nixos-option PRIVATE cxx_std_17) + +install (TARGETS nixos-option DESTINATION bin) diff --git a/nixos/modules/installer/tools/nixos-option/default.nix b/nixos/modules/installer/tools/nixos-option/default.nix new file mode 100644 index 00000000000..6464a91052c --- /dev/null +++ b/nixos/modules/installer/tools/nixos-option/default.nix @@ -0,0 +1,8 @@ +{stdenv, boost, cmake, pkgconfig, nix, ... }: +stdenv.mkDerivation rec { + name = "nixos-option"; + src = ./.; + nativeBuildInputs = [ cmake pkgconfig ]; + buildInputs = [ boost nix ]; + enableParallelBuilding = true; +} diff --git a/nixos/modules/installer/tools/nixos-option/libnix-copy-paste.cc b/nixos/modules/installer/tools/nixos-option/libnix-copy-paste.cc new file mode 100644 index 00000000000..81de5ff8523 --- /dev/null +++ b/nixos/modules/installer/tools/nixos-option/libnix-copy-paste.cc @@ -0,0 +1,81 @@ +// These are useful methods inside the nix library that ought to be exported. +// Since they are not, copy/paste them here. +// TODO: Delete these and use the ones in the library as they become available. + +#include // for nix/globals.hh's reference to SYSTEM + +#include "libnix-copy-paste.hh" +#include // for basic_altstringbuf... +#include // for basic_altstringbuf... +#include // for basic_format +#include // for format +#include // for basic_format::basi... +#include // for get_pointer +#include // for operator<<, basic_... +#include // for Strings, Error +#include // for string, basic_string + +using boost::format; +using nix::Error; +using nix::Strings; +using std::string; + +// From nix/src/libexpr/attr-path.cc +Strings parseAttrPath(const string &s) { + Strings res; + string cur; + string::const_iterator i = s.begin(); + while (i != s.end()) { + if (*i == '.') { + res.push_back(cur); + cur.clear(); + } else if (*i == '"') { + ++i; + while (1) { + if (i == s.end()) + throw Error(format("missing closing quote in selection path '%1%'") % + s); + if (*i == '"') + break; + cur.push_back(*i++); + } + } else + cur.push_back(*i); + ++i; + } + if (!cur.empty()) + res.push_back(cur); + return res; +} + +// From nix/src/nix/repl.cc +bool isVarName(const string &s) { + if (s.size() == 0) + return false; + char c = s[0]; + if ((c >= '0' && c <= '9') || c == '-' || c == '\'') + return false; + for (auto &i : s) + if (!((i >= 'a' && i <= 'z') || (i >= 'A' && i <= 'Z') || + (i >= '0' && i <= '9') || i == '_' || i == '-' || i == '\'')) + return false; + return true; +} + +// From nix/src/nix/repl.cc +std::ostream &printStringValue(std::ostream &str, const char *string) { + str << "\""; + for (const char *i = string; *i; i++) + if (*i == '\"' || *i == '\\') + str << "\\" << *i; + else if (*i == '\n') + str << "\\n"; + else if (*i == '\r') + str << "\\r"; + else if (*i == '\t') + str << "\\t"; + else + str << *i; + str << "\""; + return str; +} diff --git a/nixos/modules/installer/tools/nixos-option/libnix-copy-paste.hh b/nixos/modules/installer/tools/nixos-option/libnix-copy-paste.hh new file mode 100644 index 00000000000..225e8b1b87e --- /dev/null +++ b/nixos/modules/installer/tools/nixos-option/libnix-copy-paste.hh @@ -0,0 +1,9 @@ +#pragma once + +#include +#include +#include + +nix::Strings parseAttrPath(const std::string &s); +bool isVarName(const std::string &s); +std::ostream &printStringValue(std::ostream &str, const char *string); diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc new file mode 100644 index 00000000000..c778596d615 --- /dev/null +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -0,0 +1,585 @@ +#include // for nix/globals.hh's reference to SYSTEM + +#include // for sort +#include // for function +#include // for operator<<, basic_ostream, ostrin... +#include // for next +#include // for _List_iterator +#include // for allocator, unique_ptr, make_unique +#include // for argvToStrings, UsageError +#include // for findAlongAttrPath +#include // for Attr, Bindings, Bindings::iterator +#include // for MixEvalArgs +#include // for EvalState::forceValue +#include // for EvalState, initGC, operator<< +#include // for initPlugins, Settings, settings +#include // for Pos +#include // for getArg, LegacyArgs, printVersion +#include // for openStore +#include // for Symbol, SymbolTable +#include // for Error, Path, Strings, PathSet +#include // for absPath, baseNameOf +#include // for Value, Value::(anonymous), Value:... +#include // for string, operator+, operator== +#include // for move +#include // for get, holds_alternative, variant +#include // for vector<>::iterator, vector + +#include "libnix-copy-paste.hh" + +using nix::absPath; +using nix::Bindings; +using nix::Error; +using nix::EvalState; +using nix::Path; +using nix::PathSet; +using nix::Strings; +using nix::Symbol; +using nix::tAttrs; +using nix::tLambda; +using nix::tString; +using nix::UsageError; +using nix::Value; + +// An ostream wrapper to handle nested indentation +class Out { +public: + class Separator {}; + const static Separator sep; + enum LinePolicy { ONE_LINE, MULTI_LINE }; + explicit Out(std::ostream &ostream) + : ostream(ostream), policy(ONE_LINE), write_since_sep(true) {} + Out(Out &o, std::string const &start, std::string const &end, + LinePolicy policy); + Out(Out &o, std::string const &start, std::string const &end, int count) + : Out(o, start, end, count < 2 ? ONE_LINE : MULTI_LINE) {} + Out(Out const &) = delete; + Out(Out &&) = default; + Out &operator=(Out const &) = delete; + Out &operator=(Out &&) = delete; + ~Out() { ostream << end; } + +private: + std::ostream &ostream; + std::string indentation; + std::string end; + LinePolicy policy; + bool write_since_sep; + template friend Out &operator<<(Out &o, T thing); +}; + +template Out &operator<<(Out &o, T thing) { + if (!o.write_since_sep && o.policy == Out::MULTI_LINE) { + o.ostream << o.indentation; + } + o.write_since_sep = true; + o.ostream << thing; + return o; +} + +template <> +Out &operator<<(Out &o, Out::Separator /* thing */) { + o.ostream << (o.policy == Out::ONE_LINE ? " " : "\n"); + o.write_since_sep = false; + return o; +} + +Out::Out(Out &o, std::string const &start, std::string const &end, + LinePolicy policy) + : ostream(o.ostream), + indentation(policy == ONE_LINE ? o.indentation : o.indentation + " "), + end(policy == ONE_LINE ? end : o.indentation + end), policy(policy), + write_since_sep(true) { + o << start; + *this << Out::sep; +} + +// Stuff needed for evaluation +struct Context { + Context(EvalState *state, Bindings *autoArgs, Value options_root, + Value config_root) + : state(state), autoArgs(autoArgs), options_root(options_root), + config_root(config_root), + underscore_type(state->symbols.create("_type")) {} + EvalState *state; + Bindings *autoArgs; + Value options_root; + Value config_root; + Symbol underscore_type; +}; + +Value evaluateValue(Context *ctx, Value *v) { + ctx->state->forceValue(*v); + if (ctx->autoArgs->empty()) { + return *v; + } + Value called{}; + ctx->state->autoCallFunction(*ctx->autoArgs, *v, called); + return called; +} + +bool isOption(Context *ctx, Value const &v) { + if (v.type != tAttrs) { + return false; + } + auto const &actual_type = v.attrs->find(ctx->underscore_type); + if (actual_type == v.attrs->end()) { + return false; + } + try { + Value evaluated_type = evaluateValue(ctx, actual_type->value); + if (evaluated_type.type != tString) { + return false; + } + return evaluated_type.string.s == static_cast("option"); + } catch (Error &) { + return false; + } +} + +// Add quotes to a component of a path. +// These are needed for paths like: +// fileSystems."/".fsType +// systemd.units."dbus.service".text +std::string quoteAttribute(std::string const &attribute) { + if (isVarName(attribute)) { + return attribute; + } + std::ostringstream buf; + printStringValue(buf, attribute.c_str()); + return buf.str(); +} + +std::string const appendPath(std::string const &prefix, + std::string const &suffix) { + if (prefix.empty()) { + return quoteAttribute(suffix); + } + return prefix + "." + quoteAttribute(suffix); +} + +bool forbiddenRecursionName(std::string name) { + return (!name.empty() && name[0] == '_') || name == "haskellPackages"; +} + +void recurse(const std::function)> &f, + Context *ctx, Value v, std::string const &path) { + std::variant evaluated; + try { + evaluated = evaluateValue(ctx, &v); + } catch (Error &e) { + evaluated = e; + } + if (!f(path, evaluated)) { + return; + } + if (std::holds_alternative(evaluated)) { + return; + } + Value const &evaluated_value = std::get(evaluated); + if (evaluated_value.type != tAttrs) { + return; + } + for (auto const &child : evaluated_value.attrs->lexicographicOrder()) { + if (forbiddenRecursionName(child->name)) { + continue; + } + recurse(f, ctx, *child->value, appendPath(path, child->name)); + } +} + +// Calls f on all the option names +void mapOptions(const std::function &f, + Context *ctx, Value root) { + recurse( + [f, ctx](std::string const &path, std::variant v) { + bool isOpt = std::holds_alternative(v) || + isOption(ctx, std::get(v)); + if (isOpt) { + f(path); + } + return !isOpt; + }, + ctx, root, ""); +} + +// Calls f on all the config values inside one option. +// Simple options have one config value inside, like sound.enable = true. +// Compound options have multiple config values. For example, the option +// "users.users" has about 1000 config values inside it: +// users.users.avahi.createHome = false; +// users.users.avahi.cryptHomeLuks = null; +// users.users.avahi.description = "`avahi-daemon' privilege separation user"; +// ... +// users.users.avahi.openssh.authorizedKeys.keyFiles = [ ]; +// users.users.avahi.openssh.authorizedKeys.keys = [ ]; +// ... +// users.users.avahi.uid = 10; +// users.users.avahi.useDefaultShell = false; +// users.users.cups.createHome = false; +// ... +// users.users.cups.useDefaultShell = false; +// users.users.gdm = ... ... ... +// users.users.messagebus = ... .. ... +// users.users.nixbld1 = ... .. ... +// ... +// users.users.systemd-timesync = ... .. ... +void mapConfigValuesInOption( + const std::function v)> &f, + std::string const &path, Context *ctx) { + Value *option; + try { + option = + findAlongAttrPath(*ctx->state, path, *ctx->autoArgs, ctx->config_root); + } catch (Error &e) { + f(path, e); + return; + } + recurse( + [f, ctx](std::string const &path, std::variant v) { + bool leaf = std::holds_alternative(v) || + std::get(v).type != tAttrs || + ctx->state->isDerivation(std::get(v)); + if (!leaf) { + return true; // Keep digging + } + f(path, v); + return false; + }, + ctx, *option, path); +} + +std::string describeError(Error const &e) { return "«error: " + e.msg() + "»"; } + +void describeDerivation(Context *ctx, Out &out, Value v) { + // Copy-pasted from nix/src/nix/repl.cc :( + Bindings::iterator i = v.attrs->find(ctx->state->sDrvPath); + PathSet pathset; + try { + Path drvPath = i != v.attrs->end() + ? ctx->state->coerceToPath(*i->pos, *i->value, pathset) + : "???"; + out << "«derivation " << drvPath << "»"; + } catch (Error &e) { + out << describeError(e); + } +} + +Value parseAndEval(EvalState *state, std::string const &expression, + std::string const &path) { + Value v{}; + state->eval(state->parseExprFromString(expression, absPath(path)), v); + return v; +} + +void printValue(Context *ctx, Out &out, std::variant maybe_value, + std::string const &path); + +void printUnsortedList(Context *ctx, Out &out, Value &v) { + Out list_out(out, "[", "]", v.listSize()); + for (unsigned int n = 0; n < v.listSize(); ++n) { + printValue(ctx, list_out, *v.listElems()[n], ""); + list_out << Out::sep; + } +} + +void printSortedList(Context *ctx, Out &out, Value &v) { + std::vector results; + for (unsigned int n = 0; n < v.listSize(); ++n) { + std::ostringstream buf; + Out buf_out(buf); + printValue(ctx, buf_out, *v.listElems()[n], ""); + results.push_back(buf.str()); + } + std::sort(results.begin(), results.end()); + Out list_out(out, "[", "]", v.listSize()); + for (auto const &v : results) { + list_out << v << Out::sep; + } +} + +bool shouldSort(Context *ctx, Value &v) { + // Some lists should clearly be printed in sorted order, like + // environment.systemPackages. Some clearly should not, like + // services.xserver.multitouch.buttonsMap. As a conservative heuristic, sort + // lists of derivations. + return v.listSize() > 0 && ctx->state->isDerivation(*v.listElems()[0]); +} + +void printList(Context *ctx, Out &out, Value &v) { + if (shouldSort(ctx, v)) { + printSortedList(ctx, out, v); + } else { + printUnsortedList(ctx, out, v); + } +} + +void printAttrs(Context *ctx, Out &out, Value &v, std::string const &path) { + Out attrs_out(out, "{", "}", v.attrs->size()); + for (const auto &a : v.attrs->lexicographicOrder()) { + std::string name = a->name; + attrs_out << name << " = "; + printValue(ctx, attrs_out, *a->value, appendPath(path, name)); + attrs_out << ";" << Out::sep; + } +} + +void multiLineStringEscape(Out &out, std::string const &s) { + int i; + for (i = 1; i < s.size(); i++) { + if (s[i - 1] == '$' && s[i] == '{') { + out << "''${"; + i++; + } else if (s[i - 1] == '\'' && s[i] == '\'') { + out << "'''"; + i++; + } else { + out << s[i - 1]; + } + } + if (i == s.size()) { + out << s[i - 1]; + } +} + +void printMultiLineString(Out &out, Value const &v) { + std::string s = v.string.s; + Out str_out(out, "''", "''", Out::MULTI_LINE); + std::string::size_type begin = 0; + while (begin < s.size()) { + std::string::size_type end = s.find('\n', begin); + if (end == std::string::npos) { + multiLineStringEscape(str_out, s.substr(begin, s.size() - begin)); + break; + } + multiLineStringEscape(str_out, s.substr(begin, end - begin)); + str_out << Out::sep; + begin = end + 1; + } +} + +void printValue(Context *ctx, Out &out, std::variant maybe_value, + std::string const &path) { + try { + if (std::holds_alternative(maybe_value)) { + throw Error{std::get(maybe_value)}; + } + Value v = evaluateValue(ctx, &std::get(maybe_value)); + if (ctx->state->isDerivation(v)) { + describeDerivation(ctx, out, v); + } else if (v.isList()) { + printList(ctx, out, v); + } else if (v.type == tAttrs) { + printAttrs(ctx, out, v, path); + } else if (v.type == tString && + std::string(v.string.s).find('\n') != std::string::npos) { + printMultiLineString(out, v); + } else { + ctx->state->forceValueDeep(v); + out << v; + } + } catch (Error &e) { + if (e.msg() == "The option `" + path + "' is used but not defined.") { + // 93% of errors are this, and just letting this message through would be + // misleading. These values may or may not actually be "used" in the + // config. The thing throwing the error message assumes that if anything + // ever looks at this value, it is a "use" of this value. But here in + // nixos-options-summary, we are looking at this value only to print it. + // In order to avoid implying that this undefined value is actually + // referenced, eat the underlying error message and emit "«not defined»". + out << "«not defined»"; + } else { + out << describeError(e); + } + } +} + +void printConfigValue(Context *ctx, Out &out, std::string const &path, + std::variant v) { + out << path << " = "; + printValue(ctx, out, std::move(v), path); + out << ";\n"; +} + +void printAll(Context *ctx, Out &out) { + mapOptions( + [ctx, &out](std::string const &option_path) { + mapConfigValuesInOption( + [ctx, &out](std::string const &config_path, + std::variant v) { + printConfigValue(ctx, out, config_path, v); + }, + option_path, ctx); + }, + ctx, ctx->options_root); +} + +void printAttr(Context *ctx, Out &out, std::string const &path, Value *root) { + try { + printValue(ctx, out, + *findAlongAttrPath(*ctx->state, path, *ctx->autoArgs, *root), + path); + } catch (Error &e) { + out << describeError(e); + } +} + +void printOption(Context *ctx, Out &out, std::string const &path, + Value *option) { + out << "Value:\n"; + printAttr(ctx, out, path, &ctx->config_root); + + out << "\n\nDefault:\n"; + printAttr(ctx, out, "default", option); + + out << "\n\nExample:\n"; + printAttr(ctx, out, "example", option); + + out << "\n\nDescription:\n"; + printAttr(ctx, out, "description", option); + + out << "\n\nDeclared by:\n"; + printAttr(ctx, out, "declarations", option); + + out << "\n\nDefined by:\n"; + printAttr(ctx, out, "files", option); + out << "\n"; +} + +void printListing(Out &out, Value *v) { + // Print this header on stderr rather than stdout because the old shell script + // implementation did. I don't know why. + std::cerr << "This attribute set contains:\n"; + for (const auto &a : v->attrs->lexicographicOrder()) { + std::string name = a->name; + if (!name.empty() && name[0] != '_') { + out << name << "\n"; + } + } +} + +// Carefully walk an option path, looking for sub-options when a path walks past +// an option value. +Value findAlongOptionPath(Context *ctx, std::string const &path) { + Strings tokens = parseAttrPath(path); + Value v = ctx->options_root; + for (auto i = tokens.begin(); i != tokens.end(); i++) { + bool last_attribute = std::next(i) == tokens.end(); + auto const &attr = *i; + v = evaluateValue(ctx, &v); + if (attr.empty()) { + throw Error("empty attribute name in selection path '" + path + "'"); + } + if (isOption(ctx, v) && !last_attribute) { + Value getSubOptions = evaluateValue( + ctx, findAlongAttrPath(*ctx->state, "type.getSubOptions", + *ctx->autoArgs, v)); + if (getSubOptions.type != tLambda) { + throw Error("Option's type.getSubOptions isn't a function at '" + attr + + "' in path '" + path + "'"); + } + Value emptyString{}; + nix::mkString(emptyString, ""); + ctx->state->callFunction(getSubOptions, emptyString, v, nix::Pos{}); + // Note that we've consumed attr, but didn't actually use it. + } else if (v.type != tAttrs) { + throw Error("attribute '" + attr + "' in path '" + path + + "' attempts to index a value that should be a set but is " + + showType(v)); + } else { + auto const &next = v.attrs->find(ctx->state->symbols.create(attr)); + if (next == v.attrs->end()) { + throw Error("attribute '" + attr + "' in path '" + path + + "' not found"); + } + v = *next->value; + } + } + return v; +} + +void printOne(Context *ctx, Out &out, std::string const &path) { + try { + Value option = findAlongOptionPath(ctx, path); + option = evaluateValue(ctx, &option); + if (isOption(ctx, option)) { + printOption(ctx, out, path, &option); + } else { + printListing(out, &option); + } + } catch (Error &e) { + std::cerr << "error: " << e.msg() + << "\nAn error occurred while looking for attribute names. Are " + "you sure that '" + << path << "' exists?\n"; + } +} + +int main(int argc, char **argv) { + bool all = false; + std::string path = "."; + std::string options_expr = "(import {}).options"; + std::string config_expr = "(import {}).config"; + std::vector args; + + struct MyArgs : nix::LegacyArgs, nix::MixEvalArgs { + using nix::LegacyArgs::LegacyArgs; + }; + + MyArgs myArgs(nix::baseNameOf(argv[0]), + [&](Strings::iterator &arg, const Strings::iterator &end) { + if (*arg == "--help") { + nix::showManPage("nixos-options-summary"); + } else if (*arg == "--version") { + nix::printVersion("nixos-options-summary"); + } else if (*arg == "--all") { + all = true; + } else if (*arg == "--path") { + path = nix::getArg(*arg, arg, end); + } else if (*arg == "--options_expr") { + options_expr = nix::getArg(*arg, arg, end); + } else if (*arg == "--config_expr") { + config_expr = nix::getArg(*arg, arg, end); + } else if (!arg->empty() && arg->at(0) == '-') { + return false; + } else { + args.push_back(*arg); + } + return true; + }); + + myArgs.parseCmdline(nix::argvToStrings(argc, argv)); + + nix::initPlugins(); + nix::initGC(); + nix::settings.readOnlyMode = true; + auto store = nix::openStore(); + auto state = std::make_unique(myArgs.searchPath, store); + + Value options_root = parseAndEval(state.get(), options_expr, path); + Value config_root = parseAndEval(state.get(), config_expr, path); + + Context ctx{state.get(), myArgs.getAutoArgs(*state), options_root, + config_root}; + Out out(std::cout); + + if (all) { + if (!args.empty()) { + throw UsageError("--all cannot be used with arguments"); + } + printAll(&ctx, out); + } else { + if (args.empty()) { + printOne(&ctx, out, ""); + } + for (auto const &arg : args) { + printOne(&ctx, out, arg); + } + } + + ctx.state->printStats(); + + return 0; +} diff --git a/nixos/modules/installer/tools/tools.nix b/nixos/modules/installer/tools/tools.nix index 052e7fdd4fc..e4db39b5c81 100644 --- a/nixos/modules/installer/tools/tools.nix +++ b/nixos/modules/installer/tools/tools.nix @@ -41,10 +41,7 @@ let inherit (config.system.nixos-generate-config) configuration; }; - nixos-option = makeProg { - name = "nixos-option"; - src = ./nixos-option.sh; - }; + nixos-option = pkgs.callPackage ./nixos-option { }; nixos-version = makeProg { name = "nixos-version"; From 26c45dfec2716b1508e5d7ac8efdbdf570f2eb99 Mon Sep 17 00:00:00 2001 From: Chuck Date: Fri, 6 Sep 2019 01:25:00 -0700 Subject: [PATCH 111/377] nixos/nixos-option: Show options' types #27920 --- nixos/modules/installer/tools/nixos-option/nixos-option.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index c778596d615..6787c73e164 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -434,6 +434,9 @@ void printOption(Context *ctx, Out &out, std::string const &path, out << "\n\nDefault:\n"; printAttr(ctx, out, "default", option); + out << "\n\nType:\n"; + printAttr(ctx, out, "type.description", option); + out << "\n\nExample:\n"; printAttr(ctx, out, "example", option); From 74f05df671e6381c1515fc9da72c44051ef8753c Mon Sep 17 00:00:00 2001 From: Chuck Date: Fri, 6 Sep 2019 02:50:50 -0700 Subject: [PATCH 112/377] nixos/nixos-option: Fix references to old name --- nixos/modules/installer/tools/nixos-option/nixos-option.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index 6787c73e164..49da3ce6874 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -386,7 +386,7 @@ void printValue(Context *ctx, Out &out, std::variant maybe_value, // misleading. These values may or may not actually be "used" in the // config. The thing throwing the error message assumes that if anything // ever looks at this value, it is a "use" of this value. But here in - // nixos-options-summary, we are looking at this value only to print it. + // nixos-option, we are looking at this value only to print it. // In order to avoid implying that this undefined value is actually // referenced, eat the underlying error message and emit "«not defined»". out << "«not defined»"; @@ -534,9 +534,9 @@ int main(int argc, char **argv) { MyArgs myArgs(nix::baseNameOf(argv[0]), [&](Strings::iterator &arg, const Strings::iterator &end) { if (*arg == "--help") { - nix::showManPage("nixos-options-summary"); + nix::showManPage("nixos-option"); } else if (*arg == "--version") { - nix::printVersion("nixos-options-summary"); + nix::printVersion("nixos-option"); } else if (*arg == "--all") { all = true; } else if (*arg == "--path") { From 4af8dbf8964924dc3d2ec2bbfa159dae288b29fc Mon Sep 17 00:00:00 2001 From: Chuck Date: Fri, 6 Sep 2019 09:45:05 -0700 Subject: [PATCH 113/377] Reformat for 4-space indentation Specifically, with clang-format --style='{ IndentWidth: 4, BreakBeforeBraces: Mozilla, ColumnLimit: 120, PointerAlignment: Middle }' which was the clang-format invocation that produced the fewest diffs on the nix source out of ~20 that I tried. --- .../tools/nixos-option/libnix-copy-paste.cc | 104 +- .../tools/nixos-option/libnix-copy-paste.hh | 6 +- .../tools/nixos-option/nixos-option.cc | 953 +++++++++--------- 3 files changed, 534 insertions(+), 529 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-option/libnix-copy-paste.cc b/nixos/modules/installer/tools/nixos-option/libnix-copy-paste.cc index 81de5ff8523..875c07da639 100644 --- a/nixos/modules/installer/tools/nixos-option/libnix-copy-paste.cc +++ b/nixos/modules/installer/tools/nixos-option/libnix-copy-paste.cc @@ -21,61 +21,63 @@ using nix::Strings; using std::string; // From nix/src/libexpr/attr-path.cc -Strings parseAttrPath(const string &s) { - Strings res; - string cur; - string::const_iterator i = s.begin(); - while (i != s.end()) { - if (*i == '.') { - res.push_back(cur); - cur.clear(); - } else if (*i == '"') { - ++i; - while (1) { - if (i == s.end()) - throw Error(format("missing closing quote in selection path '%1%'") % - s); - if (*i == '"') - break; - cur.push_back(*i++); - } - } else - cur.push_back(*i); - ++i; - } - if (!cur.empty()) - res.push_back(cur); - return res; +Strings parseAttrPath(const string & s) +{ + Strings res; + string cur; + string::const_iterator i = s.begin(); + while (i != s.end()) { + if (*i == '.') { + res.push_back(cur); + cur.clear(); + } else if (*i == '"') { + ++i; + while (1) { + if (i == s.end()) + throw Error(format("missing closing quote in selection path '%1%'") % s); + if (*i == '"') + break; + cur.push_back(*i++); + } + } else + cur.push_back(*i); + ++i; + } + if (!cur.empty()) + res.push_back(cur); + return res; } // From nix/src/nix/repl.cc -bool isVarName(const string &s) { - if (s.size() == 0) - return false; - char c = s[0]; - if ((c >= '0' && c <= '9') || c == '-' || c == '\'') - return false; - for (auto &i : s) - if (!((i >= 'a' && i <= 'z') || (i >= 'A' && i <= 'Z') || - (i >= '0' && i <= '9') || i == '_' || i == '-' || i == '\'')) - return false; - return true; +bool isVarName(const string & s) +{ + if (s.size() == 0) + return false; + char c = s[0]; + if ((c >= '0' && c <= '9') || c == '-' || c == '\'') + return false; + for (auto & i : s) + if (!((i >= 'a' && i <= 'z') || (i >= 'A' && i <= 'Z') || (i >= '0' && i <= '9') || i == '_' || i == '-' || + i == '\'')) + return false; + return true; } // From nix/src/nix/repl.cc -std::ostream &printStringValue(std::ostream &str, const char *string) { - str << "\""; - for (const char *i = string; *i; i++) - if (*i == '\"' || *i == '\\') - str << "\\" << *i; - else if (*i == '\n') - str << "\\n"; - else if (*i == '\r') - str << "\\r"; - else if (*i == '\t') - str << "\\t"; - else - str << *i; - str << "\""; - return str; +std::ostream & printStringValue(std::ostream & str, const char * string) +{ + str << "\""; + for (const char * i = string; *i; i++) + if (*i == '\"' || *i == '\\') + str << "\\" << *i; + else if (*i == '\n') + str << "\\n"; + else if (*i == '\r') + str << "\\r"; + else if (*i == '\t') + str << "\\t"; + else + str << *i; + str << "\""; + return str; } diff --git a/nixos/modules/installer/tools/nixos-option/libnix-copy-paste.hh b/nixos/modules/installer/tools/nixos-option/libnix-copy-paste.hh index 225e8b1b87e..2274e9a0f85 100644 --- a/nixos/modules/installer/tools/nixos-option/libnix-copy-paste.hh +++ b/nixos/modules/installer/tools/nixos-option/libnix-copy-paste.hh @@ -4,6 +4,6 @@ #include #include -nix::Strings parseAttrPath(const std::string &s); -bool isVarName(const std::string &s); -std::ostream &printStringValue(std::ostream &str, const char *string); +nix::Strings parseAttrPath(const std::string & s); +bool isVarName(const std::string & s); +std::ostream & printStringValue(std::ostream & str, const char * string); diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index 49da3ce6874..fe44a347aef 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -42,166 +42,170 @@ using nix::UsageError; using nix::Value; // An ostream wrapper to handle nested indentation -class Out { -public: - class Separator {}; - const static Separator sep; - enum LinePolicy { ONE_LINE, MULTI_LINE }; - explicit Out(std::ostream &ostream) - : ostream(ostream), policy(ONE_LINE), write_since_sep(true) {} - Out(Out &o, std::string const &start, std::string const &end, - LinePolicy policy); - Out(Out &o, std::string const &start, std::string const &end, int count) - : Out(o, start, end, count < 2 ? ONE_LINE : MULTI_LINE) {} - Out(Out const &) = delete; - Out(Out &&) = default; - Out &operator=(Out const &) = delete; - Out &operator=(Out &&) = delete; - ~Out() { ostream << end; } +class Out +{ + public: + class Separator + {}; + const static Separator sep; + enum LinePolicy + { + ONE_LINE, + MULTI_LINE + }; + explicit Out(std::ostream & ostream) : ostream(ostream), policy(ONE_LINE), write_since_sep(true) {} + Out(Out & o, std::string const & start, std::string const & end, LinePolicy policy); + Out(Out & o, std::string const & start, std::string const & end, int count) + : Out(o, start, end, count < 2 ? ONE_LINE : MULTI_LINE) + {} + Out(Out const &) = delete; + Out(Out &&) = default; + Out & operator=(Out const &) = delete; + Out & operator=(Out &&) = delete; + ~Out() { ostream << end; } -private: - std::ostream &ostream; - std::string indentation; - std::string end; - LinePolicy policy; - bool write_since_sep; - template friend Out &operator<<(Out &o, T thing); + private: + std::ostream & ostream; + std::string indentation; + std::string end; + LinePolicy policy; + bool write_since_sep; + template friend Out & operator<<(Out & o, T thing); }; -template Out &operator<<(Out &o, T thing) { - if (!o.write_since_sep && o.policy == Out::MULTI_LINE) { - o.ostream << o.indentation; - } - o.write_since_sep = true; - o.ostream << thing; - return o; +template Out & operator<<(Out & o, T thing) +{ + if (!o.write_since_sep && o.policy == Out::MULTI_LINE) { + o.ostream << o.indentation; + } + o.write_since_sep = true; + o.ostream << thing; + return o; } -template <> -Out &operator<<(Out &o, Out::Separator /* thing */) { - o.ostream << (o.policy == Out::ONE_LINE ? " " : "\n"); - o.write_since_sep = false; - return o; +template <> Out & operator<<(Out & o, Out::Separator /* thing */) +{ + o.ostream << (o.policy == Out::ONE_LINE ? " " : "\n"); + o.write_since_sep = false; + return o; } -Out::Out(Out &o, std::string const &start, std::string const &end, - LinePolicy policy) - : ostream(o.ostream), - indentation(policy == ONE_LINE ? o.indentation : o.indentation + " "), - end(policy == ONE_LINE ? end : o.indentation + end), policy(policy), - write_since_sep(true) { - o << start; - *this << Out::sep; +Out::Out(Out & o, std::string const & start, std::string const & end, LinePolicy policy) + : ostream(o.ostream), indentation(policy == ONE_LINE ? o.indentation : o.indentation + " "), + end(policy == ONE_LINE ? end : o.indentation + end), policy(policy), write_since_sep(true) +{ + o << start; + *this << Out::sep; } // Stuff needed for evaluation -struct Context { - Context(EvalState *state, Bindings *autoArgs, Value options_root, - Value config_root) - : state(state), autoArgs(autoArgs), options_root(options_root), - config_root(config_root), - underscore_type(state->symbols.create("_type")) {} - EvalState *state; - Bindings *autoArgs; - Value options_root; - Value config_root; - Symbol underscore_type; +struct Context +{ + Context(EvalState * state, Bindings * autoArgs, Value options_root, Value config_root) + : state(state), autoArgs(autoArgs), options_root(options_root), config_root(config_root), + underscore_type(state->symbols.create("_type")) + {} + EvalState * state; + Bindings * autoArgs; + Value options_root; + Value config_root; + Symbol underscore_type; }; -Value evaluateValue(Context *ctx, Value *v) { - ctx->state->forceValue(*v); - if (ctx->autoArgs->empty()) { - return *v; - } - Value called{}; - ctx->state->autoCallFunction(*ctx->autoArgs, *v, called); - return called; +Value evaluateValue(Context * ctx, Value * v) +{ + ctx->state->forceValue(*v); + if (ctx->autoArgs->empty()) { + return *v; + } + Value called{}; + ctx->state->autoCallFunction(*ctx->autoArgs, *v, called); + return called; } -bool isOption(Context *ctx, Value const &v) { - if (v.type != tAttrs) { - return false; - } - auto const &actual_type = v.attrs->find(ctx->underscore_type); - if (actual_type == v.attrs->end()) { - return false; - } - try { - Value evaluated_type = evaluateValue(ctx, actual_type->value); - if (evaluated_type.type != tString) { - return false; +bool isOption(Context * ctx, Value const & v) +{ + if (v.type != tAttrs) { + return false; + } + auto const & actual_type = v.attrs->find(ctx->underscore_type); + if (actual_type == v.attrs->end()) { + return false; + } + try { + Value evaluated_type = evaluateValue(ctx, actual_type->value); + if (evaluated_type.type != tString) { + return false; + } + return evaluated_type.string.s == static_cast("option"); + } catch (Error &) { + return false; } - return evaluated_type.string.s == static_cast("option"); - } catch (Error &) { - return false; - } } // Add quotes to a component of a path. // These are needed for paths like: // fileSystems."/".fsType // systemd.units."dbus.service".text -std::string quoteAttribute(std::string const &attribute) { - if (isVarName(attribute)) { - return attribute; - } - std::ostringstream buf; - printStringValue(buf, attribute.c_str()); - return buf.str(); -} - -std::string const appendPath(std::string const &prefix, - std::string const &suffix) { - if (prefix.empty()) { - return quoteAttribute(suffix); - } - return prefix + "." + quoteAttribute(suffix); -} - -bool forbiddenRecursionName(std::string name) { - return (!name.empty() && name[0] == '_') || name == "haskellPackages"; -} - -void recurse(const std::function)> &f, - Context *ctx, Value v, std::string const &path) { - std::variant evaluated; - try { - evaluated = evaluateValue(ctx, &v); - } catch (Error &e) { - evaluated = e; - } - if (!f(path, evaluated)) { - return; - } - if (std::holds_alternative(evaluated)) { - return; - } - Value const &evaluated_value = std::get(evaluated); - if (evaluated_value.type != tAttrs) { - return; - } - for (auto const &child : evaluated_value.attrs->lexicographicOrder()) { - if (forbiddenRecursionName(child->name)) { - continue; +std::string quoteAttribute(std::string const & attribute) +{ + if (isVarName(attribute)) { + return attribute; + } + std::ostringstream buf; + printStringValue(buf, attribute.c_str()); + return buf.str(); +} + +std::string const appendPath(std::string const & prefix, std::string const & suffix) +{ + if (prefix.empty()) { + return quoteAttribute(suffix); + } + return prefix + "." + quoteAttribute(suffix); +} + +bool forbiddenRecursionName(std::string name) { return (!name.empty() && name[0] == '_') || name == "haskellPackages"; } + +void recurse(const std::function)> & f, Context * ctx, + Value v, std::string const & path) +{ + std::variant evaluated; + try { + evaluated = evaluateValue(ctx, &v); + } catch (Error & e) { + evaluated = e; + } + if (!f(path, evaluated)) { + return; + } + if (std::holds_alternative(evaluated)) { + return; + } + Value const & evaluated_value = std::get(evaluated); + if (evaluated_value.type != tAttrs) { + return; + } + for (auto const & child : evaluated_value.attrs->lexicographicOrder()) { + if (forbiddenRecursionName(child->name)) { + continue; + } + recurse(f, ctx, *child->value, appendPath(path, child->name)); } - recurse(f, ctx, *child->value, appendPath(path, child->name)); - } } // Calls f on all the option names -void mapOptions(const std::function &f, - Context *ctx, Value root) { - recurse( - [f, ctx](std::string const &path, std::variant v) { - bool isOpt = std::holds_alternative(v) || - isOption(ctx, std::get(v)); - if (isOpt) { - f(path); - } - return !isOpt; - }, - ctx, root, ""); +void mapOptions(const std::function & f, Context * ctx, Value root) +{ + recurse( + [f, ctx](std::string const & path, std::variant v) { + bool isOpt = std::holds_alternative(v) || isOption(ctx, std::get(v)); + if (isOpt) { + f(path); + } + return !isOpt; + }, + ctx, root, ""); } // Calls f on all the config values inside one option. @@ -225,364 +229,363 @@ void mapOptions(const std::function &f, // users.users.nixbld1 = ... .. ... // ... // users.users.systemd-timesync = ... .. ... -void mapConfigValuesInOption( - const std::function v)> &f, - std::string const &path, Context *ctx) { - Value *option; - try { - option = - findAlongAttrPath(*ctx->state, path, *ctx->autoArgs, ctx->config_root); - } catch (Error &e) { - f(path, e); - return; - } - recurse( - [f, ctx](std::string const &path, std::variant v) { - bool leaf = std::holds_alternative(v) || - std::get(v).type != tAttrs || - ctx->state->isDerivation(std::get(v)); - if (!leaf) { - return true; // Keep digging +void mapConfigValuesInOption(const std::function v)> & f, + std::string const & path, Context * ctx) +{ + Value * option; + try { + option = findAlongAttrPath(*ctx->state, path, *ctx->autoArgs, ctx->config_root); + } catch (Error & e) { + f(path, e); + return; + } + recurse( + [f, ctx](std::string const & path, std::variant v) { + bool leaf = std::holds_alternative(v) || std::get(v).type != tAttrs || + ctx->state->isDerivation(std::get(v)); + if (!leaf) { + return true; // Keep digging + } + f(path, v); + return false; + }, + ctx, *option, path); +} + +std::string describeError(Error const & e) { return "«error: " + e.msg() + "»"; } + +void describeDerivation(Context * ctx, Out & out, Value v) +{ + // Copy-pasted from nix/src/nix/repl.cc :( + Bindings::iterator i = v.attrs->find(ctx->state->sDrvPath); + PathSet pathset; + try { + Path drvPath = i != v.attrs->end() ? ctx->state->coerceToPath(*i->pos, *i->value, pathset) : "???"; + out << "«derivation " << drvPath << "»"; + } catch (Error & e) { + out << describeError(e); + } +} + +Value parseAndEval(EvalState * state, std::string const & expression, std::string const & path) +{ + Value v{}; + state->eval(state->parseExprFromString(expression, absPath(path)), v); + return v; +} + +void printValue(Context * ctx, Out & out, std::variant maybe_value, std::string const & path); + +void printUnsortedList(Context * ctx, Out & out, Value & v) +{ + Out list_out(out, "[", "]", v.listSize()); + for (unsigned int n = 0; n < v.listSize(); ++n) { + printValue(ctx, list_out, *v.listElems()[n], ""); + list_out << Out::sep; + } +} + +void printSortedList(Context * ctx, Out & out, Value & v) +{ + std::vector results; + for (unsigned int n = 0; n < v.listSize(); ++n) { + std::ostringstream buf; + Out buf_out(buf); + printValue(ctx, buf_out, *v.listElems()[n], ""); + results.push_back(buf.str()); + } + std::sort(results.begin(), results.end()); + Out list_out(out, "[", "]", v.listSize()); + for (auto const & v : results) { + list_out << v << Out::sep; + } +} + +bool shouldSort(Context * ctx, Value & v) +{ + // Some lists should clearly be printed in sorted order, like + // environment.systemPackages. Some clearly should not, like + // services.xserver.multitouch.buttonsMap. As a conservative heuristic, sort + // lists of derivations. + return v.listSize() > 0 && ctx->state->isDerivation(*v.listElems()[0]); +} + +void printList(Context * ctx, Out & out, Value & v) +{ + if (shouldSort(ctx, v)) { + printSortedList(ctx, out, v); + } else { + printUnsortedList(ctx, out, v); + } +} + +void printAttrs(Context * ctx, Out & out, Value & v, std::string const & path) +{ + Out attrs_out(out, "{", "}", v.attrs->size()); + for (const auto & a : v.attrs->lexicographicOrder()) { + std::string name = a->name; + attrs_out << name << " = "; + printValue(ctx, attrs_out, *a->value, appendPath(path, name)); + attrs_out << ";" << Out::sep; + } +} + +void multiLineStringEscape(Out & out, std::string const & s) +{ + int i; + for (i = 1; i < s.size(); i++) { + if (s[i - 1] == '$' && s[i] == '{') { + out << "''${"; + i++; + } else if (s[i - 1] == '\'' && s[i] == '\'') { + out << "'''"; + i++; + } else { + out << s[i - 1]; } - f(path, v); - return false; - }, - ctx, *option, path); -} - -std::string describeError(Error const &e) { return "«error: " + e.msg() + "»"; } - -void describeDerivation(Context *ctx, Out &out, Value v) { - // Copy-pasted from nix/src/nix/repl.cc :( - Bindings::iterator i = v.attrs->find(ctx->state->sDrvPath); - PathSet pathset; - try { - Path drvPath = i != v.attrs->end() - ? ctx->state->coerceToPath(*i->pos, *i->value, pathset) - : "???"; - out << "«derivation " << drvPath << "»"; - } catch (Error &e) { - out << describeError(e); - } -} - -Value parseAndEval(EvalState *state, std::string const &expression, - std::string const &path) { - Value v{}; - state->eval(state->parseExprFromString(expression, absPath(path)), v); - return v; -} - -void printValue(Context *ctx, Out &out, std::variant maybe_value, - std::string const &path); - -void printUnsortedList(Context *ctx, Out &out, Value &v) { - Out list_out(out, "[", "]", v.listSize()); - for (unsigned int n = 0; n < v.listSize(); ++n) { - printValue(ctx, list_out, *v.listElems()[n], ""); - list_out << Out::sep; - } -} - -void printSortedList(Context *ctx, Out &out, Value &v) { - std::vector results; - for (unsigned int n = 0; n < v.listSize(); ++n) { - std::ostringstream buf; - Out buf_out(buf); - printValue(ctx, buf_out, *v.listElems()[n], ""); - results.push_back(buf.str()); - } - std::sort(results.begin(), results.end()); - Out list_out(out, "[", "]", v.listSize()); - for (auto const &v : results) { - list_out << v << Out::sep; - } -} - -bool shouldSort(Context *ctx, Value &v) { - // Some lists should clearly be printed in sorted order, like - // environment.systemPackages. Some clearly should not, like - // services.xserver.multitouch.buttonsMap. As a conservative heuristic, sort - // lists of derivations. - return v.listSize() > 0 && ctx->state->isDerivation(*v.listElems()[0]); -} - -void printList(Context *ctx, Out &out, Value &v) { - if (shouldSort(ctx, v)) { - printSortedList(ctx, out, v); - } else { - printUnsortedList(ctx, out, v); - } -} - -void printAttrs(Context *ctx, Out &out, Value &v, std::string const &path) { - Out attrs_out(out, "{", "}", v.attrs->size()); - for (const auto &a : v.attrs->lexicographicOrder()) { - std::string name = a->name; - attrs_out << name << " = "; - printValue(ctx, attrs_out, *a->value, appendPath(path, name)); - attrs_out << ";" << Out::sep; - } -} - -void multiLineStringEscape(Out &out, std::string const &s) { - int i; - for (i = 1; i < s.size(); i++) { - if (s[i - 1] == '$' && s[i] == '{') { - out << "''${"; - i++; - } else if (s[i - 1] == '\'' && s[i] == '\'') { - out << "'''"; - i++; - } else { - out << s[i - 1]; } - } - if (i == s.size()) { - out << s[i - 1]; - } -} - -void printMultiLineString(Out &out, Value const &v) { - std::string s = v.string.s; - Out str_out(out, "''", "''", Out::MULTI_LINE); - std::string::size_type begin = 0; - while (begin < s.size()) { - std::string::size_type end = s.find('\n', begin); - if (end == std::string::npos) { - multiLineStringEscape(str_out, s.substr(begin, s.size() - begin)); - break; + if (i == s.size()) { + out << s[i - 1]; } - multiLineStringEscape(str_out, s.substr(begin, end - begin)); - str_out << Out::sep; - begin = end + 1; - } } -void printValue(Context *ctx, Out &out, std::variant maybe_value, - std::string const &path) { - try { - if (std::holds_alternative(maybe_value)) { - throw Error{std::get(maybe_value)}; +void printMultiLineString(Out & out, Value const & v) +{ + std::string s = v.string.s; + Out str_out(out, "''", "''", Out::MULTI_LINE); + std::string::size_type begin = 0; + while (begin < s.size()) { + std::string::size_type end = s.find('\n', begin); + if (end == std::string::npos) { + multiLineStringEscape(str_out, s.substr(begin, s.size() - begin)); + break; + } + multiLineStringEscape(str_out, s.substr(begin, end - begin)); + str_out << Out::sep; + begin = end + 1; } - Value v = evaluateValue(ctx, &std::get(maybe_value)); - if (ctx->state->isDerivation(v)) { - describeDerivation(ctx, out, v); - } else if (v.isList()) { - printList(ctx, out, v); - } else if (v.type == tAttrs) { - printAttrs(ctx, out, v, path); - } else if (v.type == tString && - std::string(v.string.s).find('\n') != std::string::npos) { - printMultiLineString(out, v); - } else { - ctx->state->forceValueDeep(v); - out << v; +} + +void printValue(Context * ctx, Out & out, std::variant maybe_value, std::string const & path) +{ + try { + if (std::holds_alternative(maybe_value)) { + throw Error{std::get(maybe_value)}; + } + Value v = evaluateValue(ctx, &std::get(maybe_value)); + if (ctx->state->isDerivation(v)) { + describeDerivation(ctx, out, v); + } else if (v.isList()) { + printList(ctx, out, v); + } else if (v.type == tAttrs) { + printAttrs(ctx, out, v, path); + } else if (v.type == tString && std::string(v.string.s).find('\n') != std::string::npos) { + printMultiLineString(out, v); + } else { + ctx->state->forceValueDeep(v); + out << v; + } + } catch (Error & e) { + if (e.msg() == "The option `" + path + "' is used but not defined.") { + // 93% of errors are this, and just letting this message through would be + // misleading. These values may or may not actually be "used" in the + // config. The thing throwing the error message assumes that if anything + // ever looks at this value, it is a "use" of this value. But here in + // nixos-option, we are looking at this value only to print it. + // In order to avoid implying that this undefined value is actually + // referenced, eat the underlying error message and emit "«not defined»". + out << "«not defined»"; + } else { + out << describeError(e); + } } - } catch (Error &e) { - if (e.msg() == "The option `" + path + "' is used but not defined.") { - // 93% of errors are this, and just letting this message through would be - // misleading. These values may or may not actually be "used" in the - // config. The thing throwing the error message assumes that if anything - // ever looks at this value, it is a "use" of this value. But here in - // nixos-option, we are looking at this value only to print it. - // In order to avoid implying that this undefined value is actually - // referenced, eat the underlying error message and emit "«not defined»". - out << "«not defined»"; - } else { - out << describeError(e); +} + +void printConfigValue(Context * ctx, Out & out, std::string const & path, std::variant v) +{ + out << path << " = "; + printValue(ctx, out, std::move(v), path); + out << ";\n"; +} + +void printAll(Context * ctx, Out & out) +{ + mapOptions( + [ctx, &out](std::string const & option_path) { + mapConfigValuesInOption( + [ctx, &out](std::string const & config_path, std::variant v) { + printConfigValue(ctx, out, config_path, v); + }, + option_path, ctx); + }, + ctx, ctx->options_root); +} + +void printAttr(Context * ctx, Out & out, std::string const & path, Value * root) +{ + try { + printValue(ctx, out, *findAlongAttrPath(*ctx->state, path, *ctx->autoArgs, *root), path); + } catch (Error & e) { + out << describeError(e); } - } } -void printConfigValue(Context *ctx, Out &out, std::string const &path, - std::variant v) { - out << path << " = "; - printValue(ctx, out, std::move(v), path); - out << ";\n"; +void printOption(Context * ctx, Out & out, std::string const & path, Value * option) +{ + out << "Value:\n"; + printAttr(ctx, out, path, &ctx->config_root); + + out << "\n\nDefault:\n"; + printAttr(ctx, out, "default", option); + + out << "\n\nType:\n"; + printAttr(ctx, out, "type.description", option); + + out << "\n\nExample:\n"; + printAttr(ctx, out, "example", option); + + out << "\n\nDescription:\n"; + printAttr(ctx, out, "description", option); + + out << "\n\nDeclared by:\n"; + printAttr(ctx, out, "declarations", option); + + out << "\n\nDefined by:\n"; + printAttr(ctx, out, "files", option); + out << "\n"; } -void printAll(Context *ctx, Out &out) { - mapOptions( - [ctx, &out](std::string const &option_path) { - mapConfigValuesInOption( - [ctx, &out](std::string const &config_path, - std::variant v) { - printConfigValue(ctx, out, config_path, v); - }, - option_path, ctx); - }, - ctx, ctx->options_root); -} - -void printAttr(Context *ctx, Out &out, std::string const &path, Value *root) { - try { - printValue(ctx, out, - *findAlongAttrPath(*ctx->state, path, *ctx->autoArgs, *root), - path); - } catch (Error &e) { - out << describeError(e); - } -} - -void printOption(Context *ctx, Out &out, std::string const &path, - Value *option) { - out << "Value:\n"; - printAttr(ctx, out, path, &ctx->config_root); - - out << "\n\nDefault:\n"; - printAttr(ctx, out, "default", option); - - out << "\n\nType:\n"; - printAttr(ctx, out, "type.description", option); - - out << "\n\nExample:\n"; - printAttr(ctx, out, "example", option); - - out << "\n\nDescription:\n"; - printAttr(ctx, out, "description", option); - - out << "\n\nDeclared by:\n"; - printAttr(ctx, out, "declarations", option); - - out << "\n\nDefined by:\n"; - printAttr(ctx, out, "files", option); - out << "\n"; -} - -void printListing(Out &out, Value *v) { - // Print this header on stderr rather than stdout because the old shell script - // implementation did. I don't know why. - std::cerr << "This attribute set contains:\n"; - for (const auto &a : v->attrs->lexicographicOrder()) { - std::string name = a->name; - if (!name.empty() && name[0] != '_') { - out << name << "\n"; +void printListing(Out & out, Value * v) +{ + // Print this header on stderr rather than stdout because the old shell script + // implementation did. I don't know why. + std::cerr << "This attribute set contains:\n"; + for (const auto & a : v->attrs->lexicographicOrder()) { + std::string name = a->name; + if (!name.empty() && name[0] != '_') { + out << name << "\n"; + } } - } } // Carefully walk an option path, looking for sub-options when a path walks past // an option value. -Value findAlongOptionPath(Context *ctx, std::string const &path) { - Strings tokens = parseAttrPath(path); - Value v = ctx->options_root; - for (auto i = tokens.begin(); i != tokens.end(); i++) { - bool last_attribute = std::next(i) == tokens.end(); - auto const &attr = *i; - v = evaluateValue(ctx, &v); - if (attr.empty()) { - throw Error("empty attribute name in selection path '" + path + "'"); +Value findAlongOptionPath(Context * ctx, std::string const & path) +{ + Strings tokens = parseAttrPath(path); + Value v = ctx->options_root; + for (auto i = tokens.begin(); i != tokens.end(); i++) { + bool last_attribute = std::next(i) == tokens.end(); + auto const & attr = *i; + v = evaluateValue(ctx, &v); + if (attr.empty()) { + throw Error("empty attribute name in selection path '" + path + "'"); + } + if (isOption(ctx, v) && !last_attribute) { + Value getSubOptions = + evaluateValue(ctx, findAlongAttrPath(*ctx->state, "type.getSubOptions", *ctx->autoArgs, v)); + if (getSubOptions.type != tLambda) { + throw Error("Option's type.getSubOptions isn't a function at '" + attr + "' in path '" + path + "'"); + } + Value emptyString{}; + nix::mkString(emptyString, ""); + ctx->state->callFunction(getSubOptions, emptyString, v, nix::Pos{}); + // Note that we've consumed attr, but didn't actually use it. + } else if (v.type != tAttrs) { + throw Error("attribute '" + attr + "' in path '" + path + + "' attempts to index a value that should be a set but is " + showType(v)); + } else { + auto const & next = v.attrs->find(ctx->state->symbols.create(attr)); + if (next == v.attrs->end()) { + throw Error("attribute '" + attr + "' in path '" + path + "' not found"); + } + v = *next->value; + } } - if (isOption(ctx, v) && !last_attribute) { - Value getSubOptions = evaluateValue( - ctx, findAlongAttrPath(*ctx->state, "type.getSubOptions", - *ctx->autoArgs, v)); - if (getSubOptions.type != tLambda) { - throw Error("Option's type.getSubOptions isn't a function at '" + attr + - "' in path '" + path + "'"); - } - Value emptyString{}; - nix::mkString(emptyString, ""); - ctx->state->callFunction(getSubOptions, emptyString, v, nix::Pos{}); - // Note that we've consumed attr, but didn't actually use it. - } else if (v.type != tAttrs) { - throw Error("attribute '" + attr + "' in path '" + path + - "' attempts to index a value that should be a set but is " + - showType(v)); + return v; +} + +void printOne(Context * ctx, Out & out, std::string const & path) +{ + try { + Value option = findAlongOptionPath(ctx, path); + option = evaluateValue(ctx, &option); + if (isOption(ctx, option)) { + printOption(ctx, out, path, &option); + } else { + printListing(out, &option); + } + } catch (Error & e) { + std::cerr << "error: " << e.msg() + << "\nAn error occurred while looking for attribute names. Are " + "you sure that '" + << path << "' exists?\n"; + } +} + +int main(int argc, char ** argv) +{ + bool all = false; + std::string path = "."; + std::string options_expr = "(import {}).options"; + std::string config_expr = "(import {}).config"; + std::vector args; + + struct MyArgs : nix::LegacyArgs, nix::MixEvalArgs + { + using nix::LegacyArgs::LegacyArgs; + }; + + MyArgs myArgs(nix::baseNameOf(argv[0]), [&](Strings::iterator & arg, const Strings::iterator & end) { + if (*arg == "--help") { + nix::showManPage("nixos-option"); + } else if (*arg == "--version") { + nix::printVersion("nixos-option"); + } else if (*arg == "--all") { + all = true; + } else if (*arg == "--path") { + path = nix::getArg(*arg, arg, end); + } else if (*arg == "--options_expr") { + options_expr = nix::getArg(*arg, arg, end); + } else if (*arg == "--config_expr") { + config_expr = nix::getArg(*arg, arg, end); + } else if (!arg->empty() && arg->at(0) == '-') { + return false; + } else { + args.push_back(*arg); + } + return true; + }); + + myArgs.parseCmdline(nix::argvToStrings(argc, argv)); + + nix::initPlugins(); + nix::initGC(); + nix::settings.readOnlyMode = true; + auto store = nix::openStore(); + auto state = std::make_unique(myArgs.searchPath, store); + + Value options_root = parseAndEval(state.get(), options_expr, path); + Value config_root = parseAndEval(state.get(), config_expr, path); + + Context ctx{state.get(), myArgs.getAutoArgs(*state), options_root, config_root}; + Out out(std::cout); + + if (all) { + if (!args.empty()) { + throw UsageError("--all cannot be used with arguments"); + } + printAll(&ctx, out); } else { - auto const &next = v.attrs->find(ctx->state->symbols.create(attr)); - if (next == v.attrs->end()) { - throw Error("attribute '" + attr + "' in path '" + path + - "' not found"); - } - v = *next->value; + if (args.empty()) { + printOne(&ctx, out, ""); + } + for (auto const & arg : args) { + printOne(&ctx, out, arg); + } } - } - return v; -} - -void printOne(Context *ctx, Out &out, std::string const &path) { - try { - Value option = findAlongOptionPath(ctx, path); - option = evaluateValue(ctx, &option); - if (isOption(ctx, option)) { - printOption(ctx, out, path, &option); - } else { - printListing(out, &option); - } - } catch (Error &e) { - std::cerr << "error: " << e.msg() - << "\nAn error occurred while looking for attribute names. Are " - "you sure that '" - << path << "' exists?\n"; - } -} - -int main(int argc, char **argv) { - bool all = false; - std::string path = "."; - std::string options_expr = "(import {}).options"; - std::string config_expr = "(import {}).config"; - std::vector args; - - struct MyArgs : nix::LegacyArgs, nix::MixEvalArgs { - using nix::LegacyArgs::LegacyArgs; - }; - - MyArgs myArgs(nix::baseNameOf(argv[0]), - [&](Strings::iterator &arg, const Strings::iterator &end) { - if (*arg == "--help") { - nix::showManPage("nixos-option"); - } else if (*arg == "--version") { - nix::printVersion("nixos-option"); - } else if (*arg == "--all") { - all = true; - } else if (*arg == "--path") { - path = nix::getArg(*arg, arg, end); - } else if (*arg == "--options_expr") { - options_expr = nix::getArg(*arg, arg, end); - } else if (*arg == "--config_expr") { - config_expr = nix::getArg(*arg, arg, end); - } else if (!arg->empty() && arg->at(0) == '-') { - return false; - } else { - args.push_back(*arg); - } - return true; - }); - - myArgs.parseCmdline(nix::argvToStrings(argc, argv)); - - nix::initPlugins(); - nix::initGC(); - nix::settings.readOnlyMode = true; - auto store = nix::openStore(); - auto state = std::make_unique(myArgs.searchPath, store); - - Value options_root = parseAndEval(state.get(), options_expr, path); - Value config_root = parseAndEval(state.get(), config_expr, path); - - Context ctx{state.get(), myArgs.getAutoArgs(*state), options_root, - config_root}; - Out out(std::cout); - - if (all) { - if (!args.empty()) { - throw UsageError("--all cannot be used with arguments"); - } - printAll(&ctx, out); - } else { - if (args.empty()) { - printOne(&ctx, out, ""); - } - for (auto const &arg : args) { - printOne(&ctx, out, arg); - } - } - - ctx.state->printStats(); - - return 0; + + ctx.state->printStats(); + + return 0; } From 36c00c108076915b0074fefc8ae5bb8baba476fa Mon Sep 17 00:00:00 2001 From: Chuck Date: Fri, 6 Sep 2019 09:51:08 -0700 Subject: [PATCH 114/377] Use format strings, not concatenation, in error messages --- .../installer/tools/nixos-option/nixos-option.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index fe44a347aef..d72a2ae3f8d 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -479,25 +479,25 @@ Value findAlongOptionPath(Context * ctx, std::string const & path) auto const & attr = *i; v = evaluateValue(ctx, &v); if (attr.empty()) { - throw Error("empty attribute name in selection path '" + path + "'"); + throw Error("empty attribute name in selection path '%s'", path); } if (isOption(ctx, v) && !last_attribute) { Value getSubOptions = evaluateValue(ctx, findAlongAttrPath(*ctx->state, "type.getSubOptions", *ctx->autoArgs, v)); if (getSubOptions.type != tLambda) { - throw Error("Option's type.getSubOptions isn't a function at '" + attr + "' in path '" + path + "'"); + throw Error("Option's type.getSubOptions isn't a function at '%s' in path '%s'", attr, path); } Value emptyString{}; nix::mkString(emptyString, ""); ctx->state->callFunction(getSubOptions, emptyString, v, nix::Pos{}); // Note that we've consumed attr, but didn't actually use it. } else if (v.type != tAttrs) { - throw Error("attribute '" + attr + "' in path '" + path + - "' attempts to index a value that should be a set but is " + showType(v)); + throw Error("attribute '%s' in path '%s' attempts to index a value that should be a set but is %s", attr, + path, showType(v)); } else { auto const & next = v.attrs->find(ctx->state->symbols.create(attr)); if (next == v.attrs->end()) { - throw Error("attribute '" + attr + "' in path '" + path + "' not found"); + throw Error("attribute '%s' in path '%s' not found", attr, path); } v = *next->value; } From e1ecc2b6c1fe10acf2a1f63f027f002ff4b9ff7c Mon Sep 17 00:00:00 2001 From: Chuck Date: Fri, 6 Sep 2019 09:58:34 -0700 Subject: [PATCH 115/377] Remove list sorting --- .../tools/nixos-option/nixos-option.cc | 37 +------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index d72a2ae3f8d..01eb0d5ddd1 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -1,6 +1,5 @@ #include // for nix/globals.hh's reference to SYSTEM -#include // for sort #include // for function #include // for operator<<, basic_ostream, ostrin... #include // for next @@ -276,7 +275,7 @@ Value parseAndEval(EvalState * state, std::string const & expression, std::strin void printValue(Context * ctx, Out & out, std::variant maybe_value, std::string const & path); -void printUnsortedList(Context * ctx, Out & out, Value & v) +void printList(Context * ctx, Out & out, Value & v) { Out list_out(out, "[", "]", v.listSize()); for (unsigned int n = 0; n < v.listSize(); ++n) { @@ -285,40 +284,6 @@ void printUnsortedList(Context * ctx, Out & out, Value & v) } } -void printSortedList(Context * ctx, Out & out, Value & v) -{ - std::vector results; - for (unsigned int n = 0; n < v.listSize(); ++n) { - std::ostringstream buf; - Out buf_out(buf); - printValue(ctx, buf_out, *v.listElems()[n], ""); - results.push_back(buf.str()); - } - std::sort(results.begin(), results.end()); - Out list_out(out, "[", "]", v.listSize()); - for (auto const & v : results) { - list_out << v << Out::sep; - } -} - -bool shouldSort(Context * ctx, Value & v) -{ - // Some lists should clearly be printed in sorted order, like - // environment.systemPackages. Some clearly should not, like - // services.xserver.multitouch.buttonsMap. As a conservative heuristic, sort - // lists of derivations. - return v.listSize() > 0 && ctx->state->isDerivation(*v.listElems()[0]); -} - -void printList(Context * ctx, Out & out, Value & v) -{ - if (shouldSort(ctx, v)) { - printSortedList(ctx, out, v); - } else { - printUnsortedList(ctx, out, v); - } -} - void printAttrs(Context * ctx, Out & out, Value & v, std::string const & path) { Out attrs_out(out, "{", "}", v.attrs->size()); From f3eedb6020a0b2bc8a5ce19cf9761fc60d2873f8 Mon Sep 17 00:00:00 2001 From: Chuck Date: Fri, 6 Sep 2019 09:59:45 -0700 Subject: [PATCH 116/377] Parallel build is the default, so no need to specify --- nixos/modules/installer/tools/nixos-option/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nixos/modules/installer/tools/nixos-option/default.nix b/nixos/modules/installer/tools/nixos-option/default.nix index 6464a91052c..2ba5e73d7c0 100644 --- a/nixos/modules/installer/tools/nixos-option/default.nix +++ b/nixos/modules/installer/tools/nixos-option/default.nix @@ -4,5 +4,4 @@ stdenv.mkDerivation rec { src = ./.; nativeBuildInputs = [ cmake pkgconfig ]; buildInputs = [ boost nix ]; - enableParallelBuilding = true; } From 23369829579594bd8fd1b9423e399f2aeaca5488 Mon Sep 17 00:00:00 2001 From: Chuck Date: Fri, 6 Sep 2019 10:29:32 -0700 Subject: [PATCH 117/377] Add license This is important because this contains some code copied from nix (as an interim expediency until that functionality can be exported via nix's API). The license specified here must be compatible with this borrowing. Select the same license that nix is released under: lgpl2Plus. --- nixos/modules/installer/tools/nixos-option/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/modules/installer/tools/nixos-option/default.nix b/nixos/modules/installer/tools/nixos-option/default.nix index 2ba5e73d7c0..87ba38c29ca 100644 --- a/nixos/modules/installer/tools/nixos-option/default.nix +++ b/nixos/modules/installer/tools/nixos-option/default.nix @@ -4,4 +4,7 @@ stdenv.mkDerivation rec { src = ./.; nativeBuildInputs = [ cmake pkgconfig ]; buildInputs = [ boost nix ]; + meta { + license = stdenv.lib.licenses.lgpl2Plus; + } } From d89ccc1554d9b4e8064c9d07bf23652a3bd52fce Mon Sep 17 00:00:00 2001 From: Chuck Date: Fri, 6 Sep 2019 10:46:45 -0700 Subject: [PATCH 118/377] Correct syntax for license specification --- nixos/modules/installer/tools/nixos-option/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-option/default.nix b/nixos/modules/installer/tools/nixos-option/default.nix index 87ba38c29ca..2c2674ad28d 100644 --- a/nixos/modules/installer/tools/nixos-option/default.nix +++ b/nixos/modules/installer/tools/nixos-option/default.nix @@ -4,7 +4,7 @@ stdenv.mkDerivation rec { src = ./.; nativeBuildInputs = [ cmake pkgconfig ]; buildInputs = [ boost nix ]; - meta { + meta = { license = stdenv.lib.licenses.lgpl2Plus; - } + }; } From c7c684aaa3e165287be4b9d8345481e1d85c04e8 Mon Sep 17 00:00:00 2001 From: Chuck Date: Fri, 6 Sep 2019 11:37:48 -0700 Subject: [PATCH 119/377] Preserve type of rethrown exceptions --- .../tools/nixos-option/nixos-option.cc | 38 ++++++++++--------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index 01eb0d5ddd1..5886ee6959b 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -1,10 +1,12 @@ #include // for nix/globals.hh's reference to SYSTEM +#include // for exception_ptr, current_exception #include // for function #include // for operator<<, basic_ostream, ostrin... #include // for next #include // for _List_iterator #include // for allocator, unique_ptr, make_unique +#include // for operator new #include // for argvToStrings, UsageError #include // for findAlongAttrPath #include // for Attr, Bindings, Bindings::iterator @@ -166,19 +168,19 @@ std::string const appendPath(std::string const & prefix, std::string const & suf bool forbiddenRecursionName(std::string name) { return (!name.empty() && name[0] == '_') || name == "haskellPackages"; } -void recurse(const std::function)> & f, Context * ctx, +void recurse(const std::function)> & f, Context * ctx, Value v, std::string const & path) { - std::variant evaluated; + std::variant evaluated; try { evaluated = evaluateValue(ctx, &v); - } catch (Error & e) { - evaluated = e; + } catch (Error &) { + evaluated = std::current_exception(); } if (!f(path, evaluated)) { return; } - if (std::holds_alternative(evaluated)) { + if (std::holds_alternative(evaluated)) { return; } Value const & evaluated_value = std::get(evaluated); @@ -197,8 +199,8 @@ void recurse(const std::function & f, Context * ctx, Value root) { recurse( - [f, ctx](std::string const & path, std::variant v) { - bool isOpt = std::holds_alternative(v) || isOption(ctx, std::get(v)); + [f, ctx](std::string const & path, std::variant v) { + bool isOpt = std::holds_alternative(v) || isOption(ctx, std::get(v)); if (isOpt) { f(path); } @@ -228,19 +230,19 @@ void mapOptions(const std::function & f, Context // users.users.nixbld1 = ... .. ... // ... // users.users.systemd-timesync = ... .. ... -void mapConfigValuesInOption(const std::function v)> & f, +void mapConfigValuesInOption(const std::function v)> & f, std::string const & path, Context * ctx) { Value * option; try { option = findAlongAttrPath(*ctx->state, path, *ctx->autoArgs, ctx->config_root); - } catch (Error & e) { - f(path, e); + } catch (Error &) { + f(path, std::current_exception()); return; } recurse( - [f, ctx](std::string const & path, std::variant v) { - bool leaf = std::holds_alternative(v) || std::get(v).type != tAttrs || + [f, ctx](std::string const & path, std::variant v) { + bool leaf = std::holds_alternative(v) || std::get(v).type != tAttrs || ctx->state->isDerivation(std::get(v)); if (!leaf) { return true; // Keep digging @@ -273,7 +275,7 @@ Value parseAndEval(EvalState * state, std::string const & expression, std::strin return v; } -void printValue(Context * ctx, Out & out, std::variant maybe_value, std::string const & path); +void printValue(Context * ctx, Out & out, std::variant maybe_value, std::string const & path); void printList(Context * ctx, Out & out, Value & v) { @@ -331,11 +333,11 @@ void printMultiLineString(Out & out, Value const & v) } } -void printValue(Context * ctx, Out & out, std::variant maybe_value, std::string const & path) +void printValue(Context * ctx, Out & out, std::variant maybe_value, std::string const & path) { try { - if (std::holds_alternative(maybe_value)) { - throw Error{std::get(maybe_value)}; + if (std::holds_alternative(maybe_value)) { + std::rethrow_exception(std::get(maybe_value)); } Value v = evaluateValue(ctx, &std::get(maybe_value)); if (ctx->state->isDerivation(v)) { @@ -366,7 +368,7 @@ void printValue(Context * ctx, Out & out, std::variant maybe_value } } -void printConfigValue(Context * ctx, Out & out, std::string const & path, std::variant v) +void printConfigValue(Context * ctx, Out & out, std::string const & path, std::variant v) { out << path << " = "; printValue(ctx, out, std::move(v), path); @@ -378,7 +380,7 @@ void printAll(Context * ctx, Out & out) mapOptions( [ctx, &out](std::string const & option_path) { mapConfigValuesInOption( - [ctx, &out](std::string const & config_path, std::variant v) { + [ctx, &out](std::string const & config_path, std::variant v) { printConfigValue(ctx, out, config_path, v); }, option_path, ctx); From 0adf77e2eeb5227666f54ac6476884f9ddb63bee Mon Sep 17 00:00:00 2001 From: Chuck Date: Fri, 6 Sep 2019 11:38:29 -0700 Subject: [PATCH 120/377] =?UTF-8?q?Narrow=20the=20=C2=ABnot=20defined?= =?UTF-8?q?=C2=BB=20check=20to=20just=20ThrownError?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nixos/modules/installer/tools/nixos-option/nixos-option.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index 5886ee6959b..1fde8986fdf 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -352,7 +352,7 @@ void printValue(Context * ctx, Out & out, std::variantstate->forceValueDeep(v); out << v; } - } catch (Error & e) { + } catch (ThrownError & e) { if (e.msg() == "The option `" + path + "' is used but not defined.") { // 93% of errors are this, and just letting this message through would be // misleading. These values may or may not actually be "used" in the @@ -365,6 +365,8 @@ void printValue(Context * ctx, Out & out, std::variant Date: Fri, 6 Sep 2019 12:27:34 -0700 Subject: [PATCH 121/377] Fix missing "using ThrownError" --- nixos/modules/installer/tools/nixos-option/nixos-option.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index 1fde8986fdf..383755f884a 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -37,6 +37,7 @@ using nix::PathSet; using nix::Strings; using nix::Symbol; using nix::tAttrs; +using nix::ThrownError; using nix::tLambda; using nix::tString; using nix::UsageError; From 88349921a46fb303c134f568fbe9d5ba88bb2b6a Mon Sep 17 00:00:00 2001 From: Chuck Date: Fri, 6 Sep 2019 14:30:27 -0700 Subject: [PATCH 122/377] clang-format --- .../installer/tools/nixos-option/nixos-option.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index 383755f884a..8e2a8f5c018 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -169,8 +169,8 @@ std::string const appendPath(std::string const & prefix, std::string const & suf bool forbiddenRecursionName(std::string name) { return (!name.empty() && name[0] == '_') || name == "haskellPackages"; } -void recurse(const std::function)> & f, Context * ctx, - Value v, std::string const & path) +void recurse(const std::function)> & f, + Context * ctx, Value v, std::string const & path) { std::variant evaluated; try { @@ -231,8 +231,9 @@ void mapOptions(const std::function & f, Context // users.users.nixbld1 = ... .. ... // ... // users.users.systemd-timesync = ... .. ... -void mapConfigValuesInOption(const std::function v)> & f, - std::string const & path, Context * ctx) +void mapConfigValuesInOption( + const std::function v)> & f, + std::string const & path, Context * ctx) { Value * option; try { @@ -276,7 +277,8 @@ Value parseAndEval(EvalState * state, std::string const & expression, std::strin return v; } -void printValue(Context * ctx, Out & out, std::variant maybe_value, std::string const & path); +void printValue(Context * ctx, Out & out, std::variant maybe_value, + std::string const & path); void printList(Context * ctx, Out & out, Value & v) { @@ -338,7 +340,7 @@ void printValue(Context * ctx, Out & out, std::variant(maybe_value)) { - std::rethrow_exception(std::get(maybe_value)); + std::rethrow_exception(std::get(maybe_value)); } Value v = evaluateValue(ctx, &std::get(maybe_value)); if (ctx->state->isDerivation(v)) { From b8db81573a1e5a4e26da10d778d4400684a96832 Mon Sep 17 00:00:00 2001 From: Chuck Date: Fri, 6 Sep 2019 14:32:22 -0700 Subject: [PATCH 123/377] Support submodules (Fixes #13121) --- .../tools/nixos-option/nixos-option.cc | 56 +++++++++++++++---- 1 file changed, 46 insertions(+), 10 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index 8e2a8f5c018..755c2f0b002 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -440,6 +440,45 @@ void printListing(Out & out, Value * v) } } +bool optionTypeIs(Context * ctx, Value & v, std::string const & sought_type) +{ + try { + auto const & type_lookup = v.attrs->find(ctx->state->sType); + if (type_lookup == v.attrs->end()) { + return false; + } + Value type = evaluateValue(ctx, type_lookup->value); + if (type.type != tAttrs) { + return false; + } + auto const & name_lookup = type.attrs->find(ctx->state->sName); + if (name_lookup == type.attrs->end()) { + return false; + } + Value name = evaluateValue(ctx, name_lookup->value); + if (name.type != tString) { + return false; + } + return name.string.s == sought_type; + } catch (Error &) { + return false; + } +} + +Value getSubOptions(Context * ctx, Value & option) +{ + Value getSubOptions = + evaluateValue(ctx, findAlongAttrPath(*ctx->state, "type.getSubOptions", *ctx->autoArgs, option)); + if (getSubOptions.type != tLambda) { + throw Error("Option's type.getSubOptions isn't a function"); + } + Value emptyString{}; + nix::mkString(emptyString, ""); + Value v; + ctx->state->callFunction(getSubOptions, emptyString, v, nix::Pos{}); + return v; +} + // Carefully walk an option path, looking for sub-options when a path walks past // an option value. Value findAlongOptionPath(Context * ctx, std::string const & path) @@ -453,16 +492,13 @@ Value findAlongOptionPath(Context * ctx, std::string const & path) if (attr.empty()) { throw Error("empty attribute name in selection path '%s'", path); } - if (isOption(ctx, v) && !last_attribute) { - Value getSubOptions = - evaluateValue(ctx, findAlongAttrPath(*ctx->state, "type.getSubOptions", *ctx->autoArgs, v)); - if (getSubOptions.type != tLambda) { - throw Error("Option's type.getSubOptions isn't a function at '%s' in path '%s'", attr, path); - } - Value emptyString{}; - nix::mkString(emptyString, ""); - ctx->state->callFunction(getSubOptions, emptyString, v, nix::Pos{}); - // Note that we've consumed attr, but didn't actually use it. + if (isOption(ctx, v) && optionTypeIs(ctx, v, "submodule")) { + v = getSubOptions(ctx, v); + } + if (isOption(ctx, v) && optionTypeIs(ctx, v, "loaOf") && !last_attribute) { + v = getSubOptions(ctx, v); + // Note that we've consumed attr, but didn't actually use it. This is the path component that's looked up + // in the list or attribute set that doesn't name an option -- the "root" in "users.users.root.name". } else if (v.type != tAttrs) { throw Error("attribute '%s' in path '%s' attempts to index a value that should be a set but is %s", attr, path, showType(v)); From c352bfeaf096ed11560624b8c5034ba0ed0723b7 Mon Sep 17 00:00:00 2001 From: Chuck Date: Mon, 16 Sep 2019 08:15:28 -0700 Subject: [PATCH 124/377] Switch from east const to west const For consistency with the Nix C++ convention. :~( --- .../tools/nixos-option/nixos-option.cc | 76 +++++++++---------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index 755c2f0b002..79a58e510af 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -56,13 +56,13 @@ class Out MULTI_LINE }; explicit Out(std::ostream & ostream) : ostream(ostream), policy(ONE_LINE), write_since_sep(true) {} - Out(Out & o, std::string const & start, std::string const & end, LinePolicy policy); - Out(Out & o, std::string const & start, std::string const & end, int count) + Out(Out & o, const std::string & start, const std::string & end, LinePolicy policy); + Out(Out & o, const std::string & start, const std::string & end, int count) : Out(o, start, end, count < 2 ? ONE_LINE : MULTI_LINE) {} - Out(Out const &) = delete; + Out(const Out &) = delete; Out(Out &&) = default; - Out & operator=(Out const &) = delete; + Out & operator=(const Out &) = delete; Out & operator=(Out &&) = delete; ~Out() { ostream << end; } @@ -92,7 +92,7 @@ template <> Out & operator<<(Out & o, Out::Separator /* thing */ return o; } -Out::Out(Out & o, std::string const & start, std::string const & end, LinePolicy policy) +Out::Out(Out & o, const std::string & start, const std::string & end, LinePolicy policy) : ostream(o.ostream), indentation(policy == ONE_LINE ? o.indentation : o.indentation + " "), end(policy == ONE_LINE ? end : o.indentation + end), policy(policy), write_since_sep(true) { @@ -125,12 +125,12 @@ Value evaluateValue(Context * ctx, Value * v) return called; } -bool isOption(Context * ctx, Value const & v) +bool isOption(Context * ctx, const Value & v) { if (v.type != tAttrs) { return false; } - auto const & actual_type = v.attrs->find(ctx->underscore_type); + const auto & actual_type = v.attrs->find(ctx->underscore_type); if (actual_type == v.attrs->end()) { return false; } @@ -149,7 +149,7 @@ bool isOption(Context * ctx, Value const & v) // These are needed for paths like: // fileSystems."/".fsType // systemd.units."dbus.service".text -std::string quoteAttribute(std::string const & attribute) +std::string quoteAttribute(const std::string & attribute) { if (isVarName(attribute)) { return attribute; @@ -159,7 +159,7 @@ std::string quoteAttribute(std::string const & attribute) return buf.str(); } -std::string const appendPath(std::string const & prefix, std::string const & suffix) +const std::string appendPath(const std::string & prefix, const std::string & suffix) { if (prefix.empty()) { return quoteAttribute(suffix); @@ -169,8 +169,8 @@ std::string const appendPath(std::string const & prefix, std::string const & suf bool forbiddenRecursionName(std::string name) { return (!name.empty() && name[0] == '_') || name == "haskellPackages"; } -void recurse(const std::function)> & f, - Context * ctx, Value v, std::string const & path) +void recurse(const std::function)> & f, + Context * ctx, Value v, const std::string & path) { std::variant evaluated; try { @@ -184,11 +184,11 @@ void recurse(const std::function(evaluated)) { return; } - Value const & evaluated_value = std::get(evaluated); + const Value & evaluated_value = std::get(evaluated); if (evaluated_value.type != tAttrs) { return; } - for (auto const & child : evaluated_value.attrs->lexicographicOrder()) { + for (const auto & child : evaluated_value.attrs->lexicographicOrder()) { if (forbiddenRecursionName(child->name)) { continue; } @@ -197,10 +197,10 @@ void recurse(const std::function & f, Context * ctx, Value root) +void mapOptions(const std::function & f, Context * ctx, Value root) { recurse( - [f, ctx](std::string const & path, std::variant v) { + [f, ctx](const std::string & path, std::variant v) { bool isOpt = std::holds_alternative(v) || isOption(ctx, std::get(v)); if (isOpt) { f(path); @@ -232,8 +232,8 @@ void mapOptions(const std::function & f, Context // ... // users.users.systemd-timesync = ... .. ... void mapConfigValuesInOption( - const std::function v)> & f, - std::string const & path, Context * ctx) + const std::function v)> & f, + const std::string & path, Context * ctx) { Value * option; try { @@ -243,7 +243,7 @@ void mapConfigValuesInOption( return; } recurse( - [f, ctx](std::string const & path, std::variant v) { + [f, ctx](const std::string & path, std::variant v) { bool leaf = std::holds_alternative(v) || std::get(v).type != tAttrs || ctx->state->isDerivation(std::get(v)); if (!leaf) { @@ -255,7 +255,7 @@ void mapConfigValuesInOption( ctx, *option, path); } -std::string describeError(Error const & e) { return "«error: " + e.msg() + "»"; } +std::string describeError(const Error & e) { return "«error: " + e.msg() + "»"; } void describeDerivation(Context * ctx, Out & out, Value v) { @@ -270,7 +270,7 @@ void describeDerivation(Context * ctx, Out & out, Value v) } } -Value parseAndEval(EvalState * state, std::string const & expression, std::string const & path) +Value parseAndEval(EvalState * state, const std::string & expression, const std::string & path) { Value v{}; state->eval(state->parseExprFromString(expression, absPath(path)), v); @@ -278,7 +278,7 @@ Value parseAndEval(EvalState * state, std::string const & expression, std::strin } void printValue(Context * ctx, Out & out, std::variant maybe_value, - std::string const & path); + const std::string & path); void printList(Context * ctx, Out & out, Value & v) { @@ -289,7 +289,7 @@ void printList(Context * ctx, Out & out, Value & v) } } -void printAttrs(Context * ctx, Out & out, Value & v, std::string const & path) +void printAttrs(Context * ctx, Out & out, Value & v, const std::string & path) { Out attrs_out(out, "{", "}", v.attrs->size()); for (const auto & a : v.attrs->lexicographicOrder()) { @@ -300,7 +300,7 @@ void printAttrs(Context * ctx, Out & out, Value & v, std::string const & path) } } -void multiLineStringEscape(Out & out, std::string const & s) +void multiLineStringEscape(Out & out, const std::string & s) { int i; for (i = 1; i < s.size(); i++) { @@ -319,7 +319,7 @@ void multiLineStringEscape(Out & out, std::string const & s) } } -void printMultiLineString(Out & out, Value const & v) +void printMultiLineString(Out & out, const Value & v) { std::string s = v.string.s; Out str_out(out, "''", "''", Out::MULTI_LINE); @@ -336,7 +336,7 @@ void printMultiLineString(Out & out, Value const & v) } } -void printValue(Context * ctx, Out & out, std::variant maybe_value, std::string const & path) +void printValue(Context * ctx, Out & out, std::variant maybe_value, const std::string & path) { try { if (std::holds_alternative(maybe_value)) { @@ -373,7 +373,7 @@ void printValue(Context * ctx, Out & out, std::variant v) +void printConfigValue(Context * ctx, Out & out, const std::string & path, std::variant v) { out << path << " = "; printValue(ctx, out, std::move(v), path); @@ -383,9 +383,9 @@ void printConfigValue(Context * ctx, Out & out, std::string const & path, std::v void printAll(Context * ctx, Out & out) { mapOptions( - [ctx, &out](std::string const & option_path) { + [ctx, &out](const std::string & option_path) { mapConfigValuesInOption( - [ctx, &out](std::string const & config_path, std::variant v) { + [ctx, &out](const std::string & config_path, std::variant v) { printConfigValue(ctx, out, config_path, v); }, option_path, ctx); @@ -393,7 +393,7 @@ void printAll(Context * ctx, Out & out) ctx, ctx->options_root); } -void printAttr(Context * ctx, Out & out, std::string const & path, Value * root) +void printAttr(Context * ctx, Out & out, const std::string & path, Value * root) { try { printValue(ctx, out, *findAlongAttrPath(*ctx->state, path, *ctx->autoArgs, *root), path); @@ -402,7 +402,7 @@ void printAttr(Context * ctx, Out & out, std::string const & path, Value * root) } } -void printOption(Context * ctx, Out & out, std::string const & path, Value * option) +void printOption(Context * ctx, Out & out, const std::string & path, Value * option) { out << "Value:\n"; printAttr(ctx, out, path, &ctx->config_root); @@ -440,10 +440,10 @@ void printListing(Out & out, Value * v) } } -bool optionTypeIs(Context * ctx, Value & v, std::string const & sought_type) +bool optionTypeIs(Context * ctx, Value & v, const std::string & sought_type) { try { - auto const & type_lookup = v.attrs->find(ctx->state->sType); + const auto & type_lookup = v.attrs->find(ctx->state->sType); if (type_lookup == v.attrs->end()) { return false; } @@ -451,7 +451,7 @@ bool optionTypeIs(Context * ctx, Value & v, std::string const & sought_type) if (type.type != tAttrs) { return false; } - auto const & name_lookup = type.attrs->find(ctx->state->sName); + const auto & name_lookup = type.attrs->find(ctx->state->sName); if (name_lookup == type.attrs->end()) { return false; } @@ -481,13 +481,13 @@ Value getSubOptions(Context * ctx, Value & option) // Carefully walk an option path, looking for sub-options when a path walks past // an option value. -Value findAlongOptionPath(Context * ctx, std::string const & path) +Value findAlongOptionPath(Context * ctx, const std::string & path) { Strings tokens = parseAttrPath(path); Value v = ctx->options_root; for (auto i = tokens.begin(); i != tokens.end(); i++) { bool last_attribute = std::next(i) == tokens.end(); - auto const & attr = *i; + const auto & attr = *i; v = evaluateValue(ctx, &v); if (attr.empty()) { throw Error("empty attribute name in selection path '%s'", path); @@ -503,7 +503,7 @@ Value findAlongOptionPath(Context * ctx, std::string const & path) throw Error("attribute '%s' in path '%s' attempts to index a value that should be a set but is %s", attr, path, showType(v)); } else { - auto const & next = v.attrs->find(ctx->state->symbols.create(attr)); + const auto & next = v.attrs->find(ctx->state->symbols.create(attr)); if (next == v.attrs->end()) { throw Error("attribute '%s' in path '%s' not found", attr, path); } @@ -513,7 +513,7 @@ Value findAlongOptionPath(Context * ctx, std::string const & path) return v; } -void printOne(Context * ctx, Out & out, std::string const & path) +void printOne(Context * ctx, Out & out, const std::string & path) { try { Value option = findAlongOptionPath(ctx, path); @@ -588,7 +588,7 @@ int main(int argc, char ** argv) if (args.empty()) { printOne(&ctx, out, ""); } - for (auto const & arg : args) { + for (const auto & arg : args) { printOne(&ctx, out, arg); } } From 4ded9beea2ea5d0dd739c78a5bf1e5f42a1e1c39 Mon Sep 17 00:00:00 2001 From: Chuck Date: Mon, 16 Sep 2019 08:21:54 -0700 Subject: [PATCH 125/377] Add note: Keep error message in sync with nixos-option --- lib/modules.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/modules.nix b/lib/modules.nix index 71672c7d112..44db77b5d1c 100644 --- a/lib/modules.nix +++ b/lib/modules.nix @@ -326,6 +326,8 @@ rec { # The value with a check that it is defined valueDefined = if res.isDefined then res.mergedValue else + # (nixos-option detects this specific error message and gives it special + # handling. If changed here, please change it there too.) throw "The option `${showOption loc}' is used but not defined."; # Apply the 'apply' function to the merged value. This allows options to From aa8e1d5f1e44d5b24538f4b105b9323bd586be61 Mon Sep 17 00:00:00 2001 From: Chuck Date: Mon, 16 Sep 2019 08:39:20 -0700 Subject: [PATCH 126/377] Always say which path component had trouble --- .../tools/nixos-option/nixos-option.cc | 48 +++++++++++-------- 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index 79a58e510af..fc9315423dd 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -31,6 +31,7 @@ using nix::absPath; using nix::Bindings; using nix::Error; +using nix::EvalError; using nix::EvalState; using nix::Path; using nix::PathSet; @@ -465,12 +466,14 @@ bool optionTypeIs(Context * ctx, Value & v, const std::string & sought_type) } } +MakeError(OptionPathError, EvalError); + Value getSubOptions(Context * ctx, Value & option) { Value getSubOptions = evaluateValue(ctx, findAlongAttrPath(*ctx->state, "type.getSubOptions", *ctx->autoArgs, option)); if (getSubOptions.type != tLambda) { - throw Error("Option's type.getSubOptions isn't a function"); + throw OptionPathError("Option's type.getSubOptions isn't a function"); } Value emptyString{}; nix::mkString(emptyString, ""); @@ -486,28 +489,31 @@ Value findAlongOptionPath(Context * ctx, const std::string & path) Strings tokens = parseAttrPath(path); Value v = ctx->options_root; for (auto i = tokens.begin(); i != tokens.end(); i++) { - bool last_attribute = std::next(i) == tokens.end(); const auto & attr = *i; - v = evaluateValue(ctx, &v); - if (attr.empty()) { - throw Error("empty attribute name in selection path '%s'", path); - } - if (isOption(ctx, v) && optionTypeIs(ctx, v, "submodule")) { - v = getSubOptions(ctx, v); - } - if (isOption(ctx, v) && optionTypeIs(ctx, v, "loaOf") && !last_attribute) { - v = getSubOptions(ctx, v); - // Note that we've consumed attr, but didn't actually use it. This is the path component that's looked up - // in the list or attribute set that doesn't name an option -- the "root" in "users.users.root.name". - } else if (v.type != tAttrs) { - throw Error("attribute '%s' in path '%s' attempts to index a value that should be a set but is %s", attr, - path, showType(v)); - } else { - const auto & next = v.attrs->find(ctx->state->symbols.create(attr)); - if (next == v.attrs->end()) { - throw Error("attribute '%s' in path '%s' not found", attr, path); + try { + bool last_attribute = std::next(i) == tokens.end(); + v = evaluateValue(ctx, &v); + if (attr.empty()) { + throw OptionPathError("empty attribute name"); } - v = *next->value; + if (isOption(ctx, v) && optionTypeIs(ctx, v, "submodule")) { + v = getSubOptions(ctx, v); + } + if (isOption(ctx, v) && optionTypeIs(ctx, v, "loaOf") && !last_attribute) { + v = getSubOptions(ctx, v); + // Note that we've consumed attr, but didn't actually use it. This is the path component that's looked + // up in the list or attribute set that doesn't name an option -- the "root" in "users.users.root.name". + } else if (v.type != tAttrs) { + throw OptionPathError("Value is %s while a set was expected", showType(v)); + } else { + const auto & next = v.attrs->find(ctx->state->symbols.create(attr)); + if (next == v.attrs->end()) { + throw OptionPathError("Attribute not found", attr, path); + } + v = *next->value; + } + } catch (OptionPathError & e) { + throw OptionPathError("At '%s' in path '%s': %s", attr, path, e.msg()); } } return v; From 88183eb484e14eb12aecd2788f6178fe95ec6256 Mon Sep 17 00:00:00 2001 From: Chuck Date: Mon, 16 Sep 2019 08:44:33 -0700 Subject: [PATCH 127/377] Per reviewer request, cast the other side. I don't think this matters. As long as one or the other of these is a std::string, I get an operator== that looks at content rather than pointer equality. I picked casting the constant over casting the dynamic thing in hopes that the compiler would have a better chance at optimizing away any runtime cost. Deferring to reviewer. --- nixos/modules/installer/tools/nixos-option/nixos-option.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index fc9315423dd..536d67c2d09 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -140,7 +140,7 @@ bool isOption(Context * ctx, const Value & v) if (evaluated_type.type != tString) { return false; } - return evaluated_type.string.s == static_cast("option"); + return static_cast(evaluated_type.string.s) == "option"; } catch (Error &) { return false; } From c457766a1f3034eb0ae5e30d7524c05cf4925dea Mon Sep 17 00:00:00 2001 From: Chuck Date: Mon, 16 Sep 2019 09:04:28 -0700 Subject: [PATCH 128/377] Use std::get_if --- nixos/modules/installer/tools/nixos-option/nixos-option.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index 536d67c2d09..b81342715c2 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -340,8 +340,8 @@ void printMultiLineString(Out & out, const Value & v) void printValue(Context * ctx, Out & out, std::variant maybe_value, const std::string & path) { try { - if (std::holds_alternative(maybe_value)) { - std::rethrow_exception(std::get(maybe_value)); + if (auto ex = std::get_if(&maybe_value)) { + std::rethrow_exception(*ex); } Value v = evaluateValue(ctx, &std::get(maybe_value)); if (ctx->state->isDerivation(v)) { From c967e3fd3e2a4f311dc5f6676fff1c1266b20663 Mon Sep 17 00:00:00 2001 From: Chuck Date: Mon, 16 Sep 2019 09:10:29 -0700 Subject: [PATCH 129/377] Hold state and autoArgs by reference Switch from convention "appease clang-tidy --checks='*'" to "References are like non-nullptr pointers". The clang-tidy check "google-runtime-references" complains about non-const reference arguments, but this is not a convention used in Nix. --- .../tools/nixos-option/nixos-option.cc | 50 +++++++++---------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index b81342715c2..4c8dc1ec42c 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -104,12 +104,12 @@ Out::Out(Out & o, const std::string & start, const std::string & end, LinePolicy // Stuff needed for evaluation struct Context { - Context(EvalState * state, Bindings * autoArgs, Value options_root, Value config_root) + Context(EvalState & state, Bindings & autoArgs, Value options_root, Value config_root) : state(state), autoArgs(autoArgs), options_root(options_root), config_root(config_root), - underscore_type(state->symbols.create("_type")) + underscore_type(state.symbols.create("_type")) {} - EvalState * state; - Bindings * autoArgs; + EvalState & state; + Bindings & autoArgs; Value options_root; Value config_root; Symbol underscore_type; @@ -117,12 +117,12 @@ struct Context Value evaluateValue(Context * ctx, Value * v) { - ctx->state->forceValue(*v); - if (ctx->autoArgs->empty()) { + ctx->state.forceValue(*v); + if (ctx->autoArgs.empty()) { return *v; } Value called{}; - ctx->state->autoCallFunction(*ctx->autoArgs, *v, called); + ctx->state.autoCallFunction(ctx->autoArgs, *v, called); return called; } @@ -238,7 +238,7 @@ void mapConfigValuesInOption( { Value * option; try { - option = findAlongAttrPath(*ctx->state, path, *ctx->autoArgs, ctx->config_root); + option = findAlongAttrPath(ctx->state, path, ctx->autoArgs, ctx->config_root); } catch (Error &) { f(path, std::current_exception()); return; @@ -246,7 +246,7 @@ void mapConfigValuesInOption( recurse( [f, ctx](const std::string & path, std::variant v) { bool leaf = std::holds_alternative(v) || std::get(v).type != tAttrs || - ctx->state->isDerivation(std::get(v)); + ctx->state.isDerivation(std::get(v)); if (!leaf) { return true; // Keep digging } @@ -261,20 +261,20 @@ std::string describeError(const Error & e) { return "«error: " + e.msg() + "»" void describeDerivation(Context * ctx, Out & out, Value v) { // Copy-pasted from nix/src/nix/repl.cc :( - Bindings::iterator i = v.attrs->find(ctx->state->sDrvPath); + Bindings::iterator i = v.attrs->find(ctx->state.sDrvPath); PathSet pathset; try { - Path drvPath = i != v.attrs->end() ? ctx->state->coerceToPath(*i->pos, *i->value, pathset) : "???"; + Path drvPath = i != v.attrs->end() ? ctx->state.coerceToPath(*i->pos, *i->value, pathset) : "???"; out << "«derivation " << drvPath << "»"; } catch (Error & e) { out << describeError(e); } } -Value parseAndEval(EvalState * state, const std::string & expression, const std::string & path) +Value parseAndEval(EvalState & state, const std::string & expression, const std::string & path) { Value v{}; - state->eval(state->parseExprFromString(expression, absPath(path)), v); + state.eval(state.parseExprFromString(expression, absPath(path)), v); return v; } @@ -344,7 +344,7 @@ void printValue(Context * ctx, Out & out, std::variant(maybe_value)); - if (ctx->state->isDerivation(v)) { + if (ctx->state.isDerivation(v)) { describeDerivation(ctx, out, v); } else if (v.isList()) { printList(ctx, out, v); @@ -353,7 +353,7 @@ void printValue(Context * ctx, Out & out, std::variantstate->forceValueDeep(v); + ctx->state.forceValueDeep(v); out << v; } } catch (ThrownError & e) { @@ -397,7 +397,7 @@ void printAll(Context * ctx, Out & out) void printAttr(Context * ctx, Out & out, const std::string & path, Value * root) { try { - printValue(ctx, out, *findAlongAttrPath(*ctx->state, path, *ctx->autoArgs, *root), path); + printValue(ctx, out, *findAlongAttrPath(ctx->state, path, ctx->autoArgs, *root), path); } catch (Error & e) { out << describeError(e); } @@ -444,7 +444,7 @@ void printListing(Out & out, Value * v) bool optionTypeIs(Context * ctx, Value & v, const std::string & sought_type) { try { - const auto & type_lookup = v.attrs->find(ctx->state->sType); + const auto & type_lookup = v.attrs->find(ctx->state.sType); if (type_lookup == v.attrs->end()) { return false; } @@ -452,7 +452,7 @@ bool optionTypeIs(Context * ctx, Value & v, const std::string & sought_type) if (type.type != tAttrs) { return false; } - const auto & name_lookup = type.attrs->find(ctx->state->sName); + const auto & name_lookup = type.attrs->find(ctx->state.sName); if (name_lookup == type.attrs->end()) { return false; } @@ -471,14 +471,14 @@ MakeError(OptionPathError, EvalError); Value getSubOptions(Context * ctx, Value & option) { Value getSubOptions = - evaluateValue(ctx, findAlongAttrPath(*ctx->state, "type.getSubOptions", *ctx->autoArgs, option)); + evaluateValue(ctx, findAlongAttrPath(ctx->state, "type.getSubOptions", ctx->autoArgs, option)); if (getSubOptions.type != tLambda) { throw OptionPathError("Option's type.getSubOptions isn't a function"); } Value emptyString{}; nix::mkString(emptyString, ""); Value v; - ctx->state->callFunction(getSubOptions, emptyString, v, nix::Pos{}); + ctx->state.callFunction(getSubOptions, emptyString, v, nix::Pos{}); return v; } @@ -506,7 +506,7 @@ Value findAlongOptionPath(Context * ctx, const std::string & path) } else if (v.type != tAttrs) { throw OptionPathError("Value is %s while a set was expected", showType(v)); } else { - const auto & next = v.attrs->find(ctx->state->symbols.create(attr)); + const auto & next = v.attrs->find(ctx->state.symbols.create(attr)); if (next == v.attrs->end()) { throw OptionPathError("Attribute not found", attr, path); } @@ -579,10 +579,10 @@ int main(int argc, char ** argv) auto store = nix::openStore(); auto state = std::make_unique(myArgs.searchPath, store); - Value options_root = parseAndEval(state.get(), options_expr, path); - Value config_root = parseAndEval(state.get(), config_expr, path); + Value options_root = parseAndEval(*state, options_expr, path); + Value config_root = parseAndEval(*state, config_expr, path); - Context ctx{state.get(), myArgs.getAutoArgs(*state), options_root, config_root}; + Context ctx{*state, *myArgs.getAutoArgs(*state), options_root, config_root}; Out out(std::cout); if (all) { @@ -599,7 +599,7 @@ int main(int argc, char ** argv) } } - ctx.state->printStats(); + ctx.state.printStats(); return 0; } From 3d3ce8df7f29418c28ba02d28927e1a52f6db1e9 Mon Sep 17 00:00:00 2001 From: Chuck Date: Mon, 16 Sep 2019 09:19:13 -0700 Subject: [PATCH 130/377] Pass Context by reference Switch from convention "appease clang-tidy --checks='*'" to "References are like non-nullptr pointers". The clang-tidy check "google-runtime-references" complains about non-const reference arguments, but this is not a convention used in Nix. --- .../tools/nixos-option/nixos-option.cc | 87 +++++++++---------- 1 file changed, 43 insertions(+), 44 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index 4c8dc1ec42c..bdcfffb47af 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -115,23 +115,23 @@ struct Context Symbol underscore_type; }; -Value evaluateValue(Context * ctx, Value * v) +Value evaluateValue(Context & ctx, Value * v) { - ctx->state.forceValue(*v); - if (ctx->autoArgs.empty()) { + ctx.state.forceValue(*v); + if (ctx.autoArgs.empty()) { return *v; } Value called{}; - ctx->state.autoCallFunction(ctx->autoArgs, *v, called); + ctx.state.autoCallFunction(ctx.autoArgs, *v, called); return called; } -bool isOption(Context * ctx, const Value & v) +bool isOption(Context & ctx, const Value & v) { if (v.type != tAttrs) { return false; } - const auto & actual_type = v.attrs->find(ctx->underscore_type); + const auto & actual_type = v.attrs->find(ctx.underscore_type); if (actual_type == v.attrs->end()) { return false; } @@ -171,7 +171,7 @@ const std::string appendPath(const std::string & prefix, const std::string & suf bool forbiddenRecursionName(std::string name) { return (!name.empty() && name[0] == '_') || name == "haskellPackages"; } void recurse(const std::function)> & f, - Context * ctx, Value v, const std::string & path) + Context & ctx, Value v, const std::string & path) { std::variant evaluated; try { @@ -198,10 +198,10 @@ void recurse(const std::function & f, Context * ctx, Value root) +void mapOptions(const std::function & f, Context & ctx, Value root) { recurse( - [f, ctx](const std::string & path, std::variant v) { + [f, &ctx](const std::string & path, std::variant v) { bool isOpt = std::holds_alternative(v) || isOption(ctx, std::get(v)); if (isOpt) { f(path); @@ -234,11 +234,11 @@ void mapOptions(const std::function & f, Context // users.users.systemd-timesync = ... .. ... void mapConfigValuesInOption( const std::function v)> & f, - const std::string & path, Context * ctx) + const std::string & path, Context & ctx) { Value * option; try { - option = findAlongAttrPath(ctx->state, path, ctx->autoArgs, ctx->config_root); + option = findAlongAttrPath(ctx.state, path, ctx.autoArgs, ctx.config_root); } catch (Error &) { f(path, std::current_exception()); return; @@ -246,7 +246,7 @@ void mapConfigValuesInOption( recurse( [f, ctx](const std::string & path, std::variant v) { bool leaf = std::holds_alternative(v) || std::get(v).type != tAttrs || - ctx->state.isDerivation(std::get(v)); + ctx.state.isDerivation(std::get(v)); if (!leaf) { return true; // Keep digging } @@ -258,13 +258,13 @@ void mapConfigValuesInOption( std::string describeError(const Error & e) { return "«error: " + e.msg() + "»"; } -void describeDerivation(Context * ctx, Out & out, Value v) +void describeDerivation(Context & ctx, Out & out, Value v) { // Copy-pasted from nix/src/nix/repl.cc :( - Bindings::iterator i = v.attrs->find(ctx->state.sDrvPath); + Bindings::iterator i = v.attrs->find(ctx.state.sDrvPath); PathSet pathset; try { - Path drvPath = i != v.attrs->end() ? ctx->state.coerceToPath(*i->pos, *i->value, pathset) : "???"; + Path drvPath = i != v.attrs->end() ? ctx.state.coerceToPath(*i->pos, *i->value, pathset) : "???"; out << "«derivation " << drvPath << "»"; } catch (Error & e) { out << describeError(e); @@ -278,10 +278,10 @@ Value parseAndEval(EvalState & state, const std::string & expression, const std: return v; } -void printValue(Context * ctx, Out & out, std::variant maybe_value, +void printValue(Context & ctx, Out & out, std::variant maybe_value, const std::string & path); -void printList(Context * ctx, Out & out, Value & v) +void printList(Context & ctx, Out & out, Value & v) { Out list_out(out, "[", "]", v.listSize()); for (unsigned int n = 0; n < v.listSize(); ++n) { @@ -290,7 +290,7 @@ void printList(Context * ctx, Out & out, Value & v) } } -void printAttrs(Context * ctx, Out & out, Value & v, const std::string & path) +void printAttrs(Context & ctx, Out & out, Value & v, const std::string & path) { Out attrs_out(out, "{", "}", v.attrs->size()); for (const auto & a : v.attrs->lexicographicOrder()) { @@ -337,14 +337,14 @@ void printMultiLineString(Out & out, const Value & v) } } -void printValue(Context * ctx, Out & out, std::variant maybe_value, const std::string & path) +void printValue(Context & ctx, Out & out, std::variant maybe_value, const std::string & path) { try { if (auto ex = std::get_if(&maybe_value)) { std::rethrow_exception(*ex); } Value v = evaluateValue(ctx, &std::get(maybe_value)); - if (ctx->state.isDerivation(v)) { + if (ctx.state.isDerivation(v)) { describeDerivation(ctx, out, v); } else if (v.isList()) { printList(ctx, out, v); @@ -353,7 +353,7 @@ void printValue(Context * ctx, Out & out, std::variantstate.forceValueDeep(v); + ctx.state.forceValueDeep(v); out << v; } } catch (ThrownError & e) { @@ -374,39 +374,39 @@ void printValue(Context * ctx, Out & out, std::variant v) +void printConfigValue(Context & ctx, Out & out, const std::string & path, std::variant v) { out << path << " = "; printValue(ctx, out, std::move(v), path); out << ";\n"; } -void printAll(Context * ctx, Out & out) +void printAll(Context & ctx, Out & out) { mapOptions( - [ctx, &out](const std::string & option_path) { + [&ctx, &out](const std::string & option_path) { mapConfigValuesInOption( - [ctx, &out](const std::string & config_path, std::variant v) { + [&ctx, &out](const std::string & config_path, std::variant v) { printConfigValue(ctx, out, config_path, v); }, option_path, ctx); }, - ctx, ctx->options_root); + ctx, ctx.options_root); } -void printAttr(Context * ctx, Out & out, const std::string & path, Value * root) +void printAttr(Context & ctx, Out & out, const std::string & path, Value * root) { try { - printValue(ctx, out, *findAlongAttrPath(ctx->state, path, ctx->autoArgs, *root), path); + printValue(ctx, out, *findAlongAttrPath(ctx.state, path, ctx.autoArgs, *root), path); } catch (Error & e) { out << describeError(e); } } -void printOption(Context * ctx, Out & out, const std::string & path, Value * option) +void printOption(Context & ctx, Out & out, const std::string & path, Value * option) { out << "Value:\n"; - printAttr(ctx, out, path, &ctx->config_root); + printAttr(ctx, out, path, &ctx.config_root); out << "\n\nDefault:\n"; printAttr(ctx, out, "default", option); @@ -441,10 +441,10 @@ void printListing(Out & out, Value * v) } } -bool optionTypeIs(Context * ctx, Value & v, const std::string & sought_type) +bool optionTypeIs(Context & ctx, Value & v, const std::string & sought_type) { try { - const auto & type_lookup = v.attrs->find(ctx->state.sType); + const auto & type_lookup = v.attrs->find(ctx.state.sType); if (type_lookup == v.attrs->end()) { return false; } @@ -452,7 +452,7 @@ bool optionTypeIs(Context * ctx, Value & v, const std::string & sought_type) if (type.type != tAttrs) { return false; } - const auto & name_lookup = type.attrs->find(ctx->state.sName); + const auto & name_lookup = type.attrs->find(ctx.state.sName); if (name_lookup == type.attrs->end()) { return false; } @@ -468,26 +468,25 @@ bool optionTypeIs(Context * ctx, Value & v, const std::string & sought_type) MakeError(OptionPathError, EvalError); -Value getSubOptions(Context * ctx, Value & option) +Value getSubOptions(Context & ctx, Value & option) { - Value getSubOptions = - evaluateValue(ctx, findAlongAttrPath(ctx->state, "type.getSubOptions", ctx->autoArgs, option)); + Value getSubOptions = evaluateValue(ctx, findAlongAttrPath(ctx.state, "type.getSubOptions", ctx.autoArgs, option)); if (getSubOptions.type != tLambda) { throw OptionPathError("Option's type.getSubOptions isn't a function"); } Value emptyString{}; nix::mkString(emptyString, ""); Value v; - ctx->state.callFunction(getSubOptions, emptyString, v, nix::Pos{}); + ctx.state.callFunction(getSubOptions, emptyString, v, nix::Pos{}); return v; } // Carefully walk an option path, looking for sub-options when a path walks past // an option value. -Value findAlongOptionPath(Context * ctx, const std::string & path) +Value findAlongOptionPath(Context & ctx, const std::string & path) { Strings tokens = parseAttrPath(path); - Value v = ctx->options_root; + Value v = ctx.options_root; for (auto i = tokens.begin(); i != tokens.end(); i++) { const auto & attr = *i; try { @@ -506,7 +505,7 @@ Value findAlongOptionPath(Context * ctx, const std::string & path) } else if (v.type != tAttrs) { throw OptionPathError("Value is %s while a set was expected", showType(v)); } else { - const auto & next = v.attrs->find(ctx->state.symbols.create(attr)); + const auto & next = v.attrs->find(ctx.state.symbols.create(attr)); if (next == v.attrs->end()) { throw OptionPathError("Attribute not found", attr, path); } @@ -519,7 +518,7 @@ Value findAlongOptionPath(Context * ctx, const std::string & path) return v; } -void printOne(Context * ctx, Out & out, const std::string & path) +void printOne(Context & ctx, Out & out, const std::string & path) { try { Value option = findAlongOptionPath(ctx, path); @@ -589,13 +588,13 @@ int main(int argc, char ** argv) if (!args.empty()) { throw UsageError("--all cannot be used with arguments"); } - printAll(&ctx, out); + printAll(ctx, out); } else { if (args.empty()) { - printOne(&ctx, out, ""); + printOne(ctx, out, ""); } for (const auto & arg : args) { - printOne(&ctx, out, arg); + printOne(ctx, out, arg); } } From 94a068fe36f8b369071d8185f584d31923f7b00e Mon Sep 17 00:00:00 2001 From: Chuck Date: Mon, 16 Sep 2019 09:24:26 -0700 Subject: [PATCH 131/377] Pass values by reference Switch from convention "appease clang-tidy --checks='*'" to "References are like non-nullptr pointers". The clang-tidy check "google-runtime-references" complains about non-const reference arguments, but this is not a convention used in Nix. --- .../tools/nixos-option/nixos-option.cc | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index bdcfffb47af..5fd8f69d800 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -115,14 +115,14 @@ struct Context Symbol underscore_type; }; -Value evaluateValue(Context & ctx, Value * v) +Value evaluateValue(Context & ctx, Value & v) { - ctx.state.forceValue(*v); + ctx.state.forceValue(v); if (ctx.autoArgs.empty()) { - return *v; + return v; } Value called{}; - ctx.state.autoCallFunction(ctx.autoArgs, *v, called); + ctx.state.autoCallFunction(ctx.autoArgs, v, called); return called; } @@ -136,7 +136,7 @@ bool isOption(Context & ctx, const Value & v) return false; } try { - Value evaluated_type = evaluateValue(ctx, actual_type->value); + Value evaluated_type = evaluateValue(ctx, *actual_type->value); if (evaluated_type.type != tString) { return false; } @@ -175,7 +175,7 @@ void recurse(const std::function evaluated; try { - evaluated = evaluateValue(ctx, &v); + evaluated = evaluateValue(ctx, v); } catch (Error &) { evaluated = std::current_exception(); } @@ -343,7 +343,7 @@ void printValue(Context & ctx, Out & out, std::variant(&maybe_value)) { std::rethrow_exception(*ex); } - Value v = evaluateValue(ctx, &std::get(maybe_value)); + Value v = evaluateValue(ctx, std::get(maybe_value)); if (ctx.state.isDerivation(v)) { describeDerivation(ctx, out, v); } else if (v.isList()) { @@ -394,19 +394,19 @@ void printAll(Context & ctx, Out & out) ctx, ctx.options_root); } -void printAttr(Context & ctx, Out & out, const std::string & path, Value * root) +void printAttr(Context & ctx, Out & out, const std::string & path, Value & root) { try { - printValue(ctx, out, *findAlongAttrPath(ctx.state, path, ctx.autoArgs, *root), path); + printValue(ctx, out, *findAlongAttrPath(ctx.state, path, ctx.autoArgs, root), path); } catch (Error & e) { out << describeError(e); } } -void printOption(Context & ctx, Out & out, const std::string & path, Value * option) +void printOption(Context & ctx, Out & out, const std::string & path, Value & option) { out << "Value:\n"; - printAttr(ctx, out, path, &ctx.config_root); + printAttr(ctx, out, path, ctx.config_root); out << "\n\nDefault:\n"; printAttr(ctx, out, "default", option); @@ -428,12 +428,12 @@ void printOption(Context & ctx, Out & out, const std::string & path, Value * opt out << "\n"; } -void printListing(Out & out, Value * v) +void printListing(Out & out, Value & v) { // Print this header on stderr rather than stdout because the old shell script // implementation did. I don't know why. std::cerr << "This attribute set contains:\n"; - for (const auto & a : v->attrs->lexicographicOrder()) { + for (const auto & a : v.attrs->lexicographicOrder()) { std::string name = a->name; if (!name.empty() && name[0] != '_') { out << name << "\n"; @@ -448,7 +448,7 @@ bool optionTypeIs(Context & ctx, Value & v, const std::string & sought_type) if (type_lookup == v.attrs->end()) { return false; } - Value type = evaluateValue(ctx, type_lookup->value); + Value type = evaluateValue(ctx, *type_lookup->value); if (type.type != tAttrs) { return false; } @@ -456,7 +456,7 @@ bool optionTypeIs(Context & ctx, Value & v, const std::string & sought_type) if (name_lookup == type.attrs->end()) { return false; } - Value name = evaluateValue(ctx, name_lookup->value); + Value name = evaluateValue(ctx, *name_lookup->value); if (name.type != tString) { return false; } @@ -470,7 +470,7 @@ MakeError(OptionPathError, EvalError); Value getSubOptions(Context & ctx, Value & option) { - Value getSubOptions = evaluateValue(ctx, findAlongAttrPath(ctx.state, "type.getSubOptions", ctx.autoArgs, option)); + Value getSubOptions = evaluateValue(ctx, *findAlongAttrPath(ctx.state, "type.getSubOptions", ctx.autoArgs, option)); if (getSubOptions.type != tLambda) { throw OptionPathError("Option's type.getSubOptions isn't a function"); } @@ -491,7 +491,7 @@ Value findAlongOptionPath(Context & ctx, const std::string & path) const auto & attr = *i; try { bool last_attribute = std::next(i) == tokens.end(); - v = evaluateValue(ctx, &v); + v = evaluateValue(ctx, v); if (attr.empty()) { throw OptionPathError("empty attribute name"); } @@ -522,11 +522,11 @@ void printOne(Context & ctx, Out & out, const std::string & path) { try { Value option = findAlongOptionPath(ctx, path); - option = evaluateValue(ctx, &option); + option = evaluateValue(ctx, option); if (isOption(ctx, option)) { - printOption(ctx, out, path, &option); + printOption(ctx, out, path, option); } else { - printListing(out, &option); + printListing(out, option); } } catch (Error & e) { std::cerr << "error: " << e.msg() From 2ddd2d07601d11f31f9bffa61060d680a1708b4c Mon Sep 17 00:00:00 2001 From: Chuck Date: Mon, 16 Sep 2019 09:35:38 -0700 Subject: [PATCH 132/377] Explain why header goes on stderr --- nixos/modules/installer/tools/nixos-option/nixos-option.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index 5fd8f69d800..174b7a0cbb6 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -430,8 +430,8 @@ void printOption(Context & ctx, Out & out, const std::string & path, Value & opt void printListing(Out & out, Value & v) { - // Print this header on stderr rather than stdout because the old shell script - // implementation did. I don't know why. + // Print this header on stderr rather than stdout, presumably to make it + // slightly easier to consume this output in other tools. std::cerr << "This attribute set contains:\n"; for (const auto & a : v.attrs->lexicographicOrder()) { std::string name = a->name; From 84d55716a9899954bc05b000287a54a59ee5aefe Mon Sep 17 00:00:00 2001 From: Chuck Date: Mon, 16 Sep 2019 09:36:00 -0700 Subject: [PATCH 133/377] Don't print header on stderr Automated consumers can use 'sed 1d' or similar to remove this header. This probably makes this output *easier* to consume correctly. Having this header show up in consumers' terminal or log output is probably not useful, but hiding it without hiding all error messages would have been more troublesome that just stripping it from stdout. I.e., previously, unsophisticated use would show undesired output: $ some-other-tool This attribute set contains: This attribute set contains: This attribute set contains: This attribute set contains: The simplest way to hide this undesired output would have been nixos-option ... 2>/dev/null, which would hide all error messages. We do not wish to encourage that. Correct use would have been something like: nixos-option ... 2> >( grep --line-buffered -v 'This attribute set contains:') After this change, correct use is simpler: nixos-option ... | sed 1d or nixos-option ... | sed '1/This attribute set contains:/d' if the caller don't know if this invocation of nixos-option will yield an attribute listing or an option description. --- nixos/modules/installer/tools/nixos-option/nixos-option.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index 174b7a0cbb6..2b95f9c9833 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -430,9 +430,7 @@ void printOption(Context & ctx, Out & out, const std::string & path, Value & opt void printListing(Out & out, Value & v) { - // Print this header on stderr rather than stdout, presumably to make it - // slightly easier to consume this output in other tools. - std::cerr << "This attribute set contains:\n"; + out << "This attribute set contains:\n"; for (const auto & a : v.attrs->lexicographicOrder()) { std::string name = a->name; if (!name.empty() && name[0] != '_') { From 4d17d5b31f196416ee4be50b0f7b125966ea210f Mon Sep 17 00:00:00 2001 From: Chuck Date: Mon, 16 Sep 2019 09:56:07 -0700 Subject: [PATCH 134/377] snake_case -> camelCase --- .../tools/nixos-option/nixos-option.cc | 115 +++++++++--------- 1 file changed, 57 insertions(+), 58 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index 2b95f9c9833..58d66bad1c6 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -56,7 +56,7 @@ class Out ONE_LINE, MULTI_LINE }; - explicit Out(std::ostream & ostream) : ostream(ostream), policy(ONE_LINE), write_since_sep(true) {} + explicit Out(std::ostream & ostream) : ostream(ostream), policy(ONE_LINE), writeSinceSep(true) {} Out(Out & o, const std::string & start, const std::string & end, LinePolicy policy); Out(Out & o, const std::string & start, const std::string & end, int count) : Out(o, start, end, count < 2 ? ONE_LINE : MULTI_LINE) @@ -72,16 +72,16 @@ class Out std::string indentation; std::string end; LinePolicy policy; - bool write_since_sep; + bool writeSinceSep; template friend Out & operator<<(Out & o, T thing); }; template Out & operator<<(Out & o, T thing) { - if (!o.write_since_sep && o.policy == Out::MULTI_LINE) { + if (!o.writeSinceSep && o.policy == Out::MULTI_LINE) { o.ostream << o.indentation; } - o.write_since_sep = true; + o.writeSinceSep = true; o.ostream << thing; return o; } @@ -89,13 +89,13 @@ template Out & operator<<(Out & o, T thing) template <> Out & operator<<(Out & o, Out::Separator /* thing */) { o.ostream << (o.policy == Out::ONE_LINE ? " " : "\n"); - o.write_since_sep = false; + o.writeSinceSep = false; return o; } Out::Out(Out & o, const std::string & start, const std::string & end, LinePolicy policy) : ostream(o.ostream), indentation(policy == ONE_LINE ? o.indentation : o.indentation + " "), - end(policy == ONE_LINE ? end : o.indentation + end), policy(policy), write_since_sep(true) + end(policy == ONE_LINE ? end : o.indentation + end), policy(policy), writeSinceSep(true) { o << start; *this << Out::sep; @@ -104,15 +104,15 @@ Out::Out(Out & o, const std::string & start, const std::string & end, LinePolicy // Stuff needed for evaluation struct Context { - Context(EvalState & state, Bindings & autoArgs, Value options_root, Value config_root) - : state(state), autoArgs(autoArgs), options_root(options_root), config_root(config_root), - underscore_type(state.symbols.create("_type")) + Context(EvalState & state, Bindings & autoArgs, Value optionsRoot, Value configRoot) + : state(state), autoArgs(autoArgs), optionsRoot(optionsRoot), configRoot(configRoot), + underscoreType(state.symbols.create("_type")) {} EvalState & state; Bindings & autoArgs; - Value options_root; - Value config_root; - Symbol underscore_type; + Value optionsRoot; + Value configRoot; + Symbol underscoreType; }; Value evaluateValue(Context & ctx, Value & v) @@ -131,16 +131,16 @@ bool isOption(Context & ctx, const Value & v) if (v.type != tAttrs) { return false; } - const auto & actual_type = v.attrs->find(ctx.underscore_type); - if (actual_type == v.attrs->end()) { + const auto & atualType = v.attrs->find(ctx.underscoreType); + if (atualType == v.attrs->end()) { return false; } try { - Value evaluated_type = evaluateValue(ctx, *actual_type->value); - if (evaluated_type.type != tString) { + Value evaluatedType = evaluateValue(ctx, *atualType->value); + if (evaluatedType.type != tString) { return false; } - return static_cast(evaluated_type.string.s) == "option"; + return static_cast(evaluatedType.string.s) == "option"; } catch (Error &) { return false; } @@ -238,7 +238,7 @@ void mapConfigValuesInOption( { Value * option; try { - option = findAlongAttrPath(ctx.state, path, ctx.autoArgs, ctx.config_root); + option = findAlongAttrPath(ctx.state, path, ctx.autoArgs, ctx.configRoot); } catch (Error &) { f(path, std::current_exception()); return; @@ -278,26 +278,25 @@ Value parseAndEval(EvalState & state, const std::string & expression, const std: return v; } -void printValue(Context & ctx, Out & out, std::variant maybe_value, - const std::string & path); +void printValue(Context & ctx, Out & out, std::variant maybeValue, const std::string & path); void printList(Context & ctx, Out & out, Value & v) { - Out list_out(out, "[", "]", v.listSize()); + Out listOut(out, "[", "]", v.listSize()); for (unsigned int n = 0; n < v.listSize(); ++n) { - printValue(ctx, list_out, *v.listElems()[n], ""); - list_out << Out::sep; + printValue(ctx, listOut, *v.listElems()[n], ""); + listOut << Out::sep; } } void printAttrs(Context & ctx, Out & out, Value & v, const std::string & path) { - Out attrs_out(out, "{", "}", v.attrs->size()); + Out attrsOut(out, "{", "}", v.attrs->size()); for (const auto & a : v.attrs->lexicographicOrder()) { std::string name = a->name; - attrs_out << name << " = "; - printValue(ctx, attrs_out, *a->value, appendPath(path, name)); - attrs_out << ";" << Out::sep; + attrsOut << name << " = "; + printValue(ctx, attrsOut, *a->value, appendPath(path, name)); + attrsOut << ";" << Out::sep; } } @@ -323,27 +322,27 @@ void multiLineStringEscape(Out & out, const std::string & s) void printMultiLineString(Out & out, const Value & v) { std::string s = v.string.s; - Out str_out(out, "''", "''", Out::MULTI_LINE); + Out strOut(out, "''", "''", Out::MULTI_LINE); std::string::size_type begin = 0; while (begin < s.size()) { std::string::size_type end = s.find('\n', begin); if (end == std::string::npos) { - multiLineStringEscape(str_out, s.substr(begin, s.size() - begin)); + multiLineStringEscape(strOut, s.substr(begin, s.size() - begin)); break; } - multiLineStringEscape(str_out, s.substr(begin, end - begin)); - str_out << Out::sep; + multiLineStringEscape(strOut, s.substr(begin, end - begin)); + strOut << Out::sep; begin = end + 1; } } -void printValue(Context & ctx, Out & out, std::variant maybe_value, const std::string & path) +void printValue(Context & ctx, Out & out, std::variant maybeValue, const std::string & path) { try { - if (auto ex = std::get_if(&maybe_value)) { + if (auto ex = std::get_if(&maybeValue)) { std::rethrow_exception(*ex); } - Value v = evaluateValue(ctx, std::get(maybe_value)); + Value v = evaluateValue(ctx, std::get(maybeValue)); if (ctx.state.isDerivation(v)) { describeDerivation(ctx, out, v); } else if (v.isList()) { @@ -384,14 +383,14 @@ void printConfigValue(Context & ctx, Out & out, const std::string & path, std::v void printAll(Context & ctx, Out & out) { mapOptions( - [&ctx, &out](const std::string & option_path) { + [&ctx, &out](const std::string & optionPath) { mapConfigValuesInOption( - [&ctx, &out](const std::string & config_path, std::variant v) { - printConfigValue(ctx, out, config_path, v); + [&ctx, &out](const std::string & configPath, std::variant v) { + printConfigValue(ctx, out, configPath, v); }, - option_path, ctx); + optionPath, ctx); }, - ctx, ctx.options_root); + ctx, ctx.optionsRoot); } void printAttr(Context & ctx, Out & out, const std::string & path, Value & root) @@ -406,7 +405,7 @@ void printAttr(Context & ctx, Out & out, const std::string & path, Value & root) void printOption(Context & ctx, Out & out, const std::string & path, Value & option) { out << "Value:\n"; - printAttr(ctx, out, path, ctx.config_root); + printAttr(ctx, out, path, ctx.configRoot); out << "\n\nDefault:\n"; printAttr(ctx, out, "default", option); @@ -439,26 +438,26 @@ void printListing(Out & out, Value & v) } } -bool optionTypeIs(Context & ctx, Value & v, const std::string & sought_type) +bool optionTypeIs(Context & ctx, Value & v, const std::string & soughtType) { try { - const auto & type_lookup = v.attrs->find(ctx.state.sType); - if (type_lookup == v.attrs->end()) { + const auto & typeLookup = v.attrs->find(ctx.state.sType); + if (typeLookup == v.attrs->end()) { return false; } - Value type = evaluateValue(ctx, *type_lookup->value); + Value type = evaluateValue(ctx, *typeLookup->value); if (type.type != tAttrs) { return false; } - const auto & name_lookup = type.attrs->find(ctx.state.sName); - if (name_lookup == type.attrs->end()) { + const auto & nameLookup = type.attrs->find(ctx.state.sName); + if (nameLookup == type.attrs->end()) { return false; } - Value name = evaluateValue(ctx, *name_lookup->value); + Value name = evaluateValue(ctx, *nameLookup->value); if (name.type != tString) { return false; } - return name.string.s == sought_type; + return name.string.s == soughtType; } catch (Error &) { return false; } @@ -484,11 +483,11 @@ Value getSubOptions(Context & ctx, Value & option) Value findAlongOptionPath(Context & ctx, const std::string & path) { Strings tokens = parseAttrPath(path); - Value v = ctx.options_root; + Value v = ctx.optionsRoot; for (auto i = tokens.begin(); i != tokens.end(); i++) { const auto & attr = *i; try { - bool last_attribute = std::next(i) == tokens.end(); + bool lastAttribute = std::next(i) == tokens.end(); v = evaluateValue(ctx, v); if (attr.empty()) { throw OptionPathError("empty attribute name"); @@ -496,7 +495,7 @@ Value findAlongOptionPath(Context & ctx, const std::string & path) if (isOption(ctx, v) && optionTypeIs(ctx, v, "submodule")) { v = getSubOptions(ctx, v); } - if (isOption(ctx, v) && optionTypeIs(ctx, v, "loaOf") && !last_attribute) { + if (isOption(ctx, v) && optionTypeIs(ctx, v, "loaOf") && !lastAttribute) { v = getSubOptions(ctx, v); // Note that we've consumed attr, but didn't actually use it. This is the path component that's looked // up in the list or attribute set that doesn't name an option -- the "root" in "users.users.root.name". @@ -538,8 +537,8 @@ int main(int argc, char ** argv) { bool all = false; std::string path = "."; - std::string options_expr = "(import {}).options"; - std::string config_expr = "(import {}).config"; + std::string optionsExpr = "(import {}).options"; + std::string configExpr = "(import {}).config"; std::vector args; struct MyArgs : nix::LegacyArgs, nix::MixEvalArgs @@ -557,9 +556,9 @@ int main(int argc, char ** argv) } else if (*arg == "--path") { path = nix::getArg(*arg, arg, end); } else if (*arg == "--options_expr") { - options_expr = nix::getArg(*arg, arg, end); + optionsExpr = nix::getArg(*arg, arg, end); } else if (*arg == "--config_expr") { - config_expr = nix::getArg(*arg, arg, end); + configExpr = nix::getArg(*arg, arg, end); } else if (!arg->empty() && arg->at(0) == '-') { return false; } else { @@ -576,10 +575,10 @@ int main(int argc, char ** argv) auto store = nix::openStore(); auto state = std::make_unique(myArgs.searchPath, store); - Value options_root = parseAndEval(*state, options_expr, path); - Value config_root = parseAndEval(*state, config_expr, path); + Value optionsRoot = parseAndEval(*state, optionsExpr, path); + Value configRoot = parseAndEval(*state, configExpr, path); - Context ctx{*state, *myArgs.getAutoArgs(*state), options_root, config_root}; + Context ctx{*state, *myArgs.getAutoArgs(*state), optionsRoot, configRoot}; Out out(std::cout); if (all) { From 56462408700a39bf49d130a862570ebf48b8e17c Mon Sep 17 00:00:00 2001 From: Chuck Date: Mon, 16 Sep 2019 10:01:40 -0700 Subject: [PATCH 135/377] Only print example when there is one --- .../installer/tools/nixos-option/nixos-option.cc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index 58d66bad1c6..3261b263c2f 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -402,6 +402,15 @@ void printAttr(Context & ctx, Out & out, const std::string & path, Value & root) } } +bool has_example(Context & ctx, Value & option) { + try { + findAlongAttrPath(ctx.state, "example", ctx.autoArgs, option); + return true; + } catch (Error &) { + return false; + } +} + void printOption(Context & ctx, Out & out, const std::string & path, Value & option) { out << "Value:\n"; @@ -413,8 +422,10 @@ void printOption(Context & ctx, Out & out, const std::string & path, Value & opt out << "\n\nType:\n"; printAttr(ctx, out, "type.description", option); - out << "\n\nExample:\n"; - printAttr(ctx, out, "example", option); + if (has_example(ctx, option)) { + out << "\n\nExample:\n"; + printAttr(ctx, out, "example", option); + } out << "\n\nDescription:\n"; printAttr(ctx, out, "description", option); From 57a5752300c3157fe0c2ddea06f694bc78e9ba91 Mon Sep 17 00:00:00 2001 From: Chuck Date: Mon, 16 Sep 2019 10:35:51 -0700 Subject: [PATCH 136/377] Add maintainer --- maintainers/maintainer-list.nix | 6 ++++++ nixos/modules/installer/tools/nixos-option/default.nix | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 1f2cdda41d1..e73e99b47b4 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -1194,6 +1194,12 @@ githubId = 30435868; name = "Okina Matara"; }; + chkno = { + email = "chuck@intelligence.org"; + github = "chkno"; + githubId = 1118859; + name = "Scott Worley"; + }; choochootrain = { email = "hurshal@imap.cc"; github = "choochootrain"; diff --git a/nixos/modules/installer/tools/nixos-option/default.nix b/nixos/modules/installer/tools/nixos-option/default.nix index 2c2674ad28d..753fd92c7bb 100644 --- a/nixos/modules/installer/tools/nixos-option/default.nix +++ b/nixos/modules/installer/tools/nixos-option/default.nix @@ -1,4 +1,4 @@ -{stdenv, boost, cmake, pkgconfig, nix, ... }: +{lib, stdenv, boost, cmake, pkgconfig, nix, ... }: stdenv.mkDerivation rec { name = "nixos-option"; src = ./.; @@ -6,5 +6,6 @@ stdenv.mkDerivation rec { buildInputs = [ boost nix ]; meta = { license = stdenv.lib.licenses.lgpl2Plus; + maintainers = with lib.maintainers; [ chkno ]; }; } From a3e31df4d779943cd462a36d63bb88cc4c3c66ed Mon Sep 17 00:00:00 2001 From: Chuck Date: Tue, 17 Sep 2019 17:36:26 -0700 Subject: [PATCH 137/377] (clang-format for has_example) --- .../installer/tools/nixos-option/nixos-option.cc | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index 3261b263c2f..778b7e32617 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -402,13 +402,14 @@ void printAttr(Context & ctx, Out & out, const std::string & path, Value & root) } } -bool has_example(Context & ctx, Value & option) { - try { - findAlongAttrPath(ctx.state, "example", ctx.autoArgs, option); - return true; - } catch (Error &) { - return false; - } +bool has_example(Context & ctx, Value & option) +{ + try { + findAlongAttrPath(ctx.state, "example", ctx.autoArgs, option); + return true; + } catch (Error &) { + return false; + } } void printOption(Context & ctx, Out & out, const std::string & path, Value & option) From 445145d5b9a33a9ded5a6928c52ddaeb862a8a8e Mon Sep 17 00:00:00 2001 From: Chuck Date: Tue, 17 Sep 2019 17:36:48 -0700 Subject: [PATCH 138/377] Support aggregate types attrsOf and listOf --- nixos/modules/installer/tools/nixos-option/nixos-option.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index 778b7e32617..c0c9ec0e5b4 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -475,6 +475,11 @@ bool optionTypeIs(Context & ctx, Value & v, const std::string & soughtType) } } +bool isAggregateOptionType(Context & ctx, Value & v) +{ + return optionTypeIs(ctx, v, "attrsOf") || optionTypeIs(ctx, v, "listOf") || optionTypeIs(ctx, v, "loaOf"); +} + MakeError(OptionPathError, EvalError); Value getSubOptions(Context & ctx, Value & option) @@ -507,7 +512,7 @@ Value findAlongOptionPath(Context & ctx, const std::string & path) if (isOption(ctx, v) && optionTypeIs(ctx, v, "submodule")) { v = getSubOptions(ctx, v); } - if (isOption(ctx, v) && optionTypeIs(ctx, v, "loaOf") && !lastAttribute) { + if (isOption(ctx, v) && isAggregateOptionType(ctx, v) && !lastAttribute) { v = getSubOptions(ctx, v); // Note that we've consumed attr, but didn't actually use it. This is the path component that's looked // up in the list or attribute set that doesn't name an option -- the "root" in "users.users.root.name". From 1e7985942b4f156d20ce2ddac9fc133a9091ed5b Mon Sep 17 00:00:00 2001 From: Chuck Date: Fri, 20 Sep 2019 13:37:12 -0700 Subject: [PATCH 139/377] snake_case -> camelCase --- nixos/modules/installer/tools/nixos-option/nixos-option.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/installer/tools/nixos-option/nixos-option.cc b/nixos/modules/installer/tools/nixos-option/nixos-option.cc index c0c9ec0e5b4..9b92dc829cd 100644 --- a/nixos/modules/installer/tools/nixos-option/nixos-option.cc +++ b/nixos/modules/installer/tools/nixos-option/nixos-option.cc @@ -402,7 +402,7 @@ void printAttr(Context & ctx, Out & out, const std::string & path, Value & root) } } -bool has_example(Context & ctx, Value & option) +bool hasExample(Context & ctx, Value & option) { try { findAlongAttrPath(ctx.state, "example", ctx.autoArgs, option); @@ -423,7 +423,7 @@ void printOption(Context & ctx, Out & out, const std::string & path, Value & opt out << "\n\nType:\n"; printAttr(ctx, out, "type.description", option); - if (has_example(ctx, option)) { + if (hasExample(ctx, option)) { out << "\n\nExample:\n"; printAttr(ctx, out, "example", option); } From 348bafc1dfbdf7aed48d08a55231880dffe149ed Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Mon, 4 Nov 2019 08:46:05 -0500 Subject: [PATCH 140/377] vivaldi: 2.9.1705.31-1 -> 2.9.1705.38-1 --- pkgs/applications/networking/browsers/vivaldi/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/browsers/vivaldi/default.nix b/pkgs/applications/networking/browsers/vivaldi/default.nix index c8d8d411f2d..f3228b11eb9 100644 --- a/pkgs/applications/networking/browsers/vivaldi/default.nix +++ b/pkgs/applications/networking/browsers/vivaldi/default.nix @@ -17,11 +17,11 @@ let vivaldiName = if isSnapshot then "vivaldi-snapshot" else "vivaldi"; in stdenv.mkDerivation rec { pname = "vivaldi"; - version = "2.9.1705.31-1"; + version = "2.9.1705.38-1"; src = fetchurl { url = "https://downloads.vivaldi.com/${branch}/vivaldi-${branch}_${version}_amd64.deb"; - sha256 = "113bycfygyx09bc5bgsmdniffp3282004yrl7gr16dssxrw52al2"; + sha256 = "0jj2kfdl4788l132ncz3jf1pnjig7dc9gaxjmgv51n1ahmmx8shi"; }; unpackPhase = '' From 754e315fb59252a2bb2db71ad892c8d8b1465a01 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Wed, 9 Oct 2019 01:54:56 +0200 Subject: [PATCH 141/377] release-notes 20.03: added notice for rewritten nixos-option --- nixos/doc/manual/release-notes/rl-2003.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nixos/doc/manual/release-notes/rl-2003.xml b/nixos/doc/manual/release-notes/rl-2003.xml index f001a18b1c1..72766f16eb9 100644 --- a/nixos/doc/manual/release-notes/rl-2003.xml +++ b/nixos/doc/manual/release-notes/rl-2003.xml @@ -49,6 +49,12 @@ zfs as soon as any zfs mountpoint is configured in fileSystems. + + + nixos-option has been rewritten in C++, speeding it up, improving correctness, + and adding a option which prints all options and their values. + + From ed2484f48a5c589564f6d4fc1068e0a55a0c03d2 Mon Sep 17 00:00:00 2001 From: Andrei Lapshin Date: Mon, 4 Nov 2019 13:06:18 +0300 Subject: [PATCH 142/377] hunspell-dicts: add Russian dictionary --- pkgs/development/libraries/hunspell/dictionaries.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkgs/development/libraries/hunspell/dictionaries.nix b/pkgs/development/libraries/hunspell/dictionaries.nix index 3e1799d82cd..fb64aa81d1a 100644 --- a/pkgs/development/libraries/hunspell/dictionaries.nix +++ b/pkgs/development/libraries/hunspell/dictionaries.nix @@ -722,4 +722,14 @@ in rec { platforms = platforms.all; }; }; + + /* RUSSIAN */ + + ru_RU = ru-ru; + ru-ru = mkDictFromLibreOffice { + shortName = "ru-ru"; + dictFileName = "ru_RU"; + shortDescription = "Russian (Russian)"; + license = with stdenv.lib.licenses; [ mpl20 lgpl3 ]; + }; } From c97ca709c1d64927f1dcfbb6cc732e9ddd154039 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Mon, 4 Nov 2019 09:38:27 -0500 Subject: [PATCH 143/377] linux: 5.4-rc5 -> 5.4-rc6 --- pkgs/os-specific/linux/kernel/linux-testing.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-testing.nix b/pkgs/os-specific/linux/kernel/linux-testing.nix index 9c91c91eeb4..8096684b137 100644 --- a/pkgs/os-specific/linux/kernel/linux-testing.nix +++ b/pkgs/os-specific/linux/kernel/linux-testing.nix @@ -3,7 +3,7 @@ with stdenv.lib; buildLinux (args // rec { - version = "5.4-rc5"; + version = "5.4-rc6"; extraMeta.branch = "5.4"; # modDirVersion needs to be x.y.z, will always add .0 @@ -11,7 +11,7 @@ buildLinux (args // rec { src = fetchurl { url = "https://git.kernel.org/torvalds/t/linux-${version}.tar.gz"; - sha256 = "0047f1vq93cq9qa0550dnilci0qxy4ygc6brhcr6xbwqakglwr18"; + sha256 = "0ypazqr6z0n8fwaawxca0i56bwd4g4q2bw5qwayf0f4402m34xdh"; }; # Should the testing kernels ever be built on Hydra? From 9b773fd98a02e93cf02e68727096a01da7cc6735 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Mon, 4 Nov 2019 15:59:33 +0100 Subject: [PATCH 144/377] inkscape: fix darwin build Cairo is also a dependency now. /tmp/nix-build-inkscape-0.92.4.drv-0/inkscape-0.92.4/src/display/drawing-context.h:20:10: fatal error: 'cairo.h' file not found #include ^~~~~~~~~ 1 error generated. --- pkgs/applications/graphics/inkscape/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/graphics/inkscape/default.nix b/pkgs/applications/graphics/inkscape/default.nix index c945412bc2c..e3fa897aec6 100644 --- a/pkgs/applications/graphics/inkscape/default.nix +++ b/pkgs/applications/graphics/inkscape/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, pkgconfig, perlPackages, libXft , libpng, zlib, popt, boehmgc, libxml2, libxslt, glib, gtkmm2 , glibmm, libsigcxx, lcms, boost, gettext, makeWrapper -, gsl, gtkspell2, python2, poppler, imagemagick, libwpg, librevenge +, gsl, gtkspell2, cairo, python2, poppler, imagemagick, libwpg, librevenge , libvisio, libcdr, libexif, potrace, cmake , librsvg, wrapGAppsHook }: @@ -52,7 +52,8 @@ stdenv.mkDerivation rec { librsvg # for loading icons python2Env perlPackages.perl - ] ++ stdenv.lib.optional (!stdenv.isDarwin) gtkspell2; + ] ++ stdenv.lib.optional (!stdenv.isDarwin) gtkspell2 + ++ stdenv.lib.optional stdenv.isDarwin cairo; enableParallelBuilding = true; From 7622f30ed2115702e046b2fbd452a5d32af5c5fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Lafuente?= Date: Thu, 31 Oct 2019 17:05:06 +0100 Subject: [PATCH 145/377] pulumi: install providers and add update script Without providers (also called plugins) pulumi doesn't do much. The way they work, if you want to use a provider, pulimi will look for it in your PATH, and if not found it will download it. Providers are just executables, but third party binaries usually don't work on nixos unless they are patched with the patchelf utility. Because of that, I'm installing some patched providers with the main pulumi binary. I'm also adding a small script helper to generate the hashes for all the binaries. --- pkgs/tools/admin/pulumi/data.nix | 51 ++++++++++++++++++++++++++ pkgs/tools/admin/pulumi/default.nix | 27 +++++--------- pkgs/tools/admin/pulumi/update.sh | 55 +++++++++++++++++++++++++++++ 3 files changed, 115 insertions(+), 18 deletions(-) create mode 100644 pkgs/tools/admin/pulumi/data.nix create mode 100644 pkgs/tools/admin/pulumi/update.sh diff --git a/pkgs/tools/admin/pulumi/data.nix b/pkgs/tools/admin/pulumi/data.nix new file mode 100644 index 00000000000..1edc80c24e2 --- /dev/null +++ b/pkgs/tools/admin/pulumi/data.nix @@ -0,0 +1,51 @@ +# DO NOT EDIT! This file is generated automatically by update.sh +{ }: +{ + version = "1.4.0"; + pulumiPkgs = { + x86_64-linux = [ + { + url = "https://get.pulumi.com/releases/sdk/pulumi-v1.4.0-linux-x64.tar.gz"; + sha256 = "00ywy2ba4xha6gwd42i3fdrk1myivkd1r6ijdr2vkianmg524k6f"; + } + { + url = "https://api.pulumi.com/releases/plugins/pulumi-resource-random-v0.2.0-linux-amd64.tar.gz"; + sha256 = "1hj4gysjipd091f106a7xz02g9cail5d11rn6j08m0xphg9cf3fn"; + } + { + url = "https://api.pulumi.com/releases/plugins/pulumi-resource-gcp-v1.4.1-linux-amd64.tar.gz"; + sha256 = "0r6xpsb2riqmxwxw28lbi3xd7w4ds510gw99j1rr57h5b9bq19jj"; + } + { + url = "https://api.pulumi.com/releases/plugins/pulumi-resource-kubernetes-v1.2.3-linux-amd64.tar.gz"; + sha256 = "0m7fajy3cy1agsz787ak548khwj8rwahs1ibaswqfyyw092iyzb9"; + } + { + url = "https://api.pulumi.com/releases/plugins/pulumi-resource-aws-v1.7.0-linux-amd64.tar.gz"; + sha256 = "1qw90l7h8yn06bz2l2995nbrc3svs223dm3ys1807amj4n2jyfwb"; + } + ]; + x86_64-darwin = [ + { + url = "https://get.pulumi.com/releases/sdk/pulumi-v1.4.0-darwin-x64.tar.gz"; + sha256 = "02vqw9gn17dy3rfh0j00k9f827l42g3nl3rhlcbc8jbgx3n9c9qy"; + } + { + url = "https://api.pulumi.com/releases/plugins/pulumi-resource-random-v0.2.0-darwin-amd64.tar.gz"; + sha256 = "077j9fp8ix00rcqrq8qxk3kvz6gz6sknzb2iv3qjvkh6yh292mz3"; + } + { + url = "https://api.pulumi.com/releases/plugins/pulumi-resource-gcp-v1.4.1-darwin-amd64.tar.gz"; + sha256 = "1i2vf3bxwf8awvw183hq9bbnmznda1jpv1zqghgz2ybx4s0915nx"; + } + { + url = "https://api.pulumi.com/releases/plugins/pulumi-resource-kubernetes-v1.2.3-darwin-amd64.tar.gz"; + sha256 = "123czx1c31r5r91k2jhdgmnffypnl8w1a6h9mr2rdhwgbx8hzq40"; + } + { + url = "https://api.pulumi.com/releases/plugins/pulumi-resource-aws-v1.7.0-darwin-amd64.tar.gz"; + sha256 = "0cl0vakppxi0v8ym8b4fzhzb10nl84wd0vfik8gpfwsg7zwdzhlp"; + } + ]; + }; +} diff --git a/pkgs/tools/admin/pulumi/default.nix b/pkgs/tools/admin/pulumi/default.nix index bba5c7e09cf..977c1991fab 100644 --- a/pkgs/tools/admin/pulumi/default.nix +++ b/pkgs/tools/admin/pulumi/default.nix @@ -3,26 +3,16 @@ with lib; let - - version = "1.4.0"; - - # switch the dropdown to “manual” on https://pulumi.io/quickstart/install.html # TODO: update script - pulumiArchPackage = { - x86_64-linux = { - url = "https://get.pulumi.com/releases/sdk/pulumi-v${version}-linux-x64.tar.gz"; - sha256 = "00ywy2ba4xha6gwd42i3fdrk1myivkd1r6ijdr2vkianmg524k6f"; - }; - x86_64-darwin = { - url = "https://get.pulumi.com/releases/sdk/pulumi-v${version}-darwin-x64.tar.gz"; - sha256 = "02vqw9gn17dy3rfh0j00k9f827l42g3nl3rhlcbc8jbgx3n9c9qy"; - }; - }; - + data = import ./data.nix {}; in stdenv.mkDerivation { - inherit version; pname = "pulumi"; + version = data.version; - src = fetchurl pulumiArchPackage.${stdenv.hostPlatform.system}; + postUnpack = '' + mv pulumi-* pulumi + ''; + + srcs = map (x: fetchurl x) data.pulumiPkgs.${stdenv.hostPlatform.system}; installPhase = '' mkdir -p $out/bin @@ -35,9 +25,10 @@ in stdenv.mkDerivation { homepage = https://pulumi.io/; description = "Pulumi is a cloud development platform that makes creating cloud programs easy and productive"; license = with licenses; [ asl20 ]; - platforms = builtins.attrNames pulumiArchPackage; + platforms = builtins.attrNames data.pulumiPkgs; maintainers = with maintainers; [ peterromfeldhk + jlesquembre ]; }; } diff --git a/pkgs/tools/admin/pulumi/update.sh b/pkgs/tools/admin/pulumi/update.sh new file mode 100644 index 00000000000..7cb500ee9d3 --- /dev/null +++ b/pkgs/tools/admin/pulumi/update.sh @@ -0,0 +1,55 @@ +#!/usr/bin/env bash + +VERSION="1.4.0" + +declare -A plugins +plugins=( + ["aws"]="1.7.0" + ["gcp"]="1.4.1" + ["kubernetes"]="1.2.3" + ["random"]="0.2.0" +) + +function genMainSrc() { + local url="https://get.pulumi.com/releases/sdk/pulumi-v${VERSION}-$1-x64.tar.gz" + local sha256 + sha256=$(nix-prefetch-url "$url") + echo " {" + echo " url = \"${url}\";" + echo " sha256 = \"$sha256\";" + echo " }" +} + +function genSrcs() { + for plug in "${!plugins[@]}"; do + local version=${plugins[$plug]} + # url as defined here + # https://github.com/pulumi/pulumi/blob/06d4dde8898b2a0de2c3c7ff8e45f97495b89d82/pkg/workspace/plugins.go#L197 + local url="https://api.pulumi.com/releases/plugins/pulumi-resource-${plug}-v${version}-$1-amd64.tar.gz" + local sha256 + sha256=$(nix-prefetch-url "$url") + echo " {" + echo " url = \"${url}\";" + echo " sha256 = \"$sha256\";" + echo " }" + done +} + +cat < Date: Tue, 5 Nov 2019 00:23:34 +0900 Subject: [PATCH 146/377] rictydiminished-with-firacode: fonttools requires python3 (#72762) * rictydiminished-with-firacode: fonttools requires python3 * rictydiminished-with-firacode: python3 is sufficient, purge python3Full --- pkgs/data/fonts/rictydiminished-with-firacode/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/data/fonts/rictydiminished-with-firacode/default.nix b/pkgs/data/fonts/rictydiminished-with-firacode/default.nix index 2e83d5b12d4..8b6c3749962 100644 --- a/pkgs/data/fonts/rictydiminished-with-firacode/default.nix +++ b/pkgs/data/fonts/rictydiminished-with-firacode/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchgit, fontforge, pythonFull }: +{ stdenv, fetchgit, fontforge, python3 }: stdenv.mkDerivation rec { pname = "rictydiminished-with-firacode"; @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ fontforge - (pythonFull.withPackages (ps: [ + (python3.withPackages (ps: [ ps.jinja2 ps.py3to2 ps.fonttools From de1cbcc69234d9301eb60bf8b074239f703f4d0e Mon Sep 17 00:00:00 2001 From: Max Veytsman Date: Sun, 3 Nov 2019 22:20:49 -0500 Subject: [PATCH 147/377] nixos/nat: fix typo in comment This iptables directive is marking packets coming from the internal interfaces so they can later be NATed by the rule in https://github.com/NixOS/nixpkgs/blob/22378e699682778075bcfb12cb6bf710261586f5/nixos/modules/services/networking/nat.nix#L38-L42 . Fix the comment accordingly. --- nixos/modules/services/networking/nat.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/nat.nix b/nixos/modules/services/networking/nat.nix index 89d8590093d..5681bda51cb 100644 --- a/nixos/modules/services/networking/nat.nix +++ b/nixos/modules/services/networking/nat.nix @@ -29,7 +29,7 @@ let iptables -w -t nat -N nixos-nat-post # We can't match on incoming interface in POSTROUTING, so - # mark packets coming from the external interfaces. + # mark packets coming from the internal interfaces. ${concatMapStrings (iface: '' iptables -w -t nat -A nixos-nat-pre \ -i '${iface}' -j MARK --set-mark 1 From a38273aaa58e67ec9c315b8995f9db78fb5f682d Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Mon, 4 Nov 2019 08:09:25 -0800 Subject: [PATCH 148/377] asunder: 2.9.4 -> 2.9.5 (#72459) * asunder: 2.9.4 -> 2.9.5 * asunder: cleanup build inputs Move intltool and makeWrapper to nativeBuildInputs --- pkgs/applications/audio/asunder/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/audio/asunder/default.nix b/pkgs/applications/audio/asunder/default.nix index e252635e953..5a0b6797a24 100644 --- a/pkgs/applications/audio/asunder/default.nix +++ b/pkgs/applications/audio/asunder/default.nix @@ -12,15 +12,15 @@ with stdenv.lib; stdenv.mkDerivation rec { - version = "2.9.4"; + version = "2.9.5"; pname = "asunder"; src = fetchurl { url = "http://littlesvr.ca/asunder/releases/${pname}-${version}.tar.bz2"; - sha256 = "1bwc9v9l1f3kqjd7wis6g2sv6ibc618ybh0gsb8mkkfhadp68w30"; + sha256 = "069x6az2r3wlb2hd07iz0hxpxwknw7s9h7pyhnkmzv1pw9ci3kk4"; }; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ gtk2 libcddb intltool makeWrapper ]; + nativeBuildInputs = [ intltool makeWrapper pkgconfig ]; + buildInputs = [ gtk2 libcddb ]; runtimeDeps = optional mp3Support lame ++ From 5c3715379d7cb5a49b2c2c9d503f914ddcecfe25 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Mon, 4 Nov 2019 11:21:20 -0500 Subject: [PATCH 149/377] nixos/httpd: allow user to specify a minimal list of apache modules --- .../web-servers/apache-httpd/default.nix | 101 ++++++++++-------- 1 file changed, 57 insertions(+), 44 deletions(-) diff --git a/nixos/modules/services/web-servers/apache-httpd/default.nix b/nixos/modules/services/web-servers/apache-httpd/default.nix index 8eacb1f9a34..3c5918baa53 100644 --- a/nixos/modules/services/web-servers/apache-httpd/default.nix +++ b/nixos/modules/services/web-servers/apache-httpd/default.nix @@ -29,41 +29,26 @@ let listenToString = l: "${l.ip}:${toString l.port}"; - extraModules = attrByPath ["extraModules"] [] mainCfg; - extraForeignModules = filter isAttrs extraModules; - extraApacheModules = filter isString extraModules; - allHosts = [mainCfg] ++ mainCfg.virtualHosts; enableSSL = any (vhost: vhost.enableSSL) allHosts; - - # Names of modules from ${httpd}/modules that we want to load. - apacheModules = - [ # HTTP authentication mechanisms: basic and digest. - "auth_basic" "auth_digest" - - # Authentication: is the user who he claims to be? - "authn_file" "authn_dbm" "authn_anon" "authn_core" - - # Authorization: is the user allowed access? - "authz_user" "authz_groupfile" "authz_host" "authz_core" - - # Other modules. - "ext_filter" "include" "log_config" "env" "mime_magic" - "cern_meta" "expires" "headers" "usertrack" /* "unique_id" */ "setenvif" - "mime" "dav" "status" "autoindex" "asis" "info" "dav_fs" - "vhost_alias" "negotiation" "dir" "imagemap" "actions" "speling" - "userdir" "alias" "rewrite" "proxy" "proxy_http" - "unixd" "cache" "cache_disk" "slotmem_shm" "socache_shmcb" + # NOTE: generally speaking order of modules is very important + modules = + [ # required apache modules our httpd service cannot run without + "authn_core" "authz_core" + "log_config" + "mime" "autoindex" "negotiation" "dir" + "alias" "rewrite" + "unixd" "slotmem_shm" "socache_shmcb" "mpm_${mainCfg.multiProcessingModule}" - - # For compatibility with old configurations, the new module mod_access_compat is provided. - "access_compat" ] ++ (if mainCfg.multiProcessingModule == "prefork" then [ "cgi" ] else [ "cgid" ]) ++ optional enableSSL "ssl" - ++ extraApacheModules; + ++ optional mainCfg.enableMellon { name = "auth_mellon"; path = "${pkgs.apacheHttpdPackages.mod_auth_mellon}/modules/mod_auth_mellon.so"; } + ++ optional mainCfg.enablePHP { name = "php${phpMajorVersion}"; path = "${php}/modules/libphp${phpMajorVersion}.so"; } + ++ optional mainCfg.enablePerl { name = "perl"; path = "${mod_perl}/modules/mod_perl.so"; } + ++ mainCfg.extraModules; allDenied = "Require all denied"; @@ -87,15 +72,17 @@ let browserHacks = '' - BrowserMatch "Mozilla/2" nokeepalive - BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 - BrowserMatch "RealPlayer 4\.0" force-response-1.0 - BrowserMatch "Java/1\.0" force-response-1.0 - BrowserMatch "JDK/1\.0" force-response-1.0 - BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully - BrowserMatch "^WebDrive" redirect-carefully - BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully - BrowserMatch "^gnome-vfs" redirect-carefully + + BrowserMatch "Mozilla/2" nokeepalive + BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 + BrowserMatch "RealPlayer 4\.0" force-response-1.0 + BrowserMatch "Java/1\.0" force-response-1.0 + BrowserMatch "JDK/1\.0" force-response-1.0 + BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully + BrowserMatch "^WebDrive" redirect-carefully + BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully + BrowserMatch "^gnome-vfs" redirect-carefully + ''; @@ -266,13 +253,12 @@ let Group ${mainCfg.group} ${let - load = {name, path}: "LoadModule ${name}_module ${path}\n"; - allModules = map (name: {inherit name; path = "${httpd}/modules/mod_${name}.so";}) apacheModules - ++ optional mainCfg.enableMellon { name = "auth_mellon"; path = "${pkgs.apacheHttpdPackages.mod_auth_mellon}/modules/mod_auth_mellon.so"; } - ++ optional mainCfg.enablePHP { name = "php${phpMajorVersion}"; path = "${php}/modules/libphp${phpMajorVersion}.so"; } - ++ optional mainCfg.enablePerl { name = "perl"; path = "${mod_perl}/modules/mod_perl.so"; } - ++ extraForeignModules; - in concatMapStrings load (unique allModules) + mkModule = module: + if isString module then { name = module; path = "${httpd}/modules/mod_${module}.so"; } + else if isAttrs module then { inherit (module) name path; } + else throw "Expecting either a string or attribute set including a name and path."; + in + concatMapStringsSep "\n" (module: "LoadModule ${module.name}_module ${module.path}") (unique (map mkModule modules)) } AddHandler type-map var @@ -387,7 +373,12 @@ in extraModules = mkOption { type = types.listOf types.unspecified; default = []; - example = literalExample ''[ "proxy_connect" { name = "php5"; path = "''${pkgs.php}/modules/libphp5.so"; } ]''; + example = literalExample '' + [ + "proxy_connect" + { name = "jk"; path = "''${pkgs.tomcat_connectors}/modules/mod_jk.so"; } + ] + ''; description = '' Additional Apache modules to be used. These can be specified as a string in the case of modules distributed @@ -588,6 +579,28 @@ in date.timezone = "${config.time.timeZone}" ''; + services.httpd.extraModules = mkBefore [ + # HTTP authentication mechanisms: basic and digest. + "auth_basic" "auth_digest" + + # Authentication: is the user who he claims to be? + "authn_file" "authn_dbm" "authn_anon" + + # Authorization: is the user allowed access? + "authz_user" "authz_groupfile" "authz_host" + + # Other modules. + "ext_filter" "include" "env" "mime_magic" + "cern_meta" "expires" "headers" "usertrack" "setenvif" + "dav" "status" "asis" "info" "dav_fs" + "vhost_alias" "imagemap" "actions" "speling" + "proxy" "proxy_http" + "cache" "cache_disk" + + # For compatibility with old configurations, the new module mod_access_compat is provided. + "access_compat" + ]; + systemd.services.httpd = { description = "Apache HTTPD"; From 1c336ed6fcb9cbe6559dcf5cfdd450a5a8832336 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 2 Nov 2019 10:59:32 -0700 Subject: [PATCH 150/377] ocamlPackages.mlgmpidl: 1.2.10 -> 1.2.11 --- pkgs/development/ocaml-modules/mlgmpidl/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/mlgmpidl/default.nix b/pkgs/development/ocaml-modules/mlgmpidl/default.nix index d25a5f4ce06..2733ad2b0fb 100644 --- a/pkgs/development/ocaml-modules/mlgmpidl/default.nix +++ b/pkgs/development/ocaml-modules/mlgmpidl/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation rec { name = "ocaml${ocaml.version}-mlgmpidl-${version}"; - version = "1.2.10"; + version = "1.2.11"; src = fetchFromGitHub { owner = "nberth"; repo = "mlgmpidl"; rev = version; - sha256 = "181vpqx8zdairq645b8qpkzj4fnkb508iavk7sqzskag1s8613qn"; + sha256 = "1rycl84sdvgb5avdsya9iz8brx92y2zcb6cn4w1j0164j6q2ril9"; }; buildInputs = [ perl gmp mpfr ocaml findlib camlidl ]; From 5524f4df0daa7e71cb94fd554af67b736361dca2 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 2 Nov 2019 16:02:07 -0700 Subject: [PATCH 151/377] gitAndTools.pre-commit: 1.18.3 -> 1.20.0 --- pkgs/development/python-modules/pre-commit/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pre-commit/default.nix b/pkgs/development/python-modules/pre-commit/default.nix index 18b548faf21..27d56bab06e 100644 --- a/pkgs/development/python-modules/pre-commit/default.nix +++ b/pkgs/development/python-modules/pre-commit/default.nix @@ -14,12 +14,12 @@ buildPythonApplication rec { pname = "pre-commit"; - version = "1.18.3"; + version = "1.20.0"; src = fetchPypi { inherit version; pname = "pre_commit"; - sha256 = "0gqzx5n5kps7z45rgydciz0sq1m09b4g49vclhvybi57pn3hag0x"; + sha256 = "0vmv3hrivm0sm81cn59n2pmw8h323sg4sgncl910djby2a3jc5cz"; }; propagatedBuildInputs = [ From d751e085221cfc019a9fe0409abd0ec24e426a1b Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 2 Nov 2019 14:28:04 -0700 Subject: [PATCH 152/377] python38Packages.license-expression: 0.999 -> 1.0 --- .../development/python-modules/license-expression/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/license-expression/default.nix b/pkgs/development/python-modules/license-expression/default.nix index 2bf204a9a62..177949fbd51 100644 --- a/pkgs/development/python-modules/license-expression/default.nix +++ b/pkgs/development/python-modules/license-expression/default.nix @@ -4,13 +4,13 @@ buildPythonPackage rec { pname = "license-expression"; - version = "0.999"; + version = "1.0"; src = fetchFromGitHub { owner = "nexB"; repo = "license-expression"; rev = "v${version}"; - sha256 = "0q8sha38w7ajg7ar0rmbqrwv0n58l8yzyl96cqwcbvp578fn3ir0"; + sha256 = "15dk3j5sr8iypzqqa8wa12b2a84f6ssbfvam1c1vzz00y2y5v3ic"; }; postPatch = "patchShebangs ./configure"; From b1b776b11c2e4b73e69d4bef7f33fd2bb215c286 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 2 Nov 2019 17:13:03 -0700 Subject: [PATCH 153/377] python38Packages.xdis: 4.0.4 -> 4.1.2 --- pkgs/development/python-modules/xdis/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/xdis/default.nix b/pkgs/development/python-modules/xdis/default.nix index cec21c44657..d120f17780b 100644 --- a/pkgs/development/python-modules/xdis/default.nix +++ b/pkgs/development/python-modules/xdis/default.nix @@ -6,14 +6,14 @@ buildPythonPackage rec { pname = "xdis"; - version = "4.0.4"; + version = "4.1.2"; disabled = isPy27; src = fetchFromGitHub { owner = "rocky"; repo = "python-xdis"; rev = version; - sha256 = "1m54d61ka9wgq0iqlzmsikzxa6qmwvnwsgm2kxb3vw5ic1psv4pv"; + sha256 = "0icqhafsnmcs6628cg3jjgq0d3x835nqmhljcz93yi457hfqd2lp"; }; checkInputs = [ pytest ]; From 7a17d2df56abadf62dc27a2f63190e6a201f93ce Mon Sep 17 00:00:00 2001 From: gnidorah Date: Sat, 26 Oct 2019 03:38:11 +0300 Subject: [PATCH 154/377] video2midi: 0.3.9.5 -> 0.3.9.6 --- pkgs/tools/audio/video2midi/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/audio/video2midi/default.nix b/pkgs/tools/audio/video2midi/default.nix index c664c745f32..43539f1ee29 100644 --- a/pkgs/tools/audio/video2midi/default.nix +++ b/pkgs/tools/audio/video2midi/default.nix @@ -8,7 +8,7 @@ let }); in pythonPackages.buildPythonApplication rec { pname = "video2midi"; - version = "0.3.9.5"; + version = "0.3.9.6"; format = "other"; @@ -16,7 +16,7 @@ in pythonPackages.buildPythonApplication rec { owner = "svsdval"; repo = pname; rev = version; - sha256 = "1jc50zimc64ilc1as3dyh16lsygwqyvi381mw8si8m9j3pw6may4"; + sha256 = "0x9b8hwl325gd6v9i60yh95gbn49nydpwyfqs92mbq8vvvq7x8fk"; }; propagatedBuildInputs = with pythonPackages; [ opencv3_ midiutil pygame pyopengl ]; From 2632156cf592bbdce7d54b6e2de7af7e2c14035b Mon Sep 17 00:00:00 2001 From: gnidorah Date: Sat, 26 Oct 2019 04:21:04 +0300 Subject: [PATCH 155/377] phodav: 2.2 -> 2.3 --- pkgs/tools/networking/phodav/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/networking/phodav/default.nix b/pkgs/tools/networking/phodav/default.nix index 320e7614c7c..0d7b30ae152 100644 --- a/pkgs/tools/networking/phodav/default.nix +++ b/pkgs/tools/networking/phodav/default.nix @@ -1,20 +1,24 @@ { stdenv, fetchurl -, intltool, pkgconfig, glib, libsoup }: +, pkgconfig, libsoup, meson, ninja }: let - version = "2.2"; + version = "2.3"; in stdenv.mkDerivation rec { pname = "phodav"; inherit version; src = fetchurl { url = "http://ftp.gnome.org/pub/GNOME/sources/phodav/${version}/${pname}-${version}.tar.xz"; - sha256 = "1hap0lncbcmivnflh0fbx7y58ry78p9wgj7z03r64ic0kvf0a0q8"; + sha256 = "0ndy5qva6bq7vhk06jq2d4nr5fp98xsdwypg42vjz91h9ii1xxkf"; }; - buildInputs = [ intltool glib libsoup ]; + mesonFlags = [ + "-Davahi=disabled" + "-Dsystemd=disabled" + "-Dgtk_doc=disabled" + ]; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ libsoup pkgconfig meson ninja ]; meta = with stdenv.lib; { description = "WebDav server implementation and library using libsoup"; From f7c032ee008ea0762b46817fb132a1cbe5db4bce Mon Sep 17 00:00:00 2001 From: gnidorah Date: Sat, 26 Oct 2019 11:46:05 +0300 Subject: [PATCH 156/377] pythonPackages.pykde4: fix url Became incorrect after #66585 --- pkgs/development/python-modules/pykde4/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pykde4/default.nix b/pkgs/development/python-modules/pykde4/default.nix index d2c66c8cd2c..5be43a412e5 100644 --- a/pkgs/development/python-modules/pykde4/default.nix +++ b/pkgs/development/python-modules/pykde4/default.nix @@ -19,7 +19,7 @@ in stdenv.mkDerivation rec { pname = "pykde4"; src = fetchurl { - url = "mirror://kde/stable/${version}/src/${pname}-${version}-${version}.tar.xz"; + url = "mirror://kde/stable/${version}/src/${pname}-${version}.tar.xz"; sha256 = "1z40gnkyjlv6ds3cmpzvv99394rhmydr6rxx7qj33m83xnsxgfbz"; }; From 34647cf35b256ea6bb55fc739a3c46ad4c9604ad Mon Sep 17 00:00:00 2001 From: gnidorah Date: Sat, 26 Oct 2019 12:40:13 +0300 Subject: [PATCH 157/377] kmsxx: 2018-10-23 -> 2019-10-28 --- pkgs/development/libraries/kmsxx/default.nix | 14 +++++++------- pkgs/top-level/all-packages.nix | 4 +--- pkgs/top-level/python-packages.nix | 5 +++-- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/pkgs/development/libraries/kmsxx/default.nix b/pkgs/development/libraries/kmsxx/default.nix index 71e88559dee..70058db4c0a 100644 --- a/pkgs/development/libraries/kmsxx/default.nix +++ b/pkgs/development/libraries/kmsxx/default.nix @@ -1,25 +1,25 @@ -{ stdenv, fetchFromGitHub, cmake, pkgconfig, libdrm, python }: +{ stdenv, fetchFromGitHub, cmake, pkgconfig, libdrm +, withPython ? false, python }: stdenv.mkDerivation { pname = "kmsxx"; - version = "2018-10-23"; + version = "2019-10-28"; src = fetchFromGitHub { owner = "tomba"; repo = "kmsxx"; fetchSubmodules = true; - rev = "c0093c91f0fa2fd6a5b9d1b206a6f44dcd55bfb5"; - sha256 = "03rv92r938nxb4k4gwcvxy76jnhxdx6x60b58jws83285hd9rgkf"; + rev = "d29da28c7f2a0212d834136fe64fb8ca96a0a235"; + sha256 = "0r94qjyy3s36s32s1xkzij0g2pfwigmyrshw8ni2xli7mg87g1zm"; }; enableParallelBuilding = true; + cmakeFlags = stdenv.lib.optional (!withPython) "-DKMSXX_ENABLE_PYTHON=OFF"; + nativeBuildInputs = [ cmake pkgconfig ]; buildInputs = [ libdrm python ]; - pythonPath = [ ]; - passthru.python = python; - meta = with stdenv.lib; { description = "C++11 library, utilities and python bindings for Linux kernel mode setting"; homepage = https://github.com/tomba/kmsxx; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ec5759cd98f..cf87c9b994b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15923,9 +15923,7 @@ in kmscube = callPackage ../os-specific/linux/kmscube { }; - kmsxx = callPackage ../development/libraries/kmsxx { - stdenv = gcc6Stdenv; - }; + kmsxx = callPackage ../development/libraries/kmsxx { }; latencytop = callPackage ../os-specific/linux/latencytop { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c4151922d62..1c38b47576a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4322,12 +4322,13 @@ in { kmapper = callPackage ../development/python-modules/kmapper { }; - kmsxx = (callPackage ../development/libraries/kmsxx { + kmsxx = toPythonModule ((callPackage ../development/libraries/kmsxx { inherit (pkgs.kmsxx) stdenv; inherit (pkgs) pkgconfig; + withPython = true; }).overrideAttrs (oldAttrs: { name = "${python.libPrefix}-${pkgs.kmsxx.name}"; - }); + })); precis-i18n = callPackage ../development/python-modules/precis-i18n { }; From 791f835c2ee4ee0ff7b3ade2b53151d78088e59e Mon Sep 17 00:00:00 2001 From: gnidorah Date: Sat, 26 Oct 2019 13:36:51 +0300 Subject: [PATCH 158/377] vk-messenger: 4.0.1 -> 4.5.2 --- .../instant-messengers/vk-messenger/default.nix | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/vk-messenger/default.nix b/pkgs/applications/networking/instant-messengers/vk-messenger/default.nix index 03bf3b3bbdd..983b8509dc2 100644 --- a/pkgs/applications/networking/instant-messengers/vk-messenger/default.nix +++ b/pkgs/applications/networking/instant-messengers/vk-messenger/default.nix @@ -1,19 +1,19 @@ { stdenv, fetchurl, rpmextract, autoPatchelfHook -, xorg, gtk2, gnome2, nss, alsaLib, udev, libnotify }: +, xorg, gtk3, gnome2, nss, alsaLib, udev, libnotify }: let - version = "4.0.1"; + version = "4.5.2"; in stdenv.mkDerivation { pname = "vk-messenger"; inherit version; src = { i686-linux = fetchurl { url = "https://desktop.userapi.com/rpm/master/vk-${version}.i686.rpm"; - sha256 = "0mgppa9qnhix64zp40dc05yc9klsc7qiwcgw7pwq2wm7m3fz3nm8"; + sha256 = "11xsdmvd2diq3m61si87x2c08nap0vakcypm90wjmdjwayg3fdlw"; }; x86_64-linux = fetchurl { url = "https://desktop.userapi.com/rpm/master/vk-${version}.x86_64.rpm"; - sha256 = "0ra0y4dfx4gfa1r3lm6v42j7c9pf7a8vh12kxv3wkg3pvijwgdsm"; + sha256 = "0j65d6mwj6rxczi0p9fsr6jh37jxw3a3h6w67xwgdvibb7lf3gbb"; }; }.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}"); @@ -21,7 +21,7 @@ in stdenv.mkDerivation { buildInputs = (with xorg; [ libXdamage libXtst libXScrnSaver libxkbfile ]) ++ [ - gtk2 gnome2.GConf nss alsaLib + gtk3 nss alsaLib ]; runtimeDependencies = [ udev.lib libnotify ]; @@ -49,6 +49,5 @@ in stdenv.mkDerivation { license = licenses.unfree; maintainers = [ maintainers.gnidorah ]; platforms = ["i686-linux" "x86_64-linux"]; - hydraPlatforms = []; }; } From afb4d447ba4fa56f12d8c2e742dcbb1ebbaec7c2 Mon Sep 17 00:00:00 2001 From: gnidorah Date: Sat, 26 Oct 2019 14:16:47 +0300 Subject: [PATCH 159/377] vkquake: 1.01.0 -> 1.02.1 --- pkgs/games/quakespasm/vulkan.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/games/quakespasm/vulkan.nix b/pkgs/games/quakespasm/vulkan.nix index 114f862888d..e8678253b40 100644 --- a/pkgs/games/quakespasm/vulkan.nix +++ b/pkgs/games/quakespasm/vulkan.nix @@ -2,14 +2,13 @@ stdenv.mkDerivation rec { pname = "vkquake"; - majorVersion = "1.01"; - version = "${majorVersion}.0"; + version = "1.02.1"; src = fetchFromGitHub { owner = "Novum"; repo = "vkQuake"; rev = version; - sha256 = "1iwin8j5kbyrknbkhjgpy8nmm7pxqzr0daa9gn7p38qhg2mh0a39"; + sha256 = "0fk9jqql0crnf0s12cxnris392ajciyw1zbz17qgs5hdyivp9vdx"; }; sourceRoot = "source/Quake"; From 1c3407f954f55b63142271295fa864aec9b857c5 Mon Sep 17 00:00:00 2001 From: gnidorah Date: Sat, 26 Oct 2019 15:12:37 +0300 Subject: [PATCH 160/377] openmw-tes3mp: 2019-06-09 -> 2019-07-01 --- pkgs/games/openmw/tes3mp.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/games/openmw/tes3mp.nix b/pkgs/games/openmw/tes3mp.nix index 2bc34a6ec9d..4bbddfbb1df 100644 --- a/pkgs/games/openmw/tes3mp.nix +++ b/pkgs/games/openmw/tes3mp.nix @@ -24,20 +24,20 @@ let coreScripts = fetchFromGitHub { owner = "TES3MP"; repo = "CoreScripts"; - # usually latest master - rev = "71e15fa3b1d5131b6607ba1589f41c06672ce376"; - sha256 = "1kwii8rpsxjmz4dh06wb0qaix17hq5s1qsvysv6n6209vlclfxjg"; + # usually latest in stable branch (e.g. 0.7.0) + rev = "506146f5b2297242b713a030a589966156df1e8e"; + sha256 = "0p4a4bgigyxfmaczf3jnz6ik4hgvdaafzc4614hbmbm1qbn8wpf9"; }; in openmw.overrideAttrs (oldAttrs: rec { - version = "2019-06-09"; + version = "2019-07-01"; name = "openmw-tes3mp-${version}"; src = fetchFromGitHub { owner = "TES3MP"; repo = "openmw-tes3mp"; # usually latest in stable branch (e.g. 0.7.0) - rev = "01804af100785bc2c162d568258d9662012627a3"; - sha256 = "0j99v9vvmic0bqw3y4550k1dy058lwvs9s9qcjmxh1wkqkvrpdnp"; + rev = "94a9292cc676a037496f98877b62da80cde2ac47"; + sha256 = "0kc45xs33rsxac1aba248slzvljx90ybdk4ag9jwjjmsjmy7w2w5"; }; nativeBuildInputs = oldAttrs.nativeBuildInputs ++ [ makeWrapper ]; From b505f81181bf56eb37a01bc1d8d1532361fdfa16 Mon Sep 17 00:00:00 2001 From: gnidorah Date: Sat, 26 Oct 2019 15:20:36 +0300 Subject: [PATCH 161/377] openjk: 2019-06-24 -> 2019-10-25 --- pkgs/games/openjk/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/games/openjk/default.nix b/pkgs/games/openjk/default.nix index 9109d2667c3..fd12c901583 100644 --- a/pkgs/games/openjk/default.nix +++ b/pkgs/games/openjk/default.nix @@ -21,13 +21,13 @@ let }; in stdenv.mkDerivation { pname = "OpenJK"; - version = "2019-06-24"; + version = "2019-10-25"; src = fetchFromGitHub { owner = "JACoders"; repo = "OpenJK"; - rev = "e8b5c135eccb05ddae67e00ff944001f373fddd4"; - sha256 = "0qkbn59swhnb0anvy9gq945rkb58j6axlcfgb7sff0m4swqw2394"; + rev = "e9116155052ef6a22135a1806a10e959aa9a1e00"; + sha256 = "1f1bz1g2ksw4m3rnbh6fdsawcrpbfjdmq1gs2xj0q450yb840l3z"; }; dontAddPrefix = true; From 0f68bf333ccf7b19252c30cb6a772b55c6857baf Mon Sep 17 00:00:00 2001 From: gnidorah Date: Fri, 1 Nov 2019 23:35:59 +0300 Subject: [PATCH 162/377] openxray: 510 -> 558 --- pkgs/games/openxray/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/games/openxray/default.nix b/pkgs/games/openxray/default.nix index d8ff0dd8d9e..9960d94a247 100644 --- a/pkgs/games/openxray/default.nix +++ b/pkgs/games/openxray/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { pname = "OpenXRay"; - version = "510"; + version = "558"; src = fetchFromGitHub { owner = "OpenXRay"; repo = "xray-16"; rev = version; - sha256 = "0q142l6xvgnd6ycncqld69izxclynqrs73aq89pfy1r1nzhd60ay"; + sha256 = "1wnkx9g0ww4f5pljrb0wzs054jzkig1i5hlz1p509rfvnhc50afp"; fetchSubmodules = true; }; From b7dc9e131f5855d254717e2b2b054400b20aef8a Mon Sep 17 00:00:00 2001 From: gnidorah Date: Mon, 4 Nov 2019 10:31:51 +0300 Subject: [PATCH 163/377] pakcs: 2.1.2 -> 2.2.0 --- .../development/compilers/pakcs/curry-base.nix | 2 +- .../compilers/pakcs/curry-frontend.nix | 18 ++++++++++-------- pkgs/development/compilers/pakcs/default.nix | 4 ++-- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/pkgs/development/compilers/pakcs/curry-base.nix b/pkgs/development/compilers/pakcs/curry-base.nix index 2d98699d283..b34a2146383 100644 --- a/pkgs/development/compilers/pakcs/curry-base.nix +++ b/pkgs/development/compilers/pakcs/curry-base.nix @@ -3,7 +3,7 @@ }: mkDerivation { pname = "curry-base"; - version = "1.0.0"; + version = "1.1.0"; src = ./.; libraryHaskellDepends = [ base containers directory extra filepath mtl parsec pretty time diff --git a/pkgs/development/compilers/pakcs/curry-frontend.nix b/pkgs/development/compilers/pakcs/curry-frontend.nix index d94bef9ec7f..b169578c7c3 100644 --- a/pkgs/development/compilers/pakcs/curry-frontend.nix +++ b/pkgs/development/compilers/pakcs/curry-frontend.nix @@ -1,21 +1,23 @@ -{ mkDerivation, base, Cabal, containers, curry-base, directory -, extra, filepath, mtl, network-uri, pretty, process, set-extra -, stdenv, transformers +{ mkDerivation, base, bytestring, Cabal, containers, curry-base +, directory, extra, file-embed, filepath, mtl, network-uri, pretty +, process, set-extra, stdenv, template-haskell, transformers }: mkDerivation { pname = "curry-frontend"; - version = "1.0.2"; + version = "1.0.4"; src = ./.; isLibrary = true; isExecutable = true; enableSeparateDataOutput = true; libraryHaskellDepends = [ - base containers curry-base directory extra filepath mtl network-uri - pretty process set-extra transformers + base bytestring containers curry-base directory extra file-embed + filepath mtl network-uri pretty process set-extra template-haskell + transformers ]; executableHaskellDepends = [ - base containers curry-base directory extra filepath mtl network-uri - pretty process set-extra transformers + base bytestring containers curry-base directory extra file-embed + filepath mtl network-uri pretty process set-extra template-haskell + transformers ]; testHaskellDepends = [ base Cabal curry-base filepath ]; homepage = "http://curry-language.org"; diff --git a/pkgs/development/compilers/pakcs/default.nix b/pkgs/development/compilers/pakcs/default.nix index 0b46bd1f24d..94b6daa888e 100644 --- a/pkgs/development/compilers/pakcs/default.nix +++ b/pkgs/development/compilers/pakcs/default.nix @@ -4,13 +4,13 @@ , curl, git, unzip, gnutar, coreutils, sqlite }: let - name = "pakcs-2.1.2"; + name = "pakcs-2.2.0"; # Don't switch to development release without a reason, because its # source updates without version bump. Prefer current release instead. src = fetchurl { url = "https://www.informatik.uni-kiel.de/~pakcs/download/${name}-src.tar.gz"; - sha256 = "0i0nprli3knc7zlp5qkqkpiq3ny36v52hnvgph376l3ajjds7wf6"; + sha256 = "0c0a6cp9lwha5i90kv9ya2zi1ggnvkf4gwjfzbffgwwa77s2wz2l"; }; curry-frontend = (haskellPackages.override { From 5842a29159bf2b8287993706f17b3c424b47be0c Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Fri, 1 Nov 2019 09:33:21 -0700 Subject: [PATCH 164/377] python3Packages.solo-python: 0.0.15 -> 0.0.18 --- .../python-modules/solo-python/default.nix | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/solo-python/default.nix b/pkgs/development/python-modules/solo-python/default.nix index 7b2b578eed8..829874f25ad 100644 --- a/pkgs/development/python-modules/solo-python/default.nix +++ b/pkgs/development/python-modules/solo-python/default.nix @@ -1,21 +1,22 @@ -{ lib, buildPythonPackage, fetchFromGitHub +{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder , click, ecdsa, fido2, intelhex, pyserial, pyusb, requests}: buildPythonPackage rec { pname = "solo-python"; - version = "0.0.15"; + version = "0.0.18"; format = "flit"; + disabled = pythonOlder "3.6"; # only python>=3.6 is supported src = fetchFromGitHub { owner = "solokeys"; repo = pname; rev = version; - sha256 = "14na9s65hxzx141bdv0j7rx1wi3cv85jzpdivsq1rwp6hdhiazr1"; + sha256 = "01mgppjvxlr93vrgz7bzisghpg1vqyaj4cg5wngk0h499iyx4d9q"; }; - # TODO: remove ASAP + # replaced pinned fido, with unrestricted fido version patchPhase = '' - substituteInPlace pyproject.toml --replace "fido2 == 0.7.0" "fido2 >= 0.7.0" + sed -i '/fido2/c\"fido2",' pyproject.toml ''; propagatedBuildInputs = [ @@ -28,6 +29,20 @@ requests ]; + # allow for writable directory for darwin + preBuild = '' + export HOME=$TMPDIR + ''; + + # repo doesn't contain tests, ensure imports aren't broken + pythonImportsCheck = [ + "solo" + "solo.cli" + "solo.commands" + "solo.fido2" + "solo.operations" + ]; + meta = with lib; { description = "Python tool and library for SoloKeys"; homepage = "https://github.com/solokeys/solo-python"; From 1a3f284b9cfcceeb69e1f6d98106a6620f8a0389 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 4 Nov 2019 18:19:23 +0100 Subject: [PATCH 165/377] gnome3.devhelp: clean up * Format with nixpkgs-format * Quote URL * Fix license --- .../gnome-3/devtools/devhelp/default.nix | 46 +++++++++++++++---- 1 file changed, 38 insertions(+), 8 deletions(-) diff --git a/pkgs/desktops/gnome-3/devtools/devhelp/default.nix b/pkgs/desktops/gnome-3/devtools/devhelp/default.nix index 8d731d829b2..0bc99515b34 100644 --- a/pkgs/desktops/gnome-3/devtools/devhelp/default.nix +++ b/pkgs/desktops/gnome-3/devtools/devhelp/default.nix @@ -1,6 +1,21 @@ -{ stdenv, fetchurl, meson, ninja, pkgconfig, gnome3, gtk3, wrapGAppsHook -, glib, amtk, appstream-glib, gobject-introspection, python3 -, webkitgtk, gettext, itstool, gsettings-desktop-schemas }: +{ stdenv +, fetchurl +, meson +, ninja +, pkgconfig +, gnome3 +, gtk3 +, wrapGAppsHook +, glib +, amtk +, appstream-glib +, gobject-introspection +, python3 +, webkitgtk +, gettext +, itstool +, gsettings-desktop-schemas +}: stdenv.mkDerivation rec { pname = "devhelp"; @@ -11,10 +26,25 @@ stdenv.mkDerivation rec { sha256 = "0zpmn6fgkgiayvn4diia5df0s6s7dqrdnp3nrvpavsmgn0vhb4pg"; }; - nativeBuildInputs = [ meson ninja pkgconfig gettext itstool wrapGAppsHook appstream-glib gobject-introspection python3 ]; + nativeBuildInputs = [ + meson + ninja + pkgconfig + gettext + itstool + wrapGAppsHook + appstream-glib + gobject-introspection + python3 + ]; + buildInputs = [ - glib gtk3 webkitgtk amtk - gnome3.adwaita-icon-theme gsettings-desktop-schemas + glib + gtk3 + webkitgtk + amtk + gnome3.adwaita-icon-theme + gsettings-desktop-schemas ]; doCheck = true; @@ -33,8 +63,8 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "API documentation browser for GNOME"; - homepage = https://wiki.gnome.org/Apps/Devhelp; - license = licenses.gpl2; + homepage = "https://wiki.gnome.org/Apps/Devhelp"; + license = licenses.gpl3Plus; maintainers = gnome3.maintainers; platforms = platforms.linux; }; From 6160907f85f2e014e885599b0e19d5f302577783 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 4 Nov 2019 18:20:42 +0100 Subject: [PATCH 166/377] gnome3.devhelp: fix blank pages --- pkgs/desktops/gnome-3/devtools/devhelp/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/desktops/gnome-3/devtools/devhelp/default.nix b/pkgs/desktops/gnome-3/devtools/devhelp/default.nix index 0bc99515b34..080a332d7df 100644 --- a/pkgs/desktops/gnome-3/devtools/devhelp/default.nix +++ b/pkgs/desktops/gnome-3/devtools/devhelp/default.nix @@ -15,6 +15,7 @@ , gettext , itstool , gsettings-desktop-schemas +, shared-mime-info }: stdenv.mkDerivation rec { @@ -54,6 +55,14 @@ stdenv.mkDerivation rec { patchShebangs meson_post_install.py ''; + preFixup = '' + gappsWrapperArgs+=( + # Fix pages being blank + # https://gitlab.gnome.org/GNOME/devhelp/issues/14 + --prefix XDG_DATA_DIRS : "${shared-mime-info}/share" + ) + ''; + passthru = { updateScript = gnome3.updateScript { packageName = "devhelp"; From c4821a82f880df90987ff56a4e781fc42ed914b5 Mon Sep 17 00:00:00 2001 From: Renaud Date: Mon, 4 Nov 2019 19:41:24 +0100 Subject: [PATCH 167/377] theharvester: 3.0.6 -> 3.1 + use buildPythonApplication now that upstream ships a setup.py (#72748) --- pkgs/tools/security/theharvester/default.nix | 44 +++++++++----------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/pkgs/tools/security/theharvester/default.nix b/pkgs/tools/security/theharvester/default.nix index 4a1e92e6104..4153ddafbf4 100644 --- a/pkgs/tools/security/theharvester/default.nix +++ b/pkgs/tools/security/theharvester/default.nix @@ -1,40 +1,36 @@ -{ stdenv, fetchFromGitHub, makeWrapper, python3Packages }: +{ lib, fetchFromGitHub, python3 }: -stdenv.mkDerivation rec { +python3.pkgs.buildPythonApplication rec { pname = "theHarvester"; - version = "3.0.6"; + version = "3.1"; src = fetchFromGitHub { owner = "laramies"; repo = pname; - rev = version; - sha256 = "0f33a7sfb5ih21yp1wspb03fxsls1m14yizgrw0srfirm2a6aa0c"; + rev = "V${version}"; + sha256 = "0lxzxfa9wbzim50d2jmd27i57szd0grm1dfayhnym86jn01qpvn3"; }; - nativeBuildInputs = [ makeWrapper ]; + propagatedBuildInputs = with python3.pkgs; [ + aiodns beautifulsoup4 dns grequests netaddr + plotly pyyaml requests retrying shodan texttable + ]; - # add dependencies - propagatedBuildInputs = with python3Packages; [ requests beautifulsoup4 plotly ]; + checkInputs = [ python3.pkgs.pytest ]; - installPhase = '' - # create dirs - mkdir -p $out/share/${pname} $out/bin + checkPhase = "runHook preCheck ; pytest tests/test_myparser.py ; runHook postCheck"; + # We don't run other tests (discovery modules) because they require network access - # move project code - mv * $out/share/${pname}/ - - # make project runnable - chmod +x $out/share/${pname}/theHarvester.py - ln -s $out/share/${pname}/theHarvester.py $out/bin - - wrapProgram "$out/bin/theHarvester.py" --prefix PYTHONPATH : $out/share/${pname}:$PYTHONPATH - ''; - - meta = with stdenv.lib; { + meta = with lib; { description = "Gather E-mails, subdomains and names from different public sources"; + longDescription = '' + theHarvester is a very simple, yet effective tool designed to be used in the early + stages of a penetration test. Use it for open source intelligence gathering and + helping to determine an entity's external threat landscape on the internet. The tool + gathers emails, names, subdomains, IPs, and URLs using multiple public data sources. + ''; homepage = "https://github.com/laramies/theHarvester"; - platforms = platforms.all; - maintainers = with maintainers; [ treemo ]; + maintainers = with maintainers; [ c0bw3b treemo ]; license = licenses.gpl2; }; } From e2058c7231555480efda9ac182d394bcad91f9f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Lafuente?= Date: Mon, 4 Nov 2019 20:27:52 +0100 Subject: [PATCH 168/377] clj-kondo: 2019.10.26 -> 2019.11.03 --- pkgs/development/tools/clj-kondo/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/clj-kondo/default.nix b/pkgs/development/tools/clj-kondo/default.nix index 9b2e80c7674..f821ac32fc4 100644 --- a/pkgs/development/tools/clj-kondo/default.nix +++ b/pkgs/development/tools/clj-kondo/default.nix @@ -2,7 +2,7 @@ stdenv.mkDerivation rec{ pname = "clj-kondo"; - version = "2019.10.26"; + version = "2019.11.03"; reflectionJson = fetchurl { name = "reflection.json"; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec{ src = fetchurl { url = "https://github.com/borkdude/${pname}/releases/download/v${version}/${pname}-${version}-standalone.jar"; - sha256 = "1pq03g4bkslpa3jv7vrnw3sy6wnqdgnavl8qyb4lb1y96pmk9hd1"; + sha256 = "1chvdfczlxyy1jspyf4yv1kmgz6fq4fih5qvfarvcyw7nlxlj2np"; }; dontUnpack = true; From 527dd6e833be4aff9874f296ae1bd5bd9ea3d27a Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Mon, 4 Nov 2019 21:10:41 +0100 Subject: [PATCH 169/377] =?UTF-8?q?mm-common:=200.9.12=20=E2=86=92=201.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://download.gnome.org/sources/mm-common/1.0/mm-common-1.0.0.news --- .../libraries/mm-common/default.nix | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/mm-common/default.nix b/pkgs/development/libraries/mm-common/default.nix index f590653df6b..9a789a58cca 100644 --- a/pkgs/development/libraries/mm-common/default.nix +++ b/pkgs/development/libraries/mm-common/default.nix @@ -1,14 +1,26 @@ -{ stdenv, fetchurl, gnome3 }: +{ stdenv +, fetchurl +, gnome3 +, meson +, python3 +, ninja +}: stdenv.mkDerivation rec { pname = "mm-common"; - version = "0.9.12"; + version = "1.0.0"; src = fetchurl { url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "02vwgv404b56wxy0gnm9xq9fvzgn9dhfqcy2hhl78ljv3v7drzyf"; + sha256 = "1m4w33da9f4rx2d6kdj3ix3kl0gn16ml82v2mdn4hljr3q29nzdr"; }; + nativeBuildInputs = [ + meson + python3 + ninja + ]; + passthru = { updateScript = gnome3.updateScript { packageName = pname; @@ -25,7 +37,7 @@ stdenv.mkDerivation rec { control repository. An installation of mm-common is not required for building tarball releases, unless configured to use maintainer-mode. ''; - homepage = https://www.gtkmm.org; + homepage = "https://www.gtkmm.org"; license = licenses.gpl2Plus; maintainers = gnome3.maintainers; platforms = platforms.linux; From 3a28fefe7d4e7d842304ff4eee42c76593194b0a Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Fri, 6 Sep 2019 09:25:22 +0200 Subject: [PATCH 170/377] nixos/test: Port test driver to python Thanks @blitz and @jtraue for help with implementing machine methods --- nixos/lib/test-driver/test-driver.py | 762 +++++++++++++++++++++++++++ nixos/lib/testing-python.nix | 279 ++++++++++ nixos/tests/make-test-python.nix | 9 + 3 files changed, 1050 insertions(+) create mode 100644 nixos/lib/test-driver/test-driver.py create mode 100644 nixos/lib/testing-python.nix create mode 100644 nixos/tests/make-test-python.nix diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py new file mode 100644 index 00000000000..16d4b0b907d --- /dev/null +++ b/nixos/lib/test-driver/test-driver.py @@ -0,0 +1,762 @@ +#! /somewhere/python3 + +from contextlib import contextmanager +from xml.sax.saxutils import XMLGenerator +import _thread +import atexit +import os +import pty +import queue +import re +import shutil +import socket +import subprocess +import sys +import tempfile +import time +import unicodedata + +CHAR_TO_KEY = { + "A": "shift-a", + "N": "shift-n", + "-": "0x0C", + "_": "shift-0x0C", + "B": "shift-b", + "O": "shift-o", + "=": "0x0D", + "+": "shift-0x0D", + "C": "shift-c", + "P": "shift-p", + "[": "0x1A", + "{": "shift-0x1A", + "D": "shift-d", + "Q": "shift-q", + "]": "0x1B", + "}": "shift-0x1B", + "E": "shift-e", + "R": "shift-r", + ";": "0x27", + ":": "shift-0x27", + "F": "shift-f", + "S": "shift-s", + "'": "0x28", + '"': "shift-0x28", + "G": "shift-g", + "T": "shift-t", + "`": "0x29", + "~": "shift-0x29", + "H": "shift-h", + "U": "shift-u", + "\\": "0x2B", + "|": "shift-0x2B", + "I": "shift-i", + "V": "shift-v", + ",": "0x33", + "<": "shift-0x33", + "J": "shift-j", + "W": "shift-w", + ".": "0x34", + ">": "shift-0x34", + "K": "shift-k", + "X": "shift-x", + "/": "0x35", + "?": "shift-0x35", + "L": "shift-l", + "Y": "shift-y", + " ": "spc", + "M": "shift-m", + "Z": "shift-z", + "\n": "ret", + "!": "shift-0x02", + "@": "shift-0x03", + "#": "shift-0x04", + "$": "shift-0x05", + "%": "shift-0x06", + "^": "shift-0x07", + "&": "shift-0x08", + "*": "shift-0x09", + "(": "shift-0x0A", + ")": "shift-0x0B", +} + + +def eprint(*args, **kwargs): + print(*args, file=sys.stderr, **kwargs) + + +def create_vlan(vlan_nr): + global log + log.log("starting VDE switch for network {}".format(vlan_nr)) + vde_socket = os.path.abspath("./vde{}.ctl".format(vlan_nr)) + pty_master, pty_slave = pty.openpty() + vde_process = subprocess.Popen( + ["vde_switch", "-s", vde_socket, "--dirmode", "0777"], + bufsize=1, + stdin=pty_slave, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + shell=False, + ) + fd = os.fdopen(pty_master, "w") + fd.write("version\n") + # TODO: perl version checks if this can be read from + # an if not, dies. we could hang here forever. Fix it. + vde_process.stdout.readline() + if not os.path.exists(os.path.join(vde_socket, "ctl")): + raise Exception("cannot start vde_switch") + + return (vlan_nr, vde_socket, vde_process, fd) + + +def retry(fn): + """Call the given function repeatedly, with 1 second intervals, + until it returns True or a timeout is reached. + """ + + for _ in range(900): + if fn(False): + return + time.sleep(1) + + if not fn(True): + raise Exception("action timed out") + + +class Logger: + def __init__(self): + self.logfile = os.environ.get("LOGFILE", "/dev/null") + self.logfile_handle = open(self.logfile, "wb") + self.xml = XMLGenerator(self.logfile_handle, encoding="utf-8") + self.queue = queue.Queue(1000) + + self.xml.startDocument() + self.xml.startElement("logfile", attrs={}) + + def close(self): + self.xml.endElement("logfile") + self.xml.endDocument() + self.logfile_handle.close() + + def sanitise(self, message): + return "".join(ch for ch in message if unicodedata.category(ch)[0] != "C") + + def maybe_prefix(self, message, attributes): + if "machine" in attributes: + return "{}: {}".format(attributes["machine"], message) + return message + + def log_line(self, message, attributes): + self.xml.startElement("line", attributes) + self.xml.characters(message) + self.xml.endElement("line") + + def log(self, message, attributes={}): + eprint(self.maybe_prefix(message, attributes)) + self.drain_log_queue() + self.log_line(message, attributes) + + def enqueue(self, message): + self.queue.put(message) + + def drain_log_queue(self): + try: + while True: + item = self.queue.get_nowait() + attributes = {"machine": item["machine"], "type": "serial"} + self.log_line(self.sanitise(item["msg"]), attributes) + except queue.Empty: + pass + + @contextmanager + def nested(self, message, attributes={}): + eprint(self.maybe_prefix(message, attributes)) + + self.xml.startElement("nest", attrs={}) + self.xml.startElement("head", attributes) + self.xml.characters(message) + self.xml.endElement("head") + + tic = time.time() + self.drain_log_queue() + yield + self.drain_log_queue() + toc = time.time() + self.log("({:.2f} seconds)".format(toc - tic)) + + self.xml.endElement("nest") + + +class Machine: + def __init__(self, args): + if "name" in args: + self.name = args["name"] + else: + self.name = "machine" + try: + cmd = args["startCommand"] + self.name = re.search("run-(.+)-vm$", cmd).group(1) + except KeyError: + pass + except AttributeError: + pass + + self.script = args.get("startCommand", self.create_startcommand(args)) + + tmp_dir = os.environ.get("TMPDIR", tempfile.gettempdir()) + + def create_dir(name): + path = os.path.join(tmp_dir, name) + os.makedirs(path, mode=0o700, exist_ok=True) + return path + + self.state_dir = create_dir("vm-state-{}".format(self.name)) + self.shared_dir = create_dir("xchg-shared") + + self.booted = False + self.connected = False + self.pid = None + self.socket = None + self.monitor = None + self.logger = args["log"] + self.allow_reboot = args.get("allowReboot", False) + + @staticmethod + def create_startcommand(args): + net_backend = "-netdev user,id=net0" + net_frontend = "-device virtio-net-pci,netdev=net0" + + if "netBackendArgs" in args: + net_backend += "," + args["netBackendArgs"] + + if "netFrontendArgs" in args: + net_frontend += "," + args["netFrontendArgs"] + + start_command = ( + "qemu-kvm -m 384 " + net_backend + " " + net_frontend + " $QEMU_OPTS " + ) + + if "hda" in args: + hda_path = os.path.abspath(args["hda"]) + if args.get("hdaInterface", "") == "scsi": + start_command += ( + "-drive id=hda,file=" + + hda_path + + ",werror=report,if=none " + + "-device scsi-hd,drive=hda " + ) + else: + start_command += ( + "-drive file=" + + hda_path + + ",if=" + + args["hdaInterface"] + + ",werror=report " + ) + + if "cdrom" in args: + start_command += "-cdrom " + args["cdrom"] + " " + + if "usb" in args: + start_command += ( + "-device piix3-usb-uhci -drive " + + "id=usbdisk,file=" + + args["usb"] + + ",if=none,readonly " + + "-device usb-storage,drive=usbdisk " + ) + if "bios" in args: + start_command += "-bios " + args["bios"] + " " + + start_command += args.get("qemuFlags", "") + + return start_command + + def is_up(self): + return self.booted and self.connected + + def log(self, msg): + self.logger.log(msg, {"machine": self.name}) + + def nested(self, msg, attrs={}): + my_attrs = {"machine": self.name} + my_attrs.update(attrs) + return self.logger.nested(msg, my_attrs) + + def wait_for_monitor_prompt(self): + while True: + answer = self.monitor.recv(1024).decode() + if answer.endswith("(qemu) "): + return answer + + def send_monitor_command(self, command): + message = ("{}\n".format(command)).encode() + self.log("sending monitor command: {}".format(command)) + self.monitor.send(message) + return self.wait_for_monitor_prompt() + + def wait_for_unit(self, unit, user=None): + while True: + info = self.get_unit_info(unit, user) + state = info["ActiveState"] + if state == "failed": + raise Exception('unit "{}" reached state "{}"'.format(unit, state)) + + if state == "inactive": + status, jobs = self.systemctl("list-jobs --full 2>&1", user) + if "No jobs" in jobs: + info = self.get_unit_info(unit) + if info["ActiveState"] == state: + raise Exception( + ( + 'unit "{}" is inactive and there ' "are no pending jobs" + ).format(unit) + ) + if state == "active": + return True + + def get_unit_info(self, unit, user=None): + status, lines = self.systemctl('--no-pager show "{}"'.format(unit), user) + if status != 0: + return None + + line_pattern = re.compile(r"^([^=]+)=(.*)$") + + def tuple_from_line(line): + match = line_pattern.match(line) + return match[1], match[2] + + return dict( + tuple_from_line(line) + for line in lines.split("\n") + if line_pattern.match(line) + ) + + def systemctl(self, q, user=None): + if user is not None: + q = q.replace("'", "\\'") + return self.execute( + ( + "su -l {} -c " + "$'XDG_RUNTIME_DIR=/run/user/`id -u` " + "systemctl --user {}'" + ).format(user, q) + ) + return self.execute("systemctl {}".format(q)) + + def execute(self, command): + self.connect() + + out_command = "( {} ); echo '|!EOF' $?\n".format(command) + self.shell.send(out_command.encode()) + + output = "" + status_code_pattern = re.compile(r"(.*)\|\!EOF\s+(\d+)") + + while True: + chunk = self.shell.recv(4096).decode() + match = status_code_pattern.match(chunk) + if match: + output += match[1] + status_code = int(match[2]) + return (status_code, output) + output += chunk + + def succeed(self, *commands): + """Execute each command and check that it succeeds.""" + for command in commands: + with self.nested("must succeed: {}".format(command)): + status, output = self.execute(command) + if status != 0: + self.log("output: {}".format(output)) + raise Exception( + "command `{}` failed (exit code {})".format(command, status) + ) + return output + + def fail(self, *commands): + """Execute each command and check that it fails.""" + for command in commands: + with self.nested("must fail: {}".format(command)): + status, output = self.execute(command) + if status == 0: + raise Exception( + "command `{}` unexpectedly succeeded".format(command) + ) + + def wait_until_succeeds(self, command): + with self.nested("waiting for success: {}".format(command)): + while True: + status, output = self.execute(command) + if status == 0: + return output + + def wait_until_fails(self, command): + with self.nested("waiting for failure: {}".format(command)): + while True: + status, output = self.execute(command) + if status != 0: + return output + + def wait_for_shutdown(self): + if not self.booted: + return + + with self.nested("waiting for the VM to power off"): + sys.stdout.flush() + self.process.wait() + + self.pid = None + self.booted = False + self.connected = False + + def get_tty_text(self, tty): + status, output = self.execute( + "fold -w$(stty -F /dev/tty{0} size | " + "awk '{{print $2}}') /dev/vcs{0}".format(tty) + ) + return output + + def wait_until_tty_matches(self, tty, regexp): + matcher = re.compile(regexp) + with self.nested("waiting for {} to appear on tty {}".format(regexp, tty)): + while True: + text = self.get_tty_text(tty) + if len(matcher.findall(text)) > 0: + return True + + def send_chars(self, chars): + with self.nested("sending keys ‘{}‘".format(chars)): + for char in chars: + self.send_key(char) + + def wait_for_file(self, filename): + with self.nested("waiting for file ‘{}‘".format(filename)): + while True: + status, _ = self.execute("test -e {}".format(filename)) + if status == 0: + return True + + def wait_for_open_port(self, port): + def port_is_open(_): + status, _ = self.execute("nc -z localhost {}".format(port)) + return status == 0 + + with self.nested("waiting for TCP port {}".format(port)): + retry(port_is_open) + + def wait_for_closed_port(self, port): + def port_is_closed(_): + status, _ = self.execute("nc -z localhost {}".format(port)) + return status != 0 + + retry(port_is_closed) + + def start_job(self, jobname, user=None): + return self.systemctl("start {}".format(jobname), user) + + def stop_job(self, jobname, user=None): + return self.systemctl("stop {}".format(jobname), user) + + def wait_for_job(self, jobname): + return self.wait_for_unit(jobname) + + def connect(self): + if self.connected: + return + + with self.nested("waiting for the VM to finish booting"): + self.start() + + tic = time.time() + self.shell.recv(1024) + # TODO: Timeout + toc = time.time() + + self.log("connected to guest root shell") + self.log("(connecting took {:.2f} seconds)".format(toc - tic)) + self.connected = True + + def screenshot(self, filename): + out_dir = os.environ.get("out", os.getcwd()) + word_pattern = re.compile(r"^\w+$") + if word_pattern.match(filename): + filename = os.path.join(out_dir, "{}.png".format(filename)) + tmp = "{}.ppm".format(filename) + + with self.nested( + "making screenshot {}".format(filename), + {"image": os.path.basename(filename)}, + ): + self.send_monitor_command("screendump {}".format(tmp)) + ret = subprocess.run("pnmtopng {} > {}".format(tmp, filename), shell=True) + os.unlink(tmp) + if ret.returncode != 0: + raise Exception("Cannot convert screenshot") + + def get_screen_text(self): + if shutil.which("tesseract") is None: + raise Exception("get_screen_text used but enableOCR is false") + + magick_args = ( + "-filter Catrom -density 72 -resample 300 " + + "-contrast -normalize -despeckle -type grayscale " + + "-sharpen 1 -posterize 3 -negate -gamma 100 " + + "-blur 1x65535" + ) + + tess_args = "-c debug_file=/dev/null --psm 11 --oem 2" + + with self.nested("performing optical character recognition"): + with tempfile.NamedTemporaryFile() as tmpin: + self.send_monitor_command("screendump {}".format(tmpin.name)) + + cmd = "convert {} {} tiff:- | tesseract - - {}".format( + magick_args, tmpin.name, tess_args + ) + ret = subprocess.run(cmd, shell=True, capture_output=True) + if ret.returncode != 0: + raise Exception( + "OCR failed with exit code {}".format(ret.returncode) + ) + + return ret.stdout.decode("utf-8") + + def wait_for_text(self, regex): + def screen_matches(last): + text = self.get_screen_text() + m = re.search(regex, text) + + if last and not m: + self.log("Last OCR attempt failed. Text was: {}".format(text)) + + return m + + with self.nested("waiting for {} to appear on screen".format(regex)): + retry(screen_matches) + + def send_key(self, key): + key = CHAR_TO_KEY.get(key, key) + self.send_monitor_command("sendkey {}".format(key)) + + def start(self): + if self.booted: + return + + self.log("starting vm") + + def create_socket(path): + if os.path.exists(path): + os.unlink(path) + s = socket.socket(family=socket.AF_UNIX, type=socket.SOCK_STREAM) + s.bind(path) + s.listen(1) + return s + + monitor_path = os.path.join(self.state_dir, "monitor") + self.monitor_socket = create_socket(monitor_path) + + shell_path = os.path.join(self.state_dir, "shell") + self.shell_socket = create_socket(shell_path) + + qemu_options = ( + " ".join( + [ + "" if self.allow_reboot else "-no-reboot", + "-monitor unix:{}".format(monitor_path), + "-chardev socket,id=shell,path={}".format(shell_path), + "-device virtio-serial", + "-device virtconsole,chardev=shell", + "-device virtio-rng-pci", + "-serial stdio" if "DISPLAY" in os.environ else "-nographic", + ] + ) + + " " + + os.environ.get("QEMU_OPTS", "") + ) + + environment = { + "QEMU_OPTS": qemu_options, + "SHARED_DIR": self.shared_dir, + "USE_TMPDIR": "1", + } + environment.update(dict(os.environ)) + + self.process = subprocess.Popen( + self.script, + bufsize=1, + stdin=subprocess.DEVNULL, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + shell=False, + cwd=self.state_dir, + env=environment, + ) + self.monitor, _ = self.monitor_socket.accept() + self.shell, _ = self.shell_socket.accept() + + def process_serial_output(): + for line in self.process.stdout: + line = line.decode().replace("\r", "").rstrip() + eprint("{} # {}".format(self.name, line)) + self.logger.enqueue({"msg": line, "machine": self.name}) + + _thread.start_new_thread(process_serial_output, ()) + + self.wait_for_monitor_prompt() + + self.pid = self.process.pid + self.booted = True + + self.log("QEMU running (pid {})".format(self.pid)) + + def shutdown(self): + if self.booted: + return + + self.shell.send("poweroff\n".encode()) + self.wait_for_shutdown() + + def crash(self): + if self.booted: + return + + self.log("forced crash") + self.send_monitor_command("quit") + self.wait_for_shutdown() + + def wait_for_x(self): + """Wait until it is possible to connect to the X server. Note that + testing the existence of /tmp/.X11-unix/X0 is insufficient. + """ + with self.nested("waiting for the X11 server"): + while True: + cmd = ( + "journalctl -b SYSLOG_IDENTIFIER=systemd | " + + 'grep "Reached target Current graphical"' + ) + status, _ = self.execute(cmd) + if status != 0: + continue + status, _ = self.execute("[ -e /tmp/.X11-unix/X0 ]") + if status == 0: + return + + def sleep(self, secs): + time.sleep(secs) + + def block(self): + """Make the machine unreachable by shutting down eth1 (the multicast + interface used to talk to the other VMs). We keep eth0 up so that + the test driver can continue to talk to the machine. + """ + self.send_monitor_command("set_link virtio-net-pci.1 off") + + def unblock(self): + """Make the machine reachable. + """ + self.send_monitor_command("set_link virtio-net-pci.1 on") + + +def create_machine(args): + global log + args["log"] = log + args["redirectSerial"] = os.environ.get("USE_SERIAL", "0") == "1" + return Machine(args) + + +def start_all(): + with log.nested("starting all VMs"): + for machine in machines: + machine.start() + + +def join_all(): + with log.nested("waiting for all VMs to finish"): + for machine in machines: + machine.wait_for_shutdown() + + +def test_script(): + exec(os.environ["testScript"]) + + +def run_tests(): + tests = os.environ.get("tests", None) + if tests is not None: + with log.nested("running the VM test script"): + try: + exec(tests) + except Exception as e: + eprint("error: {}".format(str(e))) + sys.exit(1) + else: + while True: + try: + value = input("> ") + exec(value) + except EOFError: + break + + # TODO: Collect coverage data + + for machine in machines: + if machine.is_up(): + machine.execute("sync") + + if nr_tests != 0: + log.log("{} out of {} tests succeeded".format(nr_succeeded, nr_tests)) + + +@contextmanager +def subtest(name): + global nr_tests + global nr_succeeded + + with log.nested(name): + nr_tests += 1 + try: + yield + nr_succeeded += 1 + return True + except Exception as e: + log.log("error: {}".format(str(e))) + + return False + + +if __name__ == "__main__": + global log + log = Logger() + + vlan_nrs = list(dict.fromkeys(os.environ["VLANS"].split())) + vde_sockets = [create_vlan(v) for v in vlan_nrs] + for nr, vde_socket, _, _ in vde_sockets: + os.environ["QEMU_VDE_SOCKET_{}".format(nr)] = vde_socket + + vm_scripts = sys.argv[1:] + machines = [create_machine({"startCommand": s}) for s in vm_scripts] + machine_eval = [ + "{0} = machines[{1}]".format(m.name, idx) for idx, m in enumerate(machines) + ] + exec("\n".join(machine_eval)) + + nr_tests = 0 + nr_succeeded = 0 + + @atexit.register + def clean_up(): + with log.nested("cleaning up"): + for machine in machines: + if machine.pid is None: + continue + log.log("killing {} (pid {})".format(machine.name, machine.pid)) + machine.process.kill() + + for _, _, process, _ in vde_sockets: + process.kill() + log.close() + + tic = time.time() + run_tests() + toc = time.time() + print("test script finished in {:.2f}s".format(toc - tic)) diff --git a/nixos/lib/testing-python.nix b/nixos/lib/testing-python.nix new file mode 100644 index 00000000000..5240cba116f --- /dev/null +++ b/nixos/lib/testing-python.nix @@ -0,0 +1,279 @@ +{ system +, pkgs ? import ../.. { inherit system config; } + # Use a minimal kernel? +, minimal ? false + # Ignored +, config ? {} + # Modules to add to each VM +, extraConfigurations ? [] }: + +with import ./build-vms.nix { inherit system pkgs minimal extraConfigurations; }; +with pkgs; + +let + jquery-ui = callPackage ./testing/jquery-ui.nix { }; + jquery = callPackage ./testing/jquery.nix { }; + +in rec { + + inherit pkgs; + + + testDriver = let + testDriverScript = ./test-driver/test-driver.py; + in stdenv.mkDerivation { + name = "nixos-test-driver"; + + nativeBuildInputs = [ makeWrapper ]; + buildInputs = [ python3 ]; + checkInputs = with python3Packages; [ pylint black ]; + + dontUnpack = true; + + preferLocalBuild = true; + + doCheck = true; + checkPhase = '' + pylint --errors-only ${testDriverScript} + black --check --diff ${testDriverScript} + ''; + + installPhase = + '' + mkdir -p $out/bin + cp ${testDriverScript} $out/bin/nixos-test-driver + chmod u+x $out/bin/nixos-test-driver + # TODO: copy user script part into this file (append) + + wrapProgram $out/bin/nixos-test-driver \ + --prefix PATH : "${lib.makeBinPath [ qemu_test vde2 netpbm coreutils ]}" \ + ''; + }; + + + # Run an automated test suite in the given virtual network. + # `driver' is the script that runs the network. + runTests = driver: + stdenv.mkDerivation { + name = "vm-test-run-${driver.testName}"; + + requiredSystemFeatures = [ "kvm" "nixos-test" ]; + + buildInputs = [ libxslt ]; + + buildCommand = + '' + mkdir -p $out/nix-support + + LOGFILE=$out/log.xml tests='exec(os.environ["testScript"])' ${driver}/bin/nixos-test-driver + + # Generate a pretty-printed log. + xsltproc --output $out/log.html ${./test-driver/log2html.xsl} $out/log.xml + ln -s ${./test-driver/logfile.css} $out/logfile.css + ln -s ${./test-driver/treebits.js} $out/treebits.js + ln -s ${jquery}/js/jquery.min.js $out/ + ln -s ${jquery}/js/jquery.js $out/ + ln -s ${jquery-ui}/js/jquery-ui.min.js $out/ + ln -s ${jquery-ui}/js/jquery-ui.js $out/ + + touch $out/nix-support/hydra-build-products + echo "report testlog $out log.html" >> $out/nix-support/hydra-build-products + + for i in */xchg/coverage-data; do + mkdir -p $out/coverage-data + mv $i $out/coverage-data/$(dirname $(dirname $i)) + done + ''; + }; + + + makeTest = + { testScript + , makeCoverageReport ? false + , enableOCR ? false + , name ? "unnamed" + , ... + } @ t: + + 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 name; + + testDriverName = with builtins; + if testNameLen > maxTestNameLen then + abort ("The name of the test '${name}' must not be longer than ${toString maxTestNameLen} " + + "it's currently ${toString testNameLen} characters long.") + else + "nixos-test-driver-${name}"; + + nodes = buildVirtualNetwork ( + t.nodes or (if t ? machine then { machine = t.machine; } else { })); + + testScript' = + # Call the test script with the computed nodes. + if lib.isFunction testScript + then testScript { inherit nodes; } + else testScript; + + vlans = map (m: m.config.virtualisation.vlans) (lib.attrValues nodes); + + vms = map (m: m.config.system.build.vm) (lib.attrValues nodes); + + ocrProg = tesseract4.override { enableLanguages = [ "eng" ]; }; + + imagemagick_tiff = imagemagick_light.override { inherit libtiff; }; + + # Generate onvenience wrappers for running the test driver + # interactively with the specified network, and for starting the + # VMs from the command line. + driver = runCommand testDriverName + { buildInputs = [ makeWrapper]; + testScript = testScript'; + preferLocalBuild = true; + testName = name; + } + '' + mkdir -p $out/bin + + echo -n "$testScript" > $out/test-script + ${python3Packages.black}/bin/black --check --diff $out/test-script + + ln -s ${testDriver}/bin/nixos-test-driver $out/bin/ + vms=($(for i in ${toString vms}; do echo $i/bin/run-*-vm; done)) + wrapProgram $out/bin/nixos-test-driver \ + --add-flags "''${vms[*]}" \ + ${lib.optionalString enableOCR + "--prefix PATH : '${ocrProg}/bin:${imagemagick_tiff}/bin'"} \ + --run "export testScript=\"\$(cat $out/test-script)\"" \ + --set VLANS '${toString vlans}' + ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-run-vms + wrapProgram $out/bin/nixos-run-vms \ + --add-flags "''${vms[*]}" \ + ${lib.optionalString enableOCR "--prefix PATH : '${ocrProg}/bin'"} \ + --set tests 'start_all(); join_all();' \ + --set VLANS '${toString vlans}' \ + ${lib.optionalString (builtins.length vms == 1) "--set USE_SERIAL 1"} + ''; # " + + passMeta = drv: drv // lib.optionalAttrs (t ? meta) { + meta = (drv.meta or {}) // t.meta; + }; + + test = passMeta (runTests driver); + report = passMeta (releaseTools.gcovReport { coverageRuns = [ test ]; }); + + nodeNames = builtins.attrNames nodes; + invalidNodeNames = lib.filter + (node: builtins.match "^[A-z_][A-z0-9_]+$" node == null) nodeNames; + + in + if lib.length invalidNodeNames > 0 then + throw '' + Cannot create machines out of (${lib.concatStringsSep ", " invalidNodeNames})! + All machines are referenced as perl variables in the testing framework which will break the + script when special characters are used. + + Please stick to alphanumeric chars and underscores as separation. + '' + else + (if makeCoverageReport then report else test) // { + inherit nodes driver test; + }; + + runInMachine = + { drv + , machine + , preBuild ? "" + , postBuild ? "" + , ... # ??? + }: + let + vm = buildVM { } + [ machine + { key = "run-in-machine"; + networking.hostName = "client"; + nix.readOnlyStore = false; + virtualisation.writableStore = false; + } + ]; + + buildrunner = writeText "vm-build" '' + source $1 + + ${coreutils}/bin/mkdir -p $TMPDIR + cd $TMPDIR + + exec $origBuilder $origArgs + ''; + + testScript = '' + startAll; + $client->waitForUnit("multi-user.target"); + ${preBuild} + $client->succeed("env -i ${bash}/bin/bash ${buildrunner} /tmp/xchg/saved-env >&2"); + ${postBuild} + $client->succeed("sync"); # flush all data before pulling the plug + ''; + + vmRunCommand = writeText "vm-run" '' + xchg=vm-state-client/xchg + ${coreutils}/bin/mkdir $out + ${coreutils}/bin/mkdir -p $xchg + + for i in $passAsFile; do + i2=''${i}Path + _basename=$(${coreutils}/bin/basename ''${!i2}) + ${coreutils}/bin/cp ''${!i2} $xchg/$_basename + eval $i2=/tmp/xchg/$_basename + ${coreutils}/bin/ls -la $xchg + done + + unset i i2 _basename + export | ${gnugrep}/bin/grep -v '^xchg=' > $xchg/saved-env + unset xchg + + export tests='${testScript}' + ${testDriver}/bin/nixos-test-driver ${vm.config.system.build.vm}/bin/run-*-vm + ''; # */ + + in + lib.overrideDerivation drv (attrs: { + requiredSystemFeatures = [ "kvm" ]; + builder = "${bash}/bin/sh"; + args = ["-e" vmRunCommand]; + origArgs = attrs.args; + origBuilder = attrs.builder; + }); + + + runInMachineWithX = { require ? [], ... } @ args: + let + client = + { ... }: + { + inherit require; + virtualisation.memorySize = 1024; + services.xserver.enable = true; + services.xserver.displayManager.slim.enable = false; + services.xserver.displayManager.auto.enable = true; + services.xserver.windowManager.default = "icewm"; + services.xserver.windowManager.icewm.enable = true; + services.xserver.desktopManager.default = "none"; + }; + in + runInMachine ({ + machine = client; + preBuild = + '' + $client->waitForX; + ''; + } // args); + + + simpleTest = as: (makeTest as).test; + +} diff --git a/nixos/tests/make-test-python.nix b/nixos/tests/make-test-python.nix new file mode 100644 index 00000000000..89897fe7e61 --- /dev/null +++ b/nixos/tests/make-test-python.nix @@ -0,0 +1,9 @@ +f: { + system ? builtins.currentSystem, + pkgs ? import ../.. { inherit system; config = {}; }, + ... +} @ args: + +with import ../lib/testing-python.nix { inherit system pkgs; }; + +makeTest (if pkgs.lib.isFunction f then f (args // { inherit pkgs; inherit (pkgs) lib; }) else f) From ac97edf013368c10c0c0978780d89b60bc520900 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 4 Nov 2019 22:49:45 +0100 Subject: [PATCH 171/377] nixos/test: use ptpython as repl --- nixos/lib/test-driver/test-driver.py | 8 ++------ nixos/lib/testing-python.nix | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py index 16d4b0b907d..45b7e229a5c 100644 --- a/nixos/lib/test-driver/test-driver.py +++ b/nixos/lib/test-driver/test-driver.py @@ -15,6 +15,7 @@ import sys import tempfile import time import unicodedata +import ptpython.repl CHAR_TO_KEY = { "A": "shift-a", @@ -690,12 +691,7 @@ def run_tests(): eprint("error: {}".format(str(e))) sys.exit(1) else: - while True: - try: - value = input("> ") - exec(value) - except EOFError: - break + ptpython.repl.embed(locals(), globals()) # TODO: Collect coverage data diff --git a/nixos/lib/testing-python.nix b/nixos/lib/testing-python.nix index 5240cba116f..21f6172e967 100644 --- a/nixos/lib/testing-python.nix +++ b/nixos/lib/testing-python.nix @@ -25,7 +25,7 @@ in rec { name = "nixos-test-driver"; nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ python3 ]; + buildInputs = [ (python3.withPackages (p: [ p.ptpython ])) ]; checkInputs = with python3Packages; [ pylint black ]; dontUnpack = true; From 7d19c5aaa76a43f8c63c665c09601a6ad3cdbc01 Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Mon, 4 Nov 2019 23:50:50 +0100 Subject: [PATCH 172/377] nixos/test: Pythonify documentation --- .../running-nixos-tests-interactively.xml | 12 +-- .../development/writing-nixos-tests.xml | 87 ++++++++++--------- 2 files changed, 50 insertions(+), 49 deletions(-) diff --git a/nixos/doc/manual/development/running-nixos-tests-interactively.xml b/nixos/doc/manual/development/running-nixos-tests-interactively.xml index e390d62fde2..ea3ba0e4bf7 100644 --- a/nixos/doc/manual/development/running-nixos-tests-interactively.xml +++ b/nixos/doc/manual/development/running-nixos-tests-interactively.xml @@ -14,14 +14,14 @@ starting VDE switch for network 1 > - You can then take any Perl statement, e.g. + You can then take any Python statement, e.g. -> startAll -> testScript -> $machine->succeed("touch /tmp/foo") -> print($machine->succeed("pwd")) # Show stdout of command +> start_all() +> test_script() +> machine.succeed("touch /tmp/foo") +> print(machine.succeed("pwd")) # Show stdout of command - The function testScript executes the entire test script + The function test_script executes the entire test script and drops you 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). diff --git a/nixos/doc/manual/development/writing-nixos-tests.xml b/nixos/doc/manual/development/writing-nixos-tests.xml index 6be2d0a4d23..24efd2e3273 100644 --- a/nixos/doc/manual/development/writing-nixos-tests.xml +++ b/nixos/doc/manual/development/writing-nixos-tests.xml @@ -8,7 +8,7 @@ A NixOS test is a Nix expression that has the following structure: -import ./make-test.nix { +import ./make-test-python.nix { # Either the configuration of a single machine: machine = @@ -27,11 +27,11 @@ import ./make-test.nix { testScript = '' - Perl code… + Python code… ''; } - The attribute testScript is a bit of Perl code that + The attribute 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 machine (if you need only one machine in your @@ -96,26 +96,27 @@ xlink:href="https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/virtualis - The test script is a sequence of Perl statements that perform various + 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, where - name is the identifier of the machine (which is - just machine if you didn’t specify multiple machines - using the nodes attribute). For instance, the following - starts the machine, waits until it has finished booting, then executes a - command and checks that the output is more-or-less correct: + name if this is also the + identifier of the machine in the declarative config. + If you didn't specify multiple machines using the nodes + attribute, it is just 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->waitForUnit("default.target"); -$machine->succeed("uname") =~ /Linux/ or die; +machine.start() +machine.wait_for_unit("default.target") +if not "Linux" in machine.succeed("uname"): + raise Exception("Wrong OS") The first line is actually unnecessary; machines are implicitly started when - you first execute an action on them (such as waitForUnit + 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: -startAll; +start_all() @@ -187,7 +188,7 @@ startAll; - getScreenText + get_screen_text @@ -204,7 +205,7 @@ startAll; - sendMonitorCommand + send_monitor_command @@ -215,23 +216,23 @@ startAll; - sendKeys + send_keys Simulate pressing keys on the virtual keyboard, e.g., - sendKeys("ctrl-alt-delete"). + send_keys("ctrl-alt-delete"). - sendChars + send_chars Simulate typing a sequence of characters on the virtual keyboard, e.g., - sendKeys("foobar\n") will type the string + send_keys("foobar\n") will type the string foobar followed by the Enter key. @@ -272,7 +273,7 @@ startAll; - waitUntilSucceeds + wait_until_succeeds @@ -282,7 +283,7 @@ startAll; - waitUntilFails + wait_until_fails @@ -292,7 +293,7 @@ startAll; - waitForUnit + wait_for_unit @@ -302,7 +303,7 @@ startAll; - waitForFile + wait_for_file @@ -312,7 +313,7 @@ startAll; - waitForOpenPort + wait_for_open_port @@ -323,7 +324,7 @@ startAll; - waitForClosedPort + wait_for_closed_port @@ -333,7 +334,7 @@ startAll; - waitForX + wait_for_x @@ -343,13 +344,13 @@ startAll; - waitForText + wait_for_text Wait until the supplied regular expressions matches the textual contents of the screen by using optical character recognition (see - getScreenText). + get_screen_text). @@ -361,23 +362,23 @@ startAll; - waitForWindow + wait_for_window Wait until an X11 window has appeared whose name matches the given - regular expression, e.g., waitForWindow(qr/Terminal/). + regular expression, e.g., wait_for_window("Terminal"). - copyFileFromHost + copy_file_from_host Copies a file from host to machine, e.g., - copyFileFromHost("myfile", "/etc/my/important/file"). + copy_file_from_host("myfile", "/etc/my/important/file"). The first argument is the file on the host. The file needs to be @@ -397,8 +398,8 @@ startAll; -$machine->systemctl("list-jobs --no-pager"); // runs `systemctl list-jobs --no-pager` -$machine->systemctl("list-jobs --no-pager", "any-user"); // spawns a shell for `any-user` and runs `systemctl --user list-jobs --no-pager` +machine.systemctl("list-jobs --no-pager") # runs `systemctl list-jobs --no-pager` +machine.systemctl("list-jobs --no-pager", "any-user") # spawns a shell for `any-user` and runs `systemctl --user list-jobs --no-pager` @@ -408,14 +409,14 @@ $machine->systemctl("list-jobs --no-pager", "any-user"); // spawns a shell for ` To test user units declared by systemd.user.services the - optional $user argument can be used: + optional user argument can be used: -$machine->start; -$machine->waitForX; -$machine->waitForUnit("xautolock.service", "x-session-user"); +machine.start() +machine.wait_for_x() +machine.wait_for_unit("xautolock.service", "x-session-user") - This applies to systemctl, getUnitInfo, - waitForUnit, startJob and - stopJob. + This applies to systemctl, get_unit_info, + wait_for_unit, start_job and + stop_job. From be48c5c5714146debbb13038d7c125fcba1b5e38 Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Tue, 10 Sep 2019 16:00:04 +0200 Subject: [PATCH 173/377] nixos/login: Port test to python --- nixos/tests/login.nix | 92 ++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 53 deletions(-) diff --git a/nixos/tests/login.nix b/nixos/tests/login.nix index bd8ed23a7b8..d36c1a91be4 100644 --- a/nixos/tests/login.nix +++ b/nixos/tests/login.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, latestKernel ? false, ... }: +import ./make-test-python.nix ({ pkgs, latestKernel ? false, ... }: { name = "login"; @@ -12,62 +12,48 @@ import ./make-test.nix ({ pkgs, latestKernel ? false, ... }: sound.enable = true; # needed for the factl test, /dev/snd/* exists without them but udev doesn't care then }; - testScript = - '' - $machine->waitForUnit('multi-user.target'); - $machine->waitUntilSucceeds("pgrep -f 'agetty.*tty1'"); - $machine->screenshot("postboot"); + testScript = '' + machine.wait_for_unit("multi-user.target") + machine.wait_until_succeeds("pgrep -f 'agetty.*tty1'") + machine.screenshot("postboot") - subtest "create user", sub { - $machine->succeed("useradd -m alice"); - $machine->succeed("(echo foobar; echo foobar) | passwd alice"); - }; + with subtest("create user"): + machine.succeed("useradd -m alice") + machine.succeed("(echo foobar; echo foobar) | passwd alice") - # Check whether switching VTs works. - subtest "virtual console switching", sub { - $machine->fail("pgrep -f 'agetty.*tty2'"); - $machine->sendKeys("alt-f2"); - $machine->waitUntilSucceeds("[ \$(fgconsole) = 2 ]"); - $machine->waitForUnit('getty@tty2.service'); - $machine->waitUntilSucceeds("pgrep -f 'agetty.*tty2'"); - }; + with subtest("Check whether switching VTs works"): + machine.fail("pgrep -f 'agetty.*tty2'") + machine.send_key("alt-f2") + machine.wait_until_succeeds("[ $(fgconsole) = 2 ]") + machine.wait_for_unit("getty@tty2.service") + machine.wait_until_succeeds("pgrep -f 'agetty.*tty2'") - # Log in as alice on a virtual console. - subtest "virtual console login", sub { - $machine->waitUntilTTYMatches(2, "login: "); - $machine->sendChars("alice\n"); - $machine->waitUntilTTYMatches(2, "login: alice"); - $machine->waitUntilSucceeds("pgrep login"); - $machine->waitUntilTTYMatches(2, "Password: "); - $machine->sendChars("foobar\n"); - $machine->waitUntilSucceeds("pgrep -u alice bash"); - $machine->sendChars("touch done\n"); - $machine->waitForFile("/home/alice/done"); - }; + with subtest("Log in as alice on a virtual console"): + machine.wait_until_tty_matches(2, "login: ") + machine.send_chars("alice\n") + machine.wait_until_tty_matches(2, "login: alice") + machine.wait_until_succeeds("pgrep login") + machine.wait_until_tty_matches(2, "Password: ") + machine.send_chars("foobar\n") + machine.wait_until_succeeds("pgrep -u alice bash") + machine.send_chars("touch done\n") + machine.wait_for_file("/home/alice/done") - # Check whether systemd gives and removes device ownership as - # needed. - subtest "device permissions", sub { - $machine->succeed("getfacl -p /dev/snd/timer | grep -q alice"); - $machine->sendKeys("alt-f1"); - $machine->waitUntilSucceeds("[ \$(fgconsole) = 1 ]"); - $machine->fail("getfacl -p /dev/snd/timer | grep -q alice"); - $machine->succeed("chvt 2"); - $machine->waitUntilSucceeds("getfacl -p /dev/snd/timer | grep -q alice"); - }; + with subtest("Systemd gives and removes device ownership as needed"): + machine.succeed("getfacl /dev/snd/timer | grep -q alice") + machine.send_key("alt-f1") + machine.wait_until_succeeds("[ $(fgconsole) = 1 ]") + machine.fail("getfacl /dev/snd/timer | grep -q alice") + machine.succeed("chvt 2") + machine.wait_until_succeeds("getfacl /dev/snd/timer | grep -q alice") - # Log out. - subtest "virtual console logout", sub { - $machine->sendChars("exit\n"); - $machine->waitUntilFails("pgrep -u alice bash"); - $machine->screenshot("mingetty"); - }; - - # Check whether ctrl-alt-delete works. - subtest "ctrl-alt-delete", sub { - $machine->sendKeys("ctrl-alt-delete"); - $machine->waitForShutdown; - }; - ''; + with subtest("Virtual console logout"): + machine.send_chars("exit\n") + machine.wait_until_fails("pgrep -u alice bash") + machine.screenshot("mingetty") + with subtest("Check whether ctrl-alt-delete works"): + machine.send_key("ctrl-alt-delete") + machine.wait_for_shutdown() + ''; }) From 75d3e810d68418b27d3e888bafe5c033c11735c7 Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Tue, 10 Sep 2019 15:59:50 +0200 Subject: [PATCH 174/377] nixos/bittorrent: Port test to python --- nixos/tests/bittorrent.nix | 58 +++++++++++++++++++++++--------------- 1 file changed, 36 insertions(+), 22 deletions(-) diff --git a/nixos/tests/bittorrent.nix b/nixos/tests/bittorrent.nix index 3b1169a1b7f..e5be652c711 100644 --- a/nixos/tests/bittorrent.nix +++ b/nixos/tests/bittorrent.nix @@ -6,7 +6,7 @@ # which only works if the first client successfully uses the UPnP-IGD # protocol to poke a hole in the NAT. -import ./make-test.nix ({ pkgs, ... }: +import ./make-test-python.nix ({ pkgs, ... }: let @@ -108,42 +108,56 @@ in testScript = { nodes, ... }: '' - startAll; + start_all() # Wait for network and miniupnpd. - $router->waitForUnit("network-online.target"); - $router->waitForUnit("miniupnpd"); + router.wait_for_unit("network-online.target") + router.wait_for_unit("miniupnpd") # Create the torrent. - $tracker->succeed("mkdir /tmp/data"); - $tracker->succeed("cp ${file} /tmp/data/test.tar.bz2"); - $tracker->succeed("transmission-create /tmp/data/test.tar.bz2 --private --tracker http://${externalTrackerAddress}:6969/announce --outfile /tmp/test.torrent"); - $tracker->succeed("chmod 644 /tmp/test.torrent"); + tracker.succeed("mkdir /tmp/data") + tracker.succeed( + "cp ${file} /tmp/data/test.tar.bz2" + ) + tracker.succeed( + "transmission-create /tmp/data/test.tar.bz2 --private --tracker http://${externalTrackerAddress}:6969/announce --outfile /tmp/test.torrent" + ) + tracker.succeed("chmod 644 /tmp/test.torrent") # Start the tracker. !!! use a less crappy tracker - $tracker->waitForUnit("network-online.target"); - $tracker->waitForUnit("opentracker.service"); - $tracker->waitForOpenPort(6969); + tracker.wait_for_unit("network-online.target") + tracker.wait_for_unit("opentracker.service") + tracker.wait_for_open_port(6969) # Start the initial seeder. - $tracker->succeed("transmission-remote --add /tmp/test.torrent --no-portmap --no-dht --download-dir /tmp/data"); + tracker.succeed( + "transmission-remote --add /tmp/test.torrent --no-portmap --no-dht --download-dir /tmp/data" + ) # Now we should be able to download from the client behind the NAT. - $tracker->waitForUnit("httpd"); - $client1->waitForUnit("network-online.target"); - $client1->succeed("transmission-remote --add http://${externalTrackerAddress}/test.torrent --download-dir /tmp >&2 &"); - $client1->waitForFile("/tmp/test.tar.bz2"); - $client1->succeed("cmp /tmp/test.tar.bz2 ${file}"); + tracker.wait_for_unit("httpd") + client1.wait_for_unit("network-online.target") + client1.succeed( + "transmission-remote --add http://${externalTrackerAddress}/test.torrent --download-dir /tmp >&2 &" + ) + client1.wait_for_file("/tmp/test.tar.bz2") + client1.succeed( + "cmp /tmp/test.tar.bz2 ${file}" + ) # Bring down the initial seeder. - # $tracker->stopJob("transmission"); + # tracker.stop_job("transmission") # Now download from the second client. This can only succeed if # the first client created a NAT hole in the router. - $client2->waitForUnit("network-online.target"); - $client2->succeed("transmission-remote --add http://${externalTrackerAddress}/test.torrent --no-portmap --no-dht --download-dir /tmp >&2 &"); - $client2->waitForFile("/tmp/test.tar.bz2"); - $client2->succeed("cmp /tmp/test.tar.bz2 ${file}"); + client2.wait_for_unit("network-online.target") + client2.succeed( + "transmission-remote --add http://${externalTrackerAddress}/test.torrent --no-portmap --no-dht --download-dir /tmp >&2 &" + ) + client2.wait_for_file("/tmp/test.tar.bz2") + client2.succeed( + "cmp /tmp/test.tar.bz2 ${file}" + ) ''; }) From 8eead58520f45f55cec40b7d7f0ca47e458356a8 Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Tue, 10 Sep 2019 19:55:35 +0200 Subject: [PATCH 175/377] nixos/postgres: Port test to python --- nixos/tests/postgresql.nix | 44 +++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/nixos/tests/postgresql.nix b/nixos/tests/postgresql.nix index ae5d6d095ea..e71c3888288 100644 --- a/nixos/tests/postgresql.nix +++ b/nixos/tests/postgresql.nix @@ -3,7 +3,7 @@ pkgs ? import ../.. { inherit system config; } }: -with import ../lib/testing.nix { inherit system pkgs; }; +with import ../lib/testing-python.nix { inherit system pkgs; }; with pkgs.lib; let @@ -40,29 +40,33 @@ let backupName = if backup-all then "all" else "postgres"; backupService = if backup-all then "postgresqlBackup" else "postgresqlBackup-postgres"; in '' - sub check_count { - my ($select, $nlines) = @_; - return 'test $(sudo -u postgres psql postgres -tAc "' . $select . '"|wc -l) -eq ' . $nlines; - } + def check_count(statement, lines): + return 'test $(sudo -u postgres psql postgres -tAc "{}"|wc -l) -eq {}'.format( + statement, lines + ) + + + machine.start() + machine.wait_for_unit("postgresql") - $machine->start; - $machine->waitForUnit("postgresql"); # postgresql should be available just after unit start - $machine->succeed("cat ${test-sql} | sudo -u postgres psql"); - $machine->shutdown; # make sure that postgresql survive restart (bug #1735) - sleep(2); - $machine->start; - $machine->waitForUnit("postgresql"); - $machine->fail(check_count("SELECT * FROM sth;", 3)); - $machine->succeed(check_count("SELECT * FROM sth;", 5)); - $machine->fail(check_count("SELECT * FROM sth;", 4)); - $machine->succeed(check_count("SELECT xpath(\'/test/text()\', doc) FROM xmltest;", 1)); + machine.succeed( + "cat ${test-sql} | sudo -u postgres psql" + ) + machine.shutdown() # make sure that postgresql survive restart (bug #1735) + time.sleep(2) + machine.start() + machine.wait_for_unit("postgresql") + machine.fail(check_count("SELECT * FROM sth;", 3)) + machine.succeed(check_count("SELECT * FROM sth;", 5)) + machine.fail(check_count("SELECT * FROM sth;", 4)) + machine.succeed(check_count("SELECT xpath('/test/text()', doc) FROM xmltest;", 1)) # Check backup service - $machine->succeed("systemctl start ${backupService}.service"); - $machine->succeed("zcat /var/backup/postgresql/${backupName}.sql.gz | grep 'ok'"); - $machine->succeed("stat -c '%a' /var/backup/postgresql/${backupName}.sql.gz | grep 600"); - $machine->shutdown; + machine.succeed("systemctl start ${backupService}.service") + machine.succeed("zcat /var/backup/postgresql/${backupName}.sql.gz | grep 'ok'") + machine.succeed("stat -c '%a' /var/backup/postgresql/${backupName}.sql.gz | grep 600") + machine.shutdown() ''; }; From 9b33b5d38c3f2f93ff03e195b090ed1b25f6d51c Mon Sep 17 00:00:00 2001 From: Jana Traue Date: Sun, 27 Oct 2019 11:24:26 +0100 Subject: [PATCH 176/377] nixos/gitea: convert test to python --- nixos/tests/gitea.nix | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/nixos/tests/gitea.nix b/nixos/tests/gitea.nix index b8ab6dabc8c..ffbc07cfbb2 100644 --- a/nixos/tests/gitea.nix +++ b/nixos/tests/gitea.nix @@ -3,7 +3,7 @@ pkgs ? import ../.. { inherit system config; } }: -with import ../lib/testing.nix { inherit system pkgs; }; +with import ../lib/testing-python.nix { inherit system pkgs; }; with pkgs.lib; { @@ -18,11 +18,11 @@ with pkgs.lib; }; testScript = '' - startAll; + start_all() - $machine->waitForUnit('gitea.service'); - $machine->waitForOpenPort('3000'); - $machine->succeed("curl --fail http://localhost:3000/"); + machine.wait_for_unit("gitea.service") + machine.wait_for_open_port(3000) + machine.succeed("curl --fail http://localhost:3000/") ''; }; @@ -37,11 +37,11 @@ with pkgs.lib; }; testScript = '' - startAll; + start_all() - $machine->waitForUnit('gitea.service'); - $machine->waitForOpenPort('3000'); - $machine->succeed("curl --fail http://localhost:3000/"); + machine.wait_for_unit("gitea.service") + machine.wait_for_open_port(3000) + machine.succeed("curl --fail http://localhost:3000/") ''; }; @@ -56,12 +56,14 @@ with pkgs.lib; }; testScript = '' - startAll; + start_all() - $machine->waitForUnit('gitea.service'); - $machine->waitForOpenPort('3000'); - $machine->succeed("curl --fail http://localhost:3000/"); - $machine->succeed("curl --fail http://localhost:3000/user/sign_up | grep 'Registration is disabled. Please contact your site administrator.'"); + machine.wait_for_unit("gitea.service") + machine.wait_for_open_port(3000) + machine.succeed("curl --fail http://localhost:3000/") + machine.succeed( + "curl --fail http://localhost:3000/user/sign_up | grep 'Registration is disabled. Please contact your site administrator.'" + ) ''; }; } From 2af2d59fd611ae6ee3ed8e7867243bdd6945f020 Mon Sep 17 00:00:00 2001 From: Julian Stecklina Date: Sun, 27 Oct 2019 11:44:06 +0100 Subject: [PATCH 177/377] nixos/emacs-daemon: convert test to python --- nixos/tests/emacs-daemon.nix | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/nixos/tests/emacs-daemon.nix b/nixos/tests/emacs-daemon.nix index 3594e35e343..b89d9b1bde6 100644 --- a/nixos/tests/emacs-daemon.nix +++ b/nixos/tests/emacs-daemon.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ...} : { +import ./make-test-python.nix ({ pkgs, ...} : { name = "emacs-daemon"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ ]; @@ -21,25 +21,28 @@ import ./make-test.nix ({ pkgs, ...} : { environment.variables.TEST_SYSTEM_VARIABLE = "system variable"; }; - testScript = - '' - $machine->waitForUnit("multi-user.target"); + testScript = '' + machine.wait_for_unit("multi-user.target") # checks that the EDITOR environment variable is set - $machine->succeed("test \$(basename \"\$EDITOR\") = emacseditor"); + machine.succeed('test $(basename "$EDITOR") = emacseditor') # waits for the emacs service to be ready - $machine->waitUntilSucceeds("systemctl --user status emacs.service | grep 'Active: active'"); + machine.wait_until_succeeds( + "systemctl --user status emacs.service | grep 'Active: active'" + ) # connects to the daemon - $machine->succeed("emacsclient --create-frame \$EDITOR &"); + machine.succeed("emacsclient --create-frame $EDITOR &") # checks that Emacs shows the edited filename - $machine->waitForText("emacseditor"); + machine.wait_for_text("emacseditor") # makes sure environment variables are accessible from Emacs - $machine->succeed("emacsclient --eval '(getenv \"TEST_SYSTEM_VARIABLE\")'") =~ /system variable/ or die; + machine.succeed( + "emacsclient --eval '(getenv \"TEST_SYSTEM_VARIABLE\")' | grep -q 'system variable'" + ) - $machine->screenshot("emacsclient"); + machine.screenshot("emacsclient") ''; }) From 8b12f0ddcc02ed2fd5fa5fc8d465cae765668f04 Mon Sep 17 00:00:00 2001 From: Jana Traue Date: Sun, 27 Oct 2019 12:08:55 +0100 Subject: [PATCH 178/377] nixos/quake3: convert test to python --- nixos/tests/quake3.nix | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/nixos/tests/quake3.nix b/nixos/tests/quake3.nix index 4253ce4a867..4d57e219790 100644 --- a/nixos/tests/quake3.nix +++ b/nixos/tests/quake3.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ...} : +import ./make-test-python.nix ({ pkgs, ...} : let @@ -59,37 +59,37 @@ rec { testScript = '' - startAll; + start_all() - $server->waitForUnit("quake3-server"); - $client1->waitForX; - $client2->waitForX; + server.wait_for_unit("quake3-server") + client1.wait_for_x() + client2.wait_for_x() - $client1->execute("quake3 +set r_fullscreen 0 +set name Foo +connect server &"); - $client2->execute("quake3 +set r_fullscreen 0 +set name Bar +connect server &"); + client1.execute("quake3 +set r_fullscreen 0 +set name Foo +connect server &") + client2.execute("quake3 +set r_fullscreen 0 +set name Bar +connect server &") - $server->waitUntilSucceeds("grep -q 'Foo.*entered the game' /tmp/log"); - $server->waitUntilSucceeds("grep -q 'Bar.*entered the game' /tmp/log"); + server.wait_until_succeeds("grep -q 'Foo.*entered the game' /tmp/log") + server.wait_until_succeeds("grep -q 'Bar.*entered the game' /tmp/log") - $server->sleep(10); # wait for a while to get a nice screenshot + server.sleep(10) # wait for a while to get a nice screenshot - $client1->block(); + client1.block() - $server->sleep(20); + server.sleep(20) - $client1->screenshot("screen1"); - $client2->screenshot("screen2"); + client1.screenshot("screen1") + client2.screenshot("screen2") - $client1->unblock(); + client1.unblock() - $server->sleep(10); + server.sleep(10) - $client1->screenshot("screen3"); - $client2->screenshot("screen4"); + client1.screenshot("screen3") + client2.screenshot("screen4") - $client1->shutdown(); - $client2->shutdown(); - $server->stopJob("quake3-server"); + client1.shutdown() + client2.shutdown() + server.stop_job("quake3-server") ''; }) From baec88a119949d5a4875a9063c0a199901c0415f Mon Sep 17 00:00:00 2001 From: Jana Traue Date: Sun, 27 Oct 2019 12:23:36 +0100 Subject: [PATCH 179/377] nixos/wireguard: convert default test to python --- nixos/tests/wireguard/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/tests/wireguard/default.nix b/nixos/tests/wireguard/default.nix index b0797b96323..8206823a918 100644 --- a/nixos/tests/wireguard/default.nix +++ b/nixos/tests/wireguard/default.nix @@ -2,7 +2,7 @@ let wg-snakeoil-keys = import ./snakeoil-keys.nix; in -import ../make-test.nix ({ pkgs, ...} : { +import ../make-test-python.nix ({ pkgs, ...} : { name = "wireguard"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ ma27 ]; @@ -86,12 +86,12 @@ import ../make-test.nix ({ pkgs, ...} : { }; testScript = '' - startAll; + start_all() - $peer0->waitForUnit("wireguard-wg0.service"); - $peer1->waitForUnit("wireguard-wg0.service"); + peer0.wait_for_unit("wireguard-wg0.service") + peer1.wait_for_unit("wireguard-wg0.service") - $peer1->succeed("ping -c5 fc00::1"); - $peer1->succeed("ping -c5 10.23.42.1") + peer1.succeed("ping -c5 fc00::1") + peer1.succeed("ping -c5 10.23.42.1") ''; }) From cdd4d4fadf0d2d0b8ce9c92fabf2a808d8a97e07 Mon Sep 17 00:00:00 2001 From: Jana Traue Date: Sun, 27 Oct 2019 12:35:15 +0100 Subject: [PATCH 180/377] nixos/wireguard: convert generated test to python --- nixos/tests/wireguard/generated.nix | 44 ++++++++++++++++------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/nixos/tests/wireguard/generated.nix b/nixos/tests/wireguard/generated.nix index 897feafe3ff..a29afd2d466 100644 --- a/nixos/tests/wireguard/generated.nix +++ b/nixos/tests/wireguard/generated.nix @@ -1,4 +1,4 @@ -import ../make-test.nix ({ pkgs, ...} : { +import ../make-test-python.nix ({ pkgs, ...} : { name = "wireguard-generated"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ ma27 grahamc ]; @@ -28,30 +28,34 @@ import ../make-test.nix ({ pkgs, ...} : { }; testScript = '' - startAll; + start_all() - $peer1->waitForUnit("wireguard-wg0.service"); - $peer2->waitForUnit("wireguard-wg0.service"); + peer1.wait_for_unit("wireguard-wg0.service") + peer2.wait_for_unit("wireguard-wg0.service") - my ($retcode, $peer1pubkey) = $peer1->execute("wg pubkey < /etc/wireguard/private"); - $peer1pubkey =~ s/\s+$//; - if ($retcode != 0) { - die "Could not read public key from peer1"; - } + retcode, peer1pubkey = peer1.execute("wg pubkey < /etc/wireguard/private") + if retcode != 0: + raise Exception("Could not read public key from peer1") - my ($retcode, $peer2pubkey) = $peer2->execute("wg pubkey < /etc/wireguard/private"); - $peer2pubkey =~ s/\s+$//; - if ($retcode != 0) { - die "Could not read public key from peer2"; - } + retcode, peer2pubkey = peer2.execute("wg pubkey < /etc/wireguard/private") + if retcode != 0: + raise Exception("Could not read public key from peer2") - $peer1->succeed("wg set wg0 peer $peer2pubkey allowed-ips 10.10.10.2/32 endpoint 192.168.1.2:12345 persistent-keepalive 1"); - $peer1->succeed("ip route replace 10.10.10.2/32 dev wg0 table main"); + peer1.succeed( + "wg set wg0 peer {} allowed-ips 10.10.10.2/32 endpoint 192.168.1.2:12345 persistent-keepalive 1".format( + peer2pubkey.strip() + ) + ) + peer1.succeed("ip route replace 10.10.10.2/32 dev wg0 table main") - $peer2->succeed("wg set wg0 peer $peer1pubkey allowed-ips 10.10.10.1/32 endpoint 192.168.1.1:12345 persistent-keepalive 1"); - $peer2->succeed("ip route replace 10.10.10.1/32 dev wg0 table main"); + peer2.succeed( + "wg set wg0 peer {} allowed-ips 10.10.10.1/32 endpoint 192.168.1.1:12345 persistent-keepalive 1".format( + peer1pubkey.strip() + ) + ) + peer2.succeed("ip route replace 10.10.10.1/32 dev wg0 table main") - $peer1->succeed("ping -c1 10.10.10.2"); - $peer2->succeed("ping -c1 10.10.10.1"); + peer1.succeed("ping -c1 10.10.10.2") + peer2.succeed("ping -c1 10.10.10.1") ''; }) From d4a5ea5219c548287d0c4f253e9b43b159199244 Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Sun, 27 Oct 2019 13:22:46 +0100 Subject: [PATCH 181/377] nixos/boot: Port test to python --- nixos/tests/boot.nix | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/nixos/tests/boot.nix b/nixos/tests/boot.nix index 57d8006d7ac..c5040f3b31f 100644 --- a/nixos/tests/boot.nix +++ b/nixos/tests/boot.nix @@ -3,7 +3,7 @@ pkgs ? import ../.. { inherit system config; } }: -with import ../lib/testing.nix { inherit system pkgs; }; +with import ../lib/testing-python.nix { inherit system pkgs; }; with pkgs.lib; let @@ -17,11 +17,11 @@ let ]; }).config.system.build.isoImage; - perlAttrs = params: "{ ${concatStringsSep ", " (mapAttrsToList (name: param: "${name} => ${builtins.toJSON param}") params)} }"; + pythonDict = params: "\n {\n ${concatStringsSep ",\n " (mapAttrsToList (name: param: "\"${name}\": \"${param}\"") params)},\n }\n"; makeBootTest = name: extraConfig: let - machineConfig = perlAttrs ({ qemuFlags = "-m 768"; } // extraConfig); + machineConfig = pythonDict ({ qemuFlags = "-m 768"; } // extraConfig); in makeTest { inherit iso; @@ -29,16 +29,16 @@ let nodes = { }; testScript = '' - my $machine = createMachine(${machineConfig}); - $machine->start; - $machine->waitForUnit("multi-user.target"); - $machine->succeed("nix verify -r --no-trust /run/current-system"); + machine = create_machine(${machineConfig}) + machine.start() + machine.wait_for_unit("multi-user.target") + machine.succeed("nix verify -r --no-trust /run/current-system") - # Test whether the channel got installed correctly. - $machine->succeed("nix-instantiate --dry-run '' -A hello"); - $machine->succeed("nix-env --dry-run -iA nixos.procps"); + with subtest("Check whether the channel got installed correctly"): + machine.succeed("nix-instantiate --dry-run '' -A hello") + machine.succeed("nix-env --dry-run -iA nixos.procps") - $machine->shutdown; + machine.shutdown() ''; }; @@ -60,7 +60,7 @@ let config.system.build.netbootIpxeScript ]; }; - machineConfig = perlAttrs ({ + machineConfig = pythonDict ({ qemuFlags = "-boot order=n -m 2000"; netBackendArgs = "tftp=${ipxeBootDir},bootfile=netboot.ipxe"; } // extraConfig); @@ -68,12 +68,11 @@ let makeTest { name = "boot-netboot-" + name; nodes = { }; - testScript = - '' - my $machine = createMachine(${machineConfig}); - $machine->start; - $machine->waitForUnit("multi-user.target"); - $machine->shutdown; + testScript = '' + machine = create_machine(${machineConfig}) + machine.start() + machine.wait_for_unit("multi-user.target") + machine.shutdown() ''; }; in { From e5ee59626309a3af57fe1befbff75081f942f5e3 Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Sun, 27 Oct 2019 13:53:55 +0100 Subject: [PATCH 182/377] nixos/acme: Port test to python --- nixos/tests/acme.nix | 53 ++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/nixos/tests/acme.nix b/nixos/tests/acme.nix index 206d97849f0..6bd315ff1ea 100644 --- a/nixos/tests/acme.nix +++ b/nixos/tests/acme.nix @@ -1,6 +1,6 @@ let commonConfig = ./common/letsencrypt/common.nix; -in import ./make-test.nix { +in import ./make-test-python.nix { name = "acme"; nodes = rec { @@ -90,39 +90,44 @@ in import ./make-test.nix { newServerSystem = nodes.webserver2.config.system.build.toplevel; switchToNewServer = "${newServerSystem}/bin/switch-to-configuration test"; in - # Note, waitForUnit does not work for oneshot services that do not have RemainAfterExit=true, + # Note, wait_for_unit does not work for oneshot services that do not have RemainAfterExit=true, # this is because a oneshot goes from inactive => activating => inactive, and never # reaches the active state. To work around this, we create some mock target units which # get pulled in by the oneshot units. The target units linger after activation, and hence we # can use them to probe that a oneshot fired. It is a bit ugly, but it is the best we can do '' - $client->start; - $letsencrypt->start; - $acmeStandalone->start; + client.start() + letsencrypt.start() + acmeStandalone.start() - $letsencrypt->waitForUnit("default.target"); - $letsencrypt->waitForUnit("pebble.service"); + letsencrypt.wait_for_unit("default.target") + letsencrypt.wait_for_unit("pebble.service") - subtest "can request certificate with HTTPS-01 challenge", sub { - $acmeStandalone->waitForUnit("default.target"); - $acmeStandalone->succeed("systemctl start acme-standalone.com.service"); - $acmeStandalone->waitForUnit("acme-finished-standalone.com.target"); - }; + with subtest("can request certificate with HTTPS-01 challenge"): + acmeStandalone.wait_for_unit("default.target") + acmeStandalone.succeed("systemctl start acme-standalone.com.service") + acmeStandalone.wait_for_unit("acme-finished-standalone.com.target") - $client->waitForUnit("default.target"); + client.wait_for_unit("default.target") - $client->succeed('curl https://acme-v02.api.letsencrypt.org:15000/roots/0 > /tmp/ca.crt'); - $client->succeed('curl https://acme-v02.api.letsencrypt.org:15000/intermediate-keys/0 >> /tmp/ca.crt'); + client.succeed("curl https://acme-v02.api.letsencrypt.org:15000/roots/0 > /tmp/ca.crt") + client.succeed( + "curl https://acme-v02.api.letsencrypt.org:15000/intermediate-keys/0 >> /tmp/ca.crt" + ) - subtest "Can request certificate for nginx service", sub { - $webserver->waitForUnit("acme-finished-a.example.com.target"); - $client->succeed('curl --cacert /tmp/ca.crt https://a.example.com/ | grep -qF "hello world"'); - }; + with subtest("Can request certificate for nginx service"): + webserver.wait_for_unit("acme-finished-a.example.com.target") + client.succeed( + "curl --cacert /tmp/ca.crt https://a.example.com/ | grep -qF 'hello world'" + ) - subtest "Can add another certificate for nginx service", sub { - $webserver->succeed("/run/current-system/fine-tune/child-1/bin/switch-to-configuration test"); - $webserver->waitForUnit("acme-finished-b.example.com.target"); - $client->succeed('curl --cacert /tmp/ca.crt https://b.example.com/ | grep -qF "hello world"'); - }; + with subtest("Can add another certificate for nginx service"): + webserver.succeed( + "/run/current-system/fine-tune/child-1/bin/switch-to-configuration test" + ) + webserver.wait_for_unit("acme-finished-b.example.com.target") + client.succeed( + "curl --cacert /tmp/ca.crt https://b.example.com/ | grep -qF 'hello world'" + ) ''; } From 986a1eb32b9e9f8c099de6153e13492be96820f4 Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Sun, 27 Oct 2019 13:56:33 +0100 Subject: [PATCH 183/377] nixos/ammonite: Port test to python --- nixos/tests/ammonite.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/tests/ammonite.nix b/nixos/tests/ammonite.nix index fedfde233e8..1955e42be5f 100644 --- a/nixos/tests/ammonite.nix +++ b/nixos/tests/ammonite.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ...} : { +import ./make-test-python.nix ({ pkgs, ...} : { name = "ammonite"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ nequissimus ]; @@ -13,8 +13,8 @@ import ./make-test.nix ({ pkgs, ...} : { }; testScript = '' - startAll; + start_all() - $amm->succeed("amm -c 'val foo = 21; println(foo * 2)' | grep 42") + amm.succeed("amm -c 'val foo = 21; println(foo * 2)' | grep 42") ''; }) From 48508da01e754f3ed3a7d2656bbc695ab66036bc Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Sun, 27 Oct 2019 14:20:06 +0100 Subject: [PATCH 184/377] nixos/automysqlackup: Port test to python --- nixos/tests/automysqlbackup.nix | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/nixos/tests/automysqlbackup.nix b/nixos/tests/automysqlbackup.nix index ada104a34de..224b93862fb 100644 --- a/nixos/tests/automysqlbackup.nix +++ b/nixos/tests/automysqlbackup.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, lib, ... }: +import ./make-test-python.nix ({ pkgs, lib, ... }: { name = "automysqlbackup"; @@ -15,20 +15,24 @@ import ./make-test.nix ({ pkgs, lib, ... }: }; testScript = '' - startAll; + start_all() # Need to have mysql started so that it can be populated with data. - $machine->waitForUnit("mysql.service"); + machine.wait_for_unit("mysql.service") - # Wait for testdb to be fully populated (5 rows). - $machine->waitUntilSucceeds("mysql -u root -D testdb -N -B -e 'select count(id) from tests' | grep -q 5"); + with subtest("Wait for testdb to be fully populated (5 rows)."): + machine.wait_until_succeeds( + "mysql -u root -D testdb -N -B -e 'select count(id) from tests' | grep -q 5" + ) - # Do a backup and wait for it to start - $machine->startJob("automysqlbackup.service"); - $machine->waitForJob("automysqlbackup.service"); + with subtest("Do a backup and wait for it to start"): + machine.start_job("automysqlbackup.service") + machine.wait_for_job("automysqlbackup.service") - # wait for backup file and check that data appears in backup - $machine->waitForFile("/var/backup/mysql/daily/testdb"); - $machine->succeed("${pkgs.gzip}/bin/zcat /var/backup/mysql/daily/testdb/daily_testdb_*.sql.gz | grep hello"); + with subtest("wait for backup file and check that data appears in backup"): + machine.wait_for_file("/var/backup/mysql/daily/testdb") + machine.succeed( + "${pkgs.gzip}/bin/zcat /var/backup/mysql/daily/testdb/daily_testdb_*.sql.gz | grep hello" + ) ''; }) From 40396a7e12419fc772063d2a3fa87ec7d14a46d9 Mon Sep 17 00:00:00 2001 From: Julian Stecklina Date: Sun, 27 Oct 2019 13:53:36 +0100 Subject: [PATCH 185/377] nixos/zfs: convert test to python --- nixos/tests/zfs.nix | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/nixos/tests/zfs.nix b/nixos/tests/zfs.nix index d7a08268e98..8f844aca416 100644 --- a/nixos/tests/zfs.nix +++ b/nixos/tests/zfs.nix @@ -7,7 +7,7 @@ with import ../lib/testing.nix { inherit system pkgs; }; let - makeTest = import ./make-test.nix; + makeTest = import ./make-test-python.nix; makeZfsTest = name: { kernelPackage ? pkgs.linuxPackages_latest @@ -34,12 +34,12 @@ let }; testScript = '' - $machine->succeed("modprobe zfs"); - $machine->succeed("zpool status"); + machine.succeed("modprobe zfs") + machine.succeed("zpool status") - $machine->succeed("ls /dev"); + machine.succeed("ls /dev") - $machine->succeed( + machine.succeed( "mkdir /tmp/mnt", "udevadm settle", @@ -55,9 +55,7 @@ let "umount /tmp/mnt", "zpool destroy rpool", "udevadm settle" - - ); - + ) '' + extraTest; }; @@ -70,8 +68,8 @@ in { unstable = makeZfsTest "unstable" { enableUnstable = true; extraTest = '' - $machine->succeed( - "echo password | zpool create -o altroot='/tmp/mnt' -O encryption=aes-256-gcm -O keyformat=passphrase rpool /dev/vdb1", + machine.succeed( + "echo password | zpool create -o altroot=\"/tmp/mnt\" -O encryption=aes-256-gcm -O keyformat=passphrase rpool /dev/vdb1", "zfs create -o mountpoint=legacy rpool/root", "mount -t zfs rpool/root /tmp/mnt", "udevadm settle", @@ -79,7 +77,7 @@ in { "umount /tmp/mnt", "zpool destroy rpool", "udevadm settle" - ); + ) ''; }; From 4704bbdd183deed592df261a2857a411840d06f8 Mon Sep 17 00:00:00 2001 From: Stig Palmquist Date: Thu, 24 Oct 2019 15:26:17 +0200 Subject: [PATCH 186/377] perlPackages.CryptOpenSSLX509: init at 1.813 --- pkgs/top-level/perl-packages.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index dcd72f0267a..d8037d399c8 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -3601,6 +3601,23 @@ let buildInputs = [ CryptOpenSSLGuess ]; }; + CryptOpenSSLX509 = buildPerlPackage rec { + pname = "Crypt-OpenSSL-X509"; + version = "1.813"; + src = fetchurl { + url = "mirror://cpan/authors/id/J/JO/JONASBN/Crypt-OpenSSL-X509-1.813.tar.gz"; + sha256 = "684bd888d2ed4c748f8f6dd8e87c14afa2974b12ee01faa082ad9cfa1e321e62"; + }; + NIX_CFLAGS_COMPILE = "-I${pkgs.openssl.dev}/include"; + NIX_CFLAGS_LINK = "-L${pkgs.openssl.out}/lib -lcrypto"; + meta = { + homepage = "https://github.com/dsully/perl-crypt-openssl-x509"; + description = "Perl extension to OpenSSL's X509 API"; + license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; + maintainers = [ maintainers.sgo ]; + }; + }; + CryptPBKDF2 = buildPerlPackage { pname = "Crypt-PBKDF2"; version = "0.161520"; From 3d89ead7c698ad7cdab22903d78303405832bd11 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 5 Nov 2019 00:38:42 +0100 Subject: [PATCH 187/377] gjs: move to top-level --- nixos/tests/gjs.nix | 4 ++-- pkgs/desktops/gnome-3/default.nix | 4 ++-- pkgs/desktops/gnome-3/devtools/anjuta/default.nix | 4 ++-- .../gnome-3/extensions/drop-down-terminal/default.nix | 5 ++--- pkgs/desktops/gnome-3/extensions/gsconnect/default.nix | 4 ++-- .../gnome-3/core => development/libraries}/gjs/default.nix | 2 +- pkgs/development/libraries/libsecret/default.nix | 4 ++-- pkgs/tools/misc/ostree/default.nix | 4 ++-- pkgs/top-level/all-packages.nix | 2 ++ 9 files changed, 17 insertions(+), 16 deletions(-) rename pkgs/{desktops/gnome-3/core => development/libraries}/gjs/default.nix (94%) diff --git a/nixos/tests/gjs.nix b/nixos/tests/gjs.nix index e6002ef98dd..87c8d7f2817 100644 --- a/nixos/tests/gjs.nix +++ b/nixos/tests/gjs.nix @@ -3,13 +3,13 @@ import ./make-test.nix ({ pkgs, ... }: { name = "gjs"; meta = { - maintainers = pkgs.gnome3.gjs.meta.maintainers; + maintainers = pkgs.gjs.meta.maintainers; }; machine = { pkgs, ... }: { imports = [ ./common/x11.nix ]; environment.systemPackages = with pkgs; [ gnome-desktop-testing ]; - environment.variables.XDG_DATA_DIRS = [ "${pkgs.gnome3.gjs.installedTests}/share" ]; + environment.variables.XDG_DATA_DIRS = [ "${pkgs.gjs.installedTests}/share" ]; }; testScript = '' diff --git a/pkgs/desktops/gnome-3/default.nix b/pkgs/desktops/gnome-3/default.nix index 952f6eaf4f8..6d2ae92ac80 100644 --- a/pkgs/desktops/gnome-3/default.nix +++ b/pkgs/desktops/gnome-3/default.nix @@ -49,8 +49,6 @@ lib.makeScope pkgs.newScope (self: with self; { gdm = callPackage ./core/gdm { }; - gjs = callPackage ./core/gjs { }; - gnome-backgrounds = callPackage ./core/gnome-backgrounds { }; gnome-bluetooth = callPackage ./core/gnome-bluetooth { }; @@ -360,4 +358,6 @@ lib.makeScope pkgs.newScope (self: with self; { inherit (pkgs) vala; # added 2019-10-10 inherit (pkgs) gegl_0_4; # added 2019-10-31 + + inherit (pkgs) gjs; # added 2019-01-05 }) diff --git a/pkgs/desktops/gnome-3/devtools/anjuta/default.nix b/pkgs/desktops/gnome-3/devtools/anjuta/default.nix index 4df3ed10a69..4f5562bbffa 100644 --- a/pkgs/desktops/gnome-3/devtools/anjuta/default.nix +++ b/pkgs/desktops/gnome-3/devtools/anjuta/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, pkgconfig, gnome3, gtk3, flex, bison, libxml2, intltool, +{ stdenv, fetchurl, pkgconfig, gnome3, gtk3, gjs, flex, bison, libxml2, intltool, gdl, libgda, gtksourceview, gsettings-desktop-schemas, itstool, python3, ncurses, makeWrapper }: @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { ncurses ]; buildInputs = [ - flex bison gtk3 libxml2 gnome3.gjs gdl + flex bison gtk3 libxml2 gjs gdl libgda gtksourceview gsettings-desktop-schemas ]; diff --git a/pkgs/desktops/gnome-3/extensions/drop-down-terminal/default.nix b/pkgs/desktops/gnome-3/extensions/drop-down-terminal/default.nix index c0ecfc29e2c..4e7fa17d495 100644 --- a/pkgs/desktops/gnome-3/extensions/drop-down-terminal/default.nix +++ b/pkgs/desktops/gnome-3/extensions/drop-down-terminal/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, substituteAll, gnome3, vte }: +{ stdenv, fetchFromGitHub, substituteAll, gjs, vte }: stdenv.mkDerivation rec { pname = "gnome-shell-extension-drop-down-terminal"; @@ -16,8 +16,7 @@ stdenv.mkDerivation rec { patches = [ (substituteAll { src = ./fix_vte_and_gjs.patch; - inherit vte; - gjs = gnome3.gjs; + inherit gjs vte; }) ]; diff --git a/pkgs/desktops/gnome-3/extensions/gsconnect/default.nix b/pkgs/desktops/gnome-3/extensions/gsconnect/default.nix index cb1dd5ceaa8..ca232d090a8 100644 --- a/pkgs/desktops/gnome-3/extensions/gsconnect/default.nix +++ b/pkgs/desktops/gnome-3/extensions/gsconnect/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchFromGitHub, substituteAll, python3, openssl, folks, gsound , meson, ninja, libxml2, pkgconfig, gobject-introspection, wrapGAppsHook -, glib, gtk3, at-spi2-core, upower, openssh, gnome3 }: +, glib, gtk3, at-spi2-core, upower, openssh, gnome3, gjs }: stdenv.mkDerivation rec { pname = "gnome-shell-gsconnect"; @@ -39,7 +39,7 @@ stdenv.mkDerivation rec { gsound upower gnome3.caribou - gnome3.gjs # for running daemon + gjs # for running daemon gnome3.evolution-data-server # for libebook-contacts typelib ]; diff --git a/pkgs/desktops/gnome-3/core/gjs/default.nix b/pkgs/development/libraries/gjs/default.nix similarity index 94% rename from pkgs/desktops/gnome-3/core/gjs/default.nix rename to pkgs/development/libraries/gjs/default.nix index b0c1e2d3077..abad7fc2fc9 100644 --- a/pkgs/desktops/gnome-3/core/gjs/default.nix +++ b/pkgs/development/libraries/gjs/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; passthru = { - updateScript = gnome3.updateScript { packageName = "gjs"; attrPath = "gnome3.gjs"; }; + updateScript = gnome3.updateScript { packageName = "gjs"; }; }; outputs = [ "out" "installedTests" ]; diff --git a/pkgs/development/libraries/libsecret/default.nix b/pkgs/development/libraries/libsecret/default.nix index 0a3c110bbbd..ca2449adefd 100644 --- a/pkgs/development/libraries/libsecret/default.nix +++ b/pkgs/development/libraries/libsecret/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchurl, glib, pkgconfig, gettext, libxslt, python3, docbook_xsl, docbook_xml_dtd_42 -, libgcrypt, gobject-introspection, vala, gtk-doc, gnome3, libintl, dbus, xvfb_run }: +, libgcrypt, gobject-introspection, vala, gtk-doc, gnome3, gjs, libintl, dbus, xvfb_run }: stdenv.mkDerivation rec { pname = "libsecret"; @@ -27,7 +27,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - installCheckInputs = [ python3 python3.pkgs.dbus-python python3.pkgs.pygobject3 xvfb_run dbus gnome3.gjs ]; + installCheckInputs = [ python3 python3.pkgs.dbus-python python3.pkgs.pygobject3 xvfb_run dbus gjs ]; # needs to run after install because typelibs point to absolute paths doInstallCheck = false; # Failed to load shared library '/force/shared/libmock_service.so.0' referenced by the typelib diff --git a/pkgs/tools/misc/ostree/default.nix b/pkgs/tools/misc/ostree/default.nix index 9f423cf6a4d..4c5e4a50ef6 100644 --- a/pkgs/tools/misc/ostree/default.nix +++ b/pkgs/tools/misc/ostree/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch, pkgconfig, gtk-doc, gobject-introspection, gnome3 +{ stdenv, fetchurl, fetchpatch, pkgconfig, gtk-doc, gobject-introspection, gjs , glib, systemd, xz, e2fsprogs, libsoup, gpgme, which, autoconf, automake, libtool, fuse, utillinuxMinimal, libselinux , libarchive, libcap, bzip2, yacc, libxslt, docbook_xsl, docbook_xml_dtd_42, python3 }: @@ -34,7 +34,7 @@ stdenv.mkDerivation rec { glib systemd e2fsprogs libsoup gpgme fuse libselinux libcap libarchive bzip2 xz utillinuxMinimal # for libmount - (python3.withPackages (p: with p; [ pyyaml ])) gnome3.gjs # for tests + (python3.withPackages (p: with p; [ pyyaml ])) gjs # for tests ]; preConfigure = '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 69b3af91c2f..7a2dd987fcf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -877,6 +877,8 @@ in gitter = callPackage ../applications/networking/instant-messengers/gitter { }; + gjs = callPackage ../development/libraries/gjs { }; + glasgow = with python3Packages; toPythonApplication glasgow; gucci = callPackage ../tools/text/gucci { }; From a2f69282576b441447e454a166014278c4bfbcbb Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 5 Nov 2019 00:49:38 +0100 Subject: [PATCH 188/377] gjs: clean up * format * add homepage --- pkgs/development/libraries/gjs/default.nix | 51 +++++++++++++++++----- 1 file changed, 40 insertions(+), 11 deletions(-) diff --git a/pkgs/development/libraries/gjs/default.nix b/pkgs/development/libraries/gjs/default.nix index abad7fc2fc9..46550c3e50f 100644 --- a/pkgs/development/libraries/gjs/default.nix +++ b/pkgs/development/libraries/gjs/default.nix @@ -1,6 +1,19 @@ -{ fetchurl, stdenv, pkgconfig, gnome3, gtk3, atk, gobject-introspection -, spidermonkey_60, pango, readline, glib, libxml2, dbus, gdk-pixbuf -, makeWrapper }: +{ fetchurl +, stdenv +, pkgconfig +, gnome3 +, gtk3 +, atk +, gobject-introspection +, spidermonkey_60 +, pango +, readline +, glib +, libxml2 +, dbus +, gdk-pixbuf +, makeWrapper +}: stdenv.mkDerivation rec { pname = "gjs"; @@ -11,16 +24,25 @@ stdenv.mkDerivation rec { sha256 = "1xf68rbagkflb9yi3visfw8cbxqlzd717y8jakgw0y6whzm1dpxl"; }; - passthru = { - updateScript = gnome3.updateScript { packageName = "gjs"; }; - }; - outputs = [ "out" "installedTests" ]; - nativeBuildInputs = [ pkgconfig makeWrapper ]; - buildInputs = [ libxml2 gobject-introspection glib pango readline dbus ]; + nativeBuildInputs = [ + pkgconfig + makeWrapper + ]; - propagatedBuildInputs = [ spidermonkey_60 ]; + buildInputs = [ + libxml2 + gobject-introspection + glib + pango + readline + dbus + ]; + + propagatedBuildInputs = [ + spidermonkey_60 + ]; configureFlags = [ "--enable-installed-tests" @@ -42,10 +64,17 @@ stdenv.mkDerivation rec { --prefix GI_TYPELIB_PATH : "${stdenv.lib.makeSearchPath "lib/girepository-1.0" [ gtk3 atk pango.out gdk-pixbuf ]}:$installedTests/libexec/gjs/installed-tests" ''; + passthru = { + updateScript = gnome3.updateScript { + packageName = "gjs"; + }; + }; + meta = with stdenv.lib; { description = "JavaScript bindings for GNOME"; + homepage = "https://gitlab.gnome.org/GNOME/gjs/blob/master/doc/Home.md"; + license = licenses.lgpl2Plus; maintainers = gnome3.maintainers; platforms = platforms.linux; - license = licenses.lgpl2Plus; }; } From a17cda6ddf06970522dd57a352496c29027c18af Mon Sep 17 00:00:00 2001 From: xrelkd <46590321+xrelkd@users.noreply.github.com> Date: Tue, 5 Nov 2019 08:08:53 +0800 Subject: [PATCH 189/377] youtube-dl: 2019.10.29 -> 2019.11.05 --- pkgs/tools/misc/youtube-dl/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/youtube-dl/default.nix b/pkgs/tools/misc/youtube-dl/default.nix index 610738daebd..bc198eb595b 100644 --- a/pkgs/tools/misc/youtube-dl/default.nix +++ b/pkgs/tools/misc/youtube-dl/default.nix @@ -18,11 +18,11 @@ buildPythonPackage rec { # The websites youtube-dl deals with are a very moving target. That means that # downloads break constantly. Because of that, updates should always be backported # to the latest stable release. - version = "2019.10.29"; + version = "2019.11.05"; src = fetchurl { url = "https://yt-dl.org/downloads/${version}/${pname}-${version}.tar.gz"; - sha256 = "1lq6ycjbx07831s24yx42q6m6svas4mf02vbszw0965dbbzs7vp4"; + sha256 = "129461i4103slqj3nq69djnlmgjj3lfgmazn41avc5g967w29b85"; }; nativeBuildInputs = [ makeWrapper ]; From a5d9600125f6e74d39bf33feca038036022f929d Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Mon, 4 Nov 2019 23:00:00 -0500 Subject: [PATCH 190/377] comic-neue: 2.2 -> 2.3 --- pkgs/data/fonts/comic-neue/default.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/data/fonts/comic-neue/default.nix b/pkgs/data/fonts/comic-neue/default.nix index 2615d0260f0..6dcefe90055 100644 --- a/pkgs/data/fonts/comic-neue/default.nix +++ b/pkgs/data/fonts/comic-neue/default.nix @@ -1,7 +1,7 @@ { lib, fetchzip }: let - version = "2.2"; + version = "2.3"; in fetchzip rec { name = "comic-neue-${version}"; @@ -9,15 +9,15 @@ in fetchzip rec { postFetch = '' mkdir -vp $out/share/{doc,fonts} - unzip -j $downloadedFile comic-neue-2.2/\*.otf -d $out/share/fonts/opentype - unzip -j $downloadedFile comic-neue-2.2/\*.ttf -d $out/share/fonts/truetype - unzip -j $downloadedFile comic-neue-2.2/\*.eot -d $out/share/fonts/EOT - unzip -j $downloadedFile comic-neue-2.2/\*.woff -d $out/share/fonts/WOFF - unzip -j $downloadedFile comic-neue-2.2/\*.woff2 -d $out/share/fonts/WOFF2 - unzip -j $downloadedFile comic-neue-2.2/\*.pdf comic-neue-2.2/FONTLOG.txt comic-neue-2.2/OFL-FAQ.txt comic-neue-2.2/SIL-License.txt -d $out/share/doc/${name} + unzip -j $downloadedFile OTF/\*.otf -d $out/share/fonts/opentype + unzip -j $downloadedFile Web/\*.ttf -d $out/share/fonts/truetype + unzip -j $downloadedFile Web/\*.eot -d $out/share/fonts/EOT + unzip -j $downloadedFile Web/\*.woff -d $out/share/fonts/WOFF + unzip -j $downloadedFile Web/\*.woff2 -d $out/share/fonts/WOFF2 + unzip -j $downloadedFile \*.pdf FONTLOG.txt OFL-FAQ.txt SIL-License.txt -d $out/share/doc/${name} ''; - sha256 = "1yypq5aqqzv3q1c6vx5130mi2iwihzzvrawhwqpwsfjl0p25sq9q"; + sha256 = "1gs4vhys0m3qsw06qaxzyi81f06w5v66kbyl64yw3pq2rb656779"; meta = with lib; { homepage = http://comicneue.com/; From c855dceacf55060540b89151dc8d1aadd118406c Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Mon, 4 Nov 2019 21:00:00 -0500 Subject: [PATCH 191/377] python3Packages.nvchecker: 1.4.4 -> 1.5 --- .../python-modules/nvchecker/default.nix | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/nvchecker/default.nix b/pkgs/development/python-modules/nvchecker/default.nix index f21624acf14..641db7008f8 100644 --- a/pkgs/development/python-modules/nvchecker/default.nix +++ b/pkgs/development/python-modules/nvchecker/default.nix @@ -1,22 +1,20 @@ -{ stdenv, buildPythonPackage, fetchPypi, pythonOlder, pytest, setuptools, structlog, pytest-asyncio, flaky, tornado, pycurl }: +{ stdenv, buildPythonPackage, fetchPypi, pythonOlder, pytest, setuptools, structlog, pytest-asyncio, flaky, tornado, pycurl, pytest-httpbin }: buildPythonPackage rec { pname = "nvchecker"; - version = "1.4.4"; + version = "1.5"; src = fetchPypi { inherit pname version; - sha256 = "6276ed2a897a30ccd71bfd7cf9e6b7842f37f3d5a86d7a70fe46f437c62b1875"; + sha256 = "0973f7c3ea5ad65fb19837e8915882a9f2c2f21f5c2589005478697391fea2fd"; }; propagatedBuildInputs = [ setuptools structlog tornado pycurl ]; - checkInputs = [ pytest pytest-asyncio flaky ]; - - # requires network access - doCheck = false; + checkInputs = [ pytest pytest-asyncio flaky pytest-httpbin ]; + # disable `test_ubuntupkg` because it requires network checkPhase = '' - py.test + py.test -m "not needs_net" --ignore=tests/test_ubuntupkg.py ''; disabled = pythonOlder "3.5"; From 8632698b067243c2693c0d050c0a58c8227f907f Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Tue, 29 Oct 2019 06:31:14 +0000 Subject: [PATCH 192/377] =?UTF-8?q?ocamlPackages.checkseum:=200.0.3=20?= =?UTF-8?q?=E2=86=92=200.1.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the “decompress” library on non-x86_64 platforms --- .../ocaml-modules/checkseum/default.nix | 45 +++++++------------ .../ocaml-modules/decompress/default.nix | 1 - 2 files changed, 16 insertions(+), 30 deletions(-) diff --git a/pkgs/development/ocaml-modules/checkseum/default.nix b/pkgs/development/ocaml-modules/checkseum/default.nix index 18e06d260f4..731dd476c5d 100644 --- a/pkgs/development/ocaml-modules/checkseum/default.nix +++ b/pkgs/development/ocaml-modules/checkseum/default.nix @@ -1,41 +1,28 @@ -{ stdenv, fetchurl, ocaml, findlib, dune, alcotest, cmdliner, fmt, optint, rresult }: +{ lib, fetchurl, buildDunePackage +, bigarray-compat, optint +, cmdliner, fmt, rresult +, alcotest +}: -if !stdenv.lib.versionAtLeast ocaml.version "4.03" -then throw "checkseum is not available for OCaml ${ocaml.version}" -else +buildDunePackage rec { + version = "0.1.1"; + pname = "checkseum"; -# The C implementation is not portable: x86 only -let hasC = stdenv.isi686 || stdenv.isx86_64; in - -stdenv.mkDerivation rec { - version = "0.0.3"; - name = "ocaml${ocaml.version}-checkseum-${version}"; src = fetchurl { - url = "https://github.com/mirage/checkseum/releases/download/v0.0.3/checkseum-v0.0.3.tbz"; - sha256 = "12j45zsvil1ynwx1x8fbddhqacc8r1zf7f6h576y3f3yvbg7l1fm"; + url = "https://github.com/mirage/checkseum/releases/download/v${version}/checkseum-v${version}.tbz"; + sha256 = "0aa2r1l65a5hcgciw6n8r5ij4gpgg0cf9k24isybxiaiz63k94d3"; }; - postPatch = stdenv.lib.optionalString (!hasC) '' - rm -r bin src-c - ''; + buildInputs = [ cmdliner fmt rresult ]; + propagatedBuildInputs = [ bigarray-compat optint ]; + checkInputs = lib.optionals doCheck [ alcotest ]; - buildInputs = [ ocaml findlib dune alcotest cmdliner fmt rresult ]; - propagatedBuildInputs = [ optint ]; - - buildPhase = "dune build"; - - doCheck = hasC; - checkPhase = "dune runtest"; - - inherit (dune) installPhase; - - passthru = { inherit hasC; }; + doCheck = true; meta = { homepage = "https://github.com/mirage/checkseum"; description = "ADLER-32 and CRC32C Cyclic Redundancy Check"; - license = stdenv.lib.licenses.mit; - maintainers = [ stdenv.lib.maintainers.vbgl ]; - inherit (ocaml.meta) platforms; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.vbgl ]; }; } diff --git a/pkgs/development/ocaml-modules/decompress/default.nix b/pkgs/development/ocaml-modules/decompress/default.nix index 828d3a98f9d..753f894e085 100644 --- a/pkgs/development/ocaml-modules/decompress/default.nix +++ b/pkgs/development/ocaml-modules/decompress/default.nix @@ -22,6 +22,5 @@ buildDunePackage rec { license = lib.licenses.mit; maintainers = [ lib.maintainers.vbgl ]; homepage = "https://github.com/mirage/decompress"; - broken = !checkseum.hasC; }; } From 1f2fff49e0c39013ab01c11409795d48038a2c6e Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Tue, 5 Nov 2019 08:18:29 +0100 Subject: [PATCH 193/377] nextcloud-client: 2.6.0 -> 2.6.1 https://github.com/nextcloud/desktop/releases/tag/v2.6.1 --- pkgs/applications/networking/nextcloud-client/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/nextcloud-client/default.nix b/pkgs/applications/networking/nextcloud-client/default.nix index 27ccbf6d88a..974d1e5a077 100644 --- a/pkgs/applications/networking/nextcloud-client/default.nix +++ b/pkgs/applications/networking/nextcloud-client/default.nix @@ -18,13 +18,13 @@ mkDerivation rec { pname = "nextcloud-client"; - version = "2.6.0"; + version = "2.6.1"; src = fetchFromGitHub { owner = "nextcloud"; repo = "desktop"; rev = "v${version}"; - sha256 = "1cggk8yfy6lak48nfh691ad5y3bap49cfa2krp7vak108krgvkxi"; + sha256 = "18318j488pxksf4zc6zag8pdpyaks55yivn91nx3x458ax6albkz"; }; patches = [ From b5d42984bb450cc8fa68b76dc09d2b16cb59c1bf Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Tue, 5 Nov 2019 08:38:54 +0100 Subject: [PATCH 194/377] podman: v1.6.2 -> v1.6.3 Signed-off-by: Sascha Grunert --- pkgs/applications/virtualization/podman/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/virtualization/podman/default.nix b/pkgs/applications/virtualization/podman/default.nix index fa48c8b5e5e..9d94ced0bf2 100644 --- a/pkgs/applications/virtualization/podman/default.nix +++ b/pkgs/applications/virtualization/podman/default.nix @@ -5,13 +5,13 @@ buildGoPackage rec { pname = "podman"; - version = "1.6.2"; + version = "1.6.3"; src = fetchFromGitHub { owner = "containers"; repo = "libpod"; rev = "v${version}"; - sha256 = "0cwyrzjjgxclnzc1yx6vm2bvq73mldwxfwalkprzlg8vpqbxji8y"; + sha256 = "0y87pylpff2xl796n5s2vrm90pspzqfw8h4a5gndn1mx18s09s69"; }; goPackagePath = "github.com/containers/libpod"; From d15b9b15619fb1d753319321bc44d71802cfdece Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 1 Nov 2019 10:33:46 -0700 Subject: [PATCH 195/377] avocode: 3.9.3 -> 3.9.6 --- pkgs/applications/graphics/avocode/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/graphics/avocode/default.nix b/pkgs/applications/graphics/avocode/default.nix index 20cbd6fc5cf..1497fe19991 100644 --- a/pkgs/applications/graphics/avocode/default.nix +++ b/pkgs/applications/graphics/avocode/default.nix @@ -5,11 +5,11 @@ stdenv.mkDerivation rec { pname = "avocode"; - version = "3.9.3"; + version = "3.9.6"; src = fetchurl { url = "https://media.avocode.com/download/avocode-app/${version}/avocode-${version}-linux.zip"; - sha256 = "1ki2fpn70p1rzf52q8511a90n7y7dqi86fs2a48qhass1abxlpqx"; + sha256 = "0jnl461dg2s5panrw12707bv34g6wxc1pxc90awnja13yq0z6bfc"; }; libPath = stdenv.lib.makeLibraryPath (with xorg; [ From b7f151df700cb54114b620192b6e62845c686398 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 3 Nov 2019 02:40:54 -0800 Subject: [PATCH 196/377] yacas: 1.6.1 -> 1.8.0 --- pkgs/applications/science/math/yacas/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/science/math/yacas/default.nix b/pkgs/applications/science/math/yacas/default.nix index bae0d9a18c6..ed680b1b4cd 100644 --- a/pkgs/applications/science/math/yacas/default.nix +++ b/pkgs/applications/science/math/yacas/default.nix @@ -5,13 +5,13 @@ stdenv.mkDerivation rec { pname = "yacas"; - version = "1.6.1"; + version = "1.8.0"; src = fetchFromGitHub { owner = "grzegorzmazur"; repo = "yacas"; rev = "v${version}"; - sha256 = "0awvlvf607r4hwl1vkhs6jq2s6ig46c66pmr4vspj2cdnypx99cc"; + sha256 = "0fwd98dwq6g0md3yhgyl30i377593b8rw6gsvffzvs11g3aqf1ga"; }; hardeningDisable = [ "format" ]; From 7c723450a186e85aa324268a0a48d9a850ac774d Mon Sep 17 00:00:00 2001 From: Azulinho Date: Mon, 4 Nov 2019 15:45:39 +0000 Subject: [PATCH 197/377] nfstrace: init at 0.4.3.2 Co-authored-by: Renaud Co-authored-by: Nick Partridge --- pkgs/tools/networking/nfstrace/default.nix | 37 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 39 insertions(+) create mode 100644 pkgs/tools/networking/nfstrace/default.nix diff --git a/pkgs/tools/networking/nfstrace/default.nix b/pkgs/tools/networking/nfstrace/default.nix new file mode 100644 index 00000000000..50654da54e4 --- /dev/null +++ b/pkgs/tools/networking/nfstrace/default.nix @@ -0,0 +1,37 @@ +{ cmake, fetchFromGitHub, fetchpatch, json_c, libpcap, ncurses, stdenv }: + +stdenv.mkDerivation rec { + pname = "nfstrace"; + version = "0.4.3.2"; + + src = fetchFromGitHub { + owner = "epam"; + repo = "nfstrace"; + rev = "${version}"; + sha256 = "1djsyn7i3xp969rnmsdaf5vwjiik9wylxxrc5nm7by00i76c1vsg"; + }; + + patches = [ + (fetchpatch { + url = "https://salsa.debian.org/debian/nfstrace/raw/debian/0.4.3.1-3/debian/patches/reproducible_build.patch"; + sha256 = "0fd96r8xi142kjwibqkd46s6jwsg5kfc5v28bqsj9rdlc2aqmay5"; + }) + ]; + + buildInputs = [ json_c libpcap ncurses ]; + nativeBuildInputs = [ cmake ]; + + # To build with GCC 8+ it needs: + CXXFLAGS = [ "-Wno-class-memaccess" "-Wno-ignored-qualifiers" ]; + # CMake can't find json_c without: + NIX_CFLAGS_COMPILE = [ "-I${json_c.dev}/include/json-c" ]; + + doCheck = false; # requires network access + + meta = with stdenv.lib; { + homepage = "http://epam.github.io/nfstrace/"; + description = "NFS and CIFS tracing/monitoring/capturing/analyzing tool"; + license = licenses.gpl2; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 85270623a5d..c441ad63540 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1906,6 +1906,8 @@ in nfdump = callPackage ../tools/networking/nfdump { }; + nfstrace = callPackage ../tools/networking/nfstrace { }; + nixpkgs-pytools = with python3.pkgs; toPythonApplication nixpkgs-pytools; noteshrink = callPackage ../tools/misc/noteshrink { }; From aa1ad7b8667b4ee9723bc4c52c3fda34ee58e44f Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Sun, 3 Nov 2019 10:51:58 +0100 Subject: [PATCH 198/377] pythonPackages.schema: Fix This depends on contextlib2 and mock. The preConfigure hook can probably be removed with the next version bump, see https://github.com/keleshev/schema/pull/222. --- pkgs/development/python-modules/schema/default.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/schema/default.nix b/pkgs/development/python-modules/schema/default.nix index 6afa5944372..2f6c9d0947e 100644 --- a/pkgs/development/python-modules/schema/default.nix +++ b/pkgs/development/python-modules/schema/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchPypi, pytest }: +{ stdenv, buildPythonPackage, fetchPypi, contextlib2, pytest, mock }: buildPythonPackage rec { @@ -10,7 +10,14 @@ buildPythonPackage rec { sha256 = "c9dc8f4624e287c7d1435f8fd758f6a0aabbb7eff442db9192cd46f0e2b6d959"; }; - checkInputs = [ pytest ]; + preConfigure = '' + substituteInPlace requirements.txt --replace '==' '>=' + ''; + + propagatedBuildInputs = [ contextlib2 ]; + + checkInputs = [ pytest mock ]; + checkPhase = "pytest ./test_schema.py"; meta = with stdenv.lib; { description = "Library for validating Python data structures"; From 85fb93535c805bf8a364362bcd9f335172fb2b32 Mon Sep 17 00:00:00 2001 From: Tobias Mayer Date: Sun, 3 Nov 2019 11:00:38 +0100 Subject: [PATCH 199/377] pythonPackages.schema: Add myself as maintainer --- pkgs/development/python-modules/schema/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/schema/default.nix b/pkgs/development/python-modules/schema/default.nix index 2f6c9d0947e..2c1173ce68f 100644 --- a/pkgs/development/python-modules/schema/default.nix +++ b/pkgs/development/python-modules/schema/default.nix @@ -23,5 +23,6 @@ buildPythonPackage rec { description = "Library for validating Python data structures"; homepage = https://github.com/keleshev/schema; license = licenses.mit; + maintainers = [ maintainers.tobim ]; }; } From 4e60c4731be01f6d203824c3b556e712d047d8d9 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 3 Nov 2019 03:31:31 -0800 Subject: [PATCH 200/377] yad: 0.42.0 -> 5.0 --- pkgs/tools/misc/yad/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/yad/default.nix b/pkgs/tools/misc/yad/default.nix index 946a07d17b4..776b41ac1aa 100644 --- a/pkgs/tools/misc/yad/default.nix +++ b/pkgs/tools/misc/yad/default.nix @@ -3,13 +3,13 @@ stdenv.mkDerivation rec { pname = "yad"; - version = "0.42.0"; + version = "5.0"; src = fetchFromGitHub { owner = "v1cont"; repo = "yad"; rev = "v${version}"; - sha256 = "0ym8pgbzx7ydk5rmi2kwwdyzi6pdpcps86i0c20cqcjmqh8kdl36"; + sha256 = "07rd61hvilsxxrj7lf8c9k0a8glj07s48m7ya8d45030r90g3lvc"; }; configureFlags = [ From 89814c917fe8ce28c0e784575510c3889590419f Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 2 Nov 2019 23:19:14 -0700 Subject: [PATCH 201/377] simplenote: 1.8.0 -> 1.9.1 --- pkgs/applications/misc/simplenote/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/simplenote/default.nix b/pkgs/applications/misc/simplenote/default.nix index 87125eb1b36..be8e2105401 100644 --- a/pkgs/applications/misc/simplenote/default.nix +++ b/pkgs/applications/misc/simplenote/default.nix @@ -6,10 +6,10 @@ let pname = "simplenote"; - version = "1.8.0"; + version = "1.9.1"; sha256 = { - x86_64-linux = "066gr1awdj5nwdr1z57mmvx7dd1z19g0wzsgbnrrb89bqfj67ykl"; + x86_64-linux = "1zqrjh1xfdpkpj1fsri9r4qkazh9j89pbj8vjr474b39v56v693j"; }.${system}; meta = with stdenv.lib; { From b9611d2287897cd328e9c7fd7f75740b22ca5265 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 2 Nov 2019 18:08:51 -0700 Subject: [PATCH 202/377] python38Packages.willow: 1.1 -> 1.3 --- pkgs/development/python-modules/willow/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/willow/default.nix b/pkgs/development/python-modules/willow/default.nix index fb9182ab179..138facad701 100644 --- a/pkgs/development/python-modules/willow/default.nix +++ b/pkgs/development/python-modules/willow/default.nix @@ -8,13 +8,13 @@ buildPythonPackage rec { pname = "willow"; - version = "1.1"; + version = "1.3"; disabled = pythonOlder "2.7"; src = fetchPypi { pname = "Willow"; inherit version; - sha256 = "818ee11803c90a0a6d49c94b0453d6266be1ef83ae00de72731c45fae4d3e78c"; + sha256 = "0dzc3cjkwp0h3v1n94c33zr5yw5fdd6dkm6vccp9i8dncmpw912g"; }; propagatedBuildInputs = [ six pillow ]; From 78c5c976955e69c933e882e8f2207059858bdeaa Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 2 Nov 2019 18:24:50 -0700 Subject: [PATCH 203/377] python38Packages.wurlitzer: 1.0.3 -> 2.0.0 --- pkgs/development/python-modules/wurlitzer/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/wurlitzer/default.nix b/pkgs/development/python-modules/wurlitzer/default.nix index d1797acb7d2..8a4d96515d7 100644 --- a/pkgs/development/python-modules/wurlitzer/default.nix +++ b/pkgs/development/python-modules/wurlitzer/default.nix @@ -7,11 +7,11 @@ buildPythonPackage rec { pname = "wurlitzer"; - version = "1.0.3"; + version = "2.0.0"; src = fetchPypi { inherit pname version; - sha256 = "0nab45pfgqdxhhyshf717xfzniss2h3bx19zdaq9gqr6v8lw6wpr"; + sha256 = "0xndv47iwc9k8cp5r9r1z3r0xww0r5x5b7qsmn39gk2gsg0119c6"; }; checkInputs = [ mock pytest ]; From ccadfbeb24e0f8825449795d250c36a4a81616e2 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sat, 2 Nov 2019 17:55:23 -0700 Subject: [PATCH 204/377] python38Packages.telethon: 1.9.0 -> 1.10.8 --- pkgs/development/python-modules/telethon/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/telethon/default.nix b/pkgs/development/python-modules/telethon/default.nix index 334163114a1..375667e91dc 100644 --- a/pkgs/development/python-modules/telethon/default.nix +++ b/pkgs/development/python-modules/telethon/default.nix @@ -2,12 +2,12 @@ buildPythonPackage rec { pname = "telethon"; - version = "1.9.0"; + version = "1.10.8"; src = fetchPypi { inherit version; pname = "Telethon"; - sha256 = "a8797ad5bfee2b350cfc9b73cbb30fc19c8f73c0db42471e0df1371b1a269edc"; + sha256 = "1v0zq6kdvcff6pygi8syylqndamz884gaby4v16p5brg5rz6k25g"; }; propagatedBuildInputs = [ From 2e8ed0f443fb8674baace434e3468ba93d0f8836 Mon Sep 17 00:00:00 2001 From: Kirill Elagin Date: Tue, 5 Nov 2019 13:29:14 +0300 Subject: [PATCH 205/377] Revert "lvm2: enable parallel building" (#72823) * Revert "lvm2: enable parallel building" This reverts commit 494d2deebfc3bde363ca5fe0bb32ddf81a86e62d. I am getting ``` gcc: error: ../../device_mapper/libdevice-mapper.a: No such file or directory ``` --- pkgs/os-specific/linux/lvm2/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/lvm2/default.nix b/pkgs/os-specific/linux/lvm2/default.nix index d5b45117732..9c48caaa243 100644 --- a/pkgs/os-specific/linux/lvm2/default.nix +++ b/pkgs/os-specific/linux/lvm2/default.nix @@ -40,7 +40,9 @@ stdenv.mkDerivation { --replace /usr/bin/udevadm ${systemd}/bin/udevadm ''; - enableParallelBuilding = true; + # https://github.com/NixOS/nixpkgs/pull/52597 + # gcc: error: ../../device_mapper/libdevice-mapper.a: No such file or directory + enableParallelBuilding = false; patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [ (fetchpatch { From 6d7ab9e14681cf55f07dfa5280a81d23bcc68fb7 Mon Sep 17 00:00:00 2001 From: Tyler Benster Date: Mon, 4 Nov 2019 20:45:25 -0800 Subject: [PATCH 206/377] pythonPackages.scikitlearn: 0.21.2 -> 0.21.3 --- pkgs/development/python-modules/scikitlearn/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/scikitlearn/default.nix b/pkgs/development/python-modules/scikitlearn/default.nix index 939782722c6..4830e3fb2ab 100644 --- a/pkgs/development/python-modules/scikitlearn/default.nix +++ b/pkgs/development/python-modules/scikitlearn/default.nix @@ -12,13 +12,13 @@ buildPythonPackage rec { pname = "scikit-learn"; - version = "0.21.2"; + version = "0.21.3"; # UnboundLocalError: local variable 'message' referenced before assignment disabled = stdenv.isi686; # https://github.com/scikit-learn/scikit-learn/issues/5534 src = fetchPypi { inherit pname version; - sha256 = "1nvj9j16y1hz9gm0qwzpnx2zmz55c63k1fai643migsyll9c7bqa"; + sha256 = "eb9b8ebf59eddd8b96366428238ab27d05a19e89c5516ce294abc35cea75d003"; }; buildInputs = [ From d6292986d8d083b2a03b7dee0c29bdbd5639c94b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 5 Nov 2019 10:31:58 +0000 Subject: [PATCH 207/377] android-udev-rules: 20190315 -> 20191103 --- pkgs/os-specific/linux/android-udev-rules/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/android-udev-rules/default.nix b/pkgs/os-specific/linux/android-udev-rules/default.nix index aed0ed374a7..2aa71b92beb 100644 --- a/pkgs/os-specific/linux/android-udev-rules/default.nix +++ b/pkgs/os-specific/linux/android-udev-rules/default.nix @@ -6,13 +6,13 @@ stdenv.mkDerivation rec { pname = "android-udev-rules"; - version = "20190315"; + version = "20191103"; src = fetchFromGitHub { owner = "M0Rf30"; repo = "android-udev-rules"; rev = version; - sha256 = "1w8zkww3cj6yzcsfzwvj1gkf4dfflhp1vd9fixnmlbm43kwkqrdr"; + sha256 = "0x2f2sv0x0ry7kccp47s0hlxps3hbpg37dj3xjjgpdm5hmn2cjq3"; }; installPhase = '' From b786c1be04639fe19eabdfee09a923eab1c41984 Mon Sep 17 00:00:00 2001 From: Marijan Date: Tue, 5 Nov 2019 00:33:17 +0100 Subject: [PATCH 208/377] nixos/openssh: port test to python --- nixos/tests/openssh.nix | 80 ++++++++++++++++++++++------------------- 1 file changed, 44 insertions(+), 36 deletions(-) diff --git a/nixos/tests/openssh.nix b/nixos/tests/openssh.nix index 8b9e2170f15..e9692b50327 100644 --- a/nixos/tests/openssh.nix +++ b/nixos/tests/openssh.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ... }: +import ./make-test-python.nix ({ pkgs, ... }: let inherit (import ./ssh-keys.nix pkgs) snakeOilPrivateKey snakeOilPublicKey; @@ -58,47 +58,55 @@ in { }; testScript = '' - startAll; + start_all() - my $key=`${pkgs.openssh}/bin/ssh-keygen -t ed25519 -f key -N ""`; + server.wait_for_unit("sshd") - $server->waitForUnit("sshd"); + with subtest("manual-authkey"): + client.succeed("mkdir -m 700 /root/.ssh") + client.succeed( + '${pkgs.openssh}/bin/ssh-keygen -t ed25519 -f /root/.ssh/id_ed25519 -N ""' + ) + public_key = client.succeed( + "${pkgs.openssh}/bin/ssh-keygen -y -f /root/.ssh/id_ed25519" + ) + public_key = public_key.strip() + client.succeed("chmod 600 /root/.ssh/id_ed25519") - subtest "manual-authkey", sub { - $server->succeed("mkdir -m 700 /root/.ssh"); - $server->copyFileFromHost("key.pub", "/root/.ssh/authorized_keys"); - $server_lazy->succeed("mkdir -m 700 /root/.ssh"); - $server_lazy->copyFileFromHost("key.pub", "/root/.ssh/authorized_keys"); + server.succeed("mkdir -m 700 /root/.ssh") + server.succeed("echo '{}' > /root/.ssh/authorized_keys".format(public_key)) + server_lazy.succeed("mkdir -m 700 /root/.ssh") + server_lazy.succeed("echo '{}' > /root/.ssh/authorized_keys".format(public_key)) - $client->succeed("mkdir -m 700 /root/.ssh"); - $client->copyFileFromHost("key", "/root/.ssh/id_ed25519"); - $client->succeed("chmod 600 /root/.ssh/id_ed25519"); + client.wait_for_unit("network.target") + client.succeed( + "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no server 'echo hello world' >&2" + ) + client.succeed( + "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no server 'ulimit -l' | grep 1024" + ) - $client->waitForUnit("network.target"); - $client->succeed("ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no server 'echo hello world' >&2"); - $client->succeed("ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no server 'ulimit -l' | grep 1024"); + client.succeed( + "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no server_lazy 'echo hello world' >&2" + ) + client.succeed( + "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no server_lazy 'ulimit -l' | grep 1024" + ) - $client->succeed("ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no server_lazy 'echo hello world' >&2"); - $client->succeed("ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no server_lazy 'ulimit -l' | grep 1024"); + with subtest("configured-authkey"): + client.succeed( + "cat ${snakeOilPrivateKey} > privkey.snakeoil" + ) + client.succeed("chmod 600 privkey.snakeoil") + client.succeed( + "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i privkey.snakeoil server true" + ) + client.succeed( + "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i privkey.snakeoil server_lazy true" + ) - }; - - subtest "configured-authkey", sub { - $client->succeed("cat ${snakeOilPrivateKey} > privkey.snakeoil"); - $client->succeed("chmod 600 privkey.snakeoil"); - $client->succeed("ssh -o UserKnownHostsFile=/dev/null" . - " -o StrictHostKeyChecking=no -i privkey.snakeoil" . - " server true"); - - $client->succeed("ssh -o UserKnownHostsFile=/dev/null" . - " -o StrictHostKeyChecking=no -i privkey.snakeoil" . - " server_lazy true"); - - }; - - subtest "localhost-only", sub { - $server_localhost_only->succeed("ss -nlt | grep '127.0.0.1:22'"); - $server_localhost_only_lazy->succeed("ss -nlt | grep '127.0.0.1:22'"); - } + with subtest("localhost-only"): + server_localhost_only.succeed("ss -nlt | grep '127.0.0.1:22'") + server_localhost_only_lazy.succeed("ss -nlt | grep '127.0.0.1:22'") ''; }) From daa97862b58ce768f1f8317df8831f64a2bf25b2 Mon Sep 17 00:00:00 2001 From: Marijan Date: Tue, 5 Nov 2019 00:35:20 +0100 Subject: [PATCH 209/377] nixos/tor: port test to python --- nixos/tests/tor.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nixos/tests/tor.nix b/nixos/tests/tor.nix index 0cb44ddff24..ad07231557c 100644 --- a/nixos/tests/tor.nix +++ b/nixos/tests/tor.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ lib, ... }: with lib; +import ./make-test-python.nix ({ lib, ... }: with lib; rec { name = "tor"; @@ -21,8 +21,10 @@ rec { }; testScript = '' - $client->waitForUnit("tor.service"); - $client->waitForOpenPort(9051); - $client->succeed("echo GETINFO version | nc 127.0.0.1 9051") =~ /514 Authentication required./ or die; + client.wait_for_unit("tor.service") + client.wait_for_open_port(9051) + assert "514 Authentication required." in client.succeed( + "echo GETINFO version | nc 127.0.0.1 9051" + ) ''; }) From 04f0961627034f47939d99ac00e9d1afab2ebc68 Mon Sep 17 00:00:00 2001 From: Marijan Date: Tue, 5 Nov 2019 00:36:18 +0100 Subject: [PATCH 210/377] nixos/transmission: port test to python --- nixos/tests/transmission.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/tests/transmission.nix b/nixos/tests/transmission.nix index f1c238730eb..f4f2186be1f 100644 --- a/nixos/tests/transmission.nix +++ b/nixos/tests/transmission.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ...} : { +import ./make-test-python.nix ({ pkgs, ...} : { name = "transmission"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ coconnor ]; @@ -14,8 +14,8 @@ import ./make-test.nix ({ pkgs, ...} : { testScript = '' - startAll; - $machine->waitForUnit("transmission"); - $machine->shutdown; + start_all() + machine.wait_for_unit("transmission") + machine.shutdown() ''; }) From 1afa50aef1f23253b454201b8f8c29045bd01dcb Mon Sep 17 00:00:00 2001 From: Marijan Date: Tue, 5 Nov 2019 00:38:50 +0100 Subject: [PATCH 211/377] nixos/fsck: port test to python --- nixos/tests/fsck.nix | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/nixos/tests/fsck.nix b/nixos/tests/fsck.nix index f943bb7f235..e522419fde2 100644 --- a/nixos/tests/fsck.nix +++ b/nixos/tests/fsck.nix @@ -1,4 +1,4 @@ -import ./make-test.nix { +import ./make-test-python.nix { name = "fsck"; machine = { lib, ... }: { @@ -14,16 +14,18 @@ import ./make-test.nix { }; testScript = '' - $machine->waitForUnit('default.target'); + machine.wait_for_unit("default.target") - subtest "root fs is fsckd", sub { - $machine->succeed('journalctl -b | grep "fsck.ext4.*/dev/vda"'); - }; + with subtest("root fs is fsckd"): + machine.succeed("journalctl -b | grep 'fsck.ext4.*/dev/vda'") - subtest "mnt fs is fsckd", sub { - $machine->succeed('journalctl -b | grep "fsck.*/dev/vdb.*clean"'); - $machine->succeed('grep "Requires=systemd-fsck@dev-vdb.service" /run/systemd/generator/mnt.mount'); - $machine->succeed('grep "After=systemd-fsck@dev-vdb.service" /run/systemd/generator/mnt.mount'); - }; + with subtest("mnt fs is fsckd"): + machine.succeed("journalctl -b | grep 'fsck.*/dev/vdb.*clean'") + machine.succeed( + "grep 'Requires=systemd-fsck@dev-vdb.service' /run/systemd/generator/mnt.mount" + ) + machine.succeed( + "grep 'After=systemd-fsck@dev-vdb.service' /run/systemd/generator/mnt.mount" + ) ''; } From 16d2fccfd93228c9ce41e5c4703b54016bc83fc5 Mon Sep 17 00:00:00 2001 From: Marijan Date: Tue, 5 Nov 2019 00:39:07 +0100 Subject: [PATCH 212/377] nixos/nix-generate-config: port test to python --- nixos/tests/nixos-generate-config.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/nixos/tests/nixos-generate-config.nix b/nixos/tests/nixos-generate-config.nix index 15a173e024b..6c83ccecc70 100644 --- a/nixos/tests/nixos-generate-config.nix +++ b/nixos/tests/nixos-generate-config.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ lib, ... } : { +import ./make-test-python.nix ({ lib, ... } : { name = "nixos-generate-config"; meta.maintainers = with lib.maintainers; [ basvandijk ]; machine = { @@ -11,14 +11,16 @@ import ./make-test.nix ({ lib, ... } : { ''; }; testScript = '' - startAll; - $machine->waitForUnit("multi-user.target"); - $machine->succeed("nixos-generate-config"); + start_all() + machine.wait_for_unit("multi-user.target") + machine.succeed("nixos-generate-config") # Test if the configuration really is overridden - $machine->succeed("grep 'OVERRIDDEN' /etc/nixos/configuration.nix"); + machine.succeed("grep 'OVERRIDDEN' /etc/nixos/configuration.nix") # Test of if the Perl variable $bootLoaderConfig is spliced correctly: - $machine->succeed("grep 'boot\\.loader\\.grub\\.enable = true;' /etc/nixos/configuration.nix"); + machine.succeed( + "grep 'boot\\.loader\\.grub\\.enable = true;' /etc/nixos/configuration.nix" + ) ''; }) From 7d98a8ba77d075c3b058b2876b112ee8f0a70048 Mon Sep 17 00:00:00 2001 From: Marijan Date: Tue, 5 Nov 2019 00:39:28 +0100 Subject: [PATCH 213/377] nixos/simple: port test to python --- nixos/tests/simple.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/tests/simple.nix b/nixos/tests/simple.nix index 84c5621d962..3810a2cd3a5 100644 --- a/nixos/tests/simple.nix +++ b/nixos/tests/simple.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ...} : { +import ./make-test-python.nix ({ pkgs, ...} : { name = "simple"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ eelco ]; @@ -10,8 +10,8 @@ import ./make-test.nix ({ pkgs, ...} : { testScript = '' - startAll; - $machine->waitForUnit("multi-user.target"); - $machine->shutdown; + start_all() + machine.wait_for_unit("multi-user.target") + machine.shutdown() ''; }) From eb98b1d1d299870c706a7b74b11fa1351f775496 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Mon, 4 Nov 2019 17:08:34 +0100 Subject: [PATCH 214/377] pythonPackages.intreehooks: init at 1.0 --- .../python-modules/intreehooks/default.nix | 28 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 pkgs/development/python-modules/intreehooks/default.nix diff --git a/pkgs/development/python-modules/intreehooks/default.nix b/pkgs/development/python-modules/intreehooks/default.nix new file mode 100644 index 00000000000..be8d3927c9f --- /dev/null +++ b/pkgs/development/python-modules/intreehooks/default.nix @@ -0,0 +1,28 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytoml +, pytest +}: + +buildPythonPackage rec { + pname = "intreehooks"; + version = "1.0"; + format = "setuptools"; + + src = fetchPypi { + inherit pname version; + sha256 = "87e600d3b16b97ed219c078681260639e77ef5a17c0e0dbdd5a302f99b4e34e1"; + }; + + propagatedBuildInputs = [ pytoml ]; + + checkInputs = [ pytest ]; + + meta = { + description = "Load a PEP 517 backend from inside the source tree"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.fridh ]; + homepage = https://github.com/takluyver/intreehooks; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 64036cec56a..40532bda450 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2540,6 +2540,8 @@ in { iniparse = callPackage ../development/python-modules/iniparse { }; + intreehooks = callPackage ../development/python-modules/intreehooks { }; + i3-py = callPackage ../development/python-modules/i3-py { }; JayDeBeApi = callPackage ../development/python-modules/JayDeBeApi {}; From d9b0ef5b0a1534b2b6ffd96ec4def88a29fc9d97 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Tue, 5 Nov 2019 11:25:49 +0100 Subject: [PATCH 215/377] pythonPackages.meson: init Add meson as Python package so it can easily be used by mesonpep517 for PEP 517 builds. --- pkgs/top-level/python-packages.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 40532bda450..5c2b009731e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -717,7 +717,7 @@ in { jwcrypto = callPackage ../development/python-modules/jwcrypto { }; kconfiglib = callPackage ../development/python-modules/kconfiglib { }; - + labelbox = callPackage ../development/python-modules/labelbox { }; lammps-cython = callPackage ../development/python-modules/lammps-cython { @@ -919,7 +919,7 @@ in { pybullet = callPackage ../development/python-modules/pybullet { }; pycairo = callPackage ../development/python-modules/pycairo { - inherit (pkgs) pkgconfig; + inherit (pkgs) meson pkgconfig; }; pycategories = callPackage ../development/python-modules/pycategories { }; @@ -979,7 +979,7 @@ in { }; pygobject3 = callPackage ../development/python-modules/pygobject/3.nix { - inherit (pkgs) pkgconfig; + inherit (pkgs) meson pkgconfig; }; pygtail = callPackage ../development/python-modules/pygtail { }; @@ -2470,7 +2470,7 @@ in { grip = callPackage ../development/python-modules/grip { }; gst-python = callPackage ../development/python-modules/gst-python { - inherit (pkgs) pkgconfig; + inherit (pkgs) meson pkgconfig; gst-plugins-base = pkgs.gst_all_1.gst-plugins-base; }; @@ -2795,7 +2795,7 @@ in { python-axolotl-curve25519 = callPackage ../development/python-modules/python-axolotl-curve25519 { }; pythonix = callPackage ../development/python-modules/pythonix { - inherit (pkgs) pkgconfig; + inherit (pkgs) meson pkgconfig; }; pyramid = callPackage ../development/python-modules/pyramid { }; @@ -3852,6 +3852,14 @@ in { mesa = callPackage ../development/python-modules/mesa { }; + meson = disabledIf (pythonOlder "3.5") (toPythonModule ((pkgs.meson.override { + python3Packages = self; + }).overrideAttrs(oldAttrs: { + # We do not want the setup hook in Python packages + # because the build is performed differently. + setupHook = null; + }))); + metaphone = callPackage ../development/python-modules/metaphone { }; mezzanine = callPackage ../development/python-modules/mezzanine { }; From 21c201adeeee05b23930f5fa5a6117500d3b1fb7 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Mon, 4 Nov 2019 17:08:50 +0100 Subject: [PATCH 216/377] pythonPackages.mesonpep517: init at 0.1.9999994 --- .../python-modules/mesonpep517/default.nix | 42 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/python-modules/mesonpep517/default.nix diff --git a/pkgs/development/python-modules/mesonpep517/default.nix b/pkgs/development/python-modules/mesonpep517/default.nix new file mode 100644 index 00000000000..ec63526070a --- /dev/null +++ b/pkgs/development/python-modules/mesonpep517/default.nix @@ -0,0 +1,42 @@ +{ lib +, buildPythonPackage +, fetchPypi +, meson +, ninja +, intreehooks +, pytoml +, pythonOlder +}: + +# TODO: offer meson as a Python package so we have dist-info folder. + +buildPythonPackage rec { + pname = "mesonpep517"; + version = "0.1.9999994"; + format = "pyproject"; + + src = fetchPypi { + inherit pname version; + sha256 = "b5bcca61024164c4a51d29e6921ea1f756d54197c8f052e4c66a2b8399aa9349"; + }; + + nativeBuildInputs = [ intreehooks ]; + + propagatedBuildInputs = [ pytoml ]; + + # postPatch = '' + # # Meson tries to detect ninja as well, so we should patch meson as well. + # substituteInPlace mesonpep517/buildapi.py \ + # --replace "'meson'" "'${meson}/bin/meson'" \ + # --replace "'ninja'" "'${ninja}/bin/ninja'" + # ''; + + propagatedNativeBuildInputs = [ meson ninja ]; + + meta = { + description = "Create pep517 compliant packages from the meson build system"; + homepage = https://gitlab.com/thiblahute/mesonpep517; + license = lib.licenses.asl20; + maintainers = [ lib.maintainers.fridh ]; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 5c2b009731e..d776e80a9e3 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3860,6 +3860,8 @@ in { setupHook = null; }))); + mesonpep517 = callPackage ../development/python-modules/mesonpep517 { }; + metaphone = callPackage ../development/python-modules/metaphone { }; mezzanine = callPackage ../development/python-modules/mezzanine { }; From eee979043debc67c3c48bafe90d0d245ad57c68e Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 5 Nov 2019 12:27:18 +0100 Subject: [PATCH 217/377] android-studio: 3.5.1.0 -> 3.5.2.0 --- pkgs/applications/editors/android-studio/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/android-studio/default.nix b/pkgs/applications/editors/android-studio/default.nix index 817bd13e7da..ca5a6e91a59 100644 --- a/pkgs/applications/editors/android-studio/default.nix +++ b/pkgs/applications/editors/android-studio/default.nix @@ -8,9 +8,9 @@ let inherit (gnome2) GConf gnome_vfs; }; stableVersion = { - version = "3.5.1.0"; # "Android Studio 3.5.1" - build = "191.5900203"; - sha256Hash = "0afxlif8pkrl6m1lhiqri1qv4vf5mfm1yg6qk5rad0442hm3kz4l"; + version = "3.5.2.0"; # "Android Studio 3.5.2" + build = "191.5977832"; + sha256Hash = "0kcd6kd5rn4b76damkfddin18d1r0dck05piv8mq1ns7x1n4hf7q"; }; betaVersion = { version = "3.6.0.14"; # "Android Studio 3.6 Beta 2" From ce6364a5ba2897701b08bd0243ec4f470213e234 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Tue, 5 Nov 2019 12:31:16 +0100 Subject: [PATCH 218/377] gns3-{gui,server}: 2.2.1 -> 2.2.2 --- pkgs/applications/networking/gns3/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/gns3/default.nix b/pkgs/applications/networking/gns3/default.nix index 5f6aca51fee..6bc2554d8c9 100644 --- a/pkgs/applications/networking/gns3/default.nix +++ b/pkgs/applications/networking/gns3/default.nix @@ -1,16 +1,16 @@ { callPackage }: let - stableVersion = "2.2.1"; - previewVersion = "2.2.1"; + stableVersion = "2.2.2"; + previewVersion = "2.2.2"; addVersion = args: let version = if args.stable then stableVersion else previewVersion; branch = if args.stable then "stable" else "preview"; in args // { inherit version branch; }; mkGui = args: callPackage (import ./gui.nix (addVersion args)) { }; mkServer = args: callPackage (import ./server.nix (addVersion args)) { }; - guiSrcHash = "16v2sdz37vm8x8w07qxaq2mbx169f9hqqpxnf1lq19v9dfhb19kh"; - serverSrcHash = "0liv9fwi2746542qpnvwzf5wcrsxfv6x5jypwd5db1qkfd50s8xa"; + guiSrcHash = "0i335fjbadixp39l75w0fl5iwz2cb8rcdj2xvx1my3vzhg8lijfl"; + serverSrcHash = "1g6km8jc53y8ph14ifjxscbimdxma6bw5ir9gqzvkjn39k9fy1w6"; in { guiStable = mkGui { stable = true; From 44efab627f360093318cf475b7cc0ecfdcfdeebf Mon Sep 17 00:00:00 2001 From: Tadeo Kondrak Date: Mon, 28 Oct 2019 08:40:31 -0600 Subject: [PATCH 219/377] aerc: Fix store references in default config --- .../networking/mailreaders/aerc/default.nix | 4 ++ .../mailreaders/aerc/runtime-sharedir.patch | 43 +++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 pkgs/applications/networking/mailreaders/aerc/runtime-sharedir.patch diff --git a/pkgs/applications/networking/mailreaders/aerc/default.nix b/pkgs/applications/networking/mailreaders/aerc/default.nix index b94ce269566..98ab5f56352 100644 --- a/pkgs/applications/networking/mailreaders/aerc/default.nix +++ b/pkgs/applications/networking/mailreaders/aerc/default.nix @@ -18,6 +18,10 @@ buildGoModule rec { python3.pkgs.wrapPython ]; + patches = [ + ./runtime-sharedir.patch + ]; + pythonPath = [ python3.pkgs.colorama ]; diff --git a/pkgs/applications/networking/mailreaders/aerc/runtime-sharedir.patch b/pkgs/applications/networking/mailreaders/aerc/runtime-sharedir.patch new file mode 100644 index 00000000000..4ff1283b5e3 --- /dev/null +++ b/pkgs/applications/networking/mailreaders/aerc/runtime-sharedir.patch @@ -0,0 +1,43 @@ +From 7ea68a2eef026723903d72f54ca54b629881ec06 Mon Sep 17 00:00:00 2001 +From: Tadeo Kondrak +Date: Mon, 28 Oct 2019 08:36:36 -0600 +Subject: [PATCH] Fix aerc breaking every time the package is rebuilt. + +On NixOS, the SHAREDIR changes on every rebuild to the package, but aerc +fills it in as part of the default config. Fix this by not substituting +@SHAREDIR@ in the default config until runtime. +--- + Makefile | 2 +- + config/config.go | 3 +++ + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index d3072d3..17ca0be 100644 +--- a/Makefile ++++ b/Makefile +@@ -24,7 +24,7 @@ aerc: $(GOSRC) + -o $@ + + aerc.conf: config/aerc.conf.in +- sed -e 's:@SHAREDIR@:$(SHAREDIR):g' > $@ < config/aerc.conf.in ++ cat config/aerc.conf.in > $@ + + DOCS := \ + aerc.1 \ +diff --git a/config/config.go b/config/config.go +index bfcbecf..2f4e703 100644 +--- a/config/config.go ++++ b/config/config.go +@@ -377,6 +377,9 @@ func LoadConfigFromFile(root *string, sharedir string) (*AercConfig, error) { + if err = config.LoadConfig(file); err != nil { + return nil, err + } ++ for i, filter := range config.Filters { ++ config.Filters[i].Command = strings.ReplaceAll(filter.Command, "@SHAREDIR@", sharedir) ++ } + if ui, err := file.GetSection("general"); err == nil { + if err := ui.MapTo(&config.General); err != nil { + return nil, err +-- +2.23.0 + From fa2909bf51c29d568dd9ce5c27cdbf7393644909 Mon Sep 17 00:00:00 2001 From: Philip Kranz Date: Fri, 11 Oct 2019 09:15:42 +0200 Subject: [PATCH 220/377] python.pkgs.pyglet: Fix missing libraries Add the paths for Xext, fontconfig and freetype to the hardcoded library paths in load_library. --- pkgs/development/python-modules/pyglet/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/pyglet/default.nix b/pkgs/development/python-modules/pyglet/default.nix index 1e7beddda7f..16484cb1211 100644 --- a/pkgs/development/python-modules/pyglet/default.nix +++ b/pkgs/development/python-modules/pyglet/default.nix @@ -8,6 +8,8 @@ , glibc , gtk2-x11 , gdk-pixbuf +, fontconfig +, freetype }: buildPythonPackage rec { @@ -45,6 +47,10 @@ buildPythonPackage rec { path = '${gdk-pixbuf}/lib/libgdk_pixbuf-2.0${ext}' elif name == 'Xext': path = '${xorg.libXext}/lib/libXext${ext}' + elif name == 'fontconfig': + path = '${fontconfig.lib}/lib/libfontconfig${ext}' + elif name == 'freetype': + path = '${freetype}/lib/libfreetype${ext}' if path is not None: return ctypes.cdll.LoadLibrary(path) raise Exception("Could not load library {}".format(names)) From aa98348f880052547f4035c6ce1f5403e6a91d15 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 5 Nov 2019 14:57:06 +0100 Subject: [PATCH 221/377] jormungandr: Remove This is a good example of a package/module that should be distributed externally (e.g. as a flake [1]): it's not stable yet so anybody who seriously wants to use it will want to use the upstream repo. Also, it's highly specialized so NixOS is not really the right place at the moment (every NixOS module slows down NixOS evaluation for everybody). [1] https://github.com/edolstra/jormungandr/tree/flake --- nixos/modules/module-list.nix | 1 - .../services/networking/jormungandr.nix | 102 ------------------ nixos/tests/all-tests.nix | 1 - nixos/tests/jormungandr.nix | 77 ------------- .../blockchains/jormungandr/default.nix | 56 ---------- pkgs/top-level/all-packages.nix | 2 - 6 files changed, 239 deletions(-) delete mode 100644 nixos/modules/services/networking/jormungandr.nix delete mode 100644 nixos/tests/jormungandr.nix delete mode 100644 pkgs/applications/blockchains/jormungandr/default.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index cacb4b13f41..24912c27245 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -620,7 +620,6 @@ ./services/networking/iodine.nix ./services/networking/iperf3.nix ./services/networking/ircd-hybrid/default.nix - ./services/networking/jormungandr.nix ./services/networking/iwd.nix ./services/networking/keepalived/default.nix ./services/networking/keybase.nix diff --git a/nixos/modules/services/networking/jormungandr.nix b/nixos/modules/services/networking/jormungandr.nix deleted file mode 100644 index 152cceb4bf9..00000000000 --- a/nixos/modules/services/networking/jormungandr.nix +++ /dev/null @@ -1,102 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.services.jormungandr; - - inherit (lib) mkEnableOption mkIf mkOption; - inherit (lib) optionalString types; - - dataDir = "/var/lib/jormungandr"; - - # Default settings so far, as the service matures we will - # move these out as separate settings - configSettings = { - storage = dataDir; - p2p = { - public_address = "/ip4/127.0.0.1/tcp/8299"; - topics_of_interest = { - messages = "high"; - blocks = "high"; - }; - }; - rest = { - listen = "127.0.0.1:8607"; - }; - }; - - configFile = if cfg.configFile == null then - pkgs.writeText "jormungandr.yaml" (builtins.toJSON configSettings) - else cfg.configFile; - -in { - - options = { - - services.jormungandr = { - enable = mkEnableOption "jormungandr service"; - - configFile = mkOption { - type = types.nullOr types.path; - default = null; - example = "/var/lib/jormungandr/node.yaml"; - description = '' - The path of the jormungandr blockchain configuration file in YAML format. - If no file is specified, a file is generated using the other options. - ''; - }; - - secretFile = mkOption { - type = types.nullOr types.path; - default = null; - example = "/etc/secret/jormungandr.yaml"; - description = '' - The path of the jormungandr blockchain secret node configuration file in - YAML format. Do not store this in nix store! - ''; - }; - - genesisBlockHash = mkOption { - type = types.nullOr types.str; - default = null; - example = "d70495af81ae8600aca3e642b2427327cb6001ec4d7a0037e96a00dabed163f9"; - description = '' - Set the genesis block hash (the hash of the block0) so we can retrieve - the genesis block (and the blockchain configuration) from the existing - storage or from the network. - ''; - }; - - genesisBlockFile = mkOption { - type = types.nullOr types.path; - default = null; - example = "/var/lib/jormungandr/block-0.bin"; - description = '' - The path of the genesis block file if we are hosting it locally. - ''; - }; - - }; - }; - - config = mkIf cfg.enable { - - systemd.services.jormungandr = { - description = "jormungandr server"; - wantedBy = [ "multi-user.target" ]; - after = [ "network-online.target" ]; - environment = { - RUST_BACKTRACE = "full"; - }; - serviceConfig = { - DynamicUser = true; - StateDirectory = baseNameOf dataDir; - ExecStart = '' - ${pkgs.jormungandr}/bin/jormungandr --config ${configFile} \ - ${optionalString (cfg.secretFile != null) " --secret ${cfg.secretFile}"} \ - ${optionalString (cfg.genesisBlockHash != null) " --genesis-block-hash ${cfg.genesisBlockHash}"} \ - ${optionalString (cfg.genesisBlockFile != null) " --genesis-block ${cfg.genesisBlockFile}"} - ''; - }; - }; - }; -} diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 1d933153ffa..53fd6dd785e 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -135,7 +135,6 @@ in jackett = handleTest ./jackett.nix {}; jellyfin = handleTest ./jellyfin.nix {}; jenkins = handleTest ./jenkins.nix {}; - jormungandr = handleTest ./jormungandr.nix {}; kafka = handleTest ./kafka.nix {}; kerberos = handleTest ./kerberos/default.nix {}; kernel-latest = handleTest ./kernel-latest.nix {}; diff --git a/nixos/tests/jormungandr.nix b/nixos/tests/jormungandr.nix deleted file mode 100644 index 2abafc53ce5..00000000000 --- a/nixos/tests/jormungandr.nix +++ /dev/null @@ -1,77 +0,0 @@ -import ./make-test.nix ({ pkgs, ... }: { - name = "jormungandr"; - meta = with pkgs.stdenv.lib.maintainers; { - maintainers = [ mmahut ]; - }; - - nodes = { - # Testing the Byzantine Fault Tolerant protocol - bft = { ... }: { - environment.systemPackages = [ pkgs.jormungandr ]; - services.jormungandr.enable = true; - services.jormungandr.genesisBlockFile = "/var/lib/jormungandr/block-0.bin"; - services.jormungandr.secretFile = "/etc/secrets/jormungandr.yaml"; - }; - - # Testing the Ouroboros Genesis Praos protocol - genesis = { ... }: { - environment.systemPackages = [ pkgs.jormungandr ]; - services.jormungandr.enable = true; - services.jormungandr.genesisBlockFile = "/var/lib/jormungandr/block-0.bin"; - services.jormungandr.secretFile = "/etc/secrets/jormungandr.yaml"; - }; - }; - - testScript = '' - startAll; - - ## Testing BFT - # Let's wait for the StateDirectory - $bft->waitForFile("/var/lib/jormungandr/"); - - # First, we generate the genesis file for our new blockchain - $bft->succeed("jcli genesis init > /root/genesis.yaml"); - - # We need to generate our secret key - $bft->succeed("jcli key generate --type=Ed25519 > /root/key.prv"); - - # We include the secret key into our services.jormungandr.secretFile - $bft->succeed("mkdir -p /etc/secrets"); - $bft->succeed("echo -e \"bft:\\n signing_key:\" \$(cat /root/key.prv) > /etc/secrets/jormungandr.yaml"); - - # After that, we generate our public key from it - $bft->succeed("cat /root/key.prv | jcli key to-public > /root/key.pub"); - - # We add our public key as a consensus leader in the genesis configration file - $bft->succeed("sed -ie \"s/ed25519_pk1vvwp2s0n5jl5f4xcjurp2e92sj2awehkrydrlas4vgqr7xzt33jsadha32/\$(cat /root/key.pub)/\" /root/genesis.yaml"); - - # Now we can generate the genesis block from it - $bft->succeed("jcli genesis encode --input /root/genesis.yaml --output /var/lib/jormungandr/block-0.bin"); - - # We should have everything to start the service now - $bft->succeed("systemctl restart jormungandr"); - $bft->waitForUnit("jormungandr.service"); - - # Now we can test if we are able to reach the REST API - $bft->waitUntilSucceeds("curl -L http://localhost:8607/api/v0/node/stats | grep uptime"); - - ## Testing Genesis - # Let's wait for the StateDirectory - $genesis->waitForFile("/var/lib/jormungandr/"); - - # Bootstraping the configuration - $genesis->succeed("jormungandr-bootstrap -g -p 8607 -s 1"); - - # Moving generated files in place - $genesis->succeed("mkdir -p /etc/secrets"); - $genesis->succeed("mv pool-secret1.yaml /etc/secrets/jormungandr.yaml"); - $genesis->succeed("mv block-0.bin /var/lib/jormungandr/"); - - # We should have everything to start the service now - $genesis->succeed("systemctl restart jormungandr"); - $genesis->waitForUnit("jormungandr.service"); - - # Now we can create and delegate an account - $genesis->succeed("./create-account-and-delegate.sh | tee -a /tmp/delegate.log"); - ''; -}) diff --git a/pkgs/applications/blockchains/jormungandr/default.nix b/pkgs/applications/blockchains/jormungandr/default.nix deleted file mode 100644 index 0898e469a6f..00000000000 --- a/pkgs/applications/blockchains/jormungandr/default.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ stdenv -, lib -, fetchgit -, rustPlatform -, openssl -, pkgconfig -, protobuf -, darwin -}: - -rustPlatform.buildRustPackage rec { - pname = "jormungandr"; - version = "0.7.0-rc4"; - - src = fetchgit { - url = "https://github.com/input-output-hk/${pname}"; - rev = "v${version}"; - sha256 = "1cjdapy0r2bikqck64cl09vzs307wcfi628hfmpczrg33i81pr3g"; - fetchSubmodules = true; - }; - - cargoSha256 = "0546ahgwcczaxda1hc1r20skzi93s40isq2ys40y9165sgdydn4i"; - - nativeBuildInputs = [ pkgconfig protobuf ]; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk.frameworks.Security ]; - - patchPhase = '' - sed -i "s~SCRIPTPATH=.*~SCRIPTPATH=$out/templates/~g" scripts/bootstrap - ''; - - installPhase = '' - install -d $out/bin $out/templates - install -m755 target/*/release/jormungandr $out/bin/ - install -m755 target/*/release/jcli $out/bin/ - install -m755 target/*/release/jormungandr-scenario-tests $out/bin/ - install -m755 scripts/send-transaction $out/templates - install -m755 scripts/jcli-helpers $out/bin/ - install -m755 scripts/bootstrap $out/bin/jormungandr-bootstrap - install -m644 scripts/faucet-send-money.shtempl $out/templates/ - install -m644 scripts/create-account-and-delegate.shtempl $out/templates/ - install -m644 scripts/faucet-send-certificate.shtempl $out/templates/ - ''; - - PROTOC = "${protobuf}/bin/protoc"; - - # Disabling integration tests - doCheck = false; - - meta = with stdenv.lib; { - description = "An aspiring blockchain node"; - homepage = "https://input-output-hk.github.io/jormungandr/"; - license = licenses.mit; - maintainers = [ maintainers.mmahut ]; - platforms = platforms.all; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9e7a04a8931..c7b04408106 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22175,8 +22175,6 @@ in inherit (darwin.apple_sdk.frameworks) IOKit; }; - jormungandr = callPackage ../applications/blockchains/jormungandr { }; - ledger-live-desktop = callPackage ../applications/blockchains/ledger-live-desktop { }; litecoin = callPackage ../applications/blockchains/litecoin.nix { From 50ea99cbc18d3f480a773de5250b4ef9c7f6d514 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 5 Nov 2019 15:14:30 +0100 Subject: [PATCH 222/377] nixos/tests/quake3.nix: Remove This was a demo of the VM testing approach in an old paper but there's no need to keep it around. --- nixos/tests/all-tests.nix | 1 - nixos/tests/quake3.nix | 95 --------------------------------------- 2 files changed, 96 deletions(-) delete mode 100644 nixos/tests/quake3.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 53fd6dd785e..5e7c8a7f4b5 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -242,7 +242,6 @@ in prosodyMysql = handleTest ./xmpp/prosody-mysql.nix {}; proxy = handleTest ./proxy.nix {}; quagga = handleTest ./quagga.nix {}; - quake3 = handleTest ./quake3.nix {}; rabbitmq = handleTest ./rabbitmq.nix {}; radarr = handleTest ./radarr.nix {}; radicale = handleTest ./radicale.nix {}; diff --git a/nixos/tests/quake3.nix b/nixos/tests/quake3.nix deleted file mode 100644 index 4d57e219790..00000000000 --- a/nixos/tests/quake3.nix +++ /dev/null @@ -1,95 +0,0 @@ -import ./make-test-python.nix ({ pkgs, ...} : - -let - - # Build Quake with coverage instrumentation. - overrides = pkgs: - { - quake3game = pkgs.quake3game.override (args: { - stdenv = pkgs.stdenvAdapters.addCoverageInstrumentation args.stdenv; - }); - }; - - # Only allow the demo data to be used (only if it's unfreeRedistributable). - unfreePredicate = pkg: with pkgs.lib; let - allowPackageNames = [ "quake3-demodata" "quake3-pointrelease" ]; - allowLicenses = [ pkgs.lib.licenses.unfreeRedistributable ]; - in elem pkg.pname allowPackageNames && - elem (pkg.meta.license or null) allowLicenses; - -in - -rec { - name = "quake3"; - meta = with pkgs.stdenv.lib.maintainers; { - maintainers = [ domenkozar eelco ]; - }; - - # TODO: lcov doesn't work atm - #makeCoverageReport = true; - - client = - { pkgs, ... }: - - { imports = [ ./common/x11.nix ]; - hardware.opengl.driSupport = true; - environment.systemPackages = [ pkgs.quake3demo ]; - nixpkgs.config.packageOverrides = overrides; - nixpkgs.config.allowUnfreePredicate = unfreePredicate; - }; - - nodes = - { server = - { pkgs, ... }: - - { systemd.services.quake3-server = - { wantedBy = [ "multi-user.target" ]; - script = - "${pkgs.quake3demo}/bin/quake3-server +set g_gametype 0 " + - "+map q3dm7 +addbot grunt +addbot daemia 2> /tmp/log"; - }; - nixpkgs.config.packageOverrides = overrides; - nixpkgs.config.allowUnfreePredicate = unfreePredicate; - networking.firewall.allowedUDPPorts = [ 27960 ]; - }; - - client1 = client; - client2 = client; - }; - - testScript = - '' - start_all() - - server.wait_for_unit("quake3-server") - client1.wait_for_x() - client2.wait_for_x() - - client1.execute("quake3 +set r_fullscreen 0 +set name Foo +connect server &") - client2.execute("quake3 +set r_fullscreen 0 +set name Bar +connect server &") - - server.wait_until_succeeds("grep -q 'Foo.*entered the game' /tmp/log") - server.wait_until_succeeds("grep -q 'Bar.*entered the game' /tmp/log") - - server.sleep(10) # wait for a while to get a nice screenshot - - client1.block() - - server.sleep(20) - - client1.screenshot("screen1") - client2.screenshot("screen2") - - client1.unblock() - - server.sleep(10) - - client1.screenshot("screen3") - client2.screenshot("screen4") - - client1.shutdown() - client2.shutdown() - server.stop_job("quake3-server") - ''; - -}) From 51de90ef44455651d389fd54f961021a099de52e Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 5 Nov 2019 00:51:07 +0100 Subject: [PATCH 223/377] gjs: add separateDebugInfo --- pkgs/development/libraries/gjs/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/libraries/gjs/default.nix b/pkgs/development/libraries/gjs/default.nix index 46550c3e50f..6430be0b57f 100644 --- a/pkgs/development/libraries/gjs/default.nix +++ b/pkgs/development/libraries/gjs/default.nix @@ -64,6 +64,8 @@ stdenv.mkDerivation rec { --prefix GI_TYPELIB_PATH : "${stdenv.lib.makeSearchPath "lib/girepository-1.0" [ gtk3 atk pango.out gdk-pixbuf ]}:$installedTests/libexec/gjs/installed-tests" ''; + separateDebugInfo = stdenv.isLinux; + passthru = { updateScript = gnome3.updateScript { packageName = "gjs"; From e13f4057e4a3dc5acfd5726caa8755ddb14376e1 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 5 Nov 2019 15:21:04 +0100 Subject: [PATCH 224/377] nixos/babeld: port test to python --- nixos/tests/babeld.nix | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/nixos/tests/babeld.nix b/nixos/tests/babeld.nix index 5242cf395d7..fafa788ba57 100644 --- a/nixos/tests/babeld.nix +++ b/nixos/tests/babeld.nix @@ -1,5 +1,5 @@ -import ./make-test.nix ({ pkgs, lib, ...} : { +import ./make-test-python.nix ({ pkgs, lib, ...} : { name = "babeld"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ hexa ]; @@ -21,7 +21,7 @@ import ./make-test.nix ({ pkgs, lib, ...} : { }; }; - localRouter = { pkgs, lib, ... }: + local_router = { pkgs, lib, ... }: { virtualisation.vlans = [ 10 20 ]; @@ -70,7 +70,7 @@ import ./make-test.nix ({ pkgs, lib, ...} : { ''; }; }; - remoteRouter = { pkgs, lib, ... }: + remote_router = { pkgs, lib, ... }: { virtualisation.vlans = [ 20 30 ]; @@ -124,25 +124,25 @@ import ./make-test.nix ({ pkgs, lib, ...} : { testScript = '' - startAll; + start_all() - $client->waitForUnit("network-online.target"); - $localRouter->waitForUnit("network-online.target"); - $remoteRouter->waitForUnit("network-online.target"); + client.wait_for_unit("network-online.target") + local_router.wait_for_unit("network-online.target") + remote_router.wait_for_unit("network-online.target") - $localRouter->waitForUnit("babeld.service"); - $remoteRouter->waitForUnit("babeld.service"); + local_router.wait_for_unit("babeld.service") + remote_router.wait_for_unit("babeld.service") - $localRouter->waitUntilSucceeds("ip route get 192.168.30.1"); - $localRouter->waitUntilSucceeds("ip route get 2001:db8:30::1"); + local_router.wait_until_succeeds("ip route get 192.168.30.1") + local_router.wait_until_succeeds("ip route get 2001:db8:30::1") - $remoteRouter->waitUntilSucceeds("ip route get 192.168.10.1"); - $remoteRouter->waitUntilSucceeds("ip route get 2001:db8:10::1"); + remote_router.wait_until_succeeds("ip route get 192.168.10.1") + remote_router.wait_until_succeeds("ip route get 2001:db8:10::1") - $client->succeed("ping -c1 192.168.30.1"); - $client->succeed("ping -c1 2001:db8:30::1"); + client.succeed("ping -c1 192.168.30.1") + client.succeed("ping -c1 2001:db8:30::1") - $remoteRouter->succeed("ping -c1 192.168.10.2"); - $remoteRouter->succeed("ping -c1 2001:db8:10::2"); + remote_router.succeed("ping -c1 192.168.10.2") + remote_router.succeed("ping -c1 2001:db8:10::2") ''; }) From 76df6d67eacf67d48485cd1d3bb7e3ae6922edae Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 5 Nov 2019 16:02:01 +0100 Subject: [PATCH 225/377] nixos/knot: port test to python --- nixos/tests/knot.nix | 52 +++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/nixos/tests/knot.nix b/nixos/tests/knot.nix index e46159836cc..7032bfc20a1 100644 --- a/nixos/tests/knot.nix +++ b/nixos/tests/knot.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, lib, ...} : +import ./make-test-python.nix ({ pkgs, lib, ...} : let common = { networking.firewall.enable = false; @@ -161,37 +161,35 @@ in { slave4 = (lib.head nodes.slave.config.networking.interfaces.eth1.ipv4.addresses).address; slave6 = (lib.head nodes.slave.config.networking.interfaces.eth1.ipv6.addresses).address; in '' - startAll; + import re - $client->waitForUnit("network.target"); - $master->waitForUnit("knot.service"); - $slave->waitForUnit("knot.service"); + start_all() - sub assertResponse { - my ($knot, $query_type, $query, $expected) = @_; - my $out = $client->succeed("khost -t $query_type $query $knot"); - $client->log("$knot replies with: $out"); - chomp $out; - die "DNS query for $query ($query_type) against $knot gave '$out' instead of '$expected'" - if ($out !~ $expected); - } + client.wait_for_unit("network.target") + master.wait_for_unit("knot.service") + slave.wait_for_unit("knot.service") - foreach ("${master4}", "${master6}", "${slave4}", "${slave6}") { - subtest $_, sub { - assertResponse($_, "SOA", "example.com", qr/start of authority.*?noc\.example\.com/); - assertResponse($_, "A", "example.com", qr/has no [^ ]+ record/); - assertResponse($_, "AAAA", "example.com", qr/has no [^ ]+ record/); - assertResponse($_, "A", "www.example.com", qr/address 192.0.2.1$/); - assertResponse($_, "AAAA", "www.example.com", qr/address 2001:db8::1$/); + def test(host, query_type, query, pattern): + out = client.succeed(f"khost -t {query_type} {query} {host}").strip() + client.log(f"{host} replied with: {out}") + assert re.search(pattern, out), f'Did not match "{pattern}"' - assertResponse($_, "NS", "sub.example.com", qr/nameserver is ns\d\.example\.com.$/); - assertResponse($_, "A", "sub.example.com", qr/address 192.0.2.2$/); - assertResponse($_, "AAAA", "sub.example.com", qr/address 2001:db8::2$/); - assertResponse($_, "RRSIG", "www.example.com", qr/RR set signature is/); - assertResponse($_, "DNSKEY", "example.com", qr/DNSSEC key is/); - }; - } + for host in ("${master4}", "${master6}", "${slave4}", "${slave6}"): + with subtest(f"Interrogate {host}"): + test(host, "SOA", "example.com", r"start of authority.*noc\.example\.com\.") + test(host, "A", "example.com", r"has no [^ ]+ record") + test(host, "AAAA", "example.com", r"has no [^ ]+ record") + + test(host, "A", "www.example.com", r"address 192.0.2.1$") + test(host, "AAAA", "www.example.com", r"address 2001:db8::1$") + + test(host, "NS", "sub.example.com", r"nameserver is ns\d\.example\.com.$") + test(host, "A", "sub.example.com", r"address 192.0.2.2$") + test(host, "AAAA", "sub.example.com", r"address 2001:db8::2$") + + test(host, "RRSIG", "www.example.com", r"RR set signature is") + test(host, "DNSKEY", "example.com", r"DNSSEC key is") ''; }) From 014970bc17d6cb7718737041e1c4a8a10ef56503 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Tue, 5 Nov 2019 16:03:21 +0100 Subject: [PATCH 226/377] nixos/knot: add myself as maintainer for test --- nixos/tests/knot.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nixos/tests/knot.nix b/nixos/tests/knot.nix index 7032bfc20a1..0588cf86ac0 100644 --- a/nixos/tests/knot.nix +++ b/nixos/tests/knot.nix @@ -30,6 +30,10 @@ let }; in { name = "knot"; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ hexa ]; + }; + nodes = { master = { lib, ... }: { From 9b78e5f35d209754bd539a7f026ab6d3ada2d67d Mon Sep 17 00:00:00 2001 From: "EEva (JPotier)" Date: Mon, 4 Nov 2019 19:08:57 +0200 Subject: [PATCH 227/377] vault: fix config when file backend is used When the option services.vault.storageBackend is set to "file", a systemd.tmpfiles.rules was added, with extraneous []. These are not needed and have been removed. --- nixos/modules/services/security/vault.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nixos/modules/services/security/vault.nix b/nixos/modules/services/security/vault.nix index d5962ba9af9..b0ab8fadcbe 100644 --- a/nixos/modules/services/security/vault.nix +++ b/nixos/modules/services/security/vault.nix @@ -119,9 +119,8 @@ in }; users.groups.vault.gid = config.ids.gids.vault; - systemd.tmpfiles.rules = optional (cfg.storagePath != null) [ - "d '${cfg.storagePath}' 0700 vault vault - -" - ]; + systemd.tmpfiles.rules = optional (cfg.storagePath != null) + "d '${cfg.storagePath}' 0700 vault vault - -"; systemd.services.vault = { description = "Vault server daemon"; From 5fecc35bb2ef82e118e023779bf1f38491234e92 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 5 Nov 2019 16:57:08 +0100 Subject: [PATCH 228/377] nixos/vault: convert test to python --- nixos/tests/vault.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nixos/tests/vault.nix b/nixos/tests/vault.nix index caf0cbb2abf..ac8cf0703da 100644 --- a/nixos/tests/vault.nix +++ b/nixos/tests/vault.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ... }: +import ./make-test-python.nix ({ pkgs, ... }: { name = "vault"; meta = with pkgs.stdenv.lib.maintainers; { @@ -12,12 +12,12 @@ import ./make-test.nix ({ pkgs, ... }: testScript = '' - startAll; + start_all() - $machine->waitForUnit('multi-user.target'); - $machine->waitForUnit('vault.service'); - $machine->waitForOpenPort(8200); - $machine->succeed('vault operator init'); - $machine->succeed('vault status | grep Sealed | grep true'); + machine.wait_for_unit("multi-user.target") + machine.wait_for_unit("vault.service") + machine.wait_for_open_port(8200) + machine.succeed("vault operator init") + machine.succeed("vault status | grep Sealed | grep true") ''; }) From 1eafac2ac66ce63ffc8e29a6b1e846c168ceb39f Mon Sep 17 00:00:00 2001 From: Andrew Newman Date: Tue, 5 Nov 2019 20:00:42 +0300 Subject: [PATCH 229/377] qtcreator 4.9.1 -> 4.10.0 (#70573) Added optional withClangPlugins to disable clang plugins compilation and, therefore, vendor clang dependency. --- .../0001-Fix-clang-libcpp-regexp.patch | 4 +- .../0002-Dont-remove-clang-header-paths.patch | 13 ++++++ pkgs/development/tools/qtcreator/default.nix | 40 ++++++++----------- 3 files changed, 31 insertions(+), 26 deletions(-) create mode 100644 pkgs/development/tools/qtcreator/0002-Dont-remove-clang-header-paths.patch diff --git a/pkgs/development/tools/qtcreator/0001-Fix-clang-libcpp-regexp.patch b/pkgs/development/tools/qtcreator/0001-Fix-clang-libcpp-regexp.patch index 8744b753a6e..39c5c06a285 100644 --- a/pkgs/development/tools/qtcreator/0001-Fix-clang-libcpp-regexp.patch +++ b/pkgs/development/tools/qtcreator/0001-Fix-clang-libcpp-regexp.patch @@ -1,8 +1,8 @@ diff --git a/src/plugins/cpptools/headerpathfilter.cpp b/src/plugins/cpptools/headerpathfilter.cpp -index b514c46..5f96358 100644 +index e2d1e6a..1a1d839 100644 --- a/src/plugins/cpptools/headerpathfilter.cpp +++ b/src/plugins/cpptools/headerpathfilter.cpp -@@ -92,8 +92,8 @@ HeaderPaths::iterator resourceIterator(HeaderPaths &headerPaths, bool isMacOs) +@@ -96,8 +96,8 @@ HeaderPaths::iterator resourceIterator(HeaderPaths &headerPaths, bool isMacOs) { // include/c++, include/g++, libc++\include and libc++abi\include static const QString cppIncludes = R"((.*\/include\/.*(g\+\+|c\+\+).*))" diff --git a/pkgs/development/tools/qtcreator/0002-Dont-remove-clang-header-paths.patch b/pkgs/development/tools/qtcreator/0002-Dont-remove-clang-header-paths.patch new file mode 100644 index 00000000000..5cd34991c39 --- /dev/null +++ b/pkgs/development/tools/qtcreator/0002-Dont-remove-clang-header-paths.patch @@ -0,0 +1,13 @@ +diff --git a/src/plugins/cpptools/headerpathfilter.cpp b/src/plugins/cpptools/headerpathfilter.cpp +index e2d1e6a..1a1d839 100644 +--- a/src/plugins/cpptools/headerpathfilter.cpp ++++ b/src/plugins/cpptools/headerpathfilter.cpp +@@ -134,8 +134,6 @@ void removeClangSystemHeaderPaths(HeaderPaths &headerPaths) + + void HeaderPathFilter::tweakHeaderPaths() + { +- removeClangSystemHeaderPaths(builtInHeaderPaths); +- + auto split = resourceIterator(builtInHeaderPaths, + projectPart.toolChainTargetTriple.contains("darwin")); + diff --git a/pkgs/development/tools/qtcreator/default.nix b/pkgs/development/tools/qtcreator/default.nix index 7e592bf060a..55eb30ab370 100644 --- a/pkgs/development/tools/qtcreator/default.nix +++ b/pkgs/development/tools/qtcreator/default.nix @@ -1,14 +1,11 @@ { mkDerivation, lib, fetchurl, fetchgit, fetchpatch , qtbase, qtquickcontrols, qtscript, qtdeclarative, qmake, llvmPackages_8 -, withDocumentation ? false +, withDocumentation ? false, withClangPlugins ? true }: with lib; let - baseVersion = "4.9"; - revision = "1"; - # Fetch clang from qt vendor, this contains submodules like this: # clang<-clang-tools-extra<-clazy. clang_qt_vendor = llvmPackages_8.clang-unwrapped.overrideAttrs (oldAttrs: { @@ -23,35 +20,28 @@ in mkDerivation rec { pname = "qtcreator"; - version = "${baseVersion}.${revision}"; + version = "4.10.0"; + baseVersion = builtins.concatStringsSep "." (lib.take 2 (builtins.splitVersion version)); src = fetchurl { url = "http://download.qt-project.org/official_releases/${pname}/${baseVersion}/${version}/qt-creator-opensource-src-${version}.tar.xz"; - sha256 = "10ddp1365rf0z4bs7yzc9hajisp3j6mzjshyd0vpi4ki126j5f3r"; + sha256 = "12hgxdghz05ms4zl8prz2w8l66vmgw1qw2gsmmwqi2rdaay3lpcg"; }; - buildInputs = [ qtbase qtscript qtquickcontrols qtdeclarative llvmPackages_8.libclang clang_qt_vendor llvmPackages_8.llvm ]; + buildInputs = [ qtbase qtscript qtquickcontrols qtdeclarative ] ++ + optionals withClangPlugins [ llvmPackages_8.libclang + clang_qt_vendor + llvmPackages_8.llvm ]; nativeBuildInputs = [ qmake ]; # 0001-Fix-clang-libcpp-regexp.patch is for fixing regexp that is used to # find clang libc++ library include paths. By default it's not covering paths # like libc++-version, which is default name for libc++ folder in nixos. + # ./0002-Dont-remove-clang-header-paths.patch is for forcing qtcreator to not + # remove system clang include paths. patches = [ ./0001-Fix-clang-libcpp-regexp.patch - - # Fix clazy plugin name. This plugin was renamed with clang8 - # release, and patch didn't make it into 4.9.1 release. Should be removed - # on qtcreator update, if this problem is fixed. - (fetchpatch { - url = "https://code.qt.io/cgit/qt-creator/qt-creator.git/patch/src/plugins/clangcodemodel/clangeditordocumentprocessor.cpp?id=53c407bc0c87e0b65b537bf26836ddd8e00ead82"; - sha256 = "1lanp7jg0x8jffajb852q8p4r34facg41l410xsz6s1k91jskbi9"; - }) - - (fetchpatch { - url = "https://code.qt.io/cgit/qt-creator/qt-creator.git/patch/src/plugins/clangtools/clangtidyclazyrunner.cpp?id=53c407bc0c87e0b65b537bf26836ddd8e00ead82"; - sha256 = "1rl0rc2l297lpfhhawvkkmj77zb081hhp0bbi7nnykf3q9ch0clh"; - }) - ]; + ./0002-Dont-remove-clang-header-paths.patch ]; doCheck = true; @@ -63,8 +53,8 @@ mkDerivation rec { preConfigure = '' substituteInPlace src/plugins/plugins.pro \ - --replace '$$[QT_INSTALL_QML]/QtQuick/Controls' '${qtquickcontrols}/${qtbase.qtQmlPrefix}/QtQuick/Controls' - + --replace '$$[QT_INSTALL_QML]/QtQuick/Controls' '${qtquickcontrols}/${qtbase.qtQmlPrefix}/QtQuick/Controls' + '' + optionalString withClangPlugins '' # Fix paths for llvm/clang includes directories. substituteInPlace src/shared/clang/clang_defines.pri \ --replace '$$clean_path($${LLVM_LIBDIR}/clang/$${LLVM_VERSION}/include)' '${clang_qt_vendor}/lib/clang/8.0.0/include' \ @@ -77,7 +67,9 @@ mkDerivation rec { # Fix paths to libclang library. substituteInPlace src/shared/clang/clang_installation.pri \ --replace 'LIBCLANG_LIBS = -L$${LLVM_LIBDIR}' 'LIBCLANG_LIBS = -L${llvmPackages_8.libclang}/lib' \ - --replace 'LIBCLANG_LIBS += $${CLANG_LIB}' 'LIBCLANG_LIBS += -lclang' + --replace 'LIBCLANG_LIBS += $${CLANG_LIB}' 'LIBCLANG_LIBS += -lclang' \ + --replace 'LIBTOOLING_LIBS = -L$${LLVM_LIBDIR}' 'LIBTOOLING_LIBS = -L${clang_qt_vendor}/lib' \ + --replace 'LLVM_CXXFLAGS ~= s,-gsplit-dwarf,' '${lib.concatStringsSep "\n" ["LLVM_CXXFLAGS ~= s,-gsplit-dwarf," " LLVM_CXXFLAGS += -fno-rtti"]}' ''; preBuild = optional withDocumentation '' From 9c54658226e99b4edfbb0d570d547a147d7d9eb4 Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Tue, 5 Nov 2019 14:35:10 +0100 Subject: [PATCH 230/377] nixos/tests: Implement python test-driver version of requireActiveUnit --- nixos/lib/test-driver/test-driver.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py index 45b7e229a5c..2c137ab3837 100644 --- a/nixos/lib/test-driver/test-driver.py +++ b/nixos/lib/test-driver/test-driver.py @@ -4,7 +4,9 @@ from contextlib import contextmanager from xml.sax.saxutils import XMLGenerator import _thread import atexit +import json import os +import ptpython.repl import pty import queue import re @@ -15,7 +17,6 @@ import sys import tempfile import time import unicodedata -import ptpython.repl CHAR_TO_KEY = { "A": "shift-a", @@ -344,6 +345,18 @@ class Machine: ) return self.execute("systemctl {}".format(q)) + def require_unit_state(self, unit, require_state="active"): + with self.nested( + "checking if unit ‘{}’ has reached state '{}'".format(unit, require_state) + ): + info = self.get_unit_info(unit) + state = info["ActiveState"] + if state != require_state: + raise Exception( + "Expected unit ‘{}’ to to be in state ".format(unit) + + "'active' but it is in state ‘{}’".format(state) + ) + def execute(self, command): self.connect() From fdb72f68ad5179883af7d13d070a7bb36dab1603 Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Tue, 5 Nov 2019 14:35:54 +0100 Subject: [PATCH 231/377] nixos/matrix-synapse: Port integration test to python --- nixos/tests/matrix-synapse.nix | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/nixos/tests/matrix-synapse.nix b/nixos/tests/matrix-synapse.nix index 882e4b75814..fca53009083 100644 --- a/nixos/tests/matrix-synapse.nix +++ b/nixos/tests/matrix-synapse.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ... } : let +import ./make-test-python.nix ({ pkgs, ... } : let runWithOpenSSL = file: cmd: pkgs.runCommand file { @@ -55,13 +55,17 @@ in { }; testScript = '' - startAll; - $serverpostgres->waitForUnit("matrix-synapse.service"); - $serverpostgres->waitUntilSucceeds("curl -L --cacert ${ca_pem} https://localhost:8448/"); - $serverpostgres->requireActiveUnit("postgresql.service"); - $serversqlite->waitForUnit("matrix-synapse.service"); - $serversqlite->waitUntilSucceeds("curl -L --cacert ${ca_pem} https://localhost:8448/"); - $serversqlite->mustSucceed("[ -e /var/lib/matrix-synapse/homeserver.db ]"); + start_all() + serverpostgres.wait_for_unit("matrix-synapse.service") + serverpostgres.wait_until_succeeds( + "curl -L --cacert ${ca_pem} https://localhost:8448/" + ) + serverpostgres.require_unit_state("postgresql.service") + serversqlite.wait_for_unit("matrix-synapse.service") + serversqlite.wait_until_succeeds( + "curl -L --cacert ${ca_pem} https://localhost:8448/" + ) + serversqlite.succeed("[ -e /var/lib/matrix-synapse/homeserver.db ]") ''; }) From 45b339b736380fe007721a460b2d2ac9791d8f5c Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Tue, 5 Nov 2019 15:59:29 +0100 Subject: [PATCH 232/377] nixos/tests: Implement python test-driver version of getWindowNames and waitForWindow --- nixos/lib/test-driver/test-driver.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py index 2c137ab3837..b1e2b923185 100644 --- a/nixos/lib/test-driver/test-driver.py +++ b/nixos/lib/test-driver/test-driver.py @@ -655,6 +655,27 @@ class Machine: if status == 0: return + def get_window_names(self): + return self.succeed( + r"xwininfo -root -tree | sed 's/.*0x[0-9a-f]* \"\([^\"]*\)\".*/\1/; t; d'" + ).splitlines() + + def wait_for_window(self, regexp): + pattern = re.compile(regexp) + + def window_is_visible(last_try): + names = self.get_window_names() + if last_try: + self.log( + "Last chance to match {} on the window list,".format(regexp) + + " which currently contains: " + + ", ".join(names) + ) + return any(pattern.search(name) for name in names) + + with self.nested("Waiting for a window to appear"): + retry(window_is_visible) + def sleep(self, secs): time.sleep(secs) From d6b7a9909e7b0ca71145019ae49063f282d0d8ba Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Tue, 5 Nov 2019 16:27:07 +0100 Subject: [PATCH 233/377] nixos/firefox: Port integration test to python --- nixos/tests/firefox.nix | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/nixos/tests/firefox.nix b/nixos/tests/firefox.nix index f5b946a0881..56ddabbae77 100644 --- a/nixos/tests/firefox.nix +++ b/nixos/tests/firefox.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ... }: { +import ./make-test-python.nix ({ pkgs, ... }: { name = "firefox"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ eelco shlevy ]; @@ -11,19 +11,27 @@ import ./make-test.nix ({ pkgs, ... }: { environment.systemPackages = [ pkgs.firefox pkgs.xdotool ]; }; - testScript = - '' - $machine->waitForX; - $machine->execute("xterm -e 'firefox file://${pkgs.valgrind.doc}/share/doc/valgrind/html/index.html' &"); - $machine->waitForWindow(qr/Valgrind/); - $machine->sleep(40); # wait until Firefox has finished loading the page - $machine->execute("xdotool key space"); # do I want to make Firefox the - # default browser? I just want to close the dialog - $machine->sleep(2); # wait until Firefox hides the default browser window - $machine->execute("xdotool key F12"); - $machine->sleep(10); # wait until Firefox draws the developer tool panel - $machine->succeed("xwininfo -root -tree | grep Valgrind"); - $machine->screenshot("screen"); + testScript = '' + machine.wait_for_x() + + with subtest("wait until Firefox has finished loading the Valgrind docs page"): + machine.execute( + "xterm -e 'firefox file://${pkgs.valgrind.doc}/share/doc/valgrind/html/index.html' &" + ) + machine.wait_for_window("Valgrind") + machine.sleep(40) + + with subtest("Close default browser prompt"): + machine.execute("xdotool key space") + + with subtest("Hide default browser window"): + machine.sleep(2) + machine.execute("xdotool key F12") + + with subtest("wait until Firefox draws the developer tool panel"): + machine.sleep(10) + machine.succeed("xwininfo -root -tree | grep Valgrind") + machine.screenshot("screen") ''; }) From f605e22cc396416ad13777ef666e577533d4f67d Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Mon, 4 Nov 2019 01:25:38 -0800 Subject: [PATCH 234/377] python3Packages.cytoolz: 0.10.0 -> 0.10.1 --- pkgs/development/python-modules/cytoolz/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/cytoolz/default.nix b/pkgs/development/python-modules/cytoolz/default.nix index f95da9b75b2..1a142cae0f0 100644 --- a/pkgs/development/python-modules/cytoolz/default.nix +++ b/pkgs/development/python-modules/cytoolz/default.nix @@ -10,11 +10,11 @@ buildPythonPackage rec { pname = "cytoolz"; - version = "0.10.0"; + version = "0.10.1"; src = fetchPypi { inherit pname version; - sha256 = "ed9f6a07c2bac70d6c597df360d0666d11d2adc90141d54c5c2db08b380a4fac"; + sha256 = "0p4a9nadsy1337gy2cnb5yanbn03j3zm6d9adyqad9bk3nlbpxc2"; }; # Extension types From 65db5ce85c1fcd2c47240a9abb229c00305b78e6 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Wed, 30 Oct 2019 11:25:38 -0700 Subject: [PATCH 235/377] onnxruntime: 0.5.0 -> 1.0.0 --- pkgs/development/libraries/onnxruntime/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/onnxruntime/default.nix b/pkgs/development/libraries/onnxruntime/default.nix index b5549c6735f..33bc4c6e82c 100644 --- a/pkgs/development/libraries/onnxruntime/default.nix +++ b/pkgs/development/libraries/onnxruntime/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { pname = "onnxruntime"; - version = "0.5.0"; + version = "1.0.0"; src = fetchFromGitHub { owner = "microsoft"; repo = "onnxruntime"; rev = "v${version}"; - sha256 = "0s8ylc5xr55490hbz7zn3hnp9dnyp92d320ln8xw5hqkw3mgyr3p"; + sha256 = "1d28lzrjnq69yl8j9ncxlsxl0bniacn3hnsr9van10zgp527436v"; # TODO: use nix-versions of grpc, onnx, eigen, googletest, etc. # submodules increase src size and compile times significantly # not currently feasible due to how integrated cmake build is with git @@ -43,6 +43,8 @@ stdenv.mkDerivation rec { rm -r $out/bin # ctest runner ''; + enableParallelBuilding = true; + meta = with stdenv.lib; { description = "Cross-platform, high performance scoring engine for ML models"; longDescription = '' @@ -55,6 +57,9 @@ stdenv.mkDerivation rec { compatibility. ''; homepage = "https://github.com/microsoft/onnxruntime"; + changelog = "https://github.com/microsoft/onnxruntime/releases"; + # https://github.com/microsoft/onnxruntime/blob/master/BUILD.md#architectures + platforms = platforms.unix; license = licenses.mit; maintainers = with maintainers; [ jonringer ]; }; From c89b97e023f2febfc1b6a9b77034d104925d3c3e Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Tue, 5 Nov 2019 18:36:00 +0100 Subject: [PATCH 236/377] git-sizer: 1.0.0 -> 1.3.0 --- pkgs/applications/version-management/git-sizer/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/git-sizer/default.nix b/pkgs/applications/version-management/git-sizer/default.nix index 7a92679583b..6d41098ee1a 100644 --- a/pkgs/applications/version-management/git-sizer/default.nix +++ b/pkgs/applications/version-management/git-sizer/default.nix @@ -2,7 +2,7 @@ buildGoPackage rec { pname = "git-sizer"; - version = "1.0.0"; + version = "1.3.0"; goPackagePath = "github.com/github/git-sizer"; @@ -10,7 +10,7 @@ buildGoPackage rec { owner = "github"; repo = pname; rev = "v${version}"; - sha256 = "11rvqpsyl41ph0fgm62k5q2p33zgnwj1jd91rd4lkaarpcd1sg5h"; + sha256 = "0kmyvai5xfalm56ywa6mhdvvjnacdzwcyz28bw0pz9a4gyf1mgvh"; }; meta = with lib; { From 1a1bab34ccf6d96950366eb672d6a1c675b80a73 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 5 Nov 2019 09:50:06 -0800 Subject: [PATCH 237/377] sysbench: 1.0.17 -> 1.0.18 * sysbench: 1.0.17 -> 1.0.18 (#72685) * sysbench: set meta.homepage + cleanup build inputs (vim isn't needed since 1.0.12) + enable parallel building --- .../tools/misc/sysbench/default.nix | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/pkgs/development/tools/misc/sysbench/default.nix b/pkgs/development/tools/misc/sysbench/default.nix index 8076925f29b..8feeb13db95 100644 --- a/pkgs/development/tools/misc/sysbench/default.nix +++ b/pkgs/development/tools/misc/sysbench/default.nix @@ -1,21 +1,26 @@ -{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, vim, libmysqlclient -, libaio }: +{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig +, libmysqlclient, libaio +}: -stdenv.mkDerivation { - name = "sysbench-1.0.17"; +stdenv.mkDerivation rec { + pname = "sysbench"; + version = "1.0.18"; nativeBuildInputs = [ autoreconfHook pkgconfig ]; - buildInputs = [ vim libmysqlclient libaio ]; + buildInputs = [ libmysqlclient libaio ]; src = fetchFromGitHub { owner = "akopytov"; - repo = "sysbench"; - rev = "1.0.17"; - sha256 = "02i9knvp0bjw6ri848xxiy2dbww2xv70nah9yn67a6zgw617hwa6"; + repo = pname; + rev = version; + sha256 = "1r6lkyfp65xqklj1rdfw551srqqyak144agi8x3wjz3wmsbqls19"; }; + enableParallelBuilding = true; + meta = { description = "Modular, cross-platform and multi-threaded benchmark tool"; + homepage = https://github.com/akopytov/sysbench; license = stdenv.lib.licenses.gpl2; platforms = stdenv.lib.platforms.linux; }; From 0720a4e24b13f8436b3b14716d79314c6ad8f91c Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Tue, 5 Nov 2019 13:46:54 -0500 Subject: [PATCH 238/377] gnome3.gnome-boxes: add glib-networking --- pkgs/desktops/gnome-3/apps/gnome-boxes/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/desktops/gnome-3/apps/gnome-boxes/default.nix b/pkgs/desktops/gnome-3/apps/gnome-boxes/default.nix index c48e6a7446f..dd2e12814af 100644 --- a/pkgs/desktops/gnome-3/apps/gnome-boxes/default.nix +++ b/pkgs/desktops/gnome-3/apps/gnome-boxes/default.nix @@ -3,7 +3,7 @@ , spice-protocol, libsoup, libosinfo, systemd, tracker, tracker-miners, vala , libcap, yajl, gmp, gdbm, cyrus_sasl, gnome3, librsvg, desktop-file-utils , mtools, cdrkit, libcdio, libusb, libarchive, acl, libgudev, libsecret -, libcap_ng, numactl, xen, libapparmor, json-glib, webkitgtk, vte +, libcap_ng, numactl, xen, libapparmor, json-glib, webkitgtk, vte, glib-networking }: let @@ -31,7 +31,7 @@ in stdenv.mkDerivation rec { libvirt spice-gtk spice-protocol libsoup json-glib webkitgtk libosinfo systemd tracker tracker-miners libcap yajl gmp gdbm cyrus_sasl libusb libarchive gnome3.adwaita-icon-theme librsvg acl libgudev libsecret - libcap_ng numactl xen libapparmor vte + libcap_ng numactl xen libapparmor vte glib-networking ]; preFixup = '' From b27b5c446148d893ab2b1b14ba0a34822c647e72 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Tue, 5 Nov 2019 13:48:06 -0500 Subject: [PATCH 239/377] gnome3.gnome-boxes: nixpkgs-fmt --- .../gnome-3/apps/gnome-boxes/default.nix | 119 +++++++++++++++--- 1 file changed, 100 insertions(+), 19 deletions(-) diff --git a/pkgs/desktops/gnome-3/apps/gnome-boxes/default.nix b/pkgs/desktops/gnome-3/apps/gnome-boxes/default.nix index dd2e12814af..ce8215d6391 100644 --- a/pkgs/desktops/gnome-3/apps/gnome-boxes/default.nix +++ b/pkgs/desktops/gnome-3/apps/gnome-boxes/default.nix @@ -1,16 +1,57 @@ -{ stdenv, fetchurl, meson, ninja, wrapGAppsHook, pkgconfig, gettext, itstool, libvirt-glib -, glib, gobject-introspection, libxml2, gtk3, gtk-vnc, freerdp, libvirt, spice-gtk, python3 -, spice-protocol, libsoup, libosinfo, systemd, tracker, tracker-miners, vala -, libcap, yajl, gmp, gdbm, cyrus_sasl, gnome3, librsvg, desktop-file-utils -, mtools, cdrkit, libcdio, libusb, libarchive, acl, libgudev, libsecret -, libcap_ng, numactl, xen, libapparmor, json-glib, webkitgtk, vte, glib-networking +{ stdenv +, fetchurl +, meson +, ninja +, wrapGAppsHook +, pkgconfig +, gettext +, itstool +, libvirt-glib +, glib +, gobject-introspection +, libxml2 +, gtk3 +, gtk-vnc +, freerdp +, libvirt +, spice-gtk +, python3 +, spice-protocol +, libsoup +, libosinfo +, systemd +, tracker +, tracker-miners +, vala +, libcap +, yajl +, gmp +, gdbm +, cyrus_sasl +, gnome3 +, librsvg +, desktop-file-utils +, mtools +, cdrkit +, libcdio +, libusb +, libarchive +, acl +, libgudev +, libsecret +, libcap_ng +, numactl +, xen +, libapparmor +, json-glib +, webkitgtk +, vte +, glib-networking }: -let - version = "3.34.1"; -in stdenv.mkDerivation rec { +stdenv.mkDerivation rec { pname = "gnome-boxes"; - inherit version; + version = "3.34.1"; src = fetchurl { url = "mirror://gnome/sources/gnome-boxes/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; @@ -20,18 +61,58 @@ in stdenv.mkDerivation rec { doCheck = true; nativeBuildInputs = [ - meson ninja vala pkgconfig gettext itstool wrapGAppsHook gobject-introspection desktop-file-utils python3 + desktop-file-utils + gettext + gobject-introspection + itstool + meson + ninja + pkgconfig + python3 + vala + wrapGAppsHook ]; # Required for USB redirection PolicyKit rules file - propagatedUserEnvPkgs = [ spice-gtk ]; + propagatedUserEnvPkgs = [ + spice-gtk + ]; buildInputs = [ - libvirt-glib glib gtk3 gtk-vnc freerdp libxml2 - libvirt spice-gtk spice-protocol libsoup json-glib webkitgtk libosinfo systemd - tracker tracker-miners libcap yajl gmp gdbm cyrus_sasl libusb libarchive - gnome3.adwaita-icon-theme librsvg acl libgudev libsecret - libcap_ng numactl xen libapparmor vte glib-networking + acl + cyrus_sasl + freerdp + gdbm + glib + glib-networking + gmp + gnome3.adwaita-icon-theme + gtk-vnc + gtk3 + json-glib + libapparmor + libarchive + libcap + libcap_ng + libgudev + libosinfo + librsvg + libsecret + libsoup + libusb + libvirt + libvirt-glib + libxml2 + numactl + spice-gtk + spice-protocol + systemd + tracker + tracker-miners + vte + webkitgtk + xen + yajl ]; preFixup = '' @@ -45,8 +126,8 @@ in stdenv.mkDerivation rec { passthru = { updateScript = gnome3.updateScript { - packageName = "gnome-boxes"; - attrPath = "gnome3.gnome-boxes"; + packageName = pname; + attrPath = "gnome3.${pname}"; }; }; From aaaea2ab84064f5c195149bdb53ccf6102438975 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Tue, 5 Nov 2019 14:12:41 -0500 Subject: [PATCH 240/377] synthv1: use qt5's mkDerivation --- pkgs/applications/audio/synthv1/default.nix | 6 +++--- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/audio/synthv1/default.nix b/pkgs/applications/audio/synthv1/default.nix index 96aa7737b81..349c7acc3db 100644 --- a/pkgs/applications/audio/synthv1/default.nix +++ b/pkgs/applications/audio/synthv1/default.nix @@ -1,6 +1,6 @@ -{ stdenv, fetchurl, pkgconfig, qt5, libjack2, alsaLib, liblo, lv2 }: +{ mkDerivation, stdenv, fetchurl, pkgconfig, qtbase, qttools, libjack2, alsaLib, liblo, lv2 }: -stdenv.mkDerivation rec { +mkDerivation rec { pname = "synthv1"; version = "0.9.11"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { sha256 = "116k2vca9dygvsd684wvxm61p0l1xrrgdph4qrrprlsr6vj0llgm"; }; - buildInputs = [ qt5.qtbase qt5.qttools libjack2 alsaLib liblo lv2 ]; + buildInputs = [ qtbase qttools libjack2 alsaLib liblo lv2 ]; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3c4af7fab59..1c88c07684f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22839,7 +22839,7 @@ in superTuxKart = callPackage ../games/super-tux-kart { }; - synthv1 = callPackage ../applications/audio/synthv1 { }; + synthv1 = libsForQt5.callPackage ../applications/audio/synthv1 { }; system-syzygy = callPackage ../games/system-syzygy { }; From 91b01aef6653c2b410a46d4bc6871f2ba226a792 Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Tue, 5 Nov 2019 19:56:20 +0000 Subject: [PATCH 241/377] drawpile: 2.1.12 -> 2.1.13 (#72854) --- pkgs/applications/graphics/drawpile/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/graphics/drawpile/default.nix b/pkgs/applications/graphics/drawpile/default.nix index 5744aeb462e..b4f6776e02c 100644 --- a/pkgs/applications/graphics/drawpile/default.nix +++ b/pkgs/applications/graphics/drawpile/default.nix @@ -60,11 +60,11 @@ let in mkDerivation rec { pname = "drawpile"; - version = "2.1.12"; + version = "2.1.13"; src = fetchurl { url = "https://drawpile.net/files/src/drawpile-${version}.tar.gz"; - sha256 = "0jvy21xmlidyfkk1p47rgyf4c1ksizcpm8s17n8mwdbnjrf6m55n"; + sha256 = "0r56hkzjdlg4615zvrjv60i3f06pv7ssh6bs6jb46qs8wbsawsxf"; }; nativeBuildInputs = [ From 6465a56d38f59bd339685942806972a8d4f1f379 Mon Sep 17 00:00:00 2001 From: Jan Hrnko Date: Tue, 5 Nov 2019 21:44:51 +0100 Subject: [PATCH 242/377] nixos/metabase: port test to python --- nixos/tests/metabase.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nixos/tests/metabase.nix b/nixos/tests/metabase.nix index be9e5ed5b1e..1450a4e9086 100644 --- a/nixos/tests/metabase.nix +++ b/nixos/tests/metabase.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ... }: { +import ./make-test-python.nix ({ pkgs, ... }: { name = "metabase"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ mmahut ]; @@ -12,9 +12,9 @@ import ./make-test.nix ({ pkgs, ... }: { }; testScript = '' - startAll; - $machine->waitForUnit("metabase.service"); - $machine->waitForOpenPort(3000); - $machine->waitUntilSucceeds("curl -L http://localhost:3000/setup | grep Metabase"); + start_all() + machine.wait_for_unit("metabase.service") + machine.wait_for_open_port(3000) + machine.wait_until_succeeds("curl -L http://localhost:3000/setup | grep Metabase") ''; }) From 5768950f01998d67bc03405c03e4a20535976462 Mon Sep 17 00:00:00 2001 From: Jan Hrnko Date: Tue, 5 Nov 2019 21:45:02 +0100 Subject: [PATCH 243/377] nixos/trac: port test to python --- nixos/tests/trac.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nixos/tests/trac.nix b/nixos/tests/trac.nix index 643095d947e..7953f8d41f7 100644 --- a/nixos/tests/trac.nix +++ b/nixos/tests/trac.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ... }: { +import ./make-test-python.nix ({ pkgs, ... }: { name = "trac"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ mmahut ]; @@ -11,9 +11,9 @@ import ./make-test.nix ({ pkgs, ... }: { }; testScript = '' - startAll; - $machine->waitForUnit("trac.service"); - $machine->waitForOpenPort(8000); - $machine->waitUntilSucceeds("curl -L http://localhost:8000/ | grep 'Trac Powered'"); + start_all() + machine.wait_for_unit("trac.service") + machine.wait_for_open_port(8000) + machine.wait_until_succeeds("curl -L http://localhost:8000/ | grep 'Trac Powered'") ''; }) From 23340a21b6e42fe211da33d5531038fed94179a3 Mon Sep 17 00:00:00 2001 From: Jan Hrnko Date: Tue, 5 Nov 2019 21:45:12 +0100 Subject: [PATCH 244/377] nixos/trezord: port test to python --- nixos/tests/trezord.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/tests/trezord.nix b/nixos/tests/trezord.nix index 1c85bf53934..8d908a52249 100644 --- a/nixos/tests/trezord.nix +++ b/nixos/tests/trezord.nix @@ -1,7 +1,7 @@ -import ./make-test.nix ({ pkgs, ... }: { +import ./make-test-python.nix ({ pkgs, ... }: { name = "trezord"; meta = with pkgs.stdenv.lib.maintainers; { - maintainers = [ mmahut ]; + maintainers = [ mmahut "1000101" ]; }; nodes = { @@ -12,9 +12,9 @@ import ./make-test.nix ({ pkgs, ... }: { }; testScript = '' - startAll; - $machine->waitForUnit("trezord.service"); - $machine->waitForOpenPort(21325); - $machine->waitUntilSucceeds("curl -L http://localhost:21325/status/ | grep Version"); + start_all() + machine.wait_for_unit("trezord.service") + machine.wait_for_open_port(21325) + machine.wait_until_succeeds("curl -L http://localhost:21325/status/ | grep Version") ''; }) From 62fa5d3447b5cb360867f9b8abdd5d2bccf203f8 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 5 Nov 2019 21:52:55 +0100 Subject: [PATCH 245/377] Add libpulseaudio to not have spotify crash when trying to play music --- pkgs/applications/audio/spotify/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/audio/spotify/default.nix b/pkgs/applications/audio/spotify/default.nix index 30f3a72deec..bc95ec625bb 100644 --- a/pkgs/applications/audio/spotify/default.nix +++ b/pkgs/applications/audio/spotify/default.nix @@ -1,7 +1,7 @@ { fetchurl, stdenv, squashfsTools, xorg, alsaLib, makeWrapper, openssl, freetype , glib, pango, cairo, atk, gdk-pixbuf, gtk2, cups, nspr, nss, libpng, libnotify , libgcrypt, systemd, fontconfig, dbus, expat, ffmpeg_3, curl, zlib, gnome3 -, at-spi2-atk, at-spi2-core +, at-spi2-atk, at-spi2-core, libpulseaudio }: let @@ -39,6 +39,7 @@ let libgcrypt libnotify libpng + libpulseaudio nss pango stdenv.cc.cc From d4d76528cb75ea17add4e44f46cc0383df633f53 Mon Sep 17 00:00:00 2001 From: Nathan Fish Date: Tue, 5 Nov 2019 17:32:32 -0500 Subject: [PATCH 246/377] ipfs-cluster 0.9.0 -> 0.11.0 (#72820) --- .../networking/ipfs-cluster/default.nix | 26 ++++--------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/pkgs/applications/networking/ipfs-cluster/default.nix b/pkgs/applications/networking/ipfs-cluster/default.nix index 426619908d6..76cc393f26a 100644 --- a/pkgs/applications/networking/ipfs-cluster/default.nix +++ b/pkgs/applications/networking/ipfs-cluster/default.nix @@ -1,35 +1,19 @@ -{ stdenv, buildGoPackage, fetchFromGitHub, fetchgx, gx-go }: +{ stdenv, buildGoModule, fetchFromGitHub, fetchgx, gx-go }: -buildGoPackage rec { +buildGoModule rec { pname = "ipfs-cluster"; - version = "0.9.0"; + version = "0.11.0"; rev = "v${version}"; - goPackagePath = "github.com/ipfs/ipfs-cluster"; - - extraSrcPaths = [ - (fetchgx { - inherit src;name = "${pname}-${version}"; - sha256 = "1k7xcirvi07p5g9gr9jcx5h39wk7jxfsyjrn5yraa8xdqhn6b6nx"; - }) - ]; + modSha256 = "03bqwg9nqh7w6j887gzxr2mcn14jc8f07z896b3swg5wzaz1i6hs"; src = fetchFromGitHub { owner = "ipfs"; repo = "ipfs-cluster"; inherit rev; - sha256 = "1bxwcp0355f1ykjcidbxv218zp9d20nma7lnpn9xcjqc8vaq03kn"; + sha256 = "0q5lanm2zdwwhdwv05fssb34y4y4dha3dq7x1iaabbf70lpqv6yx"; }; - nativeBuildInputs = [ gx-go ]; - - preBuild = '' - # fetchgx stores packages by their ipfs hash - # this will rewrite github.com/ imports to gx/ipfs/ - cd go/src/${goPackagePath} - gx-go rewrite - ''; - meta = with stdenv.lib; { description = "Allocate, replicate, and track Pins across a cluster of IPFS daemons"; homepage = https://cluster.ipfs.io/; From 5d1c5ba7f19d41cb60c8ca0f032d37fdb879b26f Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 5 Nov 2019 09:15:37 -0800 Subject: [PATCH 247/377] arrow-cpp: 0.15.0 -> 0.15.1 --- pkgs/development/libraries/arrow-cpp/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/arrow-cpp/default.nix b/pkgs/development/libraries/arrow-cpp/default.nix index aaf228e73a6..e277617c0ff 100644 --- a/pkgs/development/libraries/arrow-cpp/default.nix +++ b/pkgs/development/libraries/arrow-cpp/default.nix @@ -12,12 +12,12 @@ let in stdenv.mkDerivation rec { pname = "arrow-cpp"; - version = "0.15.0"; + version = "0.15.1"; src = fetchurl { url = "mirror://apache/arrow/arrow-${version}/apache-arrow-${version}.tar.gz"; - sha256 = "0n7xrn5490r2snjl45pm2a4pr2x8a29sh8mpyi4nj5pr9f62s1yi"; + sha256 = "1jbghpppabsix2rkxbnh41inj9lcxfz4q94p96xzxshh4g3mhb4s"; }; sourceRoot = "apache-arrow-${version}/cpp"; From f9ff0cde5d8e77d2b970834850916ecded59d9c6 Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Tue, 5 Nov 2019 22:54:42 +0100 Subject: [PATCH 248/377] sidequest: 0.7.2 -> 0.7.5 --- pkgs/applications/misc/sidequest/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/sidequest/default.nix b/pkgs/applications/misc/sidequest/default.nix index f47f2b4e9eb..c403f475168 100644 --- a/pkgs/applications/misc/sidequest/default.nix +++ b/pkgs/applications/misc/sidequest/default.nix @@ -1,7 +1,7 @@ { stdenv, lib, fetchurl, buildFHSUserEnv, makeDesktopItem, makeWrapper, atomEnv, libuuid, at-spi2-atk, icu, openssl, zlib }: let pname = "sidequest"; - version = "0.7.2"; + version = "0.7.5"; desktopItem = makeDesktopItem rec { name = "SideQuest"; @@ -16,7 +16,7 @@ src = fetchurl { url = "https://github.com/the-expanse/SideQuest/releases/download/v${version}/SideQuest-${version}.tar.xz"; - sha256 = "035grhzqm3qdfcq5vn4a85lgb188rg60wlgc02r44cnj4sbsyyzj"; + sha256 = "1a77slpm7yga5vh3j1y440dq2xgv4pa6h8xg29rdcs6zig55pa97"; }; buildInputs = [ makeWrapper ]; From cb7e94a6b63c852bbadeae7456bb87dfb5f4cd3a Mon Sep 17 00:00:00 2001 From: Timothy DeHerrera Date: Tue, 5 Nov 2019 12:16:22 -0700 Subject: [PATCH 249/377] zstd: 1.4.3 -> 1.4.4 --- pkgs/tools/compression/zstd/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/compression/zstd/default.nix b/pkgs/tools/compression/zstd/default.nix index 5a153393ccd..01e8525fe8f 100644 --- a/pkgs/tools/compression/zstd/default.nix +++ b/pkgs/tools/compression/zstd/default.nix @@ -5,10 +5,10 @@ stdenv.mkDerivation rec { pname = "zstd"; - version = "1.4.3"; + version = "1.4.4"; src = fetchFromGitHub { - sha256 = "0mmgs98cfh92gcbjyv37vz8nq7x4x7fbzymlxyqd9awwpv9v0i5n"; + sha256 = "0zn7r8d4m8w2lblnjalqpz18na0spzkdiw3fwq2fzb7drhb32v54"; rev = "v${version}"; repo = "zstd"; owner = "facebook"; From ca76550c9858eb60e82d0d573528448b3779490a Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Tue, 5 Nov 2019 12:20:00 -0500 Subject: [PATCH 250/377] flow: 0.111.0 -> 0.111.3 --- pkgs/development/tools/analysis/flow/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/analysis/flow/default.nix b/pkgs/development/tools/analysis/flow/default.nix index b309f559f36..81407a3897f 100644 --- a/pkgs/development/tools/analysis/flow/default.nix +++ b/pkgs/development/tools/analysis/flow/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "flow"; - version = "0.111.0"; + version = "0.111.3"; src = fetchFromGitHub { owner = "facebook"; repo = "flow"; rev = "refs/tags/v${version}"; - sha256 = "17w26b17n81kc1igmr6dgm6y2aa1ng0cbhbhwwz3iwsf0dm6db1l"; + sha256 = "12hfdcm491ylh0a8rhzj76wdbh556r02aj4q6vv86n3lh2120cxm"; }; installPhase = '' From 4dce5d71c65075057e773fb3290028e3e9c7db33 Mon Sep 17 00:00:00 2001 From: hyperfekt Date: Tue, 5 Nov 2019 16:20:59 +0100 Subject: [PATCH 251/377] qemu: name -> pname --- pkgs/applications/virtualization/qemu/default.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/virtualization/qemu/default.nix b/pkgs/applications/virtualization/qemu/default.nix index 5aa1f2e1f55..f90873c6e33 100644 --- a/pkgs/applications/virtualization/qemu/default.nix +++ b/pkgs/applications/virtualization/qemu/default.nix @@ -36,11 +36,10 @@ in stdenv.mkDerivation rec { version = "4.1.0"; - name = "qemu-" - + stdenv.lib.optionalString xenSupport "xen-" - + stdenv.lib.optionalString hostCpuOnly "host-cpu-only-" - + stdenv.lib.optionalString nixosTestRunner "for-vm-tests-" - + version; + pname = "qemu" + + stdenv.lib.optionalString xenSupport "-xen" + + stdenv.lib.optionalString hostCpuOnly "-host-cpu-only" + + stdenv.lib.optionalString nixosTestRunner "-for-vm-tests"; src = fetchurl { url = "https://wiki.qemu.org/download/qemu-${version}.tar.bz2"; From 9484904082893b54b0e834b2344bf49d26109dd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Tue, 13 Aug 2019 01:30:47 +0200 Subject: [PATCH 252/377] texmacs: 1.99.10 -> 1.99.11 Changelog: https://github.com/texmacs/texmacs/releases/tag/v1.99.11 --- pkgs/applications/editors/texmacs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/texmacs/default.nix b/pkgs/applications/editors/texmacs/default.nix index 31160c0916c..8ca3f8cb2a9 100644 --- a/pkgs/applications/editors/texmacs/default.nix +++ b/pkgs/applications/editors/texmacs/default.nix @@ -16,7 +16,7 @@ let pname = "TeXmacs"; - version = "1.99.10"; + version = "1.99.11"; common = callPackage ./common.nix { inherit tex extraFonts chineseFonts japaneseFonts koreanFonts; }; @@ -26,7 +26,7 @@ stdenv.mkDerivation { src = fetchurl { url = "https://www.texmacs.org/Download/ftp/tmftp/source/TeXmacs-${version}-src.tar.gz"; - sha256 = "1k12bkcik7mv93q0j7q3b77x8s6rmvlb23s3v7nnzdwjxlp5lph2"; + sha256 = "12bp0f34izzqimz49lfpgf4lyz3h45s9xbmk8v6zsawdjki76alg"; }; cmakeFlags = [ From 92930b85687fb5e033903abc769540bbe2bd9ffc Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Mon, 4 Nov 2019 16:51:05 +0000 Subject: [PATCH 253/377] =?UTF-8?q?ocamlPackages.reason:=203.5.0=20?= =?UTF-8?q?=E2=86=92=203.5.1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ensure compatibility with OCaml 4.09 --- pkgs/development/compilers/reason/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/reason/default.nix b/pkgs/development/compilers/reason/default.nix index 5ade7fd6fba..5d7d0ce6684 100644 --- a/pkgs/development/compilers/reason/default.nix +++ b/pkgs/development/compilers/reason/default.nix @@ -5,13 +5,13 @@ stdenv.mkDerivation rec { name = "ocaml${ocaml.version}-reason-${version}"; - version = "3.5.0"; + version = "3.5.1"; src = fetchFromGitHub { owner = "facebook"; repo = "reason"; - rev = "ea207004e021efef5a92ecd011d9d5b9b16bbded"; - sha256 = "0cdjy7sw15rlk63prrwy8lavqrz8fqwsgwr19ihvj99x332r98kk"; + rev = "aea245a43eb44034d2fccac7028b640a437af239"; + sha256 = "0ff7rjxbsg9zkq6sxlm9bkx7yk8x2cvras7z8436msczgd1wmmyf"; }; nativeBuildInputs = [ makeWrapper ]; From 645a6fd739eb5f7de806276666506f1092380876 Mon Sep 17 00:00:00 2001 From: Evils Date: Wed, 6 Nov 2019 01:16:15 +0100 Subject: [PATCH 254/377] mattermost-desktop: fix filechooser causing crash --- .../instant-messengers/mattermost-desktop/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix b/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix index f5f8414c870..ef2789b07ff 100644 --- a/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix @@ -1,7 +1,9 @@ { stdenv, fetchurl, gnome2, gtk3, pango, atk, cairo, gdk-pixbuf, glib, freetype, fontconfig, dbus, libX11, xorg, libXi, libXcursor, libXdamage, libXrandr, libXcomposite, libXext, libXfixes, libXrender, libXtst, -libXScrnSaver, nss, nspr, alsaLib, cups, expat, udev }: +libXScrnSaver, nss, nspr, alsaLib, cups, expat, udev, wrapGAppsHook, +hicolor-icon-theme }: + let rpath = stdenv.lib.makeLibraryPath [ alsaLib @@ -58,6 +60,8 @@ in dontConfigure = true; dontPatchELF = true; + buildInputs = [ wrapGAppsHook gtk3 hicolor-icon-theme ]; + installPhase = '' mkdir -p $out/share/mattermost-desktop cp -R . $out/share/mattermost-desktop From ebaedb0e11c6513fce3d007395452f2f2339efe0 Mon Sep 17 00:00:00 2001 From: Marius Bergmann Date: Fri, 13 Sep 2019 11:14:15 +0200 Subject: [PATCH 255/377] pythondialog: init at 3.4.0 --- .../python-modules/pythondialog/default.nix | 27 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/development/python-modules/pythondialog/default.nix diff --git a/pkgs/development/python-modules/pythondialog/default.nix b/pkgs/development/python-modules/pythondialog/default.nix new file mode 100644 index 00000000000..d2c82cf83f1 --- /dev/null +++ b/pkgs/development/python-modules/pythondialog/default.nix @@ -0,0 +1,27 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, isPy3k +}: + +buildPythonPackage rec { + pname = "pythondialog"; + version = "3.4.0"; + disabled = !isPy3k; + + src = fetchPypi { + inherit pname version; + sha256 = "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"; + }; + + patchPhase = '' + substituteInPlace dialog.py --replace ":/bin:/usr/bin" ":$out/bin" + ''; + + meta = with stdenv.lib; { + description = "A Python interface to the UNIX dialog utility and mostly-compatible programs"; + homepage = "http://pythondialog.sourceforge.net/"; + license = licenses.lgpl3; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d776e80a9e3..8d9cd6d8a66 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3264,6 +3264,8 @@ in { cudaSupport = false; }; + pythondialog = callPackage ../development/python-modules/pythondialog { }; + python2-pythondialog = callPackage ../development/python-modules/python2-pythondialog { }; pyRFC3339 = callPackage ../development/python-modules/pyrfc3339 { }; From 5efe49ce6730191809d738fc9cda0810f82c27be Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Tue, 5 Nov 2019 14:35:59 -0500 Subject: [PATCH 256/377] nixosTests.fontconfig-default-fonts: port to python --- nixos/tests/fontconfig-default-fonts.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/nixos/tests/fontconfig-default-fonts.nix b/nixos/tests/fontconfig-default-fonts.nix index 1991cec9218..68c6ac9e9c8 100644 --- a/nixos/tests/fontconfig-default-fonts.nix +++ b/nixos/tests/fontconfig-default-fonts.nix @@ -1,7 +1,12 @@ -import ./make-test.nix ({ lib, ... }: +import ./make-test-python.nix ({ lib, ... }: { name = "fontconfig-default-fonts"; + meta.maintainers = with lib.maintainers; [ + jtojnar + worldofpeace + ]; + machine = { config, pkgs, ... }: { fonts.enableDefaultFonts = true; # Background fonts fonts.fonts = with pkgs; [ @@ -20,9 +25,9 @@ import ./make-test.nix ({ lib, ... }: }; testScript = '' - $machine->succeed("fc-match serif | grep '\"Gentium Plus\"'"); - $machine->succeed("fc-match sans-serif | grep '\"Cantarell\"'"); - $machine->succeed("fc-match monospace | grep '\"Source Code Pro\"'"); - $machine->succeed("fc-match emoji | grep '\"Twitter Color Emoji\"'"); + machine.succeed("fc-match serif | grep '\"Gentium Plus\"'") + machine.succeed("fc-match sans-serif | grep '\"Cantarell\"'") + machine.succeed("fc-match monospace | grep '\"Source Code Pro\"'") + machine.succeed("fc-match emoji | grep '\"Twitter Color Emoji\"'") ''; }) From f41b8aa67c6bc05c956ad309485bce6062ccf6d6 Mon Sep 17 00:00:00 2001 From: Evils Date: Wed, 6 Nov 2019 00:13:04 +0100 Subject: [PATCH 257/377] mattermost-desktop: version 4.2.3 -> 4.3.1 --- .../instant-messengers/mattermost-desktop/default.nix | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix b/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix index ef2789b07ff..e5b962b2493 100644 --- a/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix @@ -2,11 +2,13 @@ freetype, fontconfig, dbus, libX11, xorg, libXi, libXcursor, libXdamage, libXrandr, libXcomposite, libXext, libXfixes, libXrender, libXtst, libXScrnSaver, nss, nspr, alsaLib, cups, expat, udev, wrapGAppsHook, -hicolor-icon-theme }: +hicolor-icon-theme, libuuid, at-spi2-core, at-spi2-atk }: let rpath = stdenv.lib.makeLibraryPath [ alsaLib + at-spi2-atk + at-spi2-core atk cairo cups @@ -19,6 +21,7 @@ let gnome2.GConf gtk3 pango + libuuid libX11 libXScrnSaver libXcomposite @@ -40,18 +43,18 @@ let in stdenv.mkDerivation rec { pname = "mattermost-desktop"; - version = "4.2.3"; + version = "4.3.1"; src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "https://releases.mattermost.com/desktop/${version}/${pname}-${version}-linux-x64.tar.gz"; - sha256 = "14xyn8dp0xxl4j9xdsjik9p6srqdxbirgcgym2sv64p01w3kc9wf"; + sha256 = "076nv5h6xscbw1987az00x493qhqgrli87gnn57zbvz0acgvlhfv"; } else if stdenv.hostPlatform.system == "i686-linux" then fetchurl { url = "https://releases.mattermost.com/desktop/${version}/${pname}-${version}-linux-ia32.tar.gz"; - sha256 = "063rrxw76mjz71wp9xd3ppkq3s017vrzms879r2cilypmay7fhgs"; + sha256 = "19ps9g8j6kp4haj6r3yfy4ma2wm6isq5fa8zlcz6g042ajkqq0ij"; } else throw "Mattermost-Desktop is not currently supported on ${stdenv.hostPlatform.system}"; From bc8ef6c3ff8ca5339d4adf7ad90ea523be7a763d Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Tue, 5 Nov 2019 21:00:00 -0500 Subject: [PATCH 258/377] emacs: also allow librsvg dependency when using withNS --- pkgs/applications/editors/emacs/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/emacs/default.nix b/pkgs/applications/editors/emacs/default.nix index 29a6a8773ef..2862ba7184f 100644 --- a/pkgs/applications/editors/emacs/default.nix +++ b/pkgs/applications/editors/emacs/default.nix @@ -60,9 +60,9 @@ stdenv.mkDerivation rec { [ ncurses gconf libxml2 gnutls alsaLib acl gpm gettext ] ++ lib.optionals stdenv.isLinux [ dbus libselinux systemd ] ++ lib.optionals withX - [ xlibsWrapper libXaw Xaw3d libXpm libpng libjpeg libungif libtiff librsvg libXft + [ xlibsWrapper libXaw Xaw3d libXpm libpng libjpeg libungif libtiff libXft gconf ] - ++ lib.optionals (withX || withNS) [ imagemagick ] + ++ lib.optionals (withX || withNS) [ imagemagick librsvg ] ++ lib.optionals (stdenv.isLinux && withX) [ m17n_lib libotf ] ++ lib.optional (withX && withGTK2) gtk2-x11 ++ lib.optionals (withX && withGTK3) [ gtk3-x11 gsettings-desktop-schemas ] From e47df96d3c25d152ec5e2f3be5e04cd97cb15e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Wed, 6 Nov 2019 03:17:20 +0100 Subject: [PATCH 259/377] rnnoise: Init at 0.0.1 Imported from https://github.com/nix-community/nur-combined/blob/16d7867eef4823f347da09db9a8d847bf532dfe7/repos/clefru/pkgs/rnnoise/default.nix --- .../development/libraries/rnnoise/default.nix | 23 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 pkgs/development/libraries/rnnoise/default.nix diff --git a/pkgs/development/libraries/rnnoise/default.nix b/pkgs/development/libraries/rnnoise/default.nix new file mode 100644 index 00000000000..fe6b75446b2 --- /dev/null +++ b/pkgs/development/libraries/rnnoise/default.nix @@ -0,0 +1,23 @@ +{ stdenv, lib, fetchFromGitHub, autoreconfHook }: + +stdenv.mkDerivation (rec { + name = "rnnoise-${version}"; + version = "0.0.1"; + + src = fetchFromGitHub { + owner = "xiph"; + repo = "rnnoise"; + rev = "91ef401f4c3536c6de999ac609262691ec888c4c"; + sha256 = "1h2ibg67gfcwnpvkq1rx0sngf9lk9j8pqsmsmmk5hclvrr2lp3yb"; + }; + + nativeBuildInputs = [ autoreconfHook ]; + + meta = with lib; { + homepage = https://people.xiph.org/~jm/demo/rnnoise/; + description = "Recurrent neural network for audio noise reduction."; + license = licenses.bsd3; + maintainers = [ maintainers.nh2 ]; + platforms = platforms.all; + }; +}) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e56298b2ebd..082ea2755a3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6000,6 +6000,8 @@ in rng-tools = callPackage ../tools/security/rng-tools { }; + rnnoise = callPackage ../development/libraries/rnnoise { }; + rnv = callPackage ../tools/text/xml/rnv { }; rounded-mgenplus = callPackage ../data/fonts/rounded-mgenplus { }; From 02dc6ff5bccfcecd78da039e53e2b3ea8f420390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Hamb=C3=BCchen?= Date: Wed, 6 Nov 2019 03:20:09 +0100 Subject: [PATCH 260/377] mumble: Add RNNoise support. Vastly improves suppression of background and typing noises. --- pkgs/applications/networking/mumble/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/networking/mumble/default.nix b/pkgs/applications/networking/mumble/default.nix index b3d945710f0..fe4c9f32b21 100644 --- a/pkgs/applications/networking/mumble/default.nix +++ b/pkgs/applications/networking/mumble/default.nix @@ -1,6 +1,7 @@ { stdenv, fetchurl, fetchFromGitHub, fetchpatch, pkgconfig, qt5 , avahi, boost, libopus, libsndfile, protobuf, speex, libcap , alsaLib, python +, rnnoise , jackSupport ? false, libjack2 ? null , speechdSupport ? false, speechd ? null , pulseSupport ? false, libpulseaudio ? null @@ -73,7 +74,7 @@ let type = "mumble"; nativeBuildInputs = [ qt5.qttools ]; - buildInputs = [ libopus libsndfile speex qt5.qtsvg ] + buildInputs = [ libopus libsndfile speex qt5.qtsvg rnnoise ] ++ optional stdenv.isLinux alsaLib ++ optional jackSupport libjack2 ++ optional speechdSupport speechd From e9a37289e042632fa8d22d4169d6a4116d0b292a Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Tue, 5 Nov 2019 21:27:37 -0500 Subject: [PATCH 261/377] zabbix40: 4.0.13 -> 4.0.14 --- pkgs/servers/monitoring/zabbix/versions.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/monitoring/zabbix/versions.nix b/pkgs/servers/monitoring/zabbix/versions.nix index 03e9464de01..e3324ef09fa 100644 --- a/pkgs/servers/monitoring/zabbix/versions.nix +++ b/pkgs/servers/monitoring/zabbix/versions.nix @@ -10,8 +10,8 @@ generic: { }; v40 = generic { - version = "4.0.13"; - sha256 = "1hz4sdj4nw8fh124dqd41ag2wv4rcp4snpxgk80nx76rssw6c9ny"; + version = "4.0.14"; + sha256 = "0igdxxfc61rqx6r7r81jsmv2d7nxw4whai211gk3y88dfm7l4xkb"; }; v30 = generic { From d433b25d4945c5d9d7dd5ffc991fa9538b8c32dd Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Tue, 5 Nov 2019 21:28:30 -0500 Subject: [PATCH 262/377] zabbix44: 4.4.0 -> 4.4.1 --- pkgs/servers/monitoring/zabbix/versions.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/monitoring/zabbix/versions.nix b/pkgs/servers/monitoring/zabbix/versions.nix index e3324ef09fa..74c927f752e 100644 --- a/pkgs/servers/monitoring/zabbix/versions.nix +++ b/pkgs/servers/monitoring/zabbix/versions.nix @@ -1,7 +1,7 @@ generic: { v44 = generic { - version = "4.4.0"; - sha256 = "1a4csx1i21lcavfvj5djalcnxnlyh4mhk4dddzm895ipl87afzf4"; + version = "4.4.1"; + sha256 = "0jjn2przn9s25slrcxmq8iqdgqkgxnqs45zy0n1ma6nlgmclxxqb"; }; v42 = generic { From 274fb7e0b98e19d284e64510cc101ea54d69bc34 Mon Sep 17 00:00:00 2001 From: Jan Hrnko Date: Wed, 6 Nov 2019 07:17:39 +0100 Subject: [PATCH 263/377] nixos/trickster: port test to python --- nixos/tests/trickster.nix | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/nixos/tests/trickster.nix b/nixos/tests/trickster.nix index 1461a32bb07..e2ca00980d5 100644 --- a/nixos/tests/trickster.nix +++ b/nixos/tests/trickster.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ... }: { +import ./make-test-python.nix ({ pkgs, ... }: { name = "trickster"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ "1000101" ]; @@ -15,15 +15,23 @@ import ./make-test.nix ({ pkgs, ... }: { }; testScript = '' - startAll; - $prometheus->waitForUnit("prometheus.service"); - $prometheus->waitForOpenPort(9090); - $prometheus->waitUntilSucceeds("curl -L http://localhost:9090/metrics | grep 'promhttp_metric_handler_requests_total{code=\"500\"} 0'"); - $trickster->waitForUnit("trickster.service"); - $trickster->waitForOpenPort(8082); - $trickster->waitForOpenPort(9090); - $trickster->waitUntilSucceeds("curl -L http://localhost:8082/metrics | grep 'promhttp_metric_handler_requests_total{code=\"500\"} 0'"); - $trickster->waitUntilSucceeds("curl -L http://prometheus:9090/metrics | grep 'promhttp_metric_handler_requests_total{code=\"500\"} 0'"); - $trickster->waitUntilSucceeds("curl -L http://localhost:9090/metrics | grep 'promhttp_metric_handler_requests_total{code=\"500\"} 0'"); + start_all() + prometheus.wait_for_unit("prometheus.service") + prometheus.wait_for_open_port(9090) + prometheus.wait_until_succeeds( + "curl -L http://localhost:9090/metrics | grep 'promhttp_metric_handler_requests_total{code=\"500\"} 0'" + ) + trickster.wait_for_unit("trickster.service") + trickster.wait_for_open_port(8082) + trickster.wait_for_open_port(9090) + trickster.wait_until_succeeds( + "curl -L http://localhost:8082/metrics | grep 'promhttp_metric_handler_requests_total{code=\"500\"} 0'" + ) + trickster.wait_until_succeeds( + "curl -L http://prometheus:9090/metrics | grep 'promhttp_metric_handler_requests_total{code=\"500\"} 0'" + ) + trickster.wait_until_succeeds( + "curl -L http://localhost:9090/metrics | grep 'promhttp_metric_handler_requests_total{code=\"500\"} 0'" + ) ''; }) \ No newline at end of file From 49914d7d8b0d07dadf05b7aba50c23ad2950739d Mon Sep 17 00:00:00 2001 From: Jan Hrnko Date: Wed, 6 Nov 2019 07:54:16 +0100 Subject: [PATCH 264/377] nixos/yabar: port test to python --- nixos/tests/yabar.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nixos/tests/yabar.nix b/nixos/tests/yabar.nix index bbc0cf4c7dd..9108004d4df 100644 --- a/nixos/tests/yabar.nix +++ b/nixos/tests/yabar.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, lib, ... }: +import ./make-test-python.nix ({ pkgs, lib, ... }: with lib; @@ -20,14 +20,14 @@ with lib; }; testScript = '' - $machine->start; - $machine->waitForX; + machine.start() + machine.wait_for_x() # confirm proper startup - $machine->waitForUnit("yabar.service", "bob"); - $machine->sleep(10); - $machine->waitForUnit("yabar.service", "bob"); + machine.wait_for_unit("yabar.service", "bob") + machine.sleep(10) + machine.wait_for_unit("yabar.service", "bob") - $machine->screenshot("top_bar"); + machine.screenshot("top_bar") ''; }) From 13febec4640ba592b1d2068e0bd2c3bfb9084bff Mon Sep 17 00:00:00 2001 From: Jan Hrnko Date: Wed, 6 Nov 2019 07:54:37 +0100 Subject: [PATCH 265/377] nixos/zookeeper: port test to python --- nixos/tests/zookeeper.nix | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/nixos/tests/zookeeper.nix b/nixos/tests/zookeeper.nix index f343ebd39e4..42cf20b39c5 100644 --- a/nixos/tests/zookeeper.nix +++ b/nixos/tests/zookeeper.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ...} : { +import ./make-test-python.nix ({ pkgs, ...} : { name = "zookeeper"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ nequissimus ]; @@ -15,14 +15,20 @@ import ./make-test.nix ({ pkgs, ...} : { }; testScript = '' - startAll; + start_all() - $server->waitForUnit("zookeeper"); - $server->waitForUnit("network.target"); - $server->waitForOpenPort(2181); + server.wait_for_unit("zookeeper") + server.wait_for_unit("network.target") + server.wait_for_open_port(2181) - $server->waitUntilSucceeds("${pkgs.zookeeper}/bin/zkCli.sh -server localhost:2181 create /foo bar"); - $server->waitUntilSucceeds("${pkgs.zookeeper}/bin/zkCli.sh -server localhost:2181 set /foo hello"); - $server->waitUntilSucceeds("${pkgs.zookeeper}/bin/zkCli.sh -server localhost:2181 get /foo | grep hello"); + server.wait_until_succeeds( + "${pkgs.zookeeper}/bin/zkCli.sh -server localhost:2181 create /foo bar" + ) + server.wait_until_succeeds( + "${pkgs.zookeeper}/bin/zkCli.sh -server localhost:2181 set /foo hello" + ) + server.wait_until_succeeds( + "${pkgs.zookeeper}/bin/zkCli.sh -server localhost:2181 get /foo | grep hello" + ) ''; }) From 38b2e18faa526f2a4cf55f0ed5c18906bfa2627d Mon Sep 17 00:00:00 2001 From: Jan Hrnko Date: Wed, 6 Nov 2019 07:54:45 +0100 Subject: [PATCH 266/377] nixos/upnp: port test to python --- nixos/tests/upnp.nix | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/nixos/tests/upnp.nix b/nixos/tests/upnp.nix index 98344aee3ef..d2e7fdd4fbe 100644 --- a/nixos/tests/upnp.nix +++ b/nixos/tests/upnp.nix @@ -5,7 +5,7 @@ # this succeeds an external client will try to connect to the port # mapping. -import ./make-test.nix ({ pkgs, ... }: +import ./make-test-python.nix ({ pkgs, ... }: let internalRouterAddress = "192.168.3.1"; @@ -75,20 +75,20 @@ in testScript = { nodes, ... }: '' - startAll; + start_all() # Wait for network and miniupnpd. - $router->waitForUnit("network-online.target"); - # $router->waitForUnit("nat"); - $router->waitForUnit("firewall.service"); - $router->waitForUnit("miniupnpd"); + router.wait_for_unit("network-online.target") + # $router.wait_for_unit("nat") + router.wait_for_unit("firewall.service") + router.wait_for_unit("miniupnpd") - $client1->waitForUnit("network-online.target"); + client1.wait_for_unit("network-online.target") - $client1->succeed("upnpc -a ${internalClient1Address} 9000 9000 TCP"); + client1.succeed("upnpc -a ${internalClient1Address} 9000 9000 TCP") - $client1->waitForUnit("httpd"); - $client2->waitUntilSucceeds("curl http://${externalRouterAddress}:9000/"); + client1.wait_for_unit("httpd") + client2.wait_until_succeeds("curl http://${externalRouterAddress}:9000/") ''; }) From 650ccb604b48596330cc02c8db5c62ca0322d75e Mon Sep 17 00:00:00 2001 From: Jan Hrnko Date: Wed, 6 Nov 2019 07:58:22 +0100 Subject: [PATCH 267/377] nixos/morty: port test to python --- nixos/tests/morty.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/nixos/tests/morty.nix b/nixos/tests/morty.nix index eab123bd50f..64c5a27665d 100644 --- a/nixos/tests/morty.nix +++ b/nixos/tests/morty.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ... }: +import ./make-test-python.nix ({ pkgs, ... }: { name = "morty"; @@ -22,11 +22,9 @@ import ./make-test.nix ({ pkgs, ... }: testScript = { ... }: '' - $mortyProxyWithKey->waitForUnit("default.target"); - - $mortyProxyWithKey->waitForOpenPort(3001); - $mortyProxyWithKey->succeed("curl -L 127.0.0.1:3001 | grep MortyProxy"); - + mortyProxyWithKey.wait_for_unit("default.target") + mortyProxyWithKey.wait_for_open_port(3001) + mortyProxyWithKey.succeed("curl -L 127.0.0.1:3001 | grep MortyProxy") ''; }) From 3485204442e6f97ee13bfbc41a8b244433309bce Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 31 Oct 2019 10:19:04 -0400 Subject: [PATCH 268/377] nixos/corefonts: remove 4 years ago in 7edb27b7af6ebff7e35207f7fcf16e0e2bd8884a the option was made hidden. We should just remove the module and use mkRemovedOptionModule. --- nixos/modules/config/fonts/corefonts.nix | 36 ------------------------ nixos/modules/module-list.nix | 1 - nixos/modules/rename.nix | 1 + 3 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 nixos/modules/config/fonts/corefonts.nix diff --git a/nixos/modules/config/fonts/corefonts.nix b/nixos/modules/config/fonts/corefonts.nix deleted file mode 100644 index b9f69879a10..00000000000 --- a/nixos/modules/config/fonts/corefonts.nix +++ /dev/null @@ -1,36 +0,0 @@ -# This module is deprecated, since you can just say ‘fonts.fonts = [ -# pkgs.corefonts ];’ instead. - -{ config, lib, pkgs, ... }: - -with lib; - -{ - - options = { - - fonts = { - - enableCoreFonts = mkOption { - visible = false; - default = false; - description = '' - Whether to include Microsoft's proprietary Core Fonts. These fonts - are redistributable, but only verbatim, among other restrictions. - See - for details. - ''; - }; - - }; - - }; - - - config = mkIf config.fonts.enableCoreFonts { - - fonts.fonts = [ pkgs.corefonts ]; - - }; - -} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 24912c27245..2ad6188cc25 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -1,6 +1,5 @@ [ ./config/debug-info.nix - ./config/fonts/corefonts.nix ./config/fonts/fontconfig.nix ./config/fonts/fontconfig-penultimate.nix ./config/fonts/fontconfig-ultimate.nix diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 886e2e83ba6..6c6a5915426 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -234,6 +234,7 @@ with lib; (mkRemovedOptionModule [ "services" "mysql" "rootPassword" ] "Use socket authentication or set the password outside of the nix store.") (mkRemovedOptionModule [ "services" "zabbixServer" "dbPassword" ] "Use services.zabbixServer.database.passwordFile instead.") (mkRemovedOptionModule [ "systemd" "generator-packages" ] "Use systemd.packages instead.") + (mkRemovedOptionModule [ "fonts" "enableCoreFonts" ] "Use fonts.fonts = [ pkgs.corefonts ]; instead.") # ZSH (mkRenamedOptionModule [ "programs" "zsh" "enableSyntaxHighlighting" ] [ "programs" "zsh" "syntaxHighlighting" "enable" ]) From a4dd9d7896860b73d833dea36a64730a9afc08e0 Mon Sep 17 00:00:00 2001 From: Karl Fischer Date: Tue, 5 Nov 2019 18:35:16 +0100 Subject: [PATCH 269/377] skypeforlinux: 8.51.0.72 -> 8.54.0.85 --- .../networking/instant-messengers/skypeforlinux/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix b/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix index cbab67e5e1a..f29e62a1006 100644 --- a/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix +++ b/pkgs/applications/networking/instant-messengers/skypeforlinux/default.nix @@ -7,7 +7,7 @@ let # Please keep the version x.y.0.z and do not update to x.y.76.z because the # source of the latter disappears much faster. - version = "8.51.0.72"; + version = "8.54.0.85"; rpath = stdenv.lib.makeLibraryPath [ alsaLib @@ -60,7 +60,7 @@ let if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { url = "https://repo.skype.com/deb/pool/main/s/skypeforlinux/skypeforlinux_${version}_amd64.deb"; - sha256 = "1rv3jxirlfy0gvphw8cxmwmghbak5m5wj0y3bgamcvma48mzdfk3"; + sha256 = "09k260g9qy4n8vy6wr2jb5mm27cvqyapmv8vj4ff2j72f3ad31vm"; } else throw "Skype for linux is not supported on ${stdenv.hostPlatform.system}"; From b69a51a08bc3a5e84d89fbe79d033049fb66ab4e Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 6 Nov 2019 01:46:15 -0800 Subject: [PATCH 270/377] libtommath: 1.1.0 -> 1.2.0 (#72554) --- pkgs/development/libraries/libtommath/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/libtommath/default.nix b/pkgs/development/libraries/libtommath/default.nix index 8ce82bcf07c..0fde422b9aa 100644 --- a/pkgs/development/libraries/libtommath/default.nix +++ b/pkgs/development/libraries/libtommath/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "libtommath"; - version = "1.1.0"; + version = "1.2.0"; src = fetchurl { url = "https://github.com/libtom/libtommath/releases/download/v${version}/ltm-${version}.tar.xz"; - sha256 = "1bbyagqzfdbg37k1n08nsqzdf44z8zsnjjinqbsyj7rxg246qilh"; + sha256 = "1c8q1qy88cjhdjlk3g24mra94h34c1ldvkjz0n2988c0yvn5xixp"; }; nativeBuildInputs = [ libtool ]; From 6ea7ba4d691a697ad9bebf95d9659e8ae6d5cf94 Mon Sep 17 00:00:00 2001 From: Jan Hrnko Date: Wed, 6 Nov 2019 12:27:14 +0100 Subject: [PATCH 271/377] nixos/moodle: port test to python --- nixos/tests/moodle.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/tests/moodle.nix b/nixos/tests/moodle.nix index 565a6b63694..56aa62596c0 100644 --- a/nixos/tests/moodle.nix +++ b/nixos/tests/moodle.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, lib, ... }: { +import ./make-test-python.nix ({ pkgs, lib, ... }: { name = "moodle"; meta.maintainers = [ lib.maintainers.aanderse ]; @@ -15,8 +15,8 @@ import ./make-test.nix ({ pkgs, lib, ... }: { }; testScript = '' - startAll; - $machine->waitForUnit('phpfpm-moodle.service'); - $machine->succeed('curl http://localhost/') =~ /You are not logged in/ or die; + start_all() + machine.wait_for_unit("phpfpm-moodle.service") + machine.wait_until_succeeds("curl http://localhost/ | grep 'You are not logged in'") ''; }) From 8060e760374d92a7ddc633bf2523a0cbec033178 Mon Sep 17 00:00:00 2001 From: Jan Hrnko Date: Wed, 6 Nov 2019 12:30:29 +0100 Subject: [PATCH 272/377] nixos/xautolock: port test to python --- nixos/tests/xautolock.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/tests/xautolock.nix b/nixos/tests/xautolock.nix index ee46d9e05b0..10e92b40e95 100644 --- a/nixos/tests/xautolock.nix +++ b/nixos/tests/xautolock.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, lib, ... }: +import ./make-test-python.nix ({ pkgs, lib, ... }: with lib; @@ -15,10 +15,10 @@ with lib; }; testScript = '' - $machine->start; - $machine->waitForX; - $machine->mustFail("pgrep xlock"); - $machine->sleep(120); - $machine->mustSucceed("pgrep xlock"); + machine.start() + machine.wait_for_x() + machine.fail("pgrep xlock") + machine.sleep(120) + machine.succeed("pgrep xlock") ''; }) From c0c04737ed6279fb4e1a4640b5120c1ba32cb2c8 Mon Sep 17 00:00:00 2001 From: Jan Hrnko Date: Wed, 6 Nov 2019 12:40:43 +0100 Subject: [PATCH 273/377] nixos/telegraf: port test to python --- nixos/tests/telegraf.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/tests/telegraf.nix b/nixos/tests/telegraf.nix index 6776f8d8c37..73f741b1135 100644 --- a/nixos/tests/telegraf.nix +++ b/nixos/tests/telegraf.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ...} : { +import ./make-test-python.nix ({ pkgs, ...} : { name = "telegraf"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ mic92 ]; @@ -22,9 +22,9 @@ import ./make-test.nix ({ pkgs, ...} : { }; testScript = '' - startAll; + start_all() - $machine->waitForUnit("telegraf.service"); - $machine->waitUntilSucceeds("grep -q example /tmp/metrics.out"); + machine.wait_for_unit("telegraf.service") + machine.wait_until_succeeds("grep -q example /tmp/metrics.out") ''; }) From 1b6ca29f6d0099cc5a08196316c28ac5d42bb610 Mon Sep 17 00:00:00 2001 From: Jan Hrnko Date: Wed, 6 Nov 2019 12:43:08 +0100 Subject: [PATCH 274/377] nixos/strongswan-swanctl: port test to python --- nixos/tests/strongswan-swanctl.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nixos/tests/strongswan-swanctl.nix b/nixos/tests/strongswan-swanctl.nix index 9bab9349ea7..152c0d61c54 100644 --- a/nixos/tests/strongswan-swanctl.nix +++ b/nixos/tests/strongswan-swanctl.nix @@ -16,7 +16,7 @@ # See the NixOS manual for how to run this test: # https://nixos.org/nixos/manual/index.html#sec-running-nixos-tests-interactively -import ./make-test.nix ({ pkgs, ...} : +import ./make-test-python.nix ({ pkgs, ...} : let allowESP = "iptables --insert INPUT --protocol ESP --jump ACCEPT"; @@ -142,7 +142,7 @@ in { }; testScript = '' - startAll(); - $carol->waitUntilSucceeds("ping -c 1 alice"); + start_all() + carol.wait_until_succeeds("ping -c 1 alice") ''; }) From 3803abae68d8cec603e3e34b02825b273e2d65e3 Mon Sep 17 00:00:00 2001 From: Jan Hrnko Date: Wed, 6 Nov 2019 12:44:51 +0100 Subject: [PATCH 275/377] nixos/snapper: port test to python --- nixos/tests/snapper.nix | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/nixos/tests/snapper.nix b/nixos/tests/snapper.nix index 74ec22fd349..018102d7f64 100644 --- a/nixos/tests/snapper.nix +++ b/nixos/tests/snapper.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ ... }: +import ./make-test-python.nix ({ ... }: { name = "snapper"; @@ -20,24 +20,16 @@ import ./make-test.nix ({ ... }: }; testScript = '' - $machine->succeed("btrfs subvolume create /home/.snapshots"); - - $machine->succeed("snapper -c home list"); - - $machine->succeed("snapper -c home create --description empty"); - - $machine->succeed("echo test > /home/file"); - $machine->succeed("snapper -c home create --description file"); - - $machine->succeed("snapper -c home status 1..2"); - - $machine->succeed("snapper -c home undochange 1..2"); - $machine->fail("ls /home/file"); - - $machine->succeed("snapper -c home delete 2"); - - $machine->succeed("systemctl --wait start snapper-timeline.service"); - - $machine->succeed("systemctl --wait start snapper-cleanup.service"); + machine.succeed("btrfs subvolume create /home/.snapshots") + machine.succeed("snapper -c home list") + machine.succeed("snapper -c home create --description empty") + machine.succeed("echo test > /home/file") + machine.succeed("snapper -c home create --description file") + machine.succeed("snapper -c home status 1..2") + machine.succeed("snapper -c home undochange 1..2") + machine.fail("ls /home/file") + machine.succeed("snapper -c home delete 2") + machine.succeed("systemctl --wait start snapper-timeline.service") + machine.succeed("systemctl --wait start snapper-cleanup.service") ''; }) From e86b9b9f0841985f44eb683b95398020c14bee8b Mon Sep 17 00:00:00 2001 From: Marijan Date: Tue, 5 Nov 2019 12:11:56 +0100 Subject: [PATCH 276/377] nixos/atd: port test to python --- nixos/tests/atd.nix | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/nixos/tests/atd.nix b/nixos/tests/atd.nix index 25db7279924..c3abe5c253d 100644 --- a/nixos/tests/atd.nix +++ b/nixos/tests/atd.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ... }: +import ./make-test-python.nix ({ pkgs, ... }: { name = "atd"; @@ -14,18 +14,18 @@ import ./make-test.nix ({ pkgs, ... }: # "at" has a resolution of 1 minute testScript = '' - startAll; + start_all() - $machine->waitForUnit('atd.service'); # wait for atd to start - $machine->fail("test -f ~root/at-1"); - $machine->fail("test -f ~alice/at-1"); + machine.wait_for_unit("atd.service") # wait for atd to start + machine.fail("test -f ~root/at-1") + machine.fail("test -f ~alice/at-1") - $machine->succeed("echo 'touch ~root/at-1' | at now+1min"); - $machine->succeed("su - alice -c \"echo 'touch at-1' | at now+1min\""); + machine.succeed("echo 'touch ~root/at-1' | at now+1min") + machine.succeed("su - alice -c \"echo 'touch at-1' | at now+1min\"") - $machine->succeed("sleep 1.5m"); + machine.succeed("sleep 1.5m") - $machine->succeed("test -f ~root/at-1"); - $machine->succeed("test -f ~alice/at-1"); + machine.succeed("test -f ~root/at-1") + machine.succeed("test -f ~alice/at-1") ''; }) From 0f96f9f038f295b5745f8571b6029b5bb4a64e53 Mon Sep 17 00:00:00 2001 From: Marijan Date: Tue, 5 Nov 2019 12:20:20 +0100 Subject: [PATCH 277/377] nixos/avahi: port test to python --- nixos/tests/avahi.nix | 70 +++++++++++++++++++++---------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/nixos/tests/avahi.nix b/nixos/tests/avahi.nix index ae4f54d5266..fe027c14d5a 100644 --- a/nixos/tests/avahi.nix +++ b/nixos/tests/avahi.nix @@ -1,5 +1,5 @@ # Test whether `avahi-daemon' and `libnss-mdns' work as expected. -import ./make-test.nix ({ pkgs, ... } : { +import ./make-test-python.nix ({ pkgs, ... } : { name = "avahi"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ eelco ]; @@ -23,45 +23,45 @@ import ./make-test.nix ({ pkgs, ... } : { two = cfg; }; - testScript = - '' startAll; + testScript = '' + start_all() - # mDNS. - $one->waitForUnit("network.target"); - $two->waitForUnit("network.target"); + # mDNS. + one.wait_for_unit("network.target") + two.wait_for_unit("network.target") - $one->succeed("avahi-resolve-host-name one.local | tee out >&2"); - $one->succeed("test \"`cut -f1 < out`\" = one.local"); - $one->succeed("avahi-resolve-host-name two.local | tee out >&2"); - $one->succeed("test \"`cut -f1 < out`\" = two.local"); + one.succeed("avahi-resolve-host-name one.local | tee out >&2") + one.succeed('test "`cut -f1 < out`" = one.local') + one.succeed("avahi-resolve-host-name two.local | tee out >&2") + one.succeed('test "`cut -f1 < out`" = two.local') - $two->succeed("avahi-resolve-host-name one.local | tee out >&2"); - $two->succeed("test \"`cut -f1 < out`\" = one.local"); - $two->succeed("avahi-resolve-host-name two.local | tee out >&2"); - $two->succeed("test \"`cut -f1 < out`\" = two.local"); + two.succeed("avahi-resolve-host-name one.local | tee out >&2") + two.succeed('test "`cut -f1 < out`" = one.local') + two.succeed("avahi-resolve-host-name two.local | tee out >&2") + two.succeed('test "`cut -f1 < out`" = two.local') - # Basic DNS-SD. - $one->succeed("avahi-browse -r -t _workstation._tcp | tee out >&2"); - $one->succeed("test `wc -l < out` -gt 0"); - $two->succeed("avahi-browse -r -t _workstation._tcp | tee out >&2"); - $two->succeed("test `wc -l < out` -gt 0"); + # Basic DNS-SD. + one.succeed("avahi-browse -r -t _workstation._tcp | tee out >&2") + one.succeed("test `wc -l < out` -gt 0") + two.succeed("avahi-browse -r -t _workstation._tcp | tee out >&2") + two.succeed("test `wc -l < out` -gt 0") - # More DNS-SD. - $one->execute("avahi-publish -s \"This is a test\" _test._tcp 123 one=1 &"); - $one->sleep(5); - $two->succeed("avahi-browse -r -t _test._tcp | tee out >&2"); - $two->succeed("test `wc -l < out` -gt 0"); + # More DNS-SD. + one.execute('avahi-publish -s "This is a test" _test._tcp 123 one=1 &') + one.sleep(5) + two.succeed("avahi-browse -r -t _test._tcp | tee out >&2") + two.succeed("test `wc -l < out` -gt 0") - # NSS-mDNS. - $one->succeed("getent hosts one.local >&2"); - $one->succeed("getent hosts two.local >&2"); - $two->succeed("getent hosts one.local >&2"); - $two->succeed("getent hosts two.local >&2"); + # NSS-mDNS. + one.succeed("getent hosts one.local >&2") + one.succeed("getent hosts two.local >&2") + two.succeed("getent hosts one.local >&2") + two.succeed("getent hosts two.local >&2") - # extra service definitions - $one->succeed("avahi-browse -r -t _ssh._tcp | tee out >&2"); - $one->succeed("test `wc -l < out` -gt 0"); - $two->succeed("avahi-browse -r -t _ssh._tcp | tee out >&2"); - $two->succeed("test `wc -l < out` -gt 0"); - ''; + # extra service definitions + one.succeed("avahi-browse -r -t _ssh._tcp | tee out >&2") + one.succeed("test `wc -l < out` -gt 0") + two.succeed("avahi-browse -r -t _ssh._tcp | tee out >&2") + two.succeed("test `wc -l < out` -gt 0") + ''; }) From f794de4e31787ae6307c4c14f79292be4ca85e2d Mon Sep 17 00:00:00 2001 From: Marijan Date: Tue, 5 Nov 2019 12:27:15 +0100 Subject: [PATCH 278/377] nixos/bcachefs: port test to python --- nixos/tests/bcachefs.nix | 44 ++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/nixos/tests/bcachefs.nix b/nixos/tests/bcachefs.nix index 658676ef0ab..0541e580322 100644 --- a/nixos/tests/bcachefs.nix +++ b/nixos/tests/bcachefs.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ... }: { +import ./make-test-python.nix ({ pkgs, ... }: { name = "bcachefs"; meta.maintainers = with pkgs.stdenv.lib.maintainers; [ chiiruno ]; @@ -10,29 +10,25 @@ import ./make-test.nix ({ pkgs, ... }: { }; testScript = '' - $machine->succeed("modprobe bcachefs"); - $machine->succeed("bcachefs version"); - $machine->succeed("ls /dev"); + machine.succeed("modprobe bcachefs") + machine.succeed("bcachefs version") + machine.succeed("ls /dev") - $machine->succeed( - "mkdir /tmp/mnt", - - "udevadm settle", - "parted --script /dev/vdb mklabel msdos", - "parted --script /dev/vdb -- mkpart primary 1024M -1s", - "udevadm settle", - - # Due to #32279, we cannot use encryption for this test yet - # "echo password | bcachefs format --encrypted /dev/vdb1", - # "echo password | bcachefs unlock /dev/vdb1", - "bcachefs format /dev/vdb1", - "mount -t bcachefs /dev/vdb1 /tmp/mnt", - "udevadm settle", - - "bcachefs fs usage /tmp/mnt", - - "umount /tmp/mnt", - "udevadm settle" - ); + machine.succeed( + "mkdir /tmp/mnt", + "udevadm settle", + "parted --script /dev/vdb mklabel msdos", + "parted --script /dev/vdb -- mkpart primary 1024M -1s", + "udevadm settle", + # Due to #32279, we cannot use encryption for this test yet + # "echo password | bcachefs format --encrypted /dev/vdb1", + # "echo password | bcachefs unlock /dev/vdb1", + "bcachefs format /dev/vdb1", + "mount -t bcachefs /dev/vdb1 /tmp/mnt", + "udevadm settle", + "bcachefs fs usage /tmp/mnt", + "umount /tmp/mnt", + "udevadm settle", + ) ''; }) From db546221456fd56f058804afeaa65ae2d97a8b08 Mon Sep 17 00:00:00 2001 From: Marijan Date: Tue, 5 Nov 2019 12:31:16 +0100 Subject: [PATCH 279/377] nixos/beanstalkd: port test to python --- nixos/tests/beanstalkd.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/nixos/tests/beanstalkd.nix b/nixos/tests/beanstalkd.nix index fa2fbc2c92a..4f4a454fb47 100644 --- a/nixos/tests/beanstalkd.nix +++ b/nixos/tests/beanstalkd.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, lib, ... }: +import ./make-test-python.nix ({ pkgs, lib, ... }: let pythonEnv = pkgs.python3.withPackages (p: [p.beanstalkc]); @@ -34,12 +34,16 @@ in }; testScript = '' - startAll; + start_all() - $machine->waitForUnit('beanstalkd.service'); + machine.wait_for_unit("beanstalkd.service") - $machine->succeed("${produce}"); - $machine->succeed("${consume}") eq "this is a job\n" or die; - $machine->succeed("${consume}") eq "this is another job\n" or die; + machine.succeed("${produce}") + assert "this is a job\n" == machine.succeed( + "${consume}" + ) + assert "this is another job\n" == machine.succeed( + "${consume}" + ) ''; }) From 44e6c84ea1640e1fe282aa5ce9de710414c744ec Mon Sep 17 00:00:00 2001 From: Marijan Date: Tue, 5 Nov 2019 13:18:45 +0100 Subject: [PATCH 280/377] nixos/bind: port test to python --- nixos/tests/bind.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/tests/bind.nix b/nixos/tests/bind.nix index 1f8c1dc7be4..09917b15a8e 100644 --- a/nixos/tests/bind.nix +++ b/nixos/tests/bind.nix @@ -1,4 +1,4 @@ -import ./make-test.nix { +import ./make-test-python.nix { name = "bind"; machine = { pkgs, lib, ... }: { @@ -20,8 +20,8 @@ import ./make-test.nix { }; testScript = '' - $machine->waitForUnit('bind.service'); - $machine->waitForOpenPort(53); - $machine->succeed('host 192.168.0.1 127.0.0.1 | grep -qF ns.example.org'); + machine.wait_for_unit("bind.service") + machine.wait_for_open_port(53) + machine.succeed("host 192.168.0.1 127.0.0.1 | grep -qF ns.example.org") ''; } From 54cc018b1ed325a476ce416934391edcee7dcce1 Mon Sep 17 00:00:00 2001 From: Marijan Date: Tue, 5 Nov 2019 13:48:02 +0100 Subject: [PATCH 281/377] nixos/boot-stage1: port test to python --- nixos/tests/boot-stage1.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/nixos/tests/boot-stage1.nix b/nixos/tests/boot-stage1.nix index b2e74bff6fc..cfb2ccb8285 100644 --- a/nixos/tests/boot-stage1.nix +++ b/nixos/tests/boot-stage1.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ... }: { +import ./make-test-python.nix ({ pkgs, ... }: { name = "boot-stage1"; machine = { config, pkgs, lib, ... }: { @@ -150,12 +150,12 @@ import ./make-test.nix ({ pkgs, ... }: { }; testScript = '' - $machine->waitForUnit("multi-user.target"); - $machine->succeed('test -s /run/canary2.pid'); - $machine->fail('pgrep -a canary1'); - $machine->fail('kill -0 $(< /run/canary2.pid)'); - $machine->succeed('pgrep -a -f \'^@canary3$\'''); - $machine->succeed('pgrep -a -f \'^kcanary$\'''); + machine.wait_for_unit("multi-user.target") + machine.succeed("test -s /run/canary2.pid") + machine.fail("pgrep -a canary1") + machine.fail("kill -0 $(< /run/canary2.pid)") + machine.succeed('pgrep -a -f "^@canary3$"') + machine.succeed('pgrep -a -f "^kcanary$"') ''; meta.maintainers = with pkgs.stdenv.lib.maintainers; [ aszlig ]; From af117c388b2720276eb0c6a8aa53f8db14623902 Mon Sep 17 00:00:00 2001 From: Marijan Date: Tue, 5 Nov 2019 15:45:01 +0100 Subject: [PATCH 282/377] nixos/borgbackup: port test to python --- nixos/tests/borgbackup.nix | 102 ++++++++++++++++++++----------------- 1 file changed, 56 insertions(+), 46 deletions(-) diff --git a/nixos/tests/borgbackup.nix b/nixos/tests/borgbackup.nix index 165f64b0d6d..d97471e293e 100644 --- a/nixos/tests/borgbackup.nix +++ b/nixos/tests/borgbackup.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ... }: +import ./make-test-python.nix ({ pkgs, ... }: let passphrase = "supersecret"; @@ -106,60 +106,70 @@ in { }; testScript = '' - startAll; + start_all() - $client->fail('test -d "${remoteRepo}"'); + client.fail('test -d "${remoteRepo}"') - $client->succeed("cp ${privateKey} /root/id_ed25519"); - $client->succeed("chmod 0600 /root/id_ed25519"); - $client->succeed("cp ${privateKeyAppendOnly} /root/id_ed25519.appendOnly"); - $client->succeed("chmod 0600 /root/id_ed25519.appendOnly"); + client.succeed( + "cp ${privateKey} /root/id_ed25519" + ) + client.succeed("chmod 0600 /root/id_ed25519") + client.succeed( + "cp ${privateKeyAppendOnly} /root/id_ed25519.appendOnly" + ) + client.succeed("chmod 0600 /root/id_ed25519.appendOnly") - $client->succeed("mkdir -p ${dataDir}"); - $client->succeed("touch ${dataDir}/${excludeFile}"); - $client->succeed("echo '${keepFileData}' > ${dataDir}/${keepFile}"); + client.succeed("mkdir -p ${dataDir}") + client.succeed("touch ${dataDir}/${excludeFile}") + client.succeed("echo '${keepFileData}' > ${dataDir}/${keepFile}") - subtest "local", sub { - my $borg = "BORG_PASSPHRASE='${passphrase}' borg"; - $client->systemctl("start --wait borgbackup-job-local"); - $client->fail("systemctl is-failed borgbackup-job-local"); - # Make sure exactly one archive has been created - $client->succeed("c=\$($borg list '${localRepo}' | wc -l) && [[ \$c == '1' ]]"); - # Make sure excludeFile has been excluded - $client->fail("$borg list '${localRepo}::${archiveName}' | grep -qF '${excludeFile}'"); - # Make sure keepFile has the correct content - $client->succeed("$borg extract '${localRepo}::${archiveName}'"); - $client->succeed('c=$(cat ${dataDir}/${keepFile}) && [[ "$c" == "${keepFileData}" ]]'); - # Make sure the same is true when using `borg mount` - $client->succeed("mkdir -p /mnt/borg && $borg mount '${localRepo}::${archiveName}' /mnt/borg"); - $client->succeed('c=$(cat /mnt/borg/${dataDir}/${keepFile}) && [[ "$c" == "${keepFileData}" ]]'); - }; + with subtest("local"): + borg = "BORG_PASSPHRASE='${passphrase}' borg" + client.systemctl("start --wait borgbackup-job-local") + client.fail("systemctl is-failed borgbackup-job-local") + # Make sure exactly one archive has been created + assert int(client.succeed("{} list '${localRepo}' | wc -l".format(borg))) > 0 + # Make sure excludeFile has been excluded + client.fail( + "{} list '${localRepo}::${archiveName}' | grep -qF '${excludeFile}'".format(borg) + ) + # Make sure keepFile has the correct content + client.succeed("{} extract '${localRepo}::${archiveName}'".format(borg)) + assert "${keepFileData}" in client.succeed("cat ${dataDir}/${keepFile}") + # Make sure the same is true when using `borg mount` + client.succeed( + "mkdir -p /mnt/borg && {} mount '${localRepo}::${archiveName}' /mnt/borg".format( + borg + ) + ) + assert "${keepFileData}" in client.succeed( + "cat /mnt/borg/${dataDir}/${keepFile}" + ) - subtest "remote", sub { - my $borg = "BORG_RSH='ssh -oStrictHostKeyChecking=no -i /root/id_ed25519' borg"; - $server->waitForUnit("sshd.service"); - $client->waitForUnit("network.target"); - $client->systemctl("start --wait borgbackup-job-remote"); - $client->fail("systemctl is-failed borgbackup-job-remote"); + with subtest("remote"): + borg = "BORG_RSH='ssh -oStrictHostKeyChecking=no -i /root/id_ed25519' borg" + server.wait_for_unit("sshd.service") + client.wait_for_unit("network.target") + client.systemctl("start --wait borgbackup-job-remote") + client.fail("systemctl is-failed borgbackup-job-remote") - # Make sure we can't access repos other than the specified one - $client->fail("$borg list borg\@server:wrong"); + # Make sure we can't access repos other than the specified one + client.fail("{} list borg\@server:wrong".format(borg)) - #TODO: Make sure that data is actually deleted - }; + # TODO: Make sure that data is actually deleted - subtest "remoteAppendOnly", sub { - my $borg = "BORG_RSH='ssh -oStrictHostKeyChecking=no -i /root/id_ed25519.appendOnly' borg"; - $server->waitForUnit("sshd.service"); - $client->waitForUnit("network.target"); - $client->systemctl("start --wait borgbackup-job-remoteAppendOnly"); - $client->fail("systemctl is-failed borgbackup-job-remoteAppendOnly"); + with subtest("remoteAppendOnly"): + borg = ( + "BORG_RSH='ssh -oStrictHostKeyChecking=no -i /root/id_ed25519.appendOnly' borg" + ) + server.wait_for_unit("sshd.service") + client.wait_for_unit("network.target") + client.systemctl("start --wait borgbackup-job-remoteAppendOnly") + client.fail("systemctl is-failed borgbackup-job-remoteAppendOnly") - # Make sure we can't access repos other than the specified one - $client->fail("$borg list borg\@server:wrong"); - - #TODO: Make sure that data is not actually deleted - }; + # Make sure we can't access repos other than the specified one + client.fail("{} list borg\@server:wrong".format(borg)) + # TODO: Make sure that data is not actually deleted ''; }) From 3c2c50b3597e935f44a5e383aee029640a7e4081 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 6 Nov 2019 12:52:25 +0100 Subject: [PATCH 283/377] matrix-synapse: 1.5.0 -> 1.5.1 https://github.com/matrix-org/synapse/releases/tag/v1.5.1 --- pkgs/servers/matrix-synapse/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/matrix-synapse/default.nix b/pkgs/servers/matrix-synapse/default.nix index 0c0a2c1908b..b9f4cb38742 100644 --- a/pkgs/servers/matrix-synapse/default.nix +++ b/pkgs/servers/matrix-synapse/default.nix @@ -23,11 +23,11 @@ let in buildPythonApplication rec { pname = "matrix-synapse"; - version = "1.5.0"; + version = "1.5.1"; src = fetchPypi { inherit pname version; - sha256 = "0skhzbwzq2985frnd86fn2hxhsmy0q1l5p9aich8l2gyg1dd3wb8"; + sha256 = "14c9wjp3w9m8hnm91r2a33lvd3avq5xx759dy23wmmh0z8xf0k4a"; }; patches = [ From 4390b5ef7c64cd31e6233c162d6ca331e0831352 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 6 Nov 2019 11:46:33 +0100 Subject: [PATCH 284/377] paraview: 5.6.0 -> 5.6.3 * Use qt wrapper, otherwise it wouldn't find plugins and fail to start --- pkgs/applications/graphics/paraview/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/graphics/paraview/default.nix b/pkgs/applications/graphics/paraview/default.nix index 13a00991265..fdda8062a43 100644 --- a/pkgs/applications/graphics/paraview/default.nix +++ b/pkgs/applications/graphics/paraview/default.nix @@ -2,11 +2,12 @@ stdenv, fetchFromGitHub, cmake, makeWrapper ,qtbase, qttools, python, libGLU_combined ,libXt, qtx11extras, qtxmlpatterns +, mkDerivation }: -stdenv.mkDerivation rec { +mkDerivation rec { pname = "paraview"; - version = "5.6.0"; + version = "5.6.3"; # fetching from GitHub instead of taking an "official" source # tarball because of missing submodules there @@ -14,7 +15,7 @@ stdenv.mkDerivation rec { owner = "Kitware"; repo = "ParaView"; rev = "v${version}"; - sha256 = "1j13yfdgcv4yzfr449i4c8r4rs1c9zr6qd3igr4vv3ani8zixkzi"; + sha256 = "0zcij59pg47c45gfddnpbin13w16smzhcbivzm1k4pg4366wxq1q"; fetchSubmodules = true; }; From baa88926160597f7cd2ea91ab0c911e0d51a43d1 Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sat, 2 Nov 2019 18:21:44 +0000 Subject: [PATCH 285/377] opencv3: 3.4.7 -> 3.4.8 (security) addressing CVE-2019-14491, CVE-2019-14492 & CVE-2019-15939 all internal downloads are unchanged for this release --- pkgs/development/libraries/opencv/3.x.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/libraries/opencv/3.x.nix b/pkgs/development/libraries/opencv/3.x.nix index d8946dae095..874f9535759 100644 --- a/pkgs/development/libraries/opencv/3.x.nix +++ b/pkgs/development/libraries/opencv/3.x.nix @@ -36,20 +36,20 @@ }: let - version = "3.4.7"; + version = "3.4.8"; src = fetchFromGitHub { owner = "opencv"; repo = "opencv"; rev = version; - sha256 = "0r5rrcnqx2lsnr1ja5ij2chb7yk9kkamr4p0ik52sqxydwkv3z50"; + sha256 = "1dnz3gfj70lm1gbrk8pz28apinlqi2x6nvd6xcy5hs08505nqnjp"; }; contribSrc = fetchFromGitHub { owner = "opencv"; repo = "opencv_contrib"; rev = version; - sha256 = "1ik6acsmgrx66awf19r2y3ijqvv9xg43gaphwszbiyi0jq3r43yw"; + sha256 = "0psaa1yx36n34l09zd1y8jxgf8q4jzxd3vn06fqmzwzy85hcqn8i"; }; # Contrib must be built in order to enable Tesseract support: From af480796c9e447e63f2c3720543b8e1c148cf34b Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Sat, 2 Nov 2019 14:20:12 +0100 Subject: [PATCH 286/377] sage: ignore cmp deprecation in sagenb --- .../math/sage/patches/sagenb-cmp-deprecation.patch | 13 +++++++++++++ pkgs/applications/science/math/sage/sagenb.nix | 5 +++++ 2 files changed, 18 insertions(+) create mode 100644 pkgs/applications/science/math/sage/patches/sagenb-cmp-deprecation.patch diff --git a/pkgs/applications/science/math/sage/patches/sagenb-cmp-deprecation.patch b/pkgs/applications/science/math/sage/patches/sagenb-cmp-deprecation.patch new file mode 100644 index 00000000000..9f502a66951 --- /dev/null +++ b/pkgs/applications/science/math/sage/patches/sagenb-cmp-deprecation.patch @@ -0,0 +1,13 @@ +diff --git a/sagenb/__init__.py b/sagenb/__init__.py +index 4db0d2cb..2fc5f01e 100644 +--- a/sagenb/__init__.py ++++ b/sagenb/__init__.py +@@ -1,3 +1,8 @@ + # -*- coding: utf-8 -* + # init ++import warnings + from . import storage ++ ++# deprecation in attrs, needs to be fixed in twisted ++warnings.filterwarnings('ignore', category=DeprecationWarning, ++ message=r'The usage of `cmp` is deprecated and will be removed.*') diff --git a/pkgs/applications/science/math/sage/sagenb.nix b/pkgs/applications/science/math/sage/sagenb.nix index 03b5b7a3bbf..77b2168ad97 100644 --- a/pkgs/applications/science/math/sage/sagenb.nix +++ b/pkgs/applications/science/math/sage/sagenb.nix @@ -26,6 +26,11 @@ buildPythonPackage rec { sha256 = "0bxvhr03qh2nsjdfc4pyfiqrn9jhp3vf7irsc9gqx0185jlblbxs"; }; + patches = [ + # cmp deprecation in attrs needs to be handled in twisted + ./patches/sagenb-cmp-deprecation.patch + ]; + propagatedBuildInputs = [ twisted flask From f85ce834ce426ab9abcd66a66d20afef5645baac Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Sat, 2 Nov 2019 15:15:17 +0100 Subject: [PATCH 287/377] sage: ignore deprecation warnings in rst2sws Needs to be fixed upstream (by werkzeug, twisted). Doesn't impact the functionality and the tests are soon to be removed with the py3 update anyway. --- .../sage/patches/ignore-cmp-deprecation.patch | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/science/math/sage/patches/ignore-cmp-deprecation.patch b/pkgs/applications/science/math/sage/patches/ignore-cmp-deprecation.patch index 5c1073e13e9..11ca7481961 100644 --- a/pkgs/applications/science/math/sage/patches/ignore-cmp-deprecation.patch +++ b/pkgs/applications/science/math/sage/patches/ignore-cmp-deprecation.patch @@ -1,13 +1,24 @@ diff --git a/src/sage/tests/cmdline.py b/src/sage/tests/cmdline.py -index bd6b76ab82..f8340a8c66 100644 +index bd6b76ab82..ccf1203dec 100644 --- a/src/sage/tests/cmdline.py +++ b/src/sage/tests/cmdline.py -@@ -872,7 +872,7 @@ def test_executable(args, input="", timeout=100.0, **kwds): +@@ -837,8 +837,6 @@ def test_executable(args, input="", timeout=100.0, **kwds): + /// + 4 + }}} +- sage: err # py2 +- '' + sage: ret + 0 + +@@ -871,8 +869,8 @@ def test_executable(args, input="", timeout=100.0, **kwds): + sage: output = tmp_filename(ext='.sws') sage: with open(input, 'w') as F: ....: _ = F.write(s) - sage: test_executable(["sage", "--rst2sws", input, output]) # py2 +- sage: test_executable(["sage", "--rst2sws", input, output]) # py2 - ('', '', 0) -+ ('', '...', 0) ++ sage: test_executable(["sage", "--rst2sws", input, output])[2] # py2 ++ 0 sage: import tarfile # py2 sage: f = tarfile.open(output, 'r') # py2 sage: print(f.extractfile('sage_worksheet/worksheet.html').read()) # py2 From da7ec1c1397fd50803962e0bcf74e1fe97a228d5 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Mon, 4 Nov 2019 21:48:38 +0100 Subject: [PATCH 288/377] sage: ignore werkzeug immutable dict deprecation --- .../ignore-werkzeug-immutable-dict-deprecation.patch | 12 ++++++++++++ pkgs/applications/science/math/sage/sage-src.nix | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 pkgs/applications/science/math/sage/patches/ignore-werkzeug-immutable-dict-deprecation.patch diff --git a/pkgs/applications/science/math/sage/patches/ignore-werkzeug-immutable-dict-deprecation.patch b/pkgs/applications/science/math/sage/patches/ignore-werkzeug-immutable-dict-deprecation.patch new file mode 100644 index 00000000000..c5f95b498d5 --- /dev/null +++ b/pkgs/applications/science/math/sage/patches/ignore-werkzeug-immutable-dict-deprecation.patch @@ -0,0 +1,12 @@ +diff --git a/src/sage/all.py b/src/sage/all.py +index c87c9372e9..862fca4fcc 100644 +--- a/src/sage/all.py ++++ b/src/sage/all.py +@@ -306,6 +306,7 @@ warnings.filters.remove(('ignore', None, DeprecationWarning, None, 0)) + # Ignore all deprecations from IPython etc. + warnings.filterwarnings('ignore', category=DeprecationWarning, + module='.*(IPython|ipykernel|jupyter_client|jupyter_core|nbformat|notebook|ipywidgets|storemagic)') ++warnings.filterwarnings('ignore', category=DeprecationWarning, message=r".*The import 'werkzeug.ImmutableDict' is deprecated") + # Ignore collections.abc warnings, there are a lot of them but they are + # harmless. + warnings.filterwarnings('ignore', category=DeprecationWarning, diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index c7a3da68b15..14b1023f26a 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -107,6 +107,10 @@ stdenv.mkDerivation rec { # ignore a deprecation warning for usage of `cmp` in the attrs library in the doctests ./patches/ignore-cmp-deprecation.patch + + # Werkzeug has deprecated ImmutableDict, but it is still used in legacy + # sagenb. That's no big issue since sagenb will be removed soon anyways. + ./patches/ignore-werkzeug-immutable-dict-deprecation.patch ]; patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches; From f64885b9ca7d3cb048027184f6094f81e7812e28 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Mon, 4 Nov 2019 11:36:48 +0100 Subject: [PATCH 289/377] sage: fix pkgconfig errors in tests python.pkgs.pkgconfig raises an exception on missing packages since version 1.5.0. Previously those errors were just silently ignored. That worked fine, since the packages are only missing at runtime (when they are not really needed) but present at buildtime. Since this fails the tests now, we just add the packages to PKG_CONFIG_PATH at runtime. This does not add additional runtime dependencies. Still, it would be nicer if the sage testssuite would not test the buildsystem at runtime in the first place. The breakage was originally caused by the pkgconfig update in 1efa71616fadd5c7f852173445b2db824534b99b. --- .../science/math/sage/sage-env.nix | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/science/math/sage/sage-env.nix b/pkgs/applications/science/math/sage/sage-env.nix index 0b67b3cff12..00397239876 100644 --- a/pkgs/applications/science/math/sage/sage-env.nix +++ b/pkgs/applications/science/math/sage/sage-env.nix @@ -18,6 +18,12 @@ , ecl , maxima-ecl , singular +, fflas-ffpack +, givaro +, gd +, libpng +, linbox +, m4ri , giac , palp , rWrapper @@ -101,14 +107,21 @@ writeTextFile rec { name = "sage-env"; destination = "/${name}"; text = '' - export PKG_CONFIG_PATH='${lib.concatStringsSep ":" (map (pkg: "${pkg}/lib/pkgconfig") [ - # This is only needed in the src/sage/misc/cython.py test and I'm not - # sure if there's really a usecase for it outside of the tests. However - # since singular and openblas are runtime dependencies anyways, it doesn't - # really hurt to include. + export PKG_CONFIG_PATH='${lib.makeSearchPathOutput "dev" "lib/pkgconfig" [ + # This should only be needed during build. However, since the doctests + # also test the cython build (for example in src/sage/misc/cython.py), + # it is also needed for the testsuite to pass. We could fix the + # testsuite instead, but since all the packages are also runtime + # dependencies it doesn't really hurt to include them here. singular openblasCompat - ]) + fflas-ffpack givaro + gd + libpng zlib + gsl + linbox + m4ri + ] }' export SAGE_ROOT='${sagelib.src}' export SAGE_LOCAL='@sage-local@' From afb9887dbdaf97e1447c46bab158723332a633b7 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Wed, 6 Nov 2019 00:38:28 +0100 Subject: [PATCH 290/377] sage: backport fix for threejs r109 --- pkgs/applications/science/math/sage/sage-src.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index 14b1023f26a..dc8ba48e45e 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -111,6 +111,13 @@ stdenv.mkDerivation rec { # Werkzeug has deprecated ImmutableDict, but it is still used in legacy # sagenb. That's no big issue since sagenb will be removed soon anyways. ./patches/ignore-werkzeug-immutable-dict-deprecation.patch + + # threejs r109 (#28560) + (fetchpatch { + name = "threejs-r109.patch"; + url = "https://git.sagemath.org/sage.git/patch?id=fcc11d6effa39f375bc5f4ea5831fb7a2f2767da"; + sha256 = "0hnmc8ld3bblks0hcjvjjaydkgwdr1cs3dbl2ys4gfq964pjgqwc"; + }) ]; patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches; From 9ca60eda5ac7a751a1e56026ad81a4383d4ebba8 Mon Sep 17 00:00:00 2001 From: Jan Hrnko Date: Wed, 6 Nov 2019 15:56:04 +0100 Subject: [PATCH 291/377] nixos/radarr: port test to python --- nixos/tests/radarr.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/tests/radarr.nix b/nixos/tests/radarr.nix index 9bc5607ccd5..ed90025ac42 100644 --- a/nixos/tests/radarr.nix +++ b/nixos/tests/radarr.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ lib, ... }: +import ./make-test-python.nix ({ lib, ... }: with lib; @@ -11,8 +11,8 @@ with lib; { services.radarr.enable = true; }; testScript = '' - $machine->waitForUnit('radarr.service'); - $machine->waitForOpenPort('7878'); - $machine->succeed("curl --fail http://localhost:7878/"); + machine.wait_for_unit("radarr.service") + machine.wait_for_open_port("7878") + machine.succeed("curl --fail http://localhost:7878/") ''; }) From 6868807c2ff5b0631328c5d38cb221d519c731d9 Mon Sep 17 00:00:00 2001 From: Jan Hrnko Date: Wed, 6 Nov 2019 15:57:56 +0100 Subject: [PATCH 292/377] nixos/redis: port test to python --- nixos/tests/redis.nix | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/nixos/tests/redis.nix b/nixos/tests/redis.nix index 325d93424dd..529965d7acd 100644 --- a/nixos/tests/redis.nix +++ b/nixos/tests/redis.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ...} : { +import ./make-test-python.nix ({ pkgs, ...} : { name = "redis"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ flokli ]; @@ -15,12 +15,10 @@ import ./make-test.nix ({ pkgs, ...} : { }; testScript = '' - startAll; - - $machine->waitForUnit("redis"); - $machine->waitForOpenPort("6379"); - - $machine->succeed("redis-cli ping | grep PONG"); - $machine->succeed("redis-cli -s /run/redis/redis.sock ping | grep PONG"); + start_all() + machine.wait_for_unit("redis") + machine.wait_for_open_port("6379") + machine.succeed("redis-cli ping | grep PONG") + machine.succeed("redis-cli -s /run/redis/redis.sock ping | grep PONG") ''; }) From afbfef93a7a66e8faf9f16481eb4314106b504b0 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 6 Nov 2019 16:06:43 +0100 Subject: [PATCH 293/377] nixos/tests: Ignore shutdown/crash if not booted Condition seems to be inverted. Crash and shutdown only make sense, when the machine is booted; i.e. we return immediately otherwise. In the Perl test driver this is: return unless $self->{booted}; --- nixos/lib/test-driver/test-driver.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py index 45b7e229a5c..c6baf75003a 100644 --- a/nixos/lib/test-driver/test-driver.py +++ b/nixos/lib/test-driver/test-driver.py @@ -611,14 +611,14 @@ class Machine: self.log("QEMU running (pid {})".format(self.pid)) def shutdown(self): - if self.booted: + if not self.booted: return self.shell.send("poweroff\n".encode()) self.wait_for_shutdown() def crash(self): - if self.booted: + if not self.booted: return self.log("forced crash") From 71824d769c9b34da02666759d612457fc00a2f42 Mon Sep 17 00:00:00 2001 From: Jan Hrnko Date: Wed, 6 Nov 2019 16:07:18 +0100 Subject: [PATCH 294/377] nixos/roundcube: port test to python --- nixos/tests/roundcube.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/tests/roundcube.nix b/nixos/tests/roundcube.nix index ed0ebd7dd19..4f2560ce8c2 100644 --- a/nixos/tests/roundcube.nix +++ b/nixos/tests/roundcube.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ...} : { +import ./make-test-python.nix ({ pkgs, ...} : { name = "roundcube"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ globin ]; @@ -21,10 +21,10 @@ import ./make-test.nix ({ pkgs, ...} : { }; testScript = '' - $roundcube->start; - $roundcube->waitForUnit("postgresql.service"); - $roundcube->waitForUnit("phpfpm-roundcube.service"); - $roundcube->waitForUnit("nginx.service"); - $roundcube->succeed("curl -sSfL http://roundcube/ | grep 'Keep me logged in'"); + roundcube.start + roundcube.wait_for_unit("postgresql.service") + roundcube.wait_for_unit("phpfpm-roundcube.service") + roundcube.wait_for_unit("nginx.service") + roundcube.succeed("curl -sSfL http://roundcube/ | grep 'Keep me logged in'") ''; }) From 4ffdd43d2da6917b16238cd5754ec233d5e66fef Mon Sep 17 00:00:00 2001 From: Jan Hrnko Date: Wed, 6 Nov 2019 16:12:26 +0100 Subject: [PATCH 295/377] nixos/rss2email: port test to python --- nixos/tests/rss2email.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/nixos/tests/rss2email.nix b/nixos/tests/rss2email.nix index 492d47da9f5..d62207a417b 100644 --- a/nixos/tests/rss2email.nix +++ b/nixos/tests/rss2email.nix @@ -1,4 +1,4 @@ -import ./make-test.nix { +import ./make-test-python.nix { name = "opensmtpd"; nodes = { @@ -53,14 +53,14 @@ import ./make-test.nix { }; testScript = '' - startAll; + start_all() - $server->waitForUnit("network-online.target"); - $server->waitForUnit("opensmtpd"); - $server->waitForUnit("dovecot2"); - $server->waitForUnit("nginx"); - $server->waitForUnit("rss2email"); + server.wait_for_unit("network-online.target") + server.wait_for_unit("opensmtpd") + server.wait_for_unit("dovecot2") + server.wait_for_unit("nginx") + server.wait_for_unit("rss2email") - $server->waitUntilSucceeds('check-mail-landed >&2'); + server.wait_until_succeeds("check-mail-landed >&2") ''; } From 8920cbc8aabd292c7a7838b9497e36d8d4f4588b Mon Sep 17 00:00:00 2001 From: Jan Hrnko Date: Wed, 6 Nov 2019 16:38:26 +0100 Subject: [PATCH 296/377] nixos/signal-desktop: port test to python --- nixos/tests/signal-desktop.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/nixos/tests/signal-desktop.nix b/nixos/tests/signal-desktop.nix index 605b9c3e130..c746d46dc55 100644 --- a/nixos/tests/signal-desktop.nix +++ b/nixos/tests/signal-desktop.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ...} : +import ./make-test-python.nix ({ pkgs, ...} : { name = "signal-desktop"; @@ -24,14 +24,14 @@ import ./make-test.nix ({ pkgs, ...} : testScript = { nodes, ... }: let user = nodes.machine.config.users.users.alice; in '' - startAll; - $machine->waitForX; + start_all() + machine.wait_for_x() # start signal desktop - $machine->execute("su - alice -c signal-desktop &"); + machine.execute("su - alice -c signal-desktop &") # wait for the "Link your phone to Signal Desktop" message - $machine->waitForText(qr/Link your phone to Signal Desktop/); - $machine->screenshot("signal_desktop"); + machine.wait_for_text("Link your phone to Signal Desktop") + machine.screenshot("signal_desktop") ''; }) From d1473e031e9feb711ee2de8f823a04b984a068cf Mon Sep 17 00:00:00 2001 From: Francesco Gazzetta Date: Wed, 6 Nov 2019 16:05:29 +0000 Subject: [PATCH 297/377] coloursum: 0.1.0 -> 0.2.0 (#72900) --- pkgs/tools/text/coloursum/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/text/coloursum/default.nix b/pkgs/tools/text/coloursum/default.nix index 212f071f276..133b9968850 100644 --- a/pkgs/tools/text/coloursum/default.nix +++ b/pkgs/tools/text/coloursum/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "coloursum"; - version = "0.1.0"; + version = "0.2.0"; src = fetchFromGitHub { owner = "ticky"; repo = "coloursum"; rev = "v${version}"; - sha256 = "18ikwi0ihn0vadazrkh85jfz8a2f0dkfb3zns5jzh7p7mb0ylrr2"; + sha256 = "1piz0l7qdcvjzfykm6rzqc8s1daxp3cj3923v9cmm41bc2v0p5q0"; }; - cargoSha256 = "0f73vqa82w4ccr0cc95mxga3r8jgd92jnksshxzaffbpx4s334p3"; + cargoSha256 = "091flc5ymx0y43ld6bdmig5cy479b90bkmwv3yaysi5kpr28skvh"; meta = with stdenv.lib; { description = "Colourise your checksum output"; From 070fbc350c222ac07525cadfe913c5a92b2f0818 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 31 Oct 2019 10:29:10 -0400 Subject: [PATCH 298/377] nixos/fontconfig-ultimate: remove This module has been obsolete for several years now. --- .../config/fonts/fontconfig-ultimate.nix | 86 ------------------- nixos/modules/module-list.nix | 1 - nixos/modules/rename.nix | 9 ++ 3 files changed, 9 insertions(+), 87 deletions(-) delete mode 100644 nixos/modules/config/fonts/fontconfig-ultimate.nix diff --git a/nixos/modules/config/fonts/fontconfig-ultimate.nix b/nixos/modules/config/fonts/fontconfig-ultimate.nix deleted file mode 100644 index 84d90899dff..00000000000 --- a/nixos/modules/config/fonts/fontconfig-ultimate.nix +++ /dev/null @@ -1,86 +0,0 @@ -{ config, pkgs, lib, ... }: - -with lib; - -let cfg = config.fonts.fontconfig.ultimate; - - latestVersion = pkgs.fontconfig.configVersion; - - # The configuration to be included in /etc/font/ - confPkg = pkgs.runCommand "font-ultimate-conf" { preferLocalBuild = true; } '' - support_folder=$out/etc/fonts/conf.d - latest_folder=$out/etc/fonts/${latestVersion}/conf.d - - mkdir -p $support_folder - mkdir -p $latest_folder - - # fontconfig ultimate substitutions - ${optionalString (cfg.substitutions != "none") '' - ln -s ${pkgs.fontconfig-ultimate}/etc/fonts/presets/${cfg.substitutions}/*.conf \ - $support_folder - ln -s ${pkgs.fontconfig-ultimate}/etc/fonts/presets/${cfg.substitutions}/*.conf \ - $latest_folder - ''} - - # fontconfig ultimate various configuration files - ln -s ${pkgs.fontconfig-ultimate}/etc/fonts/conf.d/*.conf \ - $support_folder - ln -s ${pkgs.fontconfig-ultimate}/etc/fonts/conf.d/*.conf \ - $latest_folder - ''; - -in -{ - - options = { - - fonts = { - - fontconfig = { - - ultimate = { - enable = mkOption { - type = types.bool; - default = false; - description = '' - Enable fontconfig-ultimate settings (formerly known as - Infinality). Besides the customizable settings in this NixOS - module, fontconfig-ultimate also provides many font-specific - rendering tweaks. - ''; - }; - - substitutions = mkOption { - type = types.enum ["free" "combi" "ms" "none"]; - default = "free"; - description = '' - Font substitutions to replace common Type 1 fonts with nicer - TrueType fonts. free uses free fonts, - ms uses Microsoft fonts, - combi uses a combination, and - none disables the substitutions. - ''; - }; - - preset = mkOption { - type = types.enum ["ultimate1" "ultimate2" "ultimate3" "ultimate4" "ultimate5" "osx" "windowsxp"]; - default = "ultimate3"; - description = '' - FreeType rendering settings preset. Any of the presets may be - customized by setting environment variables. - ''; - }; - }; - }; - }; - - }; - - config = mkIf (config.fonts.fontconfig.enable && cfg.enable) { - - fonts.fontconfig.confPackages = [ confPkg ]; - environment.variables.INFINALITY_FT = cfg.preset; - - }; - -} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 2ad6188cc25..f7c66166c5c 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -2,7 +2,6 @@ ./config/debug-info.nix ./config/fonts/fontconfig.nix ./config/fonts/fontconfig-penultimate.nix - ./config/fonts/fontconfig-ultimate.nix ./config/fonts/fontdir.nix ./config/fonts/fonts.nix ./config/fonts/ghostscript.nix diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 6c6a5915426..7d8cf55b827 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -292,5 +292,14 @@ with lib; (opt: mkRemovedOptionModule [ "services" "prometheus" "${opt}" ] '' The prometheus exporters are now configured using `services.prometheus.exporters'. See the 18.03 release notes for more information. + '' )) + + ++ (forEach [ "enable" "substitutions" "preset" ] + (opt: mkRemovedOptionModule [ "fonts" "fontconfig" "ultimate" "${opt}" ] '' + The fonts.fontconfig.ultimate module and configuration is obsolete. + The repository has since been archived and activity has ceased. + https://github.com/bohoomil/fontconfig-ultimate/issues/171. + No action should be needed for font configuration, as the fonts.fontconfig + module is already used by default. '' )); } From 7a551b3d435b6afb7e9fc4984dd22394c34f0736 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 31 Oct 2019 10:32:02 -0400 Subject: [PATCH 299/377] fontconfig-ultimate: remove --- .../libraries/fontconfig-ultimate/default.nix | 49 ------------------- pkgs/top-level/aliases.nix | 5 ++ pkgs/top-level/all-packages.nix | 2 - 3 files changed, 5 insertions(+), 51 deletions(-) delete mode 100644 pkgs/development/libraries/fontconfig-ultimate/default.nix diff --git a/pkgs/development/libraries/fontconfig-ultimate/default.nix b/pkgs/development/libraries/fontconfig-ultimate/default.nix deleted file mode 100644 index b95d6dd559d..00000000000 --- a/pkgs/development/libraries/fontconfig-ultimate/default.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ stdenv, fetchFromGitHub }: - -let version = "2016-04-23"; in -stdenv.mkDerivation { - pname = "fontconfig-ultimate"; - inherit version; - - src = fetchFromGitHub { - sha256 = "1rd2n60l8bamx84q3l91pd9a0wz9h7p6ajvx1dw22qn8rah4h498"; - rev = version; - repo = "fontconfig-ultimate"; - owner = "bohoomil"; - }; - - installPhase = '' - mkdir -p $out/etc/fonts/conf.d - cp conf.d.infinality/*.conf $out/etc/fonts/conf.d - - # Base rendering settings will be determined by NixOS module - rm $out/etc/fonts/conf.d/10-base-rendering.conf - - # Options controlled by NixOS module - rm $out/etc/fonts/conf.d/35-repl-custom.conf - rm $out/etc/fonts/conf.d/38-repl-*.conf - rm $out/etc/fonts/conf.d/82-*.conf - rm $out/etc/fonts/conf.d/83-*.conf - - # Inclusion of local and user configs handled by global configuration - rm $out/etc/fonts/conf.d/29-local.conf - rm $out/etc/fonts/conf.d/28-user.conf - - cp fontconfig_patches/fonts-settings/*.conf $out/etc/fonts/conf.d - - # fix font priority issue https://github.com/bohoomil/fontconfig-ultimate/issues/173 - mv $out/etc/fonts/conf.d/{43,60}-wqy-zenhei-sharp.conf - - mkdir -p $out/etc/fonts/presets/{combi,free,ms} - cp fontconfig_patches/combi/*.conf $out/etc/fonts/presets/combi - cp fontconfig_patches/free/*.conf $out/etc/fonts/presets/free - cp fontconfig_patches/ms/*.conf $out/etc/fonts/presets/ms - ''; - - meta = with stdenv.lib; { - description = "Font configuration files, patches, scripts and source packages (Infinality & friends)"; - homepage = https://github.com/bohoomil/fontconfig-ultimate; - license = licenses.mit; - platforms = platforms.all; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 641e7459e0c..262304cdbf0 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -106,6 +106,11 @@ mapAliases ({ firefoxWrapper = firefox; # 2015-09 flameGraph = flamegraph; # added 2018-04-25 font-awesome-ttf = font-awesome; # 2018-02-25 + # 2019-10-31 + fontconfig-ultimate = throw '' + fontconfig-ultimate has been removed. The repository has been archived upstream and activity has ceased for several years. + https://github.com/bohoomil/fontconfig-ultimate/issues/171. + ''; font-droid = throw "font-droid has been deprecated by noto-fonts"; # 2019-04-12 foomatic_filters = foomatic-filters; # 2016-08 fuse_exfat = exfat; # 2015-09-11 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e56298b2ebd..55b5c900423 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11028,8 +11028,6 @@ in fontconfig-penultimate = callPackage ../data/fonts/fontconfig-penultimate {}; - fontconfig-ultimate = callPackage ../development/libraries/fontconfig-ultimate {}; - folly = callPackage ../development/libraries/folly { }; folks = callPackage ../development/libraries/folks { }; From afa48f16f265fd3e88073bca7929e1e103bd3dc3 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 6 Nov 2019 09:06:07 -0800 Subject: [PATCH 300/377] reaper: 5.983 -> 5.984 (#72654) --- pkgs/applications/audio/reaper/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/reaper/default.nix b/pkgs/applications/audio/reaper/default.nix index 4a6cdc44f44..3b780ee2b36 100644 --- a/pkgs/applications/audio/reaper/default.nix +++ b/pkgs/applications/audio/reaper/default.nix @@ -6,11 +6,11 @@ stdenv.mkDerivation rec { pname = "reaper"; - version = "5.983"; + version = "5.984"; src = fetchurl { url = "https://www.reaper.fm/files/${stdenv.lib.versions.major version}.x/reaper${builtins.replaceStrings ["."] [""] version}_linux_x86_64.tar.xz"; - sha256 = "16xw3gsxgjfdxd1ldm8zxd48qh6lgxacnj9yjryy0brhw51dw1q4"; + sha256 = "01yy0s9b9mkl6v66vgdfxl2zhr36abridih1d4ajbrdn60vppykw"; }; nativeBuildInputs = [ autoPatchelfHook makeWrapper ]; From 46af0b2a2cfd1e536c730986ac4a16406f2366ee Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 6 Nov 2019 09:12:08 -0800 Subject: [PATCH 301/377] opera: 62.0.3331.43 -> 64.0.3417.83 (#72587) --- pkgs/applications/networking/browsers/opera/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/browsers/opera/default.nix b/pkgs/applications/networking/browsers/opera/default.nix index b968c4f3d9d..f68f34c68e5 100644 --- a/pkgs/applications/networking/browsers/opera/default.nix +++ b/pkgs/applications/networking/browsers/opera/default.nix @@ -47,11 +47,11 @@ let in stdenv.mkDerivation rec { pname = "opera"; - version = "62.0.3331.43"; + version = "64.0.3417.83"; src = fetchurl { url = "${mirror}/${version}/linux/${pname}-stable_${version}_amd64.deb"; - sha256 = "0zylg32zn6blkgy4bwmjzc26i712lwakahvrd24ncpfa8805f7x7"; + sha256 = "09ygnfma5ncx6y8yr6dm3hz98cd9srv6687wgs786dw5glfhsd57"; }; unpackCmd = "${dpkg}/bin/dpkg-deb -x $curSrc ."; From f8948e9606911a498a791471cd5f4cc01de4cfe4 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 6 Nov 2019 09:18:28 -0800 Subject: [PATCH 302/377] mcelog: 164 -> 165 (#72583) --- pkgs/os-specific/linux/mcelog/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/mcelog/default.nix b/pkgs/os-specific/linux/mcelog/default.nix index a58bfc321d3..2f073631804 100644 --- a/pkgs/os-specific/linux/mcelog/default.nix +++ b/pkgs/os-specific/linux/mcelog/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "mcelog"; - version = "164"; + version = "165"; src = fetchFromGitHub { owner = "andikleen"; repo = "mcelog"; rev = "v${version}"; - sha256 = "1i0f0zvxlzkfp0bvghm1z8z8bb8a5x97h56bwd7fdkrm00ivfw2k"; + sha256 = "1g242qz3jj7amgar497bbd8krljspwy89g1r32wz3fdpkn9m1w8s"; }; postPatch = '' From d4763639e060bdc34ce3adc24f3497485220669d Mon Sep 17 00:00:00 2001 From: WilliButz Date: Wed, 6 Nov 2019 18:51:54 +0100 Subject: [PATCH 303/377] grafana: 6.4.3 -> 6.4.4 --- pkgs/servers/monitoring/grafana/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/monitoring/grafana/default.nix b/pkgs/servers/monitoring/grafana/default.nix index fa414fec843..b00b9778178 100644 --- a/pkgs/servers/monitoring/grafana/default.nix +++ b/pkgs/servers/monitoring/grafana/default.nix @@ -2,7 +2,7 @@ buildGoPackage rec { pname = "grafana"; - version = "6.4.3"; + version = "6.4.4"; goPackagePath = "github.com/grafana/grafana"; @@ -12,12 +12,12 @@ buildGoPackage rec { rev = "v${version}"; owner = "grafana"; repo = "grafana"; - sha256 = "0150s14yjgshncs94xf42yrz7awvw2x91j0j9v23fypqmlch2p3m"; + sha256 = "0v5iwny96kb07qkj2qqqfgvnsw3dfcq3wf66zsllqavnahvrd1s8"; }; srcStatic = fetchurl { url = "https://dl.grafana.com/oss/release/grafana-${version}.linux-amd64.tar.gz"; - sha256 = "0gr9m05h8qx3g0818b0qf1w26pdir3c5ydgi9zwdhjkppsq14dq2"; + sha256 = "15583cdi4yajg678d3kj8nngs9lwj0qqn2nh5zm8il9p71w57x0k"; }; postPatch = '' From 01aedf07d944da951ae58fc0d8efeae5e6d0bc6d Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 6 Nov 2019 09:53:53 -0800 Subject: [PATCH 304/377] renpy: 7.3.3 -> 7.3.5 (#72653) (#72653) --- pkgs/development/interpreters/renpy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/interpreters/renpy/default.nix b/pkgs/development/interpreters/renpy/default.nix index 846bba9e7e7..4017a4db86c 100644 --- a/pkgs/development/interpreters/renpy/default.nix +++ b/pkgs/development/interpreters/renpy/default.nix @@ -7,7 +7,7 @@ with pythonPackages; stdenv.mkDerivation rec { pname = "renpy"; - version = "7.3.3"; + version = "7.3.5"; meta = with stdenv.lib; { description = "Ren'Py Visual Novel Engine"; @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { src = fetchurl { url = "https://www.renpy.org/dl/${version}/renpy-${version}-source.tar.bz2"; - sha256 = "0wwsm0vg6zd07xmkqrqprymahdl4ifg7bc1lpbrh0qlfs1pvjlss"; + sha256 = "1anr5cfbvbsbik4v4rvrkdkciwhg700k4lydfbs4n85raimz9mw4"; }; patches = [ From 2b2a80ab5b3c66570609699b25ee034809e7ebf5 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 6 Nov 2019 10:12:44 -0800 Subject: [PATCH 305/377] setbfree: 0.8.9 -> 0.8.10 (#72665) --- pkgs/applications/audio/setbfree/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/setbfree/default.nix b/pkgs/applications/audio/setbfree/default.nix index cd8079e31dc..6d5944b7aff 100644 --- a/pkgs/applications/audio/setbfree/default.nix +++ b/pkgs/applications/audio/setbfree/default.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation rec { pname = "setbfree"; - version = "0.8.9"; + version = "0.8.10"; src = fetchzip { url = "https://github.com/pantherb/setBfree/archive/v${version}.tar.gz"; - sha256 = "097bby2da47zlkaqy2jl8j6q0h5pxaq67lz473ygadqs5ic3nhc1"; + sha256 = "1hpj8qb5mhkqm4yy8mzzrrq0ljw22y807qly90vjkg61ascyina4"; }; postPatch = '' From 9a5ef400fc8481ca4db9fbaafc22b2d5a4aa3e43 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Wed, 6 Nov 2019 18:16:46 +0000 Subject: [PATCH 306/377] linux: 5.3.8 -> 5.3.9 --- pkgs/os-specific/linux/kernel/linux-5.3.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-5.3.nix b/pkgs/os-specific/linux/kernel/linux-5.3.nix index 8d6c9f7a1c5..c01aa1f0c61 100644 --- a/pkgs/os-specific/linux/kernel/linux-5.3.nix +++ b/pkgs/os-specific/linux/kernel/linux-5.3.nix @@ -3,7 +3,7 @@ with stdenv.lib; buildLinux (args // rec { - version = "5.3.8"; + version = "5.3.9"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "0jb6yya9yx4z52p5m32dqj0kgc6aaz9df8mvq0hzy40bqb3czwvq"; + sha256 = "12p98z12hnrgvfssmi1003l7fgx5d0zc9pwsfwjhxp9fffm7j9fp"; }; } // (args.argsOverride or {})) From f46e8f9a12314aa55f2a426b551470c678673b68 Mon Sep 17 00:00:00 2001 From: Sascha Grunert Date: Wed, 6 Nov 2019 15:17:52 +0100 Subject: [PATCH 307/377] cri-o: 1.15.2 -> 1.16.0 Signed-off-by: Sascha Grunert --- .../virtualization/cri-o/default.nix | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/virtualization/cri-o/default.nix b/pkgs/applications/virtualization/cri-o/default.nix index 07b6d024990..fddf1741720 100644 --- a/pkgs/applications/virtualization/cri-o/default.nix +++ b/pkgs/applications/virtualization/cri-o/default.nix @@ -17,7 +17,7 @@ buildGoPackage rec { project = "cri-o"; - version = "1.15.2"; + version = "1.16.0"; name = "${project}-${version}${flavor}"; goPackagePath = "github.com/${project}/${project}"; @@ -26,7 +26,7 @@ buildGoPackage rec { owner = "cri-o"; repo = "cri-o"; rev = "v${version}"; - sha256 = "0fiizxwxdq87h943421ivgw49jndk23yjz3saf1rzmn7g3xh2pn4"; + sha256 = "1kbg544v7c1apaxrpndgrap0pb5c67d8fazbkgykg6ynskx6n344"; }; outputs = [ "bin" "out" ]; @@ -42,17 +42,23 @@ buildGoPackage rec { pushd go/src/${goPackagePath} # Build pause - go build -tags ${makeFlags} -o bin/crio-config -buildmode=pie \ - -ldflags '-s -w ${ldflags}' ${goPackagePath}/cmd/crio-config - make -C pause - # Build the crio binary - go build -tags ${makeFlags} -o bin/crio -buildmode=pie \ - -ldflags '-s -w ${ldflags}' ${goPackagePath}/cmd/crio + # Build the crio binaries + function build() { + go build \ + -tags ${makeFlags} \ + -o bin/"$1" \ + -buildmode=pie \ + -ldflags '-s -w ${ldflags}' \ + ${goPackagePath}/cmd/"$1" + } + build crio + build crio-status ''; installPhase = '' install -Dm755 bin/crio $bin/bin/crio${flavor} + install -Dm755 bin/crio-status $bin/bin/crio-status${flavor} mkdir -p $bin/libexec/crio install -Dm755 bin/pause $bin/libexec/crio/pause${flavor} From 91c8c0093a3ad5226d3fa5e1b587fa52b29ce907 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 6 Nov 2019 10:26:09 -0800 Subject: [PATCH 308/377] leatherman: 1.8.0 -> 1.9.0 (#72553) --- pkgs/development/libraries/leatherman/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/leatherman/default.nix b/pkgs/development/libraries/leatherman/default.nix index 9e20923c244..bdba8688f9d 100644 --- a/pkgs/development/libraries/leatherman/default.nix +++ b/pkgs/development/libraries/leatherman/default.nix @@ -2,10 +2,10 @@ stdenv.mkDerivation rec { pname = "leatherman"; - version = "1.8.0"; + version = "1.9.0"; src = fetchFromGitHub { - sha256 = "0iizy20pdkbnsfj6bzrkkj7faizc85lcpkpandvnxfybiq7j60iw"; + sha256 = "029n16rsvj2abii6d1d4q01fygkicw8n3ja0iaribk4b4h5mc7vc"; rev = version; repo = "leatherman"; owner = "puppetlabs"; From f28fad5e2fe777534f1c2719a40e69812085dfe5 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 6 Nov 2019 10:30:58 -0800 Subject: [PATCH 309/377] jetty: 9.4.16.v20190411 -> 9.4.22.v20191022 (#72533) --- pkgs/servers/http/jetty/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/http/jetty/default.nix b/pkgs/servers/http/jetty/default.nix index 5ce44322e92..845fd41c12c 100644 --- a/pkgs/servers/http/jetty/default.nix +++ b/pkgs/servers/http/jetty/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "jetty"; - version = "9.4.16.v20190411"; + version = "9.4.22.v20191022"; src = fetchurl { url = "https://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/${version}/jetty-distribution-${version}.tar.gz"; name = "jetty-distribution-${version}.tar.gz"; - sha256 = "0vkcm68cp7z45pgfg5maxcxfjwy4xj30f2d0c7cfnw9d38wf5lpq"; + sha256 = "1a5av6ygsmjwbnlax7f7l58d7hlw3xm0cpk5ml7mb54vrlrcb7hv"; }; phases = [ "unpackPhase" "installPhase" ]; From 2316150e647cc35a2632d1767d909ab0d36d2d33 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Wed, 6 Nov 2019 13:37:46 -0500 Subject: [PATCH 310/377] linux: 4.14.151 -> 4.14.152 --- pkgs/os-specific/linux/kernel/linux-4.14.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-4.14.nix b/pkgs/os-specific/linux/kernel/linux-4.14.nix index 74d49210fd2..10d382d4620 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.14.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.14.nix @@ -3,7 +3,7 @@ with stdenv.lib; buildLinux (args // rec { - version = "4.14.151"; + version = "4.14.152"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "1bizb1wwni5r4m5i0mrsqbc5qw73lwrfrdadm09vbfz9ir19qlgz"; + sha256 = "1amhwbdg7rki9i2q7mqp4vg5rzi8snps5rx891xy1aj1sgcry8x9"; }; } // (args.argsOverride or {})) From 308aba835180a6b5db610446cc2fdb1894c18749 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Wed, 6 Nov 2019 13:38:04 -0500 Subject: [PATCH 311/377] linux: 4.19.81 -> 4.19.82 --- pkgs/os-specific/linux/kernel/linux-4.19.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-4.19.nix b/pkgs/os-specific/linux/kernel/linux-4.19.nix index e3a9b79e235..b20636aa9de 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.19.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.19.nix @@ -3,7 +3,7 @@ with stdenv.lib; buildLinux (args // rec { - version = "4.19.81"; + version = "4.19.82"; # modDirVersion needs to be x.y.z, will automatically add .0 if needed modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "17g2wiaa7l7mxi72k79drxij2zqk3nsj8wi17bl4nfvb1ypc2gi9"; + sha256 = "0parrg1ayi677zinkqq8n1bz863s0gj92j3ix67jis2y5in6vnaq"; }; } // (args.argsOverride or {})) From 042cf21f747473029851b19260a0adf1b6a631f8 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Wed, 6 Nov 2019 13:38:23 -0500 Subject: [PATCH 312/377] linux: 4.4.198 -> 4.4.199 --- pkgs/os-specific/linux/kernel/linux-4.4.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-4.4.nix b/pkgs/os-specific/linux/kernel/linux-4.4.nix index b68f791cdcc..b8bc0425bcb 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.4.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.4.nix @@ -1,11 +1,11 @@ { stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args: buildLinux (args // rec { - version = "4.4.198"; + version = "4.4.199"; extraMeta.branch = "4.4"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "04pkryy1lc75c88vq5wcjjcxs43i7bb8hhplbfi6s204ipc0iy7c"; + sha256 = "1w35j5w9jjlnwl0bis376gh3l6jsy9vpvcpaihr4pj872jcv0f8p"; }; } // (args.argsOverride or {})) From 873ffd8d29d024349d025ddc76931d3f1482ee1b Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Wed, 6 Nov 2019 13:38:36 -0500 Subject: [PATCH 313/377] linux: 4.9.198 -> 4.9.199 --- pkgs/os-specific/linux/kernel/linux-4.9.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-4.9.nix b/pkgs/os-specific/linux/kernel/linux-4.9.nix index 3d9bb239cf5..898d3186958 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.9.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.9.nix @@ -1,11 +1,11 @@ { stdenv, buildPackages, fetchurl, perl, buildLinux, ... } @ args: buildLinux (args // rec { - version = "4.9.198"; + version = "4.9.199"; extraMeta.branch = "4.9"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "1b05jra6q695s1d4rzdr39i6m8xsi5xjrdn73sgwzvx0dgxfnwlm"; + sha256 = "1mby7ymcx6f9phacbaq2n9rr0rfv0r2dis2lk7j0wclfj3q3298g"; }; } // (args.argsOverride or {})) From 8eb8fa153e3ac796566fbd2077360c63918c74d3 Mon Sep 17 00:00:00 2001 From: Galen Abell Date: Wed, 6 Nov 2019 09:35:21 +0100 Subject: [PATCH 314/377] vimPlugins: Add alias support to update.py Plugins in `plugin-list` can now optionally specify an alias name, to avoid naming collisions if plugins have the same repo name. For example, specifying `author/common-plugin as author-common-plugin` will use `author-common-plugin` as the package name in `generated.nix`. --- pkgs/misc/vim-plugins/update.py | 36 ++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/pkgs/misc/vim-plugins/update.py b/pkgs/misc/vim-plugins/update.py index 8a8e20da8d7..78abdbd6ab2 100755 --- a/pkgs/misc/vim-plugins/update.py +++ b/pkgs/misc/vim-plugins/update.py @@ -154,13 +154,13 @@ def get_current_plugins() -> List[Plugin]: return plugins -def prefetch_plugin(user: str, repo_name: str, cache: "Cache") -> Plugin: +def prefetch_plugin(user: str, repo_name: str, alias: str, cache: "Cache") -> Plugin: repo = Repo(user, repo_name) commit, date = repo.latest_commit() has_submodules = repo.has_submodules() cached_plugin = cache[commit] if cached_plugin is not None: - cached_plugin.name = repo_name + cached_plugin.name = alias or repo_name cached_plugin.date = date return cached_plugin @@ -170,7 +170,7 @@ def prefetch_plugin(user: str, repo_name: str, cache: "Cache") -> Plugin: else: sha256 = repo.prefetch_github(commit) - return Plugin(repo_name, commit, has_submodules, sha256, date=date) + return Plugin(alias or repo_name, commit, has_submodules, sha256, date=date) def print_download_error(plugin: str, ex: Exception): @@ -207,18 +207,30 @@ def check_results( sys.exit(1) +def parse_plugin_line(line: str) -> Tuple[str, str, str]: + try: + name, repo = line.split('/') + try: + repo, alias = repo.split(' as ') + return (name, repo, alias.strip()) + except ValueError: + # no alias defined + return (name, repo.strip(), None) + except ValueError: + return (None, None, None) + + def load_plugin_spec() -> List[Tuple[str, str]]: plugin_file = ROOT.joinpath("vim-plugin-names") plugins = [] with open(plugin_file) as f: for line in f: - spec = line.strip() - parts = spec.split("/") - if len(parts) != 2: - msg = f"Invalid repository {spec}, must be in the format owner/repo" + plugin = parse_plugin_line(line) + if not plugin[0]: + msg = f"Invalid repository {line}, must be in the format owner/repo[ as alias]" print(msg, file=sys.stderr) sys.exit(1) - plugins.append((parts[0], parts[1])) + plugins.append(plugin) return plugins @@ -276,12 +288,12 @@ class Cache: def prefetch( - args: Tuple[str, str], cache: Cache + args: Tuple[str, str, str], cache: Cache ) -> Tuple[str, str, Union[Exception, Plugin]]: - assert len(args) == 2 - owner, repo = args + assert len(args) == 3 + owner, repo, alias = args try: - plugin = prefetch_plugin(owner, repo, cache) + plugin = prefetch_plugin(owner, repo, alias, cache) cache[plugin.commit] = plugin return (owner, repo, plugin) except Exception as e: From 47769e5127daa5fcb0c6c237fe00bac78b4cba3d Mon Sep 17 00:00:00 2001 From: Galen Abell Date: Tue, 29 Oct 2019 11:24:49 +0100 Subject: [PATCH 315/377] vimPlugins: Update --- pkgs/misc/vim-plugins/generated.nix | 233 +++++++++++++--------------- 1 file changed, 111 insertions(+), 122 deletions(-) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index e8e9702f964..3f233035ffc 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -50,12 +50,12 @@ let alchemist-vim = buildVimPluginFrom2Nix { pname = "alchemist-vim"; - version = "2019-07-04"; + version = "2019-11-06"; src = fetchFromGitHub { owner = "slashmili"; repo = "alchemist.vim"; - rev = "336b3f549cc6028db7bf8a43f725b93250f9cae1"; - sha256 = "19wzrydm1qciwagklhl7ln37ax69jfgzfw55k4cxbx7g972dg2s3"; + rev = "8b6ea7b1314bb3b47b115c04484b7af3c483f5b8"; + sha256 = "0jfwcd426hd9pb2dyq1949g8k8g1hhkc55k1kbp30r42m116p1qh"; }; }; @@ -92,17 +92,6 @@ let }; }; - antonys-macro-repeater = buildVimPluginFrom2Nix { - pname = "antonys-macro-repeater"; - version = "2017-09-10"; - src = fetchFromGitHub { - owner = "ckarnell"; - repo = "antonys-macro-repeater"; - rev = "61784d86b2654f3e261b9cc33360c5197704e266"; - sha256 = "1cq5r091qbxjs9s12f7bb2fdm43gxwpnnh2l8nhj0n69jfk7gblw"; - }; - }; - argtextobj-vim = buildVimPluginFrom2Nix { pname = "argtextobj-vim"; version = "2010-10-18"; @@ -149,12 +138,12 @@ let awesome-vim-colorschemes = buildVimPluginFrom2Nix { pname = "awesome-vim-colorschemes"; - version = "2019-09-21"; + version = "2019-11-05"; src = fetchFromGitHub { owner = "rafi"; repo = "awesome-vim-colorschemes"; - rev = "21f5c63f22fe70b0fae3ff0fb9e55c602e622ea7"; - sha256 = "1k7h8faz9qqyqzpkxxhsjsdqyah6amwk3rlhxygz9qg25mp558xf"; + rev = "c6962f051a0dff9c8d1390efea807a7440c9c0d4"; + sha256 = "1f5qq4l6mx7na008d5w6hji93w57vk26w78l4mp66wl790jcw4ky"; }; }; @@ -204,12 +193,12 @@ let calendar-vim = buildVimPluginFrom2Nix { pname = "calendar-vim"; - version = "2019-07-30"; + version = "2019-11-04"; src = fetchFromGitHub { owner = "itchyny"; repo = "calendar.vim"; - rev = "f8ba659ba6a094d000f355807efb71f7975d10f0"; - sha256 = "16np6mkmn7h4rx9471yqy4k89m6w9v1gz1cyphlwn90gzm8f97xz"; + rev = "644f88b9ddb17ef04c4558e945d1995aab400a96"; + sha256 = "0wbj61q3qyk432wzci8q8pjw2qrl7kv4cxjlxrdcv15w45b8wskk"; }; }; @@ -314,12 +303,12 @@ let coc-eslint = buildVimPluginFrom2Nix { pname = "coc-eslint"; - version = "2019-10-21"; + version = "2019-11-01"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc-eslint"; - rev = "a84833d95ab641f0576dec5bf0ffde845055188a"; - sha256 = "1r3sy5bmnl4hbsb6ln47ahxqqbcfycca0zn6b2qnqrb64ynb30y1"; + rev = "a74369ed64ed1fc7f85cec785e8ca05c6c8c7369"; + sha256 = "12apx97iinadjlzvgdnhfjlwwnpa7f844qw17qwfv7xcrvgg9qgv"; }; }; @@ -369,23 +358,23 @@ let coc-imselect = buildVimPluginFrom2Nix { pname = "coc-imselect"; - version = "2019-07-29"; + version = "2019-11-04"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc-imselect"; - rev = "ae248e744ac3c092c6d957d3923595676666b0e2"; - sha256 = "11cnab1s9jkywbm3nv6wbaaafq2nxqp9g3yav6lc74bazkzflm8i"; + rev = "19d89413b3b00db8de6ccd7db619149f542f496c"; + sha256 = "12w36mkw6b1bxpw51h04xxg703zdwrnww0wh3j32x2bx3bycdla4"; }; }; coc-java = buildVimPluginFrom2Nix { pname = "coc-java"; - version = "2019-10-30"; + version = "2019-10-31"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc-java"; - rev = "3195dd594389247e4bdb19d129e48846d9215f54"; - sha256 = "1k354jh521fjm2xz05x1653g31bgmx3s0bpsraj516172k605qfr"; + rev = "77f7ecd8e6cc0af7a0cf293616b9f66a61a41f44"; + sha256 = "13qhw4gdl5p4imzmgickay6lc4hlnw5fsc46zw5qyqq7p88wgym9"; }; }; @@ -567,12 +556,12 @@ let coc-tsserver = buildVimPluginFrom2Nix { pname = "coc-tsserver"; - version = "2019-10-06"; + version = "2019-10-31"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc-tsserver"; - rev = "a22270bede3ebab2f51c9a4bfd91305c5d5b7fcb"; - sha256 = "1nd2hk0zdgys7gzmfzkyzsxdcc2dbw573g7wxwxsa9fsk733fydf"; + rev = "6de5817d03ddcdadf2a513e6d057e71b715ceb92"; + sha256 = "1k5wbv8a8h43zscm6r4axfd9hajb6kfmz8bqazhzbl423rbss1pn"; }; }; @@ -1033,12 +1022,12 @@ let editorconfig-vim = buildVimPluginFrom2Nix { pname = "editorconfig-vim"; - version = "2019-07-20"; + version = "2019-11-03"; src = fetchFromGitHub { owner = "editorconfig"; repo = "editorconfig-vim"; - rev = "c718cefc51ccdaf7bd27c4c1ae2de55103434241"; - sha256 = "1sbpkv2q68s6qnm03jr1vazvdqqnrgiw53w4jn38dr8l9i2im199"; + rev = "5df91ecb9008666912c7ee15f95ebe5ff4265c23"; + sha256 = "020ll1517z8hmmqcnif4kd579hwvxjf8m0m2x1lg2b9kzaid09d1"; fetchSubmodules = true; }; }; @@ -1090,12 +1079,12 @@ let falcon = buildVimPluginFrom2Nix { pname = "falcon"; - version = "2019-10-20"; + version = "2019-11-04"; src = fetchFromGitHub { owner = "fenetikm"; repo = "falcon"; - rev = "95ea5ae8b0f1766237438f28ecce56414ee6432a"; - sha256 = "1qn825py75cdh414h9gcdf41w7wv84y38m5h39p0w04qz4p585xc"; + rev = "4f7c122c55aa8a4cfaedc6b12d3d2f26ce579250"; + sha256 = "0qvdp5y4bhb5nim0va1a25xahc7698lxj63q7cx2w2papbia69pi"; }; }; @@ -1201,12 +1190,12 @@ let fzf-vim = buildVimPluginFrom2Nix { pname = "fzf-vim"; - version = "2019-07-04"; + version = "2019-11-01"; src = fetchFromGitHub { owner = "junegunn"; repo = "fzf.vim"; - rev = "359a80e3a34aacbd5257713b6a88aa085337166f"; - sha256 = "0a01g0gw59m57zizidvm9n89qh8lvj0aq4kyxy27i72ysclp3wsf"; + rev = "bce6588d2422df75ca0091edac48aa9f87f163e5"; + sha256 = "1gpldyyqb1z38jqda098h0yw8frjb08lkqbkwxl064fd2wg2844g"; }; }; @@ -1223,12 +1212,12 @@ let ghcid = buildVimPluginFrom2Nix { pname = "ghcid"; - version = "2019-10-13"; + version = "2019-11-02"; src = fetchFromGitHub { owner = "ndmitchell"; repo = "ghcid"; - rev = "3318e1f29fde78bd75b2863d6cae6e1035f814de"; - sha256 = "0nbmg9m6ydma7hx8kb2dgswv1ksy68iqcpsgj81782g0ksimdf8b"; + rev = "b3b376e42389463ffc5e450af40f79d6b6343a17"; + sha256 = "08gvkgmka199vxkxxgdlwk9hacqm8b9icycl4ddglx0sn6w6y9vg"; }; }; @@ -1609,12 +1598,12 @@ let lightline-vim = buildVimPluginFrom2Nix { pname = "lightline-vim"; - version = "2019-10-18"; + version = "2019-10-31"; src = fetchFromGitHub { owner = "itchyny"; repo = "lightline.vim"; - rev = "d7fd8d7a7465194e8eb67ce759c9fe392035f939"; - sha256 = "0dg0m5ff1gwqn8l4il2yykgmi71vjyp1z9dwil9jn74xk1zhwszp"; + rev = "53bd3279da783cd5c1b1fafb4ff31077e81b6333"; + sha256 = "0yd9z6lb0b7spwacrb5x1qpvab720y70blmr7ai9gswi55vpfkls"; }; }; @@ -1862,12 +1851,12 @@ let neosnippet-vim = buildVimPluginFrom2Nix { pname = "neosnippet-vim"; - version = "2019-10-13"; + version = "2019-11-03"; src = fetchFromGitHub { owner = "Shougo"; repo = "neosnippet.vim"; - rev = "037b7a76f28d51c126de43fb88f01b592193c835"; - sha256 = "0n0i4iax3argmmzcwm22yrs9av71nqydza15c9ynlwkdd5gi2xvp"; + rev = "23c97432929721af9130a163faa442dce76b1184"; + sha256 = "0hlb1wqh0lzl65xfb3as8f2sdrw4wfp9z7nwdg8rfzxgnbb2wxpp"; }; }; @@ -2721,12 +2710,12 @@ let ultisnips = buildVimPluginFrom2Nix { pname = "ultisnips"; - version = "2019-10-20"; + version = "2019-11-05"; src = fetchFromGitHub { owner = "SirVer"; repo = "ultisnips"; - rev = "8ff301c651d6df806c0f9305273a6c62a693bc48"; - sha256 = "0ckgwfchxxd5va9ils2d0518irlsjkc0pzncn357dfihh2mgg01s"; + rev = "84c84d5e64633e56c6e652c7dd6a9ca45ba9fa5a"; + sha256 = "04m1rhi69wkv0nspgyibj66wplj1imbdw3311ab8qsvqm6wmz60w"; }; }; @@ -2743,12 +2732,12 @@ let unicode-vim = buildVimPluginFrom2Nix { pname = "unicode-vim"; - version = "2019-06-04"; + version = "2019-11-06"; src = fetchFromGitHub { owner = "chrisbra"; repo = "unicode.vim"; - rev = "29f43f7b1be94dccfac461f4da0a34410408111f"; - sha256 = "1wr0gq008jzlaignlkr706z5cjrdb6cc16r621zvfjncm9a71pnw"; + rev = "49f79785e7fba0f40519a6b9074dcceb8626f7d5"; + sha256 = "1k2b4wh0244dx7zinag88wfcwl2x2042z0zsyv9b77w81h8qfdd1"; }; }; @@ -3029,34 +3018,34 @@ let vim-airline = buildVimPluginFrom2Nix { pname = "vim-airline"; - version = "2019-10-25"; + version = "2019-11-05"; src = fetchFromGitHub { owner = "vim-airline"; repo = "vim-airline"; - rev = "a0e9b383c67174744ea2be6239f6c71eaa10434c"; - sha256 = "0vdpcgm7925gmr15zr0nb75b2449fgw78aqchc6qqa07n6n2zgrd"; + rev = "f2241b61b2aded65d76a59be400b2cc6c3efa4d8"; + sha256 = "0nyarjf5sjpfpdiz1y305d1f9swlgd27v9qa8blympr8b1inn8fb"; }; }; vim-airline-themes = buildVimPluginFrom2Nix { pname = "vim-airline-themes"; - version = "2019-09-18"; + version = "2019-10-31"; src = fetchFromGitHub { owner = "vim-airline"; repo = "vim-airline-themes"; - rev = "0d5c5c1e2995126e76606a628316c8e3f5efb37a"; - sha256 = "1xra1yiz03pap18hsq00053s42xf185ls9qydrkgpyjypqdnm5bg"; + rev = "650701f08fa49abca607f5a69ddf0a8157bcd8cf"; + sha256 = "0kk21x1g27gsy29ikfh8iayjgnm7vs2zllgwglqfjmlqvkqajmr0"; }; }; vim-android = buildVimPluginFrom2Nix { pname = "vim-android"; - version = "2019-09-29"; + version = "2019-11-01"; src = fetchFromGitHub { owner = "hsanson"; repo = "vim-android"; - rev = "1d5d169044ef71f687df0efcffd9a394528d7f47"; - sha256 = "07h1091fdjnhi45wql7yadsyln2861m4435wzr8zp5yj2b9k132a"; + rev = "928a7ba76ee7b48a715b397543f21ee28a9959da"; + sha256 = "1cdjjyzmclzc32i1wcc5k67laz75yvi4jj2yc1fxa95bbq9zi0h5"; }; }; @@ -3326,12 +3315,12 @@ let vim-devicons = buildVimPluginFrom2Nix { pname = "vim-devicons"; - version = "2019-10-26"; + version = "2019-11-03"; src = fetchFromGitHub { owner = "ryanoasis"; repo = "vim-devicons"; - rev = "72cb43727e3b87c99042e1f9dbae23b82c8ea59f"; - sha256 = "022ikmrva76whv4gnc1c33z6b1pxg2avpay9yac57l0gs4rhccv4"; + rev = "707fa649f764c5b78fae88505a905d59eb429205"; + sha256 = "1g4p6kp01dgasabcfjqj20d4mj66j7dqf2wikhiamqiygxb7rp5y"; }; }; @@ -3359,12 +3348,12 @@ let vim-dirvish = buildVimPluginFrom2Nix { pname = "vim-dirvish"; - version = "2019-10-19"; + version = "2019-11-06"; src = fetchFromGitHub { owner = "justinmk"; repo = "vim-dirvish"; - rev = "79ffe5c6cf0a56d693659b6b98e92a82daf105f4"; - sha256 = "1s1rqc7ai5a7al4sqavsng7pa3hx8fxgdkq8ww119bwfx5p43v4z"; + rev = "fec6464f187aa2db8e90e0f32a81df781acea249"; + sha256 = "08a08a40krz6yl56snh1392lkklgdhklfr10jshyhvqis4rbpknr"; }; }; @@ -3447,12 +3436,12 @@ let vim-elixir = buildVimPluginFrom2Nix { pname = "vim-elixir"; - version = "2019-09-06"; + version = "2019-11-03"; src = fetchFromGitHub { owner = "elixir-lang"; repo = "vim-elixir"; - rev = "e8d59d115c8153a7de9872b3c4419f2354c0f14b"; - sha256 = "1q6bk8rqsdwgbyckwdnq4kv6gy5wjqrhdm06sip5x53mnkhmpf5p"; + rev = "057ac39b5982a2decf52d48cffc405ff6a666ca5"; + sha256 = "1mzdjqh99cyixngy9y38fdgs2bzni4pgrk14y8f72vlc0di0fg5d"; }; }; @@ -3667,23 +3656,23 @@ let vim-glsl = buildVimPluginFrom2Nix { pname = "vim-glsl"; - version = "2017-10-15"; + version = "2019-11-01"; src = fetchFromGitHub { owner = "tikhomirov"; repo = "vim-glsl"; - rev = "697eca9784ffac39308e1fd45e0300582c3d060b"; - sha256 = "0qj00wgshx0pm6w1p682kc6s4xnzshnwx0sr65b24g1m495ck4q4"; + rev = "fbdb226318e3e1747b29f31ad07c0cce07e9f22a"; + sha256 = "076fny258ynamnd1mnknmp1zlafvvxpx7p28985mms84k65ihvy5"; }; }; vim-go = buildVimPluginFrom2Nix { pname = "vim-go"; - version = "2019-10-29"; + version = "2019-11-04"; src = fetchFromGitHub { owner = "fatih"; repo = "vim-go"; - rev = "bbbf77153a319a52798a3c8f4a0235470cf35196"; - sha256 = "1271079cipiida8kmh1d33x4z0lzs85izkr0pdxfhm0y51g2h55k"; + rev = "dfa71c91286d796c3f775efe3c8c797289382413"; + sha256 = "1w0brsmh56d5j3mkglyvc4gbi9lpcfl8s09wz1d89q907fanf2va"; }; }; @@ -4042,12 +4031,12 @@ let vim-jsx-pretty = buildVimPluginFrom2Nix { pname = "vim-jsx-pretty"; - version = "2019-10-16"; + version = "2019-11-04"; src = fetchFromGitHub { owner = "MaxMEllon"; repo = "vim-jsx-pretty"; - rev = "8f8c9edba37310d17e59a625b177ec6a37c07035"; - sha256 = "1hk3003ypiw62vra8vdjx2gzrv23b642w1nhq0zvgmh6yv8l33nz"; + rev = "7c09c5a4caf3993238ccd79a99c8bae9ff30aa94"; + sha256 = "0qb81r2545gsjjhx9dshxlrr666g17pc4c4vdafa65a4bziaicdg"; }; }; @@ -4108,12 +4097,12 @@ let vim-ledger = buildVimPluginFrom2Nix { pname = "vim-ledger"; - version = "2019-10-30"; + version = "2019-11-04"; src = fetchFromGitHub { owner = "ledger"; repo = "vim-ledger"; - rev = "66718caab97f13d25813f91b8352c9ac75b3771e"; - sha256 = "0ia9r212019d8jqrbs3nrn36mpc09gc81gf4dnv3hksn6knpdr8b"; + rev = "c64f22ff539894496674a844094147f98d8ff3bb"; + sha256 = "0cflphpng0g74v7vdly9kxvmbx3ldw7sy28hjqsbxr88ka6c72vp"; }; }; @@ -4482,12 +4471,12 @@ let vim-plug = buildVimPluginFrom2Nix { pname = "vim-plug"; - version = "2019-10-21"; + version = "2019-11-04"; src = fetchFromGitHub { owner = "junegunn"; repo = "vim-plug"; - rev = "eee50c55bf691bf6bf04c981c1d1cfed3ffc4588"; - sha256 = "12awz68lzckh4c2ffhp3gv45f123bsb9jghv5g8ypzrj3ch6im0c"; + rev = "68fef9c2fd9d4a21b500cc2249b6711a71c6fb9f"; + sha256 = "0azmnxq82frs375k5b9yjdvsjfmzjv92ifqnmniar19d96yh6swa"; }; }; @@ -4504,12 +4493,12 @@ let vim-polyglot = buildVimPluginFrom2Nix { pname = "vim-polyglot"; - version = "2019-10-16"; + version = "2019-11-04"; src = fetchFromGitHub { owner = "sheerun"; repo = "vim-polyglot"; - rev = "31c55b85a03d96252bba14d64911cc78a20369a1"; - sha256 = "0f6kywmk7id6yglqf59qrfb1swrw3f7b7pxqj4zr0q6xmjq233n0"; + rev = "4e95df7c7e12cb76e781f2dacf1c07f8984cce58"; + sha256 = "0jq65a56crvbhgn3gvq3p4b5gni27wrpqachshbdjka6hf4gn2xv"; }; }; @@ -4526,12 +4515,12 @@ let vim-projectionist = buildVimPluginFrom2Nix { pname = "vim-projectionist"; - version = "2019-08-22"; + version = "2019-10-31"; src = fetchFromGitHub { owner = "tpope"; repo = "vim-projectionist"; - rev = "b1a826329c0891416f2357bf77a43ac49b441e6d"; - sha256 = "0za2hnsg888nl3ddhawll053j64sgqhiqpxciqi05j50bz34cs8n"; + rev = "c09a1d354d9c9b427c83e3909d3fa4bd78b54143"; + sha256 = "0mlxargcskjvki4kpry6v65xlrfgv0ranp08b7zi55pid94ygv2k"; }; }; @@ -4724,12 +4713,12 @@ let vim-signify = buildVimPluginFrom2Nix { pname = "vim-signify"; - version = "2019-10-22"; + version = "2019-11-02"; src = fetchFromGitHub { owner = "mhinz"; repo = "vim-signify"; - rev = "ad755bb72953d02d01046b606962db727766d096"; - sha256 = "1l46ar2v1000l44dwbybzy60nqw76hiczdfh370n3sr5vpp4ynda"; + rev = "7ca8e00452622faf62b909d606c4500beffcff66"; + sha256 = "0sfb39qafbaa9g50k8pp228lagzx259nzg11c13rxsvpq85zxz7s"; }; }; @@ -4746,12 +4735,12 @@ let vim-slime = buildVimPluginFrom2Nix { pname = "vim-slime"; - version = "2019-07-28"; + version = "2019-11-01"; src = fetchFromGitHub { owner = "jpalardy"; repo = "vim-slime"; - rev = "dc8ca22cef3f87999d926e18e2e230145e013838"; - sha256 = "0pafvfhf3xbdqyy7v5y8h2j47k4y1zmscp7rans6vd5rq68k8fwf"; + rev = "93776ea69b99ad0ecd5291d8a5984386fd8ffa72"; + sha256 = "1izcb2iwlwxhzc048xwi9jxr3gqyy5kqysbd1358p39sfhfcdy4j"; }; }; @@ -4768,12 +4757,12 @@ let vim-sneak = buildVimPluginFrom2Nix { pname = "vim-sneak"; - version = "2019-08-21"; + version = "2019-11-06"; src = fetchFromGitHub { owner = "justinmk"; repo = "vim-sneak"; - rev = "27cc3ce0fd19f0414024a81ee1eee6b17f155122"; - sha256 = "162gvzm7f0dsgv52ixd79ggzxddgpmrxqsqa41nv72mw61s0pmax"; + rev = "24e6c3f4cd6004e2b44e4022dee0260aba6132aa"; + sha256 = "000i2x36b8l5vc1li0f4jazs06nch9pca95yqr4w4m5hgjpzs5qs"; }; }; @@ -4790,12 +4779,12 @@ let vim-snippets = buildVimPluginFrom2Nix { pname = "vim-snippets"; - version = "2019-10-24"; + version = "2019-11-05"; src = fetchFromGitHub { owner = "honza"; repo = "vim-snippets"; - rev = "0e5c36c4fec8ae2abe0ce334dbc58c82b094705a"; - sha256 = "0gyqf9hgwzld1i02vwkzmb2cr7if5h8w0mras1x1wqvwf468x1jn"; + rev = "efecc996d48ca4a2df835ebfe4c72724238fabd4"; + sha256 = "1pnw795yqdfj5djpkzpshknl6g4lb1jr1hrcpyl43l5wpgm7nxn5"; }; }; @@ -4944,23 +4933,23 @@ let vim-terraform = buildVimPluginFrom2Nix { pname = "vim-terraform"; - version = "2019-10-07"; + version = "2019-11-04"; src = fetchFromGitHub { owner = "hashivim"; repo = "vim-terraform"; - rev = "ffdf2dc17aaef733164a7079f95dd74f6cda9241"; - sha256 = "1y4v2hn44rjyfh18ninzyb37xxc47fl20wzhnvs5gnnhjfsyfbqj"; + rev = "bd9c84050939b6a93eb7e7ce8321375e4009cc77"; + sha256 = "09jqq9iakcp8ikqjm1jxmqcbbkvnxdcwn3bm0w2gfm3r9c5a8amd"; }; }; vim-test = buildVimPluginFrom2Nix { pname = "vim-test"; - version = "2019-10-22"; + version = "2019-11-06"; src = fetchFromGitHub { owner = "janko-m"; repo = "vim-test"; - rev = "18619b98d8fc16c6d23ccbefc5e9ce335c499d42"; - sha256 = "0aja7qfv3mcg7skagrd73xj9hncv35a9l554sjmm072wbi682p5l"; + rev = "dcd7995802c7b90555ef6d920289c5d7f063bcb6"; + sha256 = "1a7k7i75n3qb14fvngkdpwvcyjl7cri2f2v1vi89waf7blmn22ib"; }; }; @@ -5340,12 +5329,12 @@ let vimtex = buildVimPluginFrom2Nix { pname = "vimtex"; - version = "2019-10-25"; + version = "2019-11-03"; src = fetchFromGitHub { owner = "lervag"; repo = "vimtex"; - rev = "f6a84aec49d9577fab7486b72a6830b61ee093b0"; - sha256 = "01aiasbysm0y23aid5v5r8avn70bc458gz3j8zbaq6c53bc1h3q0"; + rev = "878b8e860e0ef5ef52082579db4b6cf131689709"; + sha256 = "1ivnlwkyai2y20x4m7p91h3p9y70139ys736ssm4igjjd50dcihf"; }; }; @@ -5483,24 +5472,24 @@ let yats-vim = buildVimPluginFrom2Nix { pname = "yats-vim"; - version = "2019-10-17"; + version = "2019-11-06"; src = fetchFromGitHub { owner = "HerringtonDarkholme"; repo = "yats.vim"; - rev = "7ea1a4da5ab0d3ae73ea6af80b7252ae960e126f"; - sha256 = "0vhgmwycmscd7v10nzcb8q7wqx4g2lrc9jb6zgd9dnkd8dzhmz3h"; + rev = "773c6b6408597bf3e7175bd7a3427aaa1ee8b5ae"; + sha256 = "1n8cqdsygbaxnlgaaf5r946rs9d9irvqdg0779c4pz8vrxdvhwzs"; fetchSubmodules = true; }; }; youcompleteme = buildVimPluginFrom2Nix { pname = "youcompleteme"; - version = "2019-10-26"; + version = "2019-11-05"; src = fetchFromGitHub { owner = "valloric"; repo = "youcompleteme"; - rev = "3620fb550d6dd790376b18ed730dbc0f53239b35"; - sha256 = "1wd2cx37b3567rzjiydn4n7mrr0n5av8227as74fd1blnwbdik7f"; + rev = "036ad6e935aabd2783821c24ea7a8383bab9a5bb"; + sha256 = "0b82znd40imhvnjs1bri25l4ls5l82baaj18ddg2dagr78sxpv34"; fetchSubmodules = true; }; }; From 6f3f7fcc899669d5aae7535983b978f4a3a00e47 Mon Sep 17 00:00:00 2001 From: Galen Abell Date: Tue, 29 Oct 2019 11:57:44 +0100 Subject: [PATCH 316/377] vimPlugins.mattn-calendar-vim: init at 2018-08-25 --- pkgs/misc/vim-plugins/generated.nix | 11 +++++++++++ pkgs/misc/vim-plugins/vim-plugin-names | 1 + 2 files changed, 12 insertions(+) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 3f233035ffc..17b30769d52 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -1640,6 +1640,17 @@ let }; }; + mattn-calendar-vim = buildVimPluginFrom2Nix { + pname = "mattn-calendar-vim"; + version = "2018-08-24"; + src = fetchFromGitHub { + owner = "mattn"; + repo = "calendar-vim"; + rev = "867d0cd2d9388e7f1a88f5fe4da23461422fa8fb"; + sha256 = "0f13wkvnjcv3awmahrkqw9f9hjdj8fq8wm10rs8jfmzad7w16dvk"; + }; + }; + mayansmoke = buildVimPluginFrom2Nix { pname = "mayansmoke"; version = "2010-10-18"; diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index 350ed619be6..4bec1f6a8b6 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -226,6 +226,7 @@ MarcWeber/vim-addon-toggle-buffer MarcWeber/vim-addon-xdebug markonm/traces.vim martinda/Jenkinsfile-vim-syntax +mattn/calendar-vim as mattn-calendar-vim mattn/emmet-vim mattn/gist-vim mattn/webapi-vim From 05ded6497add5a6a11e3f7e58ddbd3241aecbf99 Mon Sep 17 00:00:00 2001 From: Galen Abell Date: Tue, 29 Oct 2019 12:03:24 +0100 Subject: [PATCH 317/377] vimPlugins.gv-vim: init at 2019-10-13 --- pkgs/misc/vim-plugins/generated.nix | 11 +++++++++++ pkgs/misc/vim-plugins/vim-plugin-names | 1 + 2 files changed, 12 insertions(+) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 17b30769d52..8ac05b1dbcf 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -1298,6 +1298,17 @@ let }; }; + gv-vim = buildVimPluginFrom2Nix { + pname = "gv-vim"; + version = "2019-10-13"; + src = fetchFromGitHub { + owner = "junegunn"; + repo = "gv.vim"; + rev = "7a84f6342cc79444e3fa873bf1d08fb6c53b097e"; + sha256 = "0q5xz8iw3jg42kbaspmgd8mlcgl3xglcqh3fyd2jmmwhnfzp3f7r"; + }; + }; + haskell-vim = buildVimPluginFrom2Nix { pname = "haskell-vim"; version = "2018-05-22"; diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index 4bec1f6a8b6..b647ca0c6b7 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -153,6 +153,7 @@ JuliaEditorSupport/julia-vim Julian/vim-textobj-variable-segment junegunn/fzf.vim junegunn/goyo.vim +junegunn/gv.vim junegunn/limelight.vim junegunn/seoul256.vim junegunn/vader.vim From 05c0d8792f7e6694eaa34b031b03eb53c8255d0d Mon Sep 17 00:00:00 2001 From: Galen Abell Date: Tue, 29 Oct 2019 12:05:26 +0100 Subject: [PATCH 318/377] vimPlugins.kotlin-vim: init at 2019-05-26 --- pkgs/misc/vim-plugins/generated.nix | 11 +++++++++++ pkgs/misc/vim-plugins/vim-plugin-names | 1 + 2 files changed, 12 insertions(+) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 8ac05b1dbcf..304528665d4 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -1497,6 +1497,17 @@ let }; }; + kotlin-vim = buildVimPluginFrom2Nix { + pname = "kotlin-vim"; + version = "2019-05-26"; + src = fetchFromGitHub { + owner = "udalov"; + repo = "kotlin-vim"; + rev = "b9fa728701a0aa0b9a2ffe92f10880348fc27a8f"; + sha256 = "1yqzxabhpc4jbdlzhsysp0vi1ayqg0vnpysvx4ynd9961q2fk3sz"; + }; + }; + lalrpop-vim = buildVimPluginFrom2Nix { pname = "lalrpop-vim"; version = "2017-11-22"; diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index b647ca0c6b7..331fb640b9d 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -449,6 +449,7 @@ tyru/caw.vim tyru/open-browser-github.vim tyru/open-browser.vim uarun/vim-protobuf +udalov/kotlin-vim ujihisa/neco-look valloric/youcompleteme vhda/verilog_systemverilog.vim From 2b944d2fcfb0ef5356f3e695dc69fe645e599391 Mon Sep 17 00:00:00 2001 From: Galen Abell Date: Tue, 29 Oct 2019 12:09:36 +0100 Subject: [PATCH 319/377] vimPlugins.vim-salve: init at 2019-08-02 --- pkgs/misc/vim-plugins/generated.nix | 11 +++++++++++ pkgs/misc/vim-plugins/vim-plugin-names | 1 + 2 files changed, 12 insertions(+) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 304528665d4..4e3edf83433 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -4678,6 +4678,17 @@ let }; }; + vim-salve = buildVimPluginFrom2Nix { + pname = "vim-salve"; + version = "2019-08-02"; + src = fetchFromGitHub { + owner = "tpope"; + repo = "vim-salve"; + rev = "7a3d9e7aa674bb72b46e75372320363b962f4457"; + sha256 = "0793zirb9bi81rwmp6cls5c57yn8cv9qf265nyqc51j40hhw7kcw"; + }; + }; + vim-sayonara = buildVimPluginFrom2Nix { pname = "vim-sayonara"; version = "2017-03-13"; diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index 331fb640b9d..20abe3c0276 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -431,6 +431,7 @@ tpope/vim-projectionist tpope/vim-repeat tpope/vim-rhubarb tpope/vim-rsi +tpope/vim-salve tpope/vim-scriptease tpope/vim-sensible tpope/vim-sleuth From 13c2cc0b91ed9532d8623c2e19e0040c9e02b9c1 Mon Sep 17 00:00:00 2001 From: Galen Abell Date: Tue, 29 Oct 2019 12:11:43 +0100 Subject: [PATCH 320/377] vimPlugins.utl-vim: init at 2010-10-18 --- pkgs/misc/vim-plugins/generated.nix | 11 +++++++++++ pkgs/misc/vim-plugins/vim-plugin-names | 1 + 2 files changed, 12 insertions(+) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 4e3edf83433..c7f73a88807 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -2785,6 +2785,17 @@ let }; }; + utl-vim = buildVimPluginFrom2Nix { + pname = "utl-vim"; + version = "2010-10-18"; + src = fetchFromGitHub { + owner = "vim-scripts"; + repo = "utl.vim"; + rev = "67a6506a7a8a3847d00d3af3e2ed9707460d5ce5"; + sha256 = "0ax68nmzlka9193n2h82qzvhzv4dv6lm7rg3b1vhj2pn1r6ci6p4"; + }; + }; + vader-vim = buildVimPluginFrom2Nix { pname = "vader-vim"; version = "2019-05-18"; diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index 20abe3c0276..5c3a8343792 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -483,6 +483,7 @@ vim-scripts/ReplaceWithRegister vim-scripts/ShowMultiBase vim-scripts/tabmerge vim-scripts/taglist.vim +vim-scripts/utl.vim vim-scripts/wombat256.vim vim-scripts/YankRing.vim vim-utils/vim-husk From afbde10f2fd9bb55dff13391f0985d8d2568e07c Mon Sep 17 00:00:00 2001 From: Galen Abell Date: Tue, 29 Oct 2019 12:13:13 +0100 Subject: [PATCH 321/377] vimPlugins.vim-clojure-highlight: init 2015-07-05 --- pkgs/misc/vim-plugins/generated.nix | 11 +++++++++++ pkgs/misc/vim-plugins/vim-plugin-names | 1 + 2 files changed, 12 insertions(+) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index c7f73a88807..1840d406c99 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -3214,6 +3214,17 @@ let }; }; + vim-clojure-highlight = buildVimPluginFrom2Nix { + pname = "vim-clojure-highlight"; + version = "2015-07-05"; + src = fetchFromGitHub { + owner = "guns"; + repo = "vim-clojure-highlight"; + rev = "9ac6cb8fef04b2c243377adb671324a60952aee0"; + sha256 = "0fg3faj0fq7b8pqr0i33qdg2xfd5966lrjl1wkq6jcgvdqamhz0y"; + }; + }; + vim-closetag = buildVimPluginFrom2Nix { pname = "vim-closetag"; version = "2019-02-14"; diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index 5c3a8343792..6f2413955bf 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -105,6 +105,7 @@ google/vim-codefmt google/vim-jsonnet google/vim-maktaba gregsexton/gitv +guns/vim-clojure-highlight guns/xterm-color-table.vim hashivim/vim-terraform haya14busa/incsearch-easymotion.vim From ae74169450e6dd7cc54038e09eb1672be42a1685 Mon Sep 17 00:00:00 2001 From: Galen Abell Date: Tue, 29 Oct 2019 12:14:41 +0100 Subject: [PATCH 322/377] vimPlugins.vim-clojure-static: init at 2017-10-23 --- pkgs/misc/vim-plugins/generated.nix | 11 +++++++++++ pkgs/misc/vim-plugins/vim-plugin-names | 1 + 2 files changed, 12 insertions(+) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 1840d406c99..4ccc4c5b78b 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -3225,6 +3225,17 @@ let }; }; + vim-clojure-static = buildVimPluginFrom2Nix { + pname = "vim-clojure-static"; + version = "2017-10-23"; + src = fetchFromGitHub { + owner = "guns"; + repo = "vim-clojure-static"; + rev = "fae5710a0b79555fe3296145be4f85148266771a"; + sha256 = "0s98qrhv7xh7bvh8bm1vaxpw3n2mcxayay3k90ibgjrv1jpyvzx7"; + }; + }; + vim-closetag = buildVimPluginFrom2Nix { pname = "vim-closetag"; version = "2019-02-14"; diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index 6f2413955bf..aae059a0d0c 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -106,6 +106,7 @@ google/vim-jsonnet google/vim-maktaba gregsexton/gitv guns/vim-clojure-highlight +guns/vim-clojure-static guns/xterm-color-table.vim hashivim/vim-terraform haya14busa/incsearch-easymotion.vim From c07850c5cf7b6889a598dcd1947a77530c2fb605 Mon Sep 17 00:00:00 2001 From: Galen Abell Date: Tue, 29 Oct 2019 12:16:34 +0100 Subject: [PATCH 323/377] vimPlugins.vim-sexp: init at 2017-05-15 --- pkgs/misc/vim-plugins/generated.nix | 11 +++++++++++ pkgs/misc/vim-plugins/vim-plugin-names | 1 + 2 files changed, 12 insertions(+) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 4ccc4c5b78b..6491282dd7c 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -4777,6 +4777,17 @@ let }; }; + vim-sexp = buildVimPluginFrom2Nix { + pname = "vim-sexp"; + version = "2017-05-15"; + src = fetchFromGitHub { + owner = "guns"; + repo = "vim-sexp"; + rev = "12292941903d9ac8151513189d2007e1ccfc95f0"; + sha256 = "1mfqbmrbqgnsc34pmcsrc0c5zvgxhhnw4hx4g5wbssfk1ddyx6y0"; + }; + }; + vim-signature = buildVimPluginFrom2Nix { pname = "vim-signature"; version = "2018-07-06"; diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index aae059a0d0c..b47c72c1769 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -107,6 +107,7 @@ google/vim-maktaba gregsexton/gitv guns/vim-clojure-highlight guns/vim-clojure-static +guns/vim-sexp guns/xterm-color-table.vim hashivim/vim-terraform haya14busa/incsearch-easymotion.vim From 545bc458098b8df354381a1a94a15ae2875879ba Mon Sep 17 00:00:00 2001 From: Galen Abell Date: Tue, 29 Oct 2019 12:17:36 +0100 Subject: [PATCH 324/377] vimPlugins.vim-sexp-mappings-for-regular-people: init at 2014-11-04 --- pkgs/misc/vim-plugins/generated.nix | 11 +++++++++++ pkgs/misc/vim-plugins/vim-plugin-names | 1 + 2 files changed, 12 insertions(+) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 6491282dd7c..6dba76f858a 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -4788,6 +4788,17 @@ let }; }; + vim-sexp-mappings-for-regular-people = buildVimPluginFrom2Nix { + pname = "vim-sexp-mappings-for-regular-people"; + version = "2014-11-04"; + src = fetchFromGitHub { + owner = "tpope"; + repo = "vim-sexp-mappings-for-regular-people"; + rev = "f5b66e73c81a3b4c0c8f5a8141fb09a5a213f711"; + sha256 = "1kf3bkv9wppxgifybd972avdd2563ra2387n7qc6q72b2r9mx5aa"; + }; + }; + vim-signature = buildVimPluginFrom2Nix { pname = "vim-signature"; version = "2018-07-06"; diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index b47c72c1769..b8112e62100 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -437,6 +437,7 @@ tpope/vim-rsi tpope/vim-salve tpope/vim-scriptease tpope/vim-sensible +tpope/vim-sexp-mappings-for-regular-people tpope/vim-sleuth tpope/vim-speeddating tpope/vim-surround From 1cfd1d06d65eb59d3c44dde1ec3de0931954aa9b Mon Sep 17 00:00:00 2001 From: Galen Abell Date: Tue, 29 Oct 2019 12:19:05 +0100 Subject: [PATCH 325/377] vimPlugins.VimOrganizer: init at 2014-04-10 --- pkgs/misc/vim-plugins/generated.nix | 11 +++++++++++ pkgs/misc/vim-plugins/vim-plugin-names | 1 + 2 files changed, 12 insertions(+) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 6dba76f858a..7cdc8767d83 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -5382,6 +5382,17 @@ let }; }; + VimOrganizer = buildVimPluginFrom2Nix { + pname = "VimOrganizer"; + version = "2014-04-10"; + src = fetchFromGitHub { + owner = "hsitz"; + repo = "VimOrganizer"; + rev = "cab0baf635eb9470e62d57d42f2d470180b06c8d"; + sha256 = "0qncr00xn7lj1i469fzjaaghhqrlyg5s2wj4v6625dhg98y0irix"; + }; + }; + vimoutliner = buildVimPluginFrom2Nix { pname = "vimoutliner"; version = "2018-07-04"; diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index b8112e62100..650c5e7454f 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -120,6 +120,7 @@ HerringtonDarkholme/yats.vim honza/vim-snippets hotwatermorning/auto-git-diff hsanson/vim-android +hsitz/VimOrganizer ianks/vim-tsx icymind/NeoSolarized idris-hackers/idris-vim From 874201a86034c4074540eb033bfafeb35735562d Mon Sep 17 00:00:00 2001 From: Galen Abell Date: Wed, 6 Nov 2019 10:08:05 +0100 Subject: [PATCH 326/377] vimPlugins: fix vim-docbk-snippets naming clash --- pkgs/misc/vim-plugins/generated.nix | 11 +++++++++++ pkgs/misc/vim-plugins/overrides.nix | 11 ----------- pkgs/misc/vim-plugins/vim-plugin-names | 1 + 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 7cdc8767d83..7385c86ffdc 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -3445,6 +3445,17 @@ let }; }; + vim-docbk-snippets = buildVimPluginFrom2Nix { + pname = "vim-docbk-snippets"; + version = "2019-09-13"; + src = fetchFromGitHub { + owner = "jhradilek"; + repo = "vim-snippets"; + rev = "b8604893f46f6c570a55efff733f0371ac8a805d"; + sha256 = "1qz3azgzv9718s2a6h8xw5nrvs4j776csmzsn9chvykdpx8rwim1"; + }; + }; + vim-easy-align = buildVimPluginFrom2Nix { pname = "vim-easy-align"; version = "2019-04-29"; diff --git a/pkgs/misc/vim-plugins/overrides.nix b/pkgs/misc/vim-plugins/overrides.nix index 4d127c20e31..0c05217b819 100644 --- a/pkgs/misc/vim-plugins/overrides.nix +++ b/pkgs/misc/vim-plugins/overrides.nix @@ -80,17 +80,6 @@ self: super: { ''; }; - # do not auto-update this one, as the name clashes with vim-snippets - vim-docbk-snippets = buildVimPluginFrom2Nix { - pname = "vim-docbk-snippets"; - version = "2017-11-02"; - src = fetchgit { - url = "https://github.com/jhradilek/vim-snippets"; - rev = "69cce66defdf131958f152ea7a7b26c21ca9d009"; - sha256 = "1363b2fmv69axrl2hm74dmx51cqd8k7rk116890qllnapzw1zjgc"; - }; - }; - clang_complete = super.clang_complete.overrideAttrs(old: { # In addition to the arguments you pass to your compiler, you also need to # specify the path of the C++ std header (if you are using C++). diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index 650c5e7454f..57f265775f6 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -143,6 +143,7 @@ jeffkreeftmeijer/neovim-sensible jelera/vim-javascript-syntax jgdavey/tslime.vim jhradilek/vim-docbk +jhradilek/vim-snippets as vim-docbk-snippets jiangmiao/auto-pairs jistr/vim-nerdtree-tabs jlanzarotta/bufexplorer From 2e52f98ddbe9ddd91f65f8df471d84e1e4077bdf Mon Sep 17 00:00:00 2001 From: Yurii Rashkovskii Date: Thu, 10 Oct 2019 20:09:26 +0700 Subject: [PATCH 327/377] streamlit: init at 0.49.0 --- .../machine-learning/streamlit/default.nix | 34 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/applications/science/machine-learning/streamlit/default.nix diff --git a/pkgs/applications/science/machine-learning/streamlit/default.nix b/pkgs/applications/science/machine-learning/streamlit/default.nix new file mode 100644 index 00000000000..f3d142739b8 --- /dev/null +++ b/pkgs/applications/science/machine-learning/streamlit/default.nix @@ -0,0 +1,34 @@ +{ lib, buildPythonApplication, fetchPypi + , altair, astor, base58, blinker, boto3, botocore, click, enum-compat + , future, pillow, protobuf, requests, toml, tornado, tzlocal, validators, watchdog + , jinja2, setuptools +}: + +buildPythonApplication rec { + pname = "streamlit"; + version = "0.49.0"; + format = "wheel"; # the only distribution available + + src = fetchPypi { + inherit pname version format; + sha256 = "1g12z93yh85vcgf3g9banshllr5fhz8i4f9llymcnk6mafvcsiv7"; + }; + + propagatedBuildInputs = [ + altair astor base58 blinker boto3 botocore click enum-compat + future pillow protobuf requests toml tornado tzlocal validators watchdog + jinja2 setuptools + ]; + + postInstall = '' + rm $out/bin/streamlit.cmd # remove windows helper + ''; + + meta = with lib; { + homepage = https://streamlit.io/; + description = "The fastest way to build custom ML tools"; + maintainers = with maintainers; [ yrashk ]; + license = licenses.asl20; + }; + +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e0a6b21a162..83a183e3671 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -22900,6 +22900,8 @@ in ffmpeg = ffmpeg_2; }; + streamlit = python3Packages.callPackage ../applications/science/machine-learning/streamlit { }; + stuntrally = callPackage ../games/stuntrally { ogre = ogre1_9; mygui = mygui.override { From 7456f19b40ddd9008275e75c9258e9c3bad38f66 Mon Sep 17 00:00:00 2001 From: davidak Date: Wed, 6 Nov 2019 20:12:11 +0100 Subject: [PATCH 328/377] nlohmann_json: disable tests for now since they timeout --- pkgs/development/libraries/nlohmann_json/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/nlohmann_json/default.nix b/pkgs/development/libraries/nlohmann_json/default.nix index 3a51c2ec72b..72d425e8918 100644 --- a/pkgs/development/libraries/nlohmann_json/default.nix +++ b/pkgs/development/libraries/nlohmann_json/default.nix @@ -21,7 +21,9 @@ stdenv.mkDerivation rec { "-DJSON_MultipleHeaders=ON" ]; - doCheck = stdenv.hostPlatform == stdenv.buildPlatform; + # A test cause the build to timeout https://github.com/nlohmann/json/issues/1816 + #doCheck = stdenv.hostPlatform == stdenv.buildPlatform; + doCheck = false; postInstall = "rm -rf $out/lib64"; From 98b0f8c851377ca7dd568080eb689be883a31646 Mon Sep 17 00:00:00 2001 From: "Tristan Helmich (omniIT)" Date: Wed, 6 Nov 2019 20:19:53 +0000 Subject: [PATCH 329/377] graylog: 3.1.2 -> 3.1.3 --- pkgs/tools/misc/graylog/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/graylog/default.nix b/pkgs/tools/misc/graylog/default.nix index 52e712c5cb1..d56f44aacef 100644 --- a/pkgs/tools/misc/graylog/default.nix +++ b/pkgs/tools/misc/graylog/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "graylog"; - version = "3.1.2"; + version = "3.1.3"; src = fetchurl { url = "https://packages.graylog2.org/releases/graylog/graylog-${version}.tgz"; - sha256 = "14zr1aln34j5wifhg6ak3f83l959vic8i11jr90ibmnxl5v4hcqp"; + sha256 = "0jwfq9q10nz6fy9ac2j4fcf0liz4vj0q7jmfhy9dsa3476zccwa8"; }; dontBuild = true; From 894fdfaf1fbcdd9e584ca655a2229f62d9d7c830 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 6 Nov 2019 18:54:56 +0100 Subject: [PATCH 330/377] nixos/networkmanager: fix merging options Incorrect merging of modules resulted in dhcpcd being enabled causing flaky network connection. https://github.com/NixOS/nixpkgs/pull/64364 Fixing it uncovered an infinite recursion from the same commit, previously masked by the incorrect merge. We can just drop the `mkDefault` for `networking.wireless.enable` as it is already `false` by default. Closes: https://github.com/NixOS/nixpkgs/issues/72416 --- .../services/networking/networkmanager.nix | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/nixos/modules/services/networking/networkmanager.nix b/nixos/modules/services/networking/networkmanager.nix index 918bf891b10..90d1032c41b 100644 --- a/nixos/modules/services/networking/networkmanager.nix +++ b/nixos/modules/services/networking/networkmanager.nix @@ -456,15 +456,19 @@ in { }; # Turn off NixOS' network management when networking is managed entirely by NetworkManager - networking = (mkIf (!delegateWireless) { - useDHCP = false; - # Use mkDefault to trigger the assertion about the conflict above - wireless.enable = mkDefault false; - }) // (mkIf cfg.enableStrongSwan { - networkmanager.packages = [ pkgs.networkmanager_strongswan ]; - }) // (mkIf enableIwd { - wireless.iwd.enable = true; - }); + networking = mkMerge [ + (mkIf (!delegateWireless) { + useDHCP = false; + }) + + (mkIf cfg.enableStrongSwan { + networkmanager.packages = [ pkgs.networkmanager_strongswan ]; + }) + + (mkIf enableIwd { + wireless.iwd.enable = true; + }) + ]; security.polkit.extraConfig = polkitConf; From cf138b4e6b7a7ba2ea7d27310b5a564b91804c68 Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Wed, 6 Nov 2019 21:48:08 +0100 Subject: [PATCH 331/377] nixos/tests: Fix subprocess launch call for VM monitor This crashed in the create-script case --- nixos/lib/test-driver/test-driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py index c6baf75003a..28065cd60a9 100644 --- a/nixos/lib/test-driver/test-driver.py +++ b/nixos/lib/test-driver/test-driver.py @@ -588,7 +588,7 @@ class Machine: stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, - shell=False, + shell=True, cwd=self.state_dir, env=environment, ) From 8b8db86860fe2d51ebcfb0b005ff28d0a9ae669b Mon Sep 17 00:00:00 2001 From: Merijn Broeren Date: Wed, 6 Nov 2019 19:05:08 +0000 Subject: [PATCH 332/377] Revert "python: jupyter_console: 5.2.0 -> 6.0.0" This reverts commit dc4eb2fc5e6c2731dd61e75aa7823f91aa29bf31. It was added in a large PR (#71893) by @fridh, where he already predicted some of the changes would have to be reverted. This is an obvious one, it breaks python 2.7 compatibility, as that needs 5.x of jupyter_console. --- pkgs/development/python-modules/jupyter_console/5.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/jupyter_console/5.nix b/pkgs/development/python-modules/jupyter_console/5.nix index abb162cd518..440f22b1332 100644 --- a/pkgs/development/python-modules/jupyter_console/5.nix +++ b/pkgs/development/python-modules/jupyter_console/5.nix @@ -11,11 +11,11 @@ buildPythonPackage rec { pname = "jupyter_console"; - version = "6.0.0"; + version = "5.2.0"; src = fetchPypi { inherit pname version; - sha256 = "308ce876354924fb6c540b41d5d6d08acfc946984bf0c97777c1ddcb42e0b2f5"; + sha256 = "545dedd3aaaa355148093c5609f0229aeb121b4852995c2accfa64fe3e0e55cd"; }; checkInputs = [ nose ]; From 58975005b2862ae72c96622f860c2d643d51f365 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Wed, 6 Nov 2019 16:20:00 -0500 Subject: [PATCH 333/377] gitAndTools.hub: 2.12.8 -> 2.13.0 Changelog: https://github.com/github/hub/releases/tag/v2.13.0 --- .../version-management/git-and-tools/hub/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/git-and-tools/hub/default.nix b/pkgs/applications/version-management/git-and-tools/hub/default.nix index e40bfc9961b..ee21a2158ac 100644 --- a/pkgs/applications/version-management/git-and-tools/hub/default.nix +++ b/pkgs/applications/version-management/git-and-tools/hub/default.nix @@ -2,7 +2,7 @@ buildGoPackage rec { pname = "hub"; - version = "2.12.8"; + version = "2.13.0"; goPackagePath = "github.com/github/hub"; @@ -13,7 +13,7 @@ buildGoPackage rec { owner = "github"; repo = pname; rev = "v${version}"; - sha256 = "0a2dpg0w29nblk1dba9a35bpwwyf0zbqcgrwn4a8diyx27b77x3x"; + sha256 = "18b0r16fk5wahvysqvg6vzjr7smyc2sdxp9sf55viby3kkwjfbkh"; }; nativeBuildInputs = [ groff utillinux ]; From b8a18cf1c7ae610287996d5cd6b259862d9df755 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Wed, 6 Nov 2019 13:33:43 -0800 Subject: [PATCH 334/377] pidgin-sipe: 1.24.0 -> 1.25.0 * pidgin-sipe: 1.24.0 -> 1.25.0 (#71773) Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/pidgin-sipe/versions --- .../instant-messengers/pidgin-plugins/sipe/default.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/pidgin-plugins/sipe/default.nix b/pkgs/applications/networking/instant-messengers/pidgin-plugins/sipe/default.nix index 6180f531f47..3d1a6ac534c 100644 --- a/pkgs/applications/networking/instant-messengers/pidgin-plugins/sipe/default.nix +++ b/pkgs/applications/networking/instant-messengers/pidgin-plugins/sipe/default.nix @@ -2,21 +2,18 @@ stdenv.mkDerivation rec { pname = "pidgin-sipe"; - version = "1.24.0"; + version = "1.25.0"; src = fetchurl { url = "mirror://sourceforge/sipe/${pname}-${version}.tar.gz"; - sha256 = "04cxprz6dbcsc4n2jg72mr1r9630nhrywn0zim9kwvbgps3wdd9c"; + sha256 = "0262sz00iqxylx0xfyr48xikhiqzr8pg7b4b7vwj5iv4qxpxv939"; }; nativeBuildInputs = [ intltool ]; buildInputs = [ pidgin gmime libxml2 nss ]; enableParallelBuilding = true; - # glib-2.62 deprecations - NIX_CFLAGS_COMPILE = [ "-DGLIB_DISABLE_DEPRECATION_WARNINGS" ]; - - postInstall = "find $out -ls; ln -s \$out/lib/purple-2 \$out/share/pidgin-sipe"; + postInstall = "ln -s \$out/lib/purple-2 \$out/share/pidgin-sipe"; meta = with stdenv.lib; { description = "SIPE plugin for Pidgin IM"; From 61dda301bf6dfdd5ec0e9a28591ced4b0288d639 Mon Sep 17 00:00:00 2001 From: chessai Date: Mon, 28 Oct 2019 02:25:49 -0400 Subject: [PATCH 335/377] arrayfire: update - Depend on `clfft`, `clblas`, and `opencl-clhpp` from nixpkgs (do not fetch their sources) - Add `buildDocs` flag. When set to true, arrayfire's docs will be built using `doxygen`. - Ensure that `cudatoolkit` is not evaluated on darwin. - Move `python` from `buildInputs` to `nativeBuildInputs`. - Meta: Shrink `description` and add `longDescription`. - Meta: `homepage` formatting now adheres to nixpkgs manual. - Meta: remove version - A few minour syntactic-only changes. --- .../libraries/arrayfire/default.nix | 56 +++++++------------ 1 file changed, 20 insertions(+), 36 deletions(-) diff --git a/pkgs/development/libraries/arrayfire/default.nix b/pkgs/development/libraries/arrayfire/default.nix index 17f43a9ddfa..6e2db870068 100644 --- a/pkgs/development/libraries/arrayfire/default.nix +++ b/pkgs/development/libraries/arrayfire/default.nix @@ -1,36 +1,16 @@ { stdenv, fetchurl, fetchFromGitHub, cmake, pkgconfig , cudatoolkit, opencl-clhpp, ocl-icd, fftw, fftwFloat, mkl , blas, openblas, boost, mesa, libGLU_combined -, freeimage, python +, freeimage, python, clfft, clblas +, doxygen, buildDocs ? false }: let - version = "3.6.4"; + strOnLinux = stdenv.lib.optionalString stdenv.isLinux; - clfftSource = fetchFromGitHub { - owner = "arrayfire"; - repo = "clFFT"; - rev = "16925fb93338b3cac66490b5cf764953d6a5dac7"; - sha256 = "0y35nrdz7w4n1l17myhkni3hwm37z775xn6f76xmf1ph7dbkslsc"; - fetchSubmodules = true; - }; - - clblasSource = fetchFromGitHub { - owner = "arrayfire"; - repo = "clBLAS"; - rev = "1f3de2ae5582972f665c685b18ef0df43c1792bb"; - sha256 = "154mz52r5hm0jrp5fqrirzzbki14c1jkacj75flplnykbl36ibjs"; - fetchSubmodules = true; - }; - - cl2hppSource = fetchurl { - url = "https://github.com/KhronosGroup/OpenCL-CLHPP/releases/download/v2.0.10/cl2.hpp"; - sha256 = "1v4q0g6b6mwwsi0kn7kbjn749j3qafb9r4ld3zdq1163ln9cwnvw"; - }; - -in stdenv.mkDerivation { +in stdenv.mkDerivation rec { pname = "arrayfire"; - inherit version; + version = "3.6.4"; src = fetchurl { url = "http://arrayfire.com/arrayfire_source/arrayfire-full-${version}.tar.bz2"; @@ -41,21 +21,21 @@ in stdenv.mkDerivation { "-DAF_BUILD_OPENCL=OFF" "-DAF_BUILD_EXAMPLES=OFF" "-DBUILD_TESTING=OFF" - "-DCMAKE_LIBRARY_PATH=${cudatoolkit}/lib/stubs" + (strOnLinux "-DCMAKE_LIBRARY_PATH=${cudatoolkit}/lib/stubs") ]; patches = [ ./no-download.patch ]; postPatch = '' mkdir -p ./build/third_party/clFFT/src - cp -R --no-preserve=mode,ownership ${clfftSource}/ ./build/third_party/clFFT/src/clFFT-ext/ + cp -R --no-preserve=mode,ownership ${clfft.src}/ ./build/third_party/clFFT/src/clFFT-ext/ mkdir -p ./build/third_party/clBLAS/src - cp -R --no-preserve=mode,ownership ${clblasSource}/ ./build/third_party/clBLAS/src/clBLAS-ext/ + cp -R --no-preserve=mode,ownership ${clblas.src}/ ./build/third_party/clBLAS/src/clBLAS-ext/ mkdir -p ./build/include/CL - cp -R --no-preserve=mode,ownership ${cl2hppSource} ./build/include/CL/cl2.hpp + cp -R --no-preserve=mode,ownership ${opencl-clhpp}/include/CL/cl2.hpp ./build/include/CL/cl2.hpp ''; - preBuild = '' + preBuild = strOnLinux '' export CUDA_PATH="${cudatoolkit}" ''; @@ -64,6 +44,7 @@ in stdenv.mkDerivation { nativeBuildInputs = [ cmake pkgconfig + python ]; buildInputs = [ @@ -72,15 +53,18 @@ in stdenv.mkDerivation { openblas libGLU_combined mesa freeimage - boost.out boost.dev python - ] ++ (stdenv.lib.optional stdenv.isLinux [ cudatoolkit ocl-icd ]); + boost.out boost.dev + ] ++ (stdenv.lib.optional stdenv.isLinux [ cudatoolkit ocl-icd ]) + ++ (stdenv.lib.optional buildDocs [ doxygen ]); meta = with stdenv.lib; { - description = "A general-purpose library that simplifies the process of developing software that targets parallel and massively-parallel architectures including CPUs, GPUs, and other hardware acceleration devices"; + description = "A general-purpose library for parallel and massively-parallel computations"; + longDescription = '' + A general-purpose library that simplifies the process of developing software that targets parallel and massively-parallel architectures including CPUs, GPUs, and other hardware acceleration devices."; + ''; license = licenses.bsd3; - homepage = https://arrayfire.com/ ; + homepage = "https://arrayfire.com/"; platforms = platforms.linux ++ platforms.darwin; - maintainers = with stdenv.lib.maintainers; [ chessai ]; - inherit version; + maintainers = with maintainers; [ chessai ]; }; } From 92216681ccb5b4424bdcab14e0081ba8209a4186 Mon Sep 17 00:00:00 2001 From: Daniel Schaefer Date: Wed, 6 Nov 2019 19:48:14 +0100 Subject: [PATCH 336/377] apache-directory-studio: 2.0.0.v20170904-M13 -> 2.0.0-M14 --- .../networking/apache-directory-studio/default.nix | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/networking/apache-directory-studio/default.nix b/pkgs/applications/networking/apache-directory-studio/default.nix index ce5c7fb41f1..0c8136724ff 100644 --- a/pkgs/applications/networking/apache-directory-studio/default.nix +++ b/pkgs/applications/networking/apache-directory-studio/default.nix @@ -14,22 +14,23 @@ let genericName = "Apache Directory Studio"; categories = "Java;Network"; }; - + version = "2.0.0-M14"; + versionWithDate = "2.0.0.v20180908-M14"; in stdenv.mkDerivation rec { pname = "apache-directory-studio"; - version = "2.0.0.v20170904-M13"; + inherit version; src = if stdenv.hostPlatform.system == "x86_64-linux" then fetchurl { - url = "mirror://apache/directory/studio/${version}/ApacheDirectoryStudio-${version}-linux.gtk.x86_64.tar.gz"; - sha256 = "1jfnm6m0ijk31r30hhrxxnizk742dm317iny041p29v897rma7aq"; + url = "mirror://apache/directory/studio/${versionWithDate}/ApacheDirectoryStudio-${versionWithDate}-linux.gtk.x86_64.tar.gz"; + sha256 = "0kq4l3755q69p7bry9xpm5xxw56ksncp76fdqqd1xzbvsg309bps"; } else if stdenv.hostPlatform.system == "i686-linux" then fetchurl { - url = "mirror://apache/directory/studio/${version}/ApacheDirectoryStudio-${version}-linux.gtk.x86.tar.gz"; - sha256 = "1bxmgram42qyhrqkgp5k8770f5mjjdd4c6xl4gj09smiycm1qa4n"; + url = "mirror://apache/directory/studio/${versionWithDate}/ApacheDirectoryStudio-${versionWithDate}-linux.gtk.x86.tar.gz"; + sha256 = "038dy8jjgq5gj5r56y9ps3ycqi9gn57i4q1r3mmjx1b1950wmh1q"; } else throw "Unsupported system: ${stdenv.hostPlatform.system}"; From 997bd95b3be694042e9fe940ae8237603ceed441 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 7 Nov 2019 00:37:10 +0100 Subject: [PATCH 337/377] python3Packages.todoist: 8.1.0 -> 8.1.1 --- pkgs/development/python-modules/todoist/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/todoist/default.nix b/pkgs/development/python-modules/todoist/default.nix index 0a32118338e..08ea37f4ba1 100644 --- a/pkgs/development/python-modules/todoist/default.nix +++ b/pkgs/development/python-modules/todoist/default.nix @@ -3,11 +3,11 @@ buildPythonPackage rec { pname = "todoist-python"; - version = "8.1.0"; + version = "8.1.1"; src = fetchPypi { inherit pname version; - sha256 = "0f4d402137f02f415f99acaa9d7ab24016687202dec9a191aee4745a9ce67dc6"; + sha256 = "0khipf8v0gqvspq7m67aqv0ql3rdqyqr8qfhbm1szc1z6mygj8ns"; }; propagatedBuildInputs = [ requests ]; From 7d331eae2e7e12aff69b39304cfa03702f013c7f Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Tue, 5 Nov 2019 14:42:44 -0500 Subject: [PATCH 338/377] nixosTests.packagekit: port to python --- nixos/tests/packagekit.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/nixos/tests/packagekit.nix b/nixos/tests/packagekit.nix index e2d68af661f..7e93ad35e80 100644 --- a/nixos/tests/packagekit.nix +++ b/nixos/tests/packagekit.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ... }: { +import ./make-test-python.nix ({ pkgs, ... }: { name = "packagekit"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ peterhoeg ]; @@ -13,12 +13,14 @@ import ./make-test.nix ({ pkgs, ... }: { }; testScript = '' - startAll; + start_all() # send a dbus message to activate the service - $machine->succeed("dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.PackageKit /org/freedesktop/PackageKit org.freedesktop.DBus.Introspectable.Introspect"); + machine.succeed( + "dbus-send --system --type=method_call --print-reply --dest=org.freedesktop.PackageKit /org/freedesktop/PackageKit org.freedesktop.DBus.Introspectable.Introspect" + ) # so now it should be running - $machine->succeed("systemctl is-active packagekit.service"); + machine.wait_for_unit("packagekit.service") ''; }) From ceec19f682c6fe3507e47f7bbb6af0e34a3cdbd3 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Tue, 5 Nov 2019 16:13:16 -0500 Subject: [PATCH 339/377] nixosTests.udisks2: port to python --- nixos/tests/udisks2.nix | 44 ++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/nixos/tests/udisks2.nix b/nixos/tests/udisks2.nix index dcf869908d8..0cbfa0c4c7b 100644 --- a/nixos/tests/udisks2.nix +++ b/nixos/tests/udisks2.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ pkgs, ... }: +import ./make-test-python.nix ({ pkgs, ... }: let @@ -30,32 +30,40 @@ in testScript = '' - my $stick = $machine->stateDir . "/usbstick.img"; - system("xz -d < ${stick} > $stick") == 0 or die; + import lzma - $machine->succeed("udisksctl info -b /dev/vda >&2"); - $machine->fail("udisksctl info -b /dev/sda1"); + with lzma.open( + "${stick}" + ) as data, open(machine.state_dir + "/usbstick.img", "wb") as stick: + stick.write(data.read()) + + machine.succeed("udisksctl info -b /dev/vda >&2") + machine.fail("udisksctl info -b /dev/sda1") # Attach a USB stick and wait for it to show up. - $machine->sendMonitorCommand("drive_add 0 id=stick,if=none,file=$stick,format=raw"); - $machine->sendMonitorCommand("device_add usb-storage,id=stick,drive=stick"); - $machine->waitUntilSucceeds("udisksctl info -b /dev/sda1"); - $machine->succeed("udisksctl info -b /dev/sda1 | grep 'IdLabel:.*USBSTICK'"); + machine.send_monitor_command( + f"drive_add 0 id=stick,if=none,file={stick.name},format=raw" + ) + machine.send_monitor_command("device_add usb-storage,id=stick,drive=stick") + machine.wait_until_succeeds("udisksctl info -b /dev/sda1") + machine.succeed("udisksctl info -b /dev/sda1 | grep 'IdLabel:.*USBSTICK'") # Mount the stick as a non-root user and do some stuff with it. - $machine->succeed("su - alice -c 'udisksctl info -b /dev/sda1'"); - $machine->succeed("su - alice -c 'udisksctl mount -b /dev/sda1'"); - $machine->succeed("su - alice -c 'cat /run/media/alice/USBSTICK/test.txt'") =~ /Hello World/ or die; - $machine->succeed("su - alice -c 'echo foo > /run/media/alice/USBSTICK/bar.txt'"); + machine.succeed("su - alice -c 'udisksctl info -b /dev/sda1'") + machine.succeed("su - alice -c 'udisksctl mount -b /dev/sda1'") + machine.succeed( + "su - alice -c 'cat /run/media/alice/USBSTICK/test.txt' | grep -q 'Hello World'" + ) + machine.succeed("su - alice -c 'echo foo > /run/media/alice/USBSTICK/bar.txt'") # Unmounting the stick should make the mountpoint disappear. - $machine->succeed("su - alice -c 'udisksctl unmount -b /dev/sda1'"); - $machine->fail("[ -d /run/media/alice/USBSTICK ]"); + machine.succeed("su - alice -c 'udisksctl unmount -b /dev/sda1'") + machine.fail("[ -d /run/media/alice/USBSTICK ]") # Remove the USB stick. - $machine->sendMonitorCommand("device_del stick"); - $machine->waitUntilFails("udisksctl info -b /dev/sda1"); - $machine->fail("[ -e /dev/sda ]"); + machine.send_monitor_command("device_del stick") + machine.wait_until_fails("udisksctl info -b /dev/sda1") + machine.fail("[ -e /dev/sda ]") ''; }) From eee5986ac3c77d045016165c67bfcda8c9cfc795 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Tue, 5 Nov 2019 19:56:21 -0500 Subject: [PATCH 340/377] nixos/tests: add gnome-installed-tests with builder function The test script is also ported to python. --- nixos/tests/all-tests.nix | 11 +-- nixos/tests/colord.nix | 18 ----- nixos/tests/flatpak-builder.nix | 20 ----- nixos/tests/flatpak.nix | 26 ------- nixos/tests/fwupd.nix | 21 ----- nixos/tests/gdk-pixbuf.nix | 21 ----- nixos/tests/gjs.nix | 19 ----- nixos/tests/glib-networking.nix | 17 ---- nixos/tests/gnome-photos.nix | 42 ---------- nixos/tests/graphene.nix | 18 ----- nixos/tests/installed-tests/colord.nix | 5 ++ nixos/tests/installed-tests/default.nix | 77 +++++++++++++++++++ .../tests/installed-tests/flatpak-builder.nix | 14 ++++ nixos/tests/installed-tests/flatpak.nix | 19 +++++ nixos/tests/installed-tests/fwupd.nix | 12 +++ nixos/tests/installed-tests/gdk-pixbuf.nix | 13 ++++ nixos/tests/installed-tests/gjs.nix | 6 ++ .../tests/installed-tests/glib-networking.nix | 5 ++ nixos/tests/installed-tests/gnome-photos.nix | 35 +++++++++ nixos/tests/installed-tests/graphene.nix | 5 ++ nixos/tests/installed-tests/ostree.nix | 23 ++++++ .../installed-tests/xdg-desktop-portal.nix | 5 ++ nixos/tests/ostree.nix | 21 ----- nixos/tests/xdg-desktop-portal.nix | 17 ---- 24 files changed, 220 insertions(+), 250 deletions(-) delete mode 100644 nixos/tests/colord.nix delete mode 100644 nixos/tests/flatpak-builder.nix delete mode 100644 nixos/tests/flatpak.nix delete mode 100644 nixos/tests/fwupd.nix delete mode 100644 nixos/tests/gdk-pixbuf.nix delete mode 100644 nixos/tests/gjs.nix delete mode 100644 nixos/tests/glib-networking.nix delete mode 100644 nixos/tests/gnome-photos.nix delete mode 100644 nixos/tests/graphene.nix create mode 100644 nixos/tests/installed-tests/colord.nix create mode 100644 nixos/tests/installed-tests/default.nix create mode 100644 nixos/tests/installed-tests/flatpak-builder.nix create mode 100644 nixos/tests/installed-tests/flatpak.nix create mode 100644 nixos/tests/installed-tests/fwupd.nix create mode 100644 nixos/tests/installed-tests/gdk-pixbuf.nix create mode 100644 nixos/tests/installed-tests/gjs.nix create mode 100644 nixos/tests/installed-tests/glib-networking.nix create mode 100644 nixos/tests/installed-tests/gnome-photos.nix create mode 100644 nixos/tests/installed-tests/graphene.nix create mode 100644 nixos/tests/installed-tests/ostree.nix create mode 100644 nixos/tests/installed-tests/xdg-desktop-portal.nix delete mode 100644 nixos/tests/ostree.nix delete mode 100644 nixos/tests/xdg-desktop-portal.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 5e7c8a7f4b5..fa065197916 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -48,7 +48,6 @@ in clickhouse = handleTest ./clickhouse.nix {}; cloud-init = handleTest ./cloud-init.nix {}; codimd = handleTest ./codimd.nix {}; - colord = handleTest ./colord.nix {}; containers-bridge = handleTest ./containers-bridge.nix {}; containers-ephemeral = handleTest ./containers-ephemeral.nix {}; containers-extra_veth = handleTest ./containers-extra_veth.nix {}; @@ -88,27 +87,21 @@ in firewall = handleTest ./firewall.nix {}; fish = handleTest ./fish.nix {}; flannel = handleTestOn ["x86_64-linux"] ./flannel.nix {}; - flatpak = handleTest ./flatpak.nix {}; - flatpak-builder = handleTest ./flatpak-builder.nix {}; fluentd = handleTest ./fluentd.nix {}; fontconfig-default-fonts = handleTest ./fontconfig-default-fonts.nix {}; fsck = handleTest ./fsck.nix {}; - fwupd = handleTestOn ["x86_64-linux"] ./fwupd.nix {}; # libsmbios is unsupported on aarch64 - gdk-pixbuf = handleTest ./gdk-pixbuf.nix {}; gotify-server = handleTest ./gotify-server.nix {}; gitea = handleTest ./gitea.nix {}; gitlab = handleTest ./gitlab.nix {}; gitolite = handleTest ./gitolite.nix {}; gjs = handleTest ./gjs.nix {}; - glib-networking = handleTest ./glib-networking.nix {}; glusterfs = handleTest ./glusterfs.nix {}; gnome3-xorg = handleTest ./gnome3-xorg.nix {}; gnome3 = handleTest ./gnome3.nix {}; - gnome-photos = handleTest ./gnome-photos.nix {}; + installed-tests = pkgs.recurseIntoAttrs (handleTest ./installed-tests {}); gocd-agent = handleTest ./gocd-agent.nix {}; gocd-server = handleTest ./gocd-server.nix {}; google-oslogin = handleTest ./google-oslogin {}; - graphene = handleTest ./graphene.nix {}; grafana = handleTest ./grafana.nix {}; graphite = handleTest ./graphite.nix {}; graylog = handleTest ./graylog.nix {}; @@ -216,7 +209,6 @@ in os-prober = handleTestOn ["x86_64-linux"] ./os-prober.nix {}; osquery = handleTest ./osquery.nix {}; osrm-backend = handleTest ./osrm-backend.nix {}; - ostree = handleTest ./ostree.nix {}; overlayfs = handleTest ./overlayfs.nix {}; packagekit = handleTest ./packagekit.nix {}; pam-oath-login = handleTest ./pam-oath-login.nix {}; @@ -291,7 +283,6 @@ in wireguard-generated = handleTest ./wireguard/generated.nix {}; wordpress = handleTest ./wordpress.nix {}; xautolock = handleTest ./xautolock.nix {}; - xdg-desktop-portal = handleTest ./xdg-desktop-portal.nix {}; xfce = handleTest ./xfce.nix {}; xfce4-14 = handleTest ./xfce4-14.nix {}; xmonad = handleTest ./xmonad.nix {}; diff --git a/nixos/tests/colord.nix b/nixos/tests/colord.nix deleted file mode 100644 index ce38aaca4bf..00000000000 --- a/nixos/tests/colord.nix +++ /dev/null @@ -1,18 +0,0 @@ -# run installed tests -import ./make-test.nix ({ pkgs, ... }: - -{ - name = "colord"; - - meta = { - maintainers = pkgs.colord.meta.maintainers; - }; - - machine = { pkgs, ... }: { - environment.systemPackages = with pkgs; [ gnome-desktop-testing ]; - }; - - testScript = '' - $machine->succeed("gnome-desktop-testing-runner -d '${pkgs.colord.installedTests}/share'"); - ''; -}) diff --git a/nixos/tests/flatpak-builder.nix b/nixos/tests/flatpak-builder.nix deleted file mode 100644 index 49b97e8ca99..00000000000 --- a/nixos/tests/flatpak-builder.nix +++ /dev/null @@ -1,20 +0,0 @@ -# run installed tests -import ./make-test.nix ({ pkgs, ... }: - -{ - name = "flatpak-builder"; - meta = { - maintainers = pkgs.flatpak-builder.meta.maintainers; - }; - - machine = { pkgs, ... }: { - services.flatpak.enable = true; - xdg.portal.enable = true; - environment.systemPackages = with pkgs; [ gnome-desktop-testing flatpak-builder ] ++ flatpak-builder.installedTestsDependencies; - virtualisation.diskSize = 2048; - }; - - testScript = '' - $machine->succeed("gnome-desktop-testing-runner -d '${pkgs.flatpak-builder.installedTests}/share' --timeout 3600"); - ''; -}) diff --git a/nixos/tests/flatpak.nix b/nixos/tests/flatpak.nix deleted file mode 100644 index b0c61830d05..00000000000 --- a/nixos/tests/flatpak.nix +++ /dev/null @@ -1,26 +0,0 @@ -# run installed tests -import ./make-test.nix ({ pkgs, ... }: - -{ - name = "flatpak"; - meta = { - maintainers = pkgs.flatpak.meta.maintainers; - }; - - machine = { pkgs, ... }: { - imports = [ ./common/x11.nix ]; - services.xserver.desktopManager.gnome3.enable = true; # TODO: figure out minimal environment where the tests work - # common/x11.nix enables the auto display manager (lightdm) - services.xserver.displayManager.gdm.enable = false; - environment.gnome3.excludePackages = pkgs.gnome3.optionalPackages; - services.flatpak.enable = true; - environment.systemPackages = with pkgs; [ gnupg gnome-desktop-testing ostree python2 ]; - virtualisation.memorySize = 2047; - virtualisation.diskSize = 1024; - }; - - testScript = '' - $machine->waitForX(); - $machine->succeed("gnome-desktop-testing-runner -d '${pkgs.flatpak.installedTests}/share' --timeout 3600"); - ''; -}) diff --git a/nixos/tests/fwupd.nix b/nixos/tests/fwupd.nix deleted file mode 100644 index 88dac8ccbcd..00000000000 --- a/nixos/tests/fwupd.nix +++ /dev/null @@ -1,21 +0,0 @@ -# run installed tests -import ./make-test.nix ({ pkgs, ... }: { - name = "fwupd"; - - meta = { - maintainers = pkgs.fwupd.meta.maintainers; - }; - - machine = { pkgs, ... }: { - services.fwupd.enable = true; - services.fwupd.blacklistPlugins = []; # don't blacklist test plugin - services.fwupd.enableTestRemote = true; - environment.systemPackages = with pkgs; [ gnome-desktop-testing ]; - environment.variables.XDG_DATA_DIRS = [ "${pkgs.fwupd.installedTests}/share" ]; - virtualisation.memorySize = 768; - }; - - testScript = '' - $machine->succeed("gnome-desktop-testing-runner"); - ''; -}) diff --git a/nixos/tests/gdk-pixbuf.nix b/nixos/tests/gdk-pixbuf.nix deleted file mode 100644 index 9a62b593f46..00000000000 --- a/nixos/tests/gdk-pixbuf.nix +++ /dev/null @@ -1,21 +0,0 @@ -# run installed tests -import ./make-test.nix ({ pkgs, ... }: { - name = "gdk-pixbuf"; - - meta = { - maintainers = pkgs.gdk-pixbuf.meta.maintainers; - }; - - machine = { pkgs, ... }: { - environment.systemPackages = with pkgs; [ gnome-desktop-testing ]; - environment.variables.XDG_DATA_DIRS = [ "${pkgs.gdk-pixbuf.installedTests}/share" ]; - - # Tests allocate a lot of memory trying to exploit a CVE - # but qemu-system-i386 has a 2047M memory limit - virtualisation.memorySize = if pkgs.stdenv.isi686 then 2047 else 4096; - }; - - testScript = '' - $machine->succeed("gnome-desktop-testing-runner -t 1800"); # increase timeout to 1800s - ''; -}) diff --git a/nixos/tests/gjs.nix b/nixos/tests/gjs.nix deleted file mode 100644 index 87c8d7f2817..00000000000 --- a/nixos/tests/gjs.nix +++ /dev/null @@ -1,19 +0,0 @@ -# run installed tests -import ./make-test.nix ({ pkgs, ... }: { - name = "gjs"; - - meta = { - maintainers = pkgs.gjs.meta.maintainers; - }; - - machine = { pkgs, ... }: { - imports = [ ./common/x11.nix ]; - environment.systemPackages = with pkgs; [ gnome-desktop-testing ]; - environment.variables.XDG_DATA_DIRS = [ "${pkgs.gjs.installedTests}/share" ]; - }; - - testScript = '' - $machine->waitForX; - $machine->succeed("gnome-desktop-testing-runner"); - ''; -}) diff --git a/nixos/tests/glib-networking.nix b/nixos/tests/glib-networking.nix deleted file mode 100644 index c0bbb2b3554..00000000000 --- a/nixos/tests/glib-networking.nix +++ /dev/null @@ -1,17 +0,0 @@ -# run installed tests -import ./make-test.nix ({ pkgs, ... }: - -{ - name = "glib-networking"; - meta = { - maintainers = pkgs.glib-networking.meta.maintainers; - }; - - machine = { pkgs, ... }: { - environment.systemPackages = with pkgs; [ gnome-desktop-testing ]; - }; - - testScript = '' - $machine->succeed("gnome-desktop-testing-runner -d '${pkgs.glib-networking.installedTests}/share'"); - ''; -}) diff --git a/nixos/tests/gnome-photos.nix b/nixos/tests/gnome-photos.nix deleted file mode 100644 index 2ecda1d68ce..00000000000 --- a/nixos/tests/gnome-photos.nix +++ /dev/null @@ -1,42 +0,0 @@ -# run installed tests -import ./make-test.nix ({ pkgs, lib, ... }: - -let - - # gsettings tool with access to gsettings-desktop-schemas - desktop-gsettings = with pkgs; stdenv.mkDerivation { - name = "desktop-gsettings"; - dontUnpack = true; - nativeBuildInputs = [ glib wrapGAppsHook ]; - buildInputs = [ gsettings-desktop-schemas ]; - installPhase = '' - runHook preInstall - mkdir -p $out/bin - ln -s ${glib.bin}/bin/gsettings $out/bin/desktop-gsettings - runHook postInstall - ''; - }; - -in - -{ - name = "gnome-photos"; - meta = { - maintainers = pkgs.gnome-photos.meta.maintainers; - }; - - machine = { pkgs, ... }: { - imports = [ ./common/x11.nix ]; - programs.dconf.enable = true; - services.gnome3.at-spi2-core.enable = true; # needed for dogtail - environment.systemPackages = with pkgs; [ gnome-desktop-testing desktop-gsettings ]; - services.dbus.packages = with pkgs; [ gnome-photos ]; - }; - - testScript = '' - $machine->waitForX; - # dogtail needs accessibility enabled - $machine->succeed("desktop-gsettings set org.gnome.desktop.interface toolkit-accessibility true 2>&1"); - $machine->succeed("gnome-desktop-testing-runner -d '${pkgs.gnome-photos.installedTests}/share' 2>&1"); - ''; -}) diff --git a/nixos/tests/graphene.nix b/nixos/tests/graphene.nix deleted file mode 100644 index 5591bcc30c0..00000000000 --- a/nixos/tests/graphene.nix +++ /dev/null @@ -1,18 +0,0 @@ -# run installed tests -import ./make-test.nix ({ pkgs, ... }: - -{ - name = "graphene"; - - meta = { - maintainers = pkgs.graphene.meta.maintainers; - }; - - machine = { pkgs, ... }: { - environment.systemPackages = with pkgs; [ gnome-desktop-testing ]; - }; - - testScript = '' - $machine->succeed("gnome-desktop-testing-runner -d '${pkgs.graphene.installedTests}/share'"); - ''; -}) diff --git a/nixos/tests/installed-tests/colord.nix b/nixos/tests/installed-tests/colord.nix new file mode 100644 index 00000000000..77e6b917fe6 --- /dev/null +++ b/nixos/tests/installed-tests/colord.nix @@ -0,0 +1,5 @@ +{ pkgs, makeInstalledTest, ... }: + +makeInstalledTest { + tested = pkgs.colord; +} diff --git a/nixos/tests/installed-tests/default.nix b/nixos/tests/installed-tests/default.nix new file mode 100644 index 00000000000..7867a61e3dd --- /dev/null +++ b/nixos/tests/installed-tests/default.nix @@ -0,0 +1,77 @@ +# NixOS tests for gnome-desktop-testing-runner using software +# See https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests + +{ system ? builtins.currentSystem, + config ? {}, + pkgs ? import ../../.. { inherit system config; } +}: + +with import ../../lib/testing-python.nix { inherit system pkgs; }; +with pkgs.lib; + +let + + callInstalledTest = pkgs.newScope { inherit makeInstalledTest; }; + + makeInstalledTest = + { # Package to test. Needs to have an installedTests output + tested + + # Config to inject into machine + , testConfig ? {} + + # Test script snippet to inject before gnome-desktop-testing-runner begins. + # This is useful for extra setup the environment may need before the runner begins. + , preTestScript ? "" + + # Does test need X11? + , withX11 ? false + + # Extra flags to pass to gnome-desktop-testing-runner. + , testRunnerFlags ? "" + }: + makeTest rec { + name = tested.name; + + meta = { + maintainers = tested.meta.maintainers; + }; + + machine = { ... }: { + imports = [ + testConfig + ] ++ optional withX11 ../common/x11.nix; + + environment.systemPackages = with pkgs; [ gnome-desktop-testing ]; + + }; + + testScript = + optionalString withX11 '' + machine.wait_for_x() + '' + + optionalString (preTestScript != "") '' + ${preTestScript} + '' + + '' + machine.succeed( + "gnome-desktop-testing-runner ${testRunnerFlags} -d '${tested.installedTests}/share'" + ) + ''; + }; + +in + +{ + colord = callInstalledTest ./colord.nix {}; + flatpak = callInstalledTest ./flatpak.nix {}; + flatpak-builder = callInstalledTest ./flatpak-builder.nix {}; + fwupd = callInstalledTest ./fwupd.nix {}; + gdk-pixbuf = callInstalledTest ./gdk-pixbuf.nix {}; + gjs = callInstalledTest ./gjs.nix {}; + glib-networking = callInstalledTest ./glib-networking.nix {}; + gnome-photos = callInstalledTest ./gnome-photos.nix {}; + graphene = callInstalledTest ./graphene.nix {}; + ostree = callInstalledTest ./ostree.nix {}; + xdg-desktop-portal = callInstalledTest ./xdg-desktop-portal.nix {}; +} diff --git a/nixos/tests/installed-tests/flatpak-builder.nix b/nixos/tests/installed-tests/flatpak-builder.nix new file mode 100644 index 00000000000..31b9f2b258f --- /dev/null +++ b/nixos/tests/installed-tests/flatpak-builder.nix @@ -0,0 +1,14 @@ +{ pkgs, makeInstalledTest, ... }: + +makeInstalledTest { + tested = pkgs.flatpak-builder; + + testConfig = { + services.flatpak.enable = true; + xdg.portal.enable = true; + environment.systemPackages = with pkgs; [ flatpak-builder ] ++ flatpak-builder.installedTestsDependencies; + virtualisation.diskSize = 2048; + }; + + testRunnerFlags = "--timeout 3600"; +} diff --git a/nixos/tests/installed-tests/flatpak.nix b/nixos/tests/installed-tests/flatpak.nix new file mode 100644 index 00000000000..cbd25484e3d --- /dev/null +++ b/nixos/tests/installed-tests/flatpak.nix @@ -0,0 +1,19 @@ +{ pkgs, makeInstalledTest, ... }: + +makeInstalledTest { + tested = pkgs.flatpak; + withX11 = true; + + testConfig = { + services.xserver.desktopManager.gnome3.enable = true; # TODO: figure out minimal environment where the tests work + # common/x11.nix enables the auto display manager (lightdm) + services.xserver.displayManager.gdm.enable = false; + environment.gnome3.excludePackages = pkgs.gnome3.optionalPackages; + services.flatpak.enable = true; + environment.systemPackages = with pkgs; [ gnupg ostree python2 ]; + virtualisation.memorySize = 2047; + virtualisation.diskSize = 1024; + }; + + testRunnerFlags = "--timeout 3600"; +} diff --git a/nixos/tests/installed-tests/fwupd.nix b/nixos/tests/installed-tests/fwupd.nix new file mode 100644 index 00000000000..b9f761e9958 --- /dev/null +++ b/nixos/tests/installed-tests/fwupd.nix @@ -0,0 +1,12 @@ +{ pkgs, makeInstalledTest, ... }: + +makeInstalledTest { + tested = pkgs.fwupd; + + testConfig = { + services.fwupd.enable = true; + services.fwupd.blacklistPlugins = []; # don't blacklist test plugin + services.fwupd.enableTestRemote = true; + virtualisation.memorySize = 768; + }; +} diff --git a/nixos/tests/installed-tests/gdk-pixbuf.nix b/nixos/tests/installed-tests/gdk-pixbuf.nix new file mode 100644 index 00000000000..3d0011a427a --- /dev/null +++ b/nixos/tests/installed-tests/gdk-pixbuf.nix @@ -0,0 +1,13 @@ +{ pkgs, makeInstalledTest, ... }: + +makeInstalledTest { + tested = pkgs.gdk-pixbuf; + + testConfig = { + # Tests allocate a lot of memory trying to exploit a CVE + # but qemu-system-i386 has a 2047M memory limit + virtualisation.memorySize = if pkgs.stdenv.isi686 then 2047 else 4096; + }; + + testRunnerFlags = "--timeout 1800"; +} diff --git a/nixos/tests/installed-tests/gjs.nix b/nixos/tests/installed-tests/gjs.nix new file mode 100644 index 00000000000..1656e9de171 --- /dev/null +++ b/nixos/tests/installed-tests/gjs.nix @@ -0,0 +1,6 @@ +{ pkgs, makeInstalledTest, ... }: + +makeInstalledTest { + tested = pkgs.gjs; + withX11 = true; +} diff --git a/nixos/tests/installed-tests/glib-networking.nix b/nixos/tests/installed-tests/glib-networking.nix new file mode 100644 index 00000000000..b58d4df21fc --- /dev/null +++ b/nixos/tests/installed-tests/glib-networking.nix @@ -0,0 +1,5 @@ +{ pkgs, makeInstalledTest, ... }: + +makeInstalledTest { + tested = pkgs.glib-networking; +} diff --git a/nixos/tests/installed-tests/gnome-photos.nix b/nixos/tests/installed-tests/gnome-photos.nix new file mode 100644 index 00000000000..05e7ccb65ad --- /dev/null +++ b/nixos/tests/installed-tests/gnome-photos.nix @@ -0,0 +1,35 @@ +{ pkgs, makeInstalledTest, ... }: + +makeInstalledTest { + tested = pkgs.gnome-photos; + + withX11 = true; + + testConfig = { + programs.dconf.enable = true; + services.gnome3.at-spi2-core.enable = true; # needed for dogtail + environment.systemPackages = with pkgs; [ + # gsettings tool with access to gsettings-desktop-schemas + (stdenv.mkDerivation { + name = "desktop-gsettings"; + dontUnpack = true; + nativeBuildInputs = [ glib wrapGAppsHook ]; + buildInputs = [ gsettings-desktop-schemas ]; + installPhase = '' + runHook preInstall + mkdir -p $out/bin + ln -s ${glib.bin}/bin/gsettings $out/bin/desktop-gsettings + runHook postInstall + ''; + }) + ]; + services.dbus.packages = with pkgs; [ gnome-photos ]; + }; + + preTestScript = '' + # dogtail needs accessibility enabled + machine.succeed( + "desktop-gsettings set org.gnome.desktop.interface toolkit-accessibility true 2>&1" + ) + ''; +} diff --git a/nixos/tests/installed-tests/graphene.nix b/nixos/tests/installed-tests/graphene.nix new file mode 100644 index 00000000000..e43339abd88 --- /dev/null +++ b/nixos/tests/installed-tests/graphene.nix @@ -0,0 +1,5 @@ +{ pkgs, makeInstalledTest, ... }: + +makeInstalledTest { + tested = pkgs.graphene; +} diff --git a/nixos/tests/installed-tests/ostree.nix b/nixos/tests/installed-tests/ostree.nix new file mode 100644 index 00000000000..eef7cace54c --- /dev/null +++ b/nixos/tests/installed-tests/ostree.nix @@ -0,0 +1,23 @@ +{ pkgs, lib, makeInstalledTest, ... }: + +makeInstalledTest { + tested = pkgs.ostree; + + # TODO: Wrap/patch the tests directly in the package + testConfig = { + environment.systemPackages = with pkgs; [ + (python3.withPackages (p: with p; [ pyyaml ])) + gnupg + ostree + ]; + + # for GJS tests + environment.variables.GI_TYPELIB_PATH = lib.makeSearchPath "lib/girepository-1.0" (with pkgs; [ + gtk3 + pango.out + ostree + gdk-pixbuf + atk + ]); + }; +} diff --git a/nixos/tests/installed-tests/xdg-desktop-portal.nix b/nixos/tests/installed-tests/xdg-desktop-portal.nix new file mode 100644 index 00000000000..b16008ff4ad --- /dev/null +++ b/nixos/tests/installed-tests/xdg-desktop-portal.nix @@ -0,0 +1,5 @@ +{ pkgs, makeInstalledTest, ... }: + +makeInstalledTest { + tested = pkgs.xdg-desktop-portal; +} diff --git a/nixos/tests/ostree.nix b/nixos/tests/ostree.nix deleted file mode 100644 index d7ad84a1a5f..00000000000 --- a/nixos/tests/ostree.nix +++ /dev/null @@ -1,21 +0,0 @@ -# run installed tests -import ./make-test.nix ({ pkgs, lib, ... }: { - name = "ostree"; - - meta = { - maintainers = pkgs.ostree.meta.maintainers; - }; - - # TODO: Wrap/patch the tests directly in the package - machine = { pkgs, ... }: { - environment.systemPackages = with pkgs; [ - gnome-desktop-testing ostree gnupg (python3.withPackages (p: with p; [ pyyaml ])) - ]; - - environment.variables.GI_TYPELIB_PATH = lib.makeSearchPath "lib/girepository-1.0" (with pkgs; [ gtk3 pango.out ostree gdk-pixbuf atk ]); # for GJS tests - }; - - testScript = '' - $machine->succeed("gnome-desktop-testing-runner -d ${pkgs.ostree.installedTests}/share"); - ''; -}) diff --git a/nixos/tests/xdg-desktop-portal.nix b/nixos/tests/xdg-desktop-portal.nix deleted file mode 100644 index 79ebb83c49a..00000000000 --- a/nixos/tests/xdg-desktop-portal.nix +++ /dev/null @@ -1,17 +0,0 @@ -# run installed tests -import ./make-test.nix ({ pkgs, ... }: - -{ - name = "xdg-desktop-portal"; - meta = { - maintainers = pkgs.xdg-desktop-portal.meta.maintainers; - }; - - machine = { pkgs, ... }: { - environment.systemPackages = with pkgs; [ gnome-desktop-testing ]; - }; - - testScript = '' - $machine->succeed("gnome-desktop-testing-runner -d '${pkgs.xdg-desktop-portal.installedTests}/share'"); - ''; -}) From d7c8ad7d69dbf368047357c61c49274cc72dc25b Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Tue, 5 Nov 2019 22:04:56 -0500 Subject: [PATCH 341/377] nixosTests.flatpak: fix eval optionalPackages are deprecated. --- nixos/tests/installed-tests/flatpak.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/tests/installed-tests/flatpak.nix b/nixos/tests/installed-tests/flatpak.nix index cbd25484e3d..091c9932662 100644 --- a/nixos/tests/installed-tests/flatpak.nix +++ b/nixos/tests/installed-tests/flatpak.nix @@ -8,7 +8,7 @@ makeInstalledTest { services.xserver.desktopManager.gnome3.enable = true; # TODO: figure out minimal environment where the tests work # common/x11.nix enables the auto display manager (lightdm) services.xserver.displayManager.gdm.enable = false; - environment.gnome3.excludePackages = pkgs.gnome3.optionalPackages; + services.gnome3.core-utilities.enable = false; services.flatpak.enable = true; environment.systemPackages = with pkgs; [ gnupg ostree python2 ]; virtualisation.memorySize = 2047; From f3288a2b8db751feddacb0c1594299944094d153 Mon Sep 17 00:00:00 2001 From: merijnb Date: Thu, 7 Nov 2019 00:31:56 +0000 Subject: [PATCH 342/377] pythonPackages.tables: 3.6.0 -> 3.6.1 (#72930) The package has vanished from pypi, and only this new version is now available. The release notes for the new version state: ``` Release 3.6.1 Maintenance release to fix packaging issues. No new features or bug fixes. ``` so I can only assume that the 3.6.0 release was not working correctly. --- pkgs/development/python-modules/tables/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/tables/default.nix b/pkgs/development/python-modules/tables/default.nix index b664b882b28..d67bec7a496 100644 --- a/pkgs/development/python-modules/tables/default.nix +++ b/pkgs/development/python-modules/tables/default.nix @@ -4,12 +4,12 @@ with stdenv.lib; buildPythonPackage rec { - version = "3.6.0"; + version = "3.6.1"; pname = "tables"; src = fetchPypi { inherit pname version; - sha256 = "0k9xc0b49j311r6yayw7wzjay6ch3jznijhzc4x33yv490hqhd6v"; + sha256 = "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"; }; nativeBuildInputs = [ cython ]; From cb581af6d5f34c50022032a223b7362af957e097 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Wed, 6 Nov 2019 11:23:32 -0800 Subject: [PATCH 343/377] cargo-geiger: fix darwin build --- .../tools/rust/cargo-geiger/default.nix | 15 ++++++++++++--- pkgs/top-level/all-packages.nix | 3 ++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-geiger/default.nix b/pkgs/development/tools/rust/cargo-geiger/default.nix index 2512a9ec4f4..70601faaf6d 100644 --- a/pkgs/development/tools/rust/cargo-geiger/default.nix +++ b/pkgs/development/tools/rust/cargo-geiger/default.nix @@ -1,6 +1,8 @@ { stdenv, lib, fetchFromGitHub -, rustPlatform, pkgconfig -, openssl, Security }: +, rustPlatform, pkgconfig, openssl +# darwin dependencies +, Security, CoreFoundation, libiconv +}: rustPlatform.buildRustPackage rec { pname = "cargo-geiger"; @@ -26,9 +28,16 @@ rustPlatform.buildRustPackage rec { --skip test_package::case_6 ''; - buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ]; + buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security libiconv ]; nativeBuildInputs = [ pkgconfig ]; + # FIXME: Use impure version of CoreFoundation because of missing symbols. + # CFURLSetResourcePropertyForKey is defined in the headers but there's no + # corresponding implementation in the sources from opensource.apple.com. + preConfigure = stdenv.lib.optionalString stdenv.isDarwin '' + export NIX_CFLAGS_COMPILE="-F${CoreFoundation}/Library/Frameworks $NIX_CFLAGS_COMPILE" + ''; + meta = with lib; { description = "Detects usage of unsafe Rust in a Rust crate and its dependencies."; homepage = https://github.com/anderejd/cargo-geiger; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bab793823e9..5476aea81a1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8534,7 +8534,8 @@ in cargo-expand = callPackage ../development/tools/rust/cargo-expand { }; cargo-fuzz = callPackage ../development/tools/rust/cargo-fuzz { }; cargo-geiger = callPackage ../development/tools/rust/cargo-geiger { - inherit (darwin.apple_sdk.frameworks) Security; + inherit (darwin) libiconv; + inherit (darwin.apple_sdk.frameworks) Security CoreFoundation; }; cargo-inspect = callPackage ../development/tools/rust/cargo-inspect { inherit (darwin.apple_sdk.frameworks) Security; From 85f3d86bea70fe0d76a7e3520966c58604f8e5e9 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Wed, 6 Nov 2019 21:22:40 -0500 Subject: [PATCH 344/377] gom: test only on x86_64 This is failing at the stress test regularly on aarch64 and i686-linux. --- pkgs/development/libraries/gom/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/gom/default.nix b/pkgs/development/libraries/gom/default.nix index 9a947c3ff82..e006f8cd6f8 100644 --- a/pkgs/development/libraries/gom/default.nix +++ b/pkgs/development/libraries/gom/default.nix @@ -55,7 +55,8 @@ stdenv.mkDerivation rec { "-Dpygobject-override-dir=${placeholder "py"}/${python3.sitePackages}/gi/overrides" ]; - doCheck = true; + # Success is more likely on x86_64 + doCheck = stdenv.isx86_64; passthru = { updateScript = gnome3.updateScript { From 52ee1026b01bd875ca5a95f9fe1193dcbd742364 Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Wed, 6 Nov 2019 21:48:53 +0100 Subject: [PATCH 345/377] nixos/test: Handle undecodable bytes This threw exceptions in boot menus --- nixos/lib/test-driver/test-driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/lib/test-driver/test-driver.py b/nixos/lib/test-driver/test-driver.py index 28065cd60a9..c83d1f4ba1c 100644 --- a/nixos/lib/test-driver/test-driver.py +++ b/nixos/lib/test-driver/test-driver.py @@ -597,7 +597,7 @@ class Machine: def process_serial_output(): for line in self.process.stdout: - line = line.decode().replace("\r", "").rstrip() + line = line.decode("unicode_escape").replace("\r", "").rstrip() eprint("{} # {}".format(self.name, line)) self.logger.enqueue({"msg": line, "machine": self.name}) From ff4e86f4a5363c811ab1362e8ea38e86fa762f36 Mon Sep 17 00:00:00 2001 From: WilliButz Date: Wed, 6 Nov 2019 16:45:17 +0100 Subject: [PATCH 346/377] nixos/tests/loki: port to python --- nixos/tests/loki.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/nixos/tests/loki.nix b/nixos/tests/loki.nix index 9c3058d02f8..dbf1e8a650f 100644 --- a/nixos/tests/loki.nix +++ b/nixos/tests/loki.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ lib, pkgs, ... }: +import ./make-test-python.nix ({ lib, pkgs, ... }: { name = "loki"; @@ -26,12 +26,14 @@ import ./make-test.nix ({ lib, pkgs, ... }: }; testScript = '' - $machine->start; - $machine->waitForUnit("loki.service"); - $machine->waitForUnit("promtail.service"); - $machine->waitForOpenPort(3100); - $machine->waitForOpenPort(9080); - $machine->succeed("echo 'Loki Ingestion Test' > /var/log/testlog"); - $machine->waitUntilSucceeds("${pkgs.grafana-loki}/bin/logcli --addr='http://localhost:3100' query --no-labels '{job=\"varlogs\",filename=\"/var/log/testlog\"}' | grep -q 'Loki Ingestion Test'"); + machine.start + machine.wait_for_unit("loki.service") + machine.wait_for_unit("promtail.service") + machine.wait_for_open_port(3100) + machine.wait_for_open_port(9080) + machine.succeed("echo 'Loki Ingestion Test' > /var/log/testlog") + machine.wait_until_succeeds( + "${pkgs.grafana-loki}/bin/logcli --addr='http://localhost:3100' query --no-labels '{job=\"varlogs\",filename=\"/var/log/testlog\"}' | grep -q 'Loki Ingestion Test'" + ) ''; }) From 336bffae6dbcd7abbdd2518cc1303485da2140c7 Mon Sep 17 00:00:00 2001 From: WilliButz Date: Wed, 6 Nov 2019 16:45:57 +0100 Subject: [PATCH 347/377] nixos/tests/pgjwt: port to python --- nixos/tests/pgjwt.nix | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/nixos/tests/pgjwt.nix b/nixos/tests/pgjwt.nix index a2d81288c81..4793a3e3150 100644 --- a/nixos/tests/pgjwt.nix +++ b/nixos/tests/pgjwt.nix @@ -1,12 +1,5 @@ -import ./make-test.nix ({ pkgs, lib, ...}: -let - test = with pkgs; runCommand "patch-test" { - nativeBuildInputs = [ pgjwt ]; - } - '' - sed -e '12 i CREATE EXTENSION pgcrypto;\nCREATE EXTENSION pgtap;\nSET search_path TO tap,public;' ${pgjwt.src}/test.sql > $out; - ''; -in +import ./make-test-python.nix ({ pkgs, lib, ...}: + with pkgs; { name = "pgjwt"; meta = with lib.maintainers; { @@ -29,9 +22,13 @@ with pkgs; { pgProve = "${pkgs.perlPackages.TAPParserSourceHandlerpgTAP}"; in '' - startAll; - $master->waitForUnit("postgresql"); - $master->copyFileFromHost("${test}","/tmp/test.sql"); - $master->succeed("${pkgs.sudo}/bin/sudo -u ${sqlSU} PGOPTIONS=--search_path=tap,public ${pgProve}/bin/pg_prove -d postgres -v -f /tmp/test.sql"); + start_all() + master.wait_for_unit("postgresql") + master.succeed( + "${pkgs.gnused}/bin/sed -e '12 i CREATE EXTENSION pgcrypto;\\nCREATE EXTENSION pgtap;\\nSET search_path TO tap,public;' ${pgjwt.src}/test.sql > /tmp/test.sql" + ) + master.succeed( + "${pkgs.sudo}/bin/sudo -u ${sqlSU} PGOPTIONS=--search_path=tap,public ${pgProve}/bin/pg_prove -d postgres -v -f /tmp/test.sql" + ) ''; }) From 9a7101c999ae94574497498ec48b9e000b85e107 Mon Sep 17 00:00:00 2001 From: WilliButz Date: Wed, 6 Nov 2019 16:48:07 +0100 Subject: [PATCH 348/377] nixos/tests/initrd-ssh: port to python --- nixos/tests/initrd-network-ssh/default.nix | 38 +++++++++++++--------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/nixos/tests/initrd-network-ssh/default.nix b/nixos/tests/initrd-network-ssh/default.nix index 796c50c610e..73d9f938e22 100644 --- a/nixos/tests/initrd-network-ssh/default.nix +++ b/nixos/tests/initrd-network-ssh/default.nix @@ -1,4 +1,4 @@ -import ../make-test.nix ({ lib, ... }: +import ../make-test-python.nix ({ lib, ... }: { name = "initrd-network-ssh"; @@ -35,25 +35,31 @@ import ../make-test.nix ({ lib, ... }: client = { config, ... }: { - environment.etc.knownHosts = { - text = concatStrings [ - "server," - "${toString (head (splitString " " ( - toString (elemAt (splitString "\n" config.networking.extraHosts) 2) - )))} " - "${readFile ./dropbear.pub}" - ]; + environment.etc = { + knownHosts = { + text = concatStrings [ + "server," + "${toString (head (splitString " " ( + toString (elemAt (splitString "\n" config.networking.extraHosts) 2) + )))} " + "${readFile ./dropbear.pub}" + ]; + }; + sshKey = { + source = ./openssh.priv; # dont use this anywhere else + mode = "0600"; + }; }; }; }; testScript = '' - startAll; - $client->waitForUnit("network.target"); - $client->copyFileFromHost("${./openssh.priv}","/etc/sshKey"); - $client->succeed("chmod 0600 /etc/sshKey"); - $client->waitUntilSucceeds("ping -c 1 server"); - $client->succeed("ssh -i /etc/sshKey -o UserKnownHostsFile=/etc/knownHosts server 'touch /fnord'"); - $client->shutdown; + start_all() + client.wait_for_unit("network.target") + client.wait_until_succeeds("ping -c 1 server") + client.succeed( + "ssh -i /etc/sshKey -o UserKnownHostsFile=/etc/knownHosts server 'touch /fnord'" + ) + client.shutdown() ''; }) From 34755fb5e4d7a0074316380645f6486256141122 Mon Sep 17 00:00:00 2001 From: WilliButz Date: Wed, 6 Nov 2019 16:50:33 +0100 Subject: [PATCH 349/377] nixos/tests/grafana: port to python --- nixos/tests/grafana.nix | 48 +++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 21 deletions(-) diff --git a/nixos/tests/grafana.nix b/nixos/tests/grafana.nix index 7a1b4c8ffbb..4b453ece7f1 100644 --- a/nixos/tests/grafana.nix +++ b/nixos/tests/grafana.nix @@ -1,4 +1,4 @@ -import ./make-test.nix ({ lib, pkgs, ... }: +import ./make-test-python.nix ({ lib, pkgs, ... }: let inherit (lib) mkMerge nameValuePair maintainers; @@ -64,28 +64,34 @@ in { inherit nodes; testScript = '' - startAll(); + start_all() - subtest "Grafana sqlite", sub { - $sqlite->waitForUnit("grafana.service"); - $sqlite->waitForOpenPort(3000); - $sqlite->succeed("curl -sSfN -u testadmin:snakeoilpwd http://127.0.0.1:3000/api/org/users | grep -q testadmin\@localhost"); - }; + with subtest("Successful API query as admin user with sqlite db"): + sqlite.wait_for_unit("grafana.service") + sqlite.wait_for_open_port(3000) + sqlite.succeed( + "curl -sSfN -u testadmin:snakeoilpwd http://127.0.0.1:3000/api/org/users | grep -q testadmin\@localhost" + ) + sqlite.shutdown() - subtest "Grafana postgresql", sub { - $postgresql->waitForUnit("grafana.service"); - $postgresql->waitForUnit("postgresql.service"); - $postgresql->waitForOpenPort(3000); - $postgresql->waitForOpenPort(5432); - $postgresql->succeed("curl -sSfN -u testadmin:snakeoilpwd http://127.0.0.1:3000/api/org/users | grep -q testadmin\@localhost"); - }; + with subtest("Successful API query as admin user with postgresql db"): + postgresql.wait_for_unit("grafana.service") + postgresql.wait_for_unit("postgresql.service") + postgresql.wait_for_open_port(3000) + postgresql.wait_for_open_port(5432) + postgresql.succeed( + "curl -sSfN -u testadmin:snakeoilpwd http://127.0.0.1:3000/api/org/users | grep -q testadmin\@localhost" + ) + postgresql.shutdown() - subtest "Grafana mysql", sub { - $mysql->waitForUnit("grafana.service"); - $mysql->waitForUnit("mysql.service"); - $mysql->waitForOpenPort(3000); - $mysql->waitForOpenPort(3306); - $mysql->succeed("curl -sSfN -u testadmin:snakeoilpwd http://127.0.0.1:3000/api/org/users | grep -q testadmin\@localhost"); - }; + with subtest("Successful API query as admin user with mysql db"): + mysql.wait_for_unit("grafana.service") + mysql.wait_for_unit("mysql.service") + mysql.wait_for_open_port(3000) + mysql.wait_for_open_port(3306) + mysql.succeed( + "curl -sSfN -u testadmin:snakeoilpwd http://127.0.0.1:3000/api/org/users | grep -q testadmin\@localhost" + ) + mysql.shutdown() ''; }) From 426b467af817060b9576d39b30f6f7ac1c48f78e Mon Sep 17 00:00:00 2001 From: WilliButz Date: Wed, 6 Nov 2019 16:54:31 +0100 Subject: [PATCH 350/377] nixos/tests/prometheus-exporters: port to python --- nixos/tests/prometheus-exporters.nix | 224 +++++++++++++++------------ 1 file changed, 129 insertions(+), 95 deletions(-) diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix index 676183f6356..76cecb7433a 100644 --- a/nixos/tests/prometheus-exporters.nix +++ b/nixos/tests/prometheus-exporters.nix @@ -4,12 +4,10 @@ }: let - inherit (import ../lib/testing.nix { inherit system pkgs; }) makeTest; + inherit (import ../lib/testing-python.nix { inherit system pkgs; }) makeTest; inherit (pkgs.lib) concatStringsSep maintainers mapAttrs mkMerge removeSuffix replaceChars singleton splitString; - escape' = str: replaceChars [''"'' "$" "\n"] [''\\\"'' "\\$" ""] str; - /* * The attrset `exporterTests` contains one attribute * for each exporter test. Each of these attributes @@ -33,9 +31,9 @@ let * services..enable = true; * }; * exporterTest = '' - * waitForUnit("prometheus--exporter.service"); - * waitForOpenPort("1234"); - * succeed("curl -sSf 'localhost:1234/metrics'"); + * wait_for_unit("prometheus--exporter.service") + * wait_for_open_port("1234") + * succeed("curl -sSf 'localhost:1234/metrics'") * ''; * }; * @@ -49,11 +47,11 @@ let * }; * * testScript = '' - * $->start(); - * $->waitForUnit("prometheus--exporter.service"); - * $->waitForOpenPort("1234"); - * $->succeed("curl -sSf 'localhost:1234/metrics'"); - * $->shutdown(); + * .start() + * .wait_for_unit("prometheus--exporter.service") + * .wait_for_open_port("1234") + * .succeed("curl -sSf 'localhost:1234/metrics'") + * .shutdown() * ''; */ @@ -72,9 +70,11 @@ let ''; }; exporterTest = '' - waitForUnit("prometheus-bind-exporter.service"); - waitForOpenPort(9119); - succeed("curl -sSf http://localhost:9119/metrics | grep -q 'bind_query_recursions_total 0'"); + wait_for_unit("prometheus-bind-exporter.service") + wait_for_open_port(9119) + succeed( + "curl -sSf http://localhost:9119/metrics | grep -q 'bind_query_recursions_total 0'" + ) ''; }; @@ -89,9 +89,11 @@ let }); }; exporterTest = '' - waitForUnit("prometheus-blackbox-exporter.service"); - waitForOpenPort(9115); - succeed("curl -sSf 'http://localhost:9115/probe?target=localhost&module=icmp_v6' | grep -q 'probe_success 1'"); + wait_for_unit("prometheus-blackbox-exporter.service") + wait_for_open_port(9115) + succeed( + "curl -sSf 'http://localhost:9115/probe?target=localhost&module=icmp_v6' | grep -q 'probe_success 1'" + ) ''; }; @@ -100,7 +102,7 @@ let enable = true; extraFlags = [ "--web.collectd-push-path /collectd" ]; }; - exporterTest =let postData = escape' '' + exporterTest = let postData = replaceChars [ "\n" ] [ "" ] '' [{ "values":[23], "dstypes":["gauge"], @@ -108,13 +110,21 @@ let "interval":1000, "host":"testhost", "plugin":"testplugin", - "time":$(date +%s) + "time":DATE }] ''; in '' - waitForUnit("prometheus-collectd-exporter.service"); - waitForOpenPort(9103); - succeed("curl -sSfH 'Content-Type: application/json' -X POST --data \"${postData}\" localhost:9103/collectd"); - succeed("curl -sSf localhost:9103/metrics | grep -q 'collectd_testplugin_gauge{instance=\"testhost\"} 23'"); + wait_for_unit("prometheus-collectd-exporter.service") + wait_for_open_port(9103) + succeed( + 'echo \'${postData}\'> /tmp/data.json' + ) + succeed('sed -ie "s DATE $(date +%s) " /tmp/data.json') + succeed( + "curl -sSfH 'Content-Type: application/json' -X POST --data @/tmp/data.json localhost:9103/collectd" + ) + succeed( + "curl -sSf localhost:9103/metrics | grep -q 'collectd_testplugin_gauge{instance=\"testhost\"} 23'" + ) ''; }; @@ -127,9 +137,9 @@ let services.dnsmasq.enable = true; }; exporterTest = '' - waitForUnit("prometheus-dnsmasq-exporter.service"); - waitForOpenPort(9153); - succeed("curl -sSf http://localhost:9153/metrics | grep -q 'dnsmasq_leases 0'"); + wait_for_unit("prometheus-dnsmasq-exporter.service") + wait_for_open_port(9153) + succeed("curl -sSf http://localhost:9153/metrics | grep -q 'dnsmasq_leases 0'") ''; }; @@ -144,9 +154,11 @@ let services.dovecot2.enable = true; }; exporterTest = '' - waitForUnit("prometheus-dovecot-exporter.service"); - waitForOpenPort(9166); - succeed("curl -sSf http://localhost:9166/metrics | grep -q 'dovecot_up{scope=\"global\"} 1'"); + wait_for_unit("prometheus-dovecot-exporter.service") + wait_for_open_port(9166) + succeed( + "curl -sSf http://localhost:9166/metrics | grep -q 'dovecot_up{scope=\"global\"} 1'" + ) ''; }; @@ -155,9 +167,11 @@ let enable = true; }; exporterTest = '' - waitForUnit("prometheus-fritzbox-exporter.service"); - waitForOpenPort(9133); - succeed("curl -sSf http://localhost:9133/metrics | grep -q 'fritzbox_exporter_collect_errors 0'"); + wait_for_unit("prometheus-fritzbox-exporter.service") + wait_for_open_port(9133) + succeed( + "curl -sSf http://localhost:9133/metrics | grep -q 'fritzbox_exporter_collect_errors 0'" + ) ''; }; @@ -180,11 +194,11 @@ let }; }; exporterTest = '' - waitForUnit("nginx.service"); - waitForOpenPort(80); - waitForUnit("prometheus-json-exporter.service"); - waitForOpenPort(7979); - succeed("curl -sSf localhost:7979/metrics | grep -q 'json_test_metric 1'"); + wait_for_unit("nginx.service") + wait_for_open_port(80) + wait_for_unit("prometheus-json-exporter.service") + wait_for_open_port(7979) + succeed("curl -sSf localhost:7979/metrics | grep -q 'json_test_metric 1'") ''; }; @@ -222,10 +236,12 @@ let users.users.mailexporter.isSystemUser = true; }; exporterTest = '' - waitForUnit("postfix.service") - waitForUnit("prometheus-mail-exporter.service") - waitForOpenPort(9225) - waitUntilSucceeds("curl -sSf http://localhost:9225/metrics | grep -q 'mail_deliver_success{configname=\"testserver\"} 1'") + wait_for_unit("postfix.service") + wait_for_unit("prometheus-mail-exporter.service") + wait_for_open_port(9225) + wait_until_succeeds( + "curl -sSf http://localhost:9225/metrics | grep -q 'mail_deliver_success{configname=\"testserver\"} 1'" + ) ''; }; @@ -256,9 +272,9 @@ let }; }; exporterTest = '' - waitForUnit("nginx.service") - waitForUnit("prometheus-nextcloud-exporter.service") - waitForOpenPort(9205) + wait_for_unit("nginx.service") + wait_for_unit("prometheus-nextcloud-exporter.service") + wait_for_open_port(9205) succeed("curl -sSf http://localhost:9205/metrics | grep -q 'nextcloud_up 1'") ''; }; @@ -275,9 +291,9 @@ let }; }; exporterTest = '' - waitForUnit("nginx.service") - waitForUnit("prometheus-nginx-exporter.service") - waitForOpenPort(9113) + wait_for_unit("nginx.service") + wait_for_unit("prometheus-nginx-exporter.service") + wait_for_open_port(9113) succeed("curl -sSf http://localhost:9113/metrics | grep -q 'nginx_up 1'") ''; }; @@ -287,9 +303,11 @@ let enable = true; }; exporterTest = '' - waitForUnit("prometheus-node-exporter.service"); - waitForOpenPort(9100); - succeed("curl -sSf http://localhost:9100/metrics | grep -q 'node_exporter_build_info{.\\+} 1'"); + wait_for_unit("prometheus-node-exporter.service") + wait_for_open_port(9100) + succeed( + "curl -sSf http://localhost:9100/metrics | grep -q 'node_exporter_build_info{.\\+} 1'" + ) ''; }; @@ -301,9 +319,11 @@ let services.postfix.enable = true; }; exporterTest = '' - waitForUnit("prometheus-postfix-exporter.service"); - waitForOpenPort(9154); - succeed("curl -sSf http://localhost:9154/metrics | grep -q 'postfix_smtpd_connects_total 0'"); + wait_for_unit("prometheus-postfix-exporter.service") + wait_for_open_port(9154) + succeed( + "curl -sSf http://localhost:9154/metrics | grep -q 'postfix_smtpd_connects_total 0'" + ) ''; }; @@ -316,18 +336,24 @@ let services.postgresql.enable = true; }; exporterTest = '' - waitForUnit("prometheus-postgres-exporter.service"); - waitForOpenPort(9187); - waitForUnit("postgresql.service"); - succeed("curl -sSf http://localhost:9187/metrics | grep -q 'pg_exporter_last_scrape_error 0'"); - succeed("curl -sSf http://localhost:9187/metrics | grep -q 'pg_up 1'"); - systemctl("stop postgresql.service"); - succeed("curl -sSf http://localhost:9187/metrics | grep -qv 'pg_exporter_last_scrape_error 0'"); - succeed("curl -sSf http://localhost:9187/metrics | grep -q 'pg_up 0'"); - systemctl("start postgresql.service"); - waitForUnit("postgresql.service"); - succeed("curl -sSf http://localhost:9187/metrics | grep -q 'pg_exporter_last_scrape_error 0'"); - succeed("curl -sSf http://localhost:9187/metrics | grep -q 'pg_up 1'"); + wait_for_unit("prometheus-postgres-exporter.service") + wait_for_open_port(9187) + wait_for_unit("postgresql.service") + succeed( + "curl -sSf http://localhost:9187/metrics | grep -q 'pg_exporter_last_scrape_error 0'" + ) + succeed("curl -sSf http://localhost:9187/metrics | grep -q 'pg_up 1'") + systemctl("stop postgresql.service") + succeed( + "curl -sSf http://localhost:9187/metrics | grep -qv 'pg_exporter_last_scrape_error 0'" + ) + succeed("curl -sSf http://localhost:9187/metrics | grep -q 'pg_up 0'") + systemctl("start postgresql.service") + wait_for_unit("postgresql.service") + succeed( + "curl -sSf http://localhost:9187/metrics | grep -q 'pg_exporter_last_scrape_error 0'" + ) + succeed("curl -sSf http://localhost:9187/metrics | grep -q 'pg_up 1'") ''; }; @@ -339,11 +365,13 @@ let services.rspamd.enable = true; }; exporterTest = '' - waitForUnit("rspamd.service"); - waitForUnit("prometheus-rspamd-exporter.service"); - waitForOpenPort(11334); - waitForOpenPort(7980); - waitUntilSucceeds("curl -sSf localhost:7980/metrics | grep -q 'rspamd_scanned{host=\"rspamd\"} 0'"); + wait_for_unit("rspamd.service") + wait_for_unit("prometheus-rspamd-exporter.service") + wait_for_open_port(11334) + wait_for_open_port(7980) + wait_until_succeeds( + "curl -sSf localhost:7980/metrics | grep -q 'rspamd_scanned{host=\"rspamd\"} 0'" + ) ''; }; @@ -356,9 +384,9 @@ let }; }; exporterTest = '' - waitForUnit("prometheus-snmp-exporter.service"); - waitForOpenPort(9116); - succeed("curl -sSf localhost:9116/metrics | grep -q 'snmp_request_errors_total 0'"); + wait_for_unit("prometheus-snmp-exporter.service") + wait_for_open_port(9116) + succeed("curl -sSf localhost:9116/metrics | grep -q 'snmp_request_errors_total 0'") ''; }; @@ -377,11 +405,11 @@ let }; }; exporterTest = '' - waitForUnit("nginx.service"); - waitForOpenPort(80); - waitForUnit("prometheus-surfboard-exporter.service"); - waitForOpenPort(9239); - succeed("curl -sSf localhost:9239/metrics | grep -q 'surfboard_up 1'"); + wait_for_unit("nginx.service") + wait_for_open_port(80) + wait_for_unit("prometheus-surfboard-exporter.service") + wait_for_open_port(9239) + succeed("curl -sSf localhost:9239/metrics | grep -q 'surfboard_up 1'") ''; }; @@ -396,11 +424,11 @@ let services.tor.controlPort = 9051; }; exporterTest = '' - waitForUnit("tor.service"); - waitForOpenPort(9051); - waitForUnit("prometheus-tor-exporter.service"); - waitForOpenPort(9130); - succeed("curl -sSf localhost:9130/metrics | grep -q 'tor_version{.\\+} 1'"); + wait_for_unit("tor.service") + wait_for_open_port(9051) + wait_for_unit("prometheus-tor-exporter.service") + wait_for_open_port(9130) + succeed("curl -sSf localhost:9130/metrics | grep -q 'tor_version{.\\+} 1'") ''; }; @@ -426,10 +454,12 @@ let }; }; exporterTest = '' - waitForUnit("prometheus-varnish-exporter.service"); - waitForOpenPort(6081); - waitForOpenPort(9131); - succeed("curl -sSf http://localhost:9131/metrics | grep -q 'varnish_up 1'"); + wait_for_unit("prometheus-varnish-exporter.service") + wait_for_open_port(6081) + wait_for_open_port(9131) + succeed( + "curl -sSf http://localhost:9131/metrics | grep -q 'varnish_up 1'" + ) ''; }; @@ -451,9 +481,11 @@ let systemd.services.prometheus-wireguard-exporter.after = [ "wireguard-wg0.service" ]; }; exporterTest = '' - waitForUnit("prometheus-wireguard-exporter.service"); - waitForOpenPort(9586); - waitUntilSucceeds("curl -sSf http://localhost:9586/metrics | grep '${snakeoil.peer1.publicKey}'"); + wait_for_unit("prometheus-wireguard-exporter.service") + wait_for_open_port(9586) + wait_until_succeeds( + "curl -sSf http://localhost:9586/metrics | grep '${snakeoil.peer1.publicKey}'" + ) ''; }; }; @@ -466,11 +498,13 @@ mapAttrs (exporter: testConfig: (makeTest { } testConfig.metricProvider or {}]; testScript = '' - ${"$"+exporter}->start(); - ${concatStringsSep " " (map (line: '' - ${"$"+exporter}->${line}; - '') (splitString "\n" (removeSuffix "\n" testConfig.exporterTest)))} - ${"$"+exporter}->shutdown(); + ${exporter}.start() + ${concatStringsSep "\n" (map (line: + if (builtins.substring 0 1 line == " " || builtins.substring 0 1 line == ")") + then line + else "${exporter}.${line}" + ) (splitString "\n" (removeSuffix "\n" testConfig.exporterTest)))} + ${exporter}.shutdown() ''; meta = with maintainers; { From 4e96a9d9f7357958479d17922ec95729bf58fd5f Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 7 Nov 2019 13:46:37 +0100 Subject: [PATCH 351/377] gcab: clean up * format with nixpkgs-fmt * remove UTF-8 locale hack, since now we have C.UTF-8 * add description, fix homepage, correct license * split to multiple outputs --- pkgs/development/libraries/gcab/default.nix | 38 ++++++++++++++++----- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/pkgs/development/libraries/gcab/default.nix b/pkgs/development/libraries/gcab/default.nix index ee5988b30f5..bc8cb72f21c 100644 --- a/pkgs/development/libraries/gcab/default.nix +++ b/pkgs/development/libraries/gcab/default.nix @@ -1,21 +1,42 @@ -{ stdenv, fetchurl, gettext, gobject-introspection, pkgconfig -, meson, ninja, glibcLocales, git, vala, glib, zlib, gnome3 +{ stdenv +, fetchurl +, gettext +, gobject-introspection +, pkgconfig +, meson +, ninja +, git +, vala +, glib +, zlib +, gnome3 }: stdenv.mkDerivation rec { pname = "gcab"; version = "1.2"; - LC_ALL = "en_US.UTF-8"; + outputs = [ "bin" "out" "dev" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; sha256 = "038h5kk41si2hc9d9169rrlvp8xgsxq27kri7hv2vr39gvz9cbas"; }; - nativeBuildInputs = [ meson ninja glibcLocales git pkgconfig vala gettext gobject-introspection ]; + nativeBuildInputs = [ + meson + ninja + git + pkgconfig + vala + gettext + gobject-introspection + ]; - buildInputs = [ glib zlib ]; + buildInputs = [ + glib + zlib + ]; mesonFlags = [ "-Ddocs=false" @@ -30,9 +51,10 @@ stdenv.mkDerivation rec { }; meta = with stdenv.lib; { + description = "GObject library to create cabinet files"; + homepage = "https://gitlab.gnome.org/GNOME/gcab"; + license = licenses.lgpl21Plus; + maintainers = gnome3.maintainers; platforms = platforms.linux; - license = licenses.lgpl21; - homepage = "https://wiki.gnome.org/msitools"; - maintainers = [ maintainers.lethalman ]; }; } From 40d77f8f0170f7b89de50fa1e317b21b36c79dff Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 7 Nov 2019 13:51:04 +0100 Subject: [PATCH 352/377] gcab: add devdoc --- pkgs/development/libraries/gcab/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gcab/default.nix b/pkgs/development/libraries/gcab/default.nix index bc8cb72f21c..3242a04b204 100644 --- a/pkgs/development/libraries/gcab/default.nix +++ b/pkgs/development/libraries/gcab/default.nix @@ -2,6 +2,9 @@ , fetchurl , gettext , gobject-introspection +, gtk-doc +, docbook_xsl +, docbook_xml_dtd_43 , pkgconfig , meson , ninja @@ -16,7 +19,7 @@ stdenv.mkDerivation rec { pname = "gcab"; version = "1.2"; - outputs = [ "bin" "out" "dev" ]; + outputs = [ "bin" "out" "dev" "devdoc" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; @@ -31,6 +34,9 @@ stdenv.mkDerivation rec { vala gettext gobject-introspection + gtk-doc + docbook_xsl + docbook_xml_dtd_43 ]; buildInputs = [ @@ -39,7 +45,6 @@ stdenv.mkDerivation rec { ]; mesonFlags = [ - "-Ddocs=false" "-Dtests=false" ]; From c88e084ecb73c72d966423084ab13adf98376b83 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Fri, 1 Nov 2019 21:16:03 -0700 Subject: [PATCH 353/377] gcab: 1.2 -> 1.3 --- pkgs/development/libraries/gcab/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/gcab/default.nix b/pkgs/development/libraries/gcab/default.nix index 3242a04b204..b4e941eab39 100644 --- a/pkgs/development/libraries/gcab/default.nix +++ b/pkgs/development/libraries/gcab/default.nix @@ -17,13 +17,13 @@ stdenv.mkDerivation rec { pname = "gcab"; - version = "1.2"; + version = "1.3"; outputs = [ "bin" "out" "dev" "devdoc" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "038h5kk41si2hc9d9169rrlvp8xgsxq27kri7hv2vr39gvz9cbas"; + sha256 = "1rv81b37d5ya7xpfdxrfk173jjcwabxyng7vafgwyl5myv44qc0h"; }; nativeBuildInputs = [ From 85251b3c2485b814719b70d9c58718ee58400256 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 7 Nov 2019 08:02:33 -0500 Subject: [PATCH 354/377] nixosTests.libxmlb: port to python --- nixos/tests/installed-tests/default.nix | 1 + nixos/tests/installed-tests/libxmlb.nix | 5 +++++ nixos/tests/libxmlb.nix | 17 ----------------- 3 files changed, 6 insertions(+), 17 deletions(-) create mode 100644 nixos/tests/installed-tests/libxmlb.nix delete mode 100644 nixos/tests/libxmlb.nix diff --git a/nixos/tests/installed-tests/default.nix b/nixos/tests/installed-tests/default.nix index 7867a61e3dd..7809a2ff88d 100644 --- a/nixos/tests/installed-tests/default.nix +++ b/nixos/tests/installed-tests/default.nix @@ -72,6 +72,7 @@ in glib-networking = callInstalledTest ./glib-networking.nix {}; gnome-photos = callInstalledTest ./gnome-photos.nix {}; graphene = callInstalledTest ./graphene.nix {}; + libxmlb = callInstalledTest ./libxmlb.nix {}; ostree = callInstalledTest ./ostree.nix {}; xdg-desktop-portal = callInstalledTest ./xdg-desktop-portal.nix {}; } diff --git a/nixos/tests/installed-tests/libxmlb.nix b/nixos/tests/installed-tests/libxmlb.nix new file mode 100644 index 00000000000..af2bbe9c35e --- /dev/null +++ b/nixos/tests/installed-tests/libxmlb.nix @@ -0,0 +1,5 @@ +{ pkgs, makeInstalledTest, ... }: + +makeInstalledTest { + tested = pkgs.libxmlb; +} diff --git a/nixos/tests/libxmlb.nix b/nixos/tests/libxmlb.nix deleted file mode 100644 index 3bee568ac5a..00000000000 --- a/nixos/tests/libxmlb.nix +++ /dev/null @@ -1,17 +0,0 @@ -# run installed tests -import ./make-test.nix ({ pkgs, ... }: - -{ - name = "libxmlb"; - meta = { - maintainers = pkgs.libxmlb.meta.maintainers; - }; - - machine = { pkgs, ... }: { - environment.systemPackages = with pkgs; [ gnome-desktop-testing ]; - }; - - testScript = '' - $machine->succeed("gnome-desktop-testing-runner -d '${pkgs.libxmlb.installedTests}/share'"); - ''; -}) From 75a8cd9930787ae9e66baabb7af140cd7d693200 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 7 Nov 2019 08:03:58 -0500 Subject: [PATCH 355/377] all-tests.nix: remove libxmlb --- nixos/tests/all-tests.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index fa065197916..5f2972e45a8 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -143,7 +143,6 @@ in ldap = handleTest ./ldap.nix {}; leaps = handleTest ./leaps.nix {}; libgdata = handleTest ./libgdata.nix {}; - libxmlb = handleTest ./libxmlb.nix {}; lidarr = handleTest ./lidarr.nix {}; lightdm = handleTest ./lightdm.nix {}; limesurvey = handleTest ./limesurvey.nix {}; From e253d015a187aa51f85f9f1dfb926b7889c5731b Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 7 Nov 2019 13:59:11 +0100 Subject: [PATCH 356/377] gcab: run & install tests also add nixosTests.installed-tests.gcab for running the installed tests --- nixos/tests/installed-tests/default.nix | 1 + nixos/tests/installed-tests/gcab.nix | 5 +++++ pkgs/development/libraries/gcab/default.nix | 17 +++++++++++++-- .../libraries/gcab/installed-tests-path.patch | 21 +++++++++++++++++++ 4 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 nixos/tests/installed-tests/gcab.nix create mode 100644 pkgs/development/libraries/gcab/installed-tests-path.patch diff --git a/nixos/tests/installed-tests/default.nix b/nixos/tests/installed-tests/default.nix index 7867a61e3dd..fdf6bb91c13 100644 --- a/nixos/tests/installed-tests/default.nix +++ b/nixos/tests/installed-tests/default.nix @@ -67,6 +67,7 @@ in flatpak = callInstalledTest ./flatpak.nix {}; flatpak-builder = callInstalledTest ./flatpak-builder.nix {}; fwupd = callInstalledTest ./fwupd.nix {}; + gcab = callInstalledTest ./gcab.nix {}; gdk-pixbuf = callInstalledTest ./gdk-pixbuf.nix {}; gjs = callInstalledTest ./gjs.nix {}; glib-networking = callInstalledTest ./glib-networking.nix {}; diff --git a/nixos/tests/installed-tests/gcab.nix b/nixos/tests/installed-tests/gcab.nix new file mode 100644 index 00000000000..b24cc2e0126 --- /dev/null +++ b/nixos/tests/installed-tests/gcab.nix @@ -0,0 +1,5 @@ +{ pkgs, makeInstalledTest, ... }: + +makeInstalledTest { + tested = pkgs.gcab; +} diff --git a/pkgs/development/libraries/gcab/default.nix b/pkgs/development/libraries/gcab/default.nix index b4e941eab39..2598b85269f 100644 --- a/pkgs/development/libraries/gcab/default.nix +++ b/pkgs/development/libraries/gcab/default.nix @@ -13,19 +13,25 @@ , glib , zlib , gnome3 +, nixosTests }: stdenv.mkDerivation rec { pname = "gcab"; version = "1.3"; - outputs = [ "bin" "out" "dev" "devdoc" ]; + outputs = [ "bin" "out" "dev" "devdoc" "installedTests" ]; src = fetchurl { url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; sha256 = "1rv81b37d5ya7xpfdxrfk173jjcwabxyng7vafgwyl5myv44qc0h"; }; + patches = [ + # allow installing installed tests to a separate output + ./installed-tests-path.patch + ]; + nativeBuildInputs = [ meson ninja @@ -45,14 +51,21 @@ stdenv.mkDerivation rec { ]; mesonFlags = [ - "-Dtests=false" + "-Dinstalled_tests=true" + "-Dinstalled_test_prefix=${placeholder ''installedTests''}" ]; + doCheck = true; + passthru = { updateScript = gnome3.updateScript { packageName = pname; versionPolicy = "none"; }; + + tests = { + installedTests = nixosTests.installed-tests.gcab; + }; }; meta = with stdenv.lib; { diff --git a/pkgs/development/libraries/gcab/installed-tests-path.patch b/pkgs/development/libraries/gcab/installed-tests-path.patch new file mode 100644 index 00000000000..ab3b6b3fae3 --- /dev/null +++ b/pkgs/development/libraries/gcab/installed-tests-path.patch @@ -0,0 +1,21 @@ +diff --git a/meson_options.txt b/meson_options.txt +index c1b1da1..9b76022 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -4,3 +4,4 @@ + option('vapi', type : 'boolean', value : true, description: 'generate Vala bindings (requires introspection)') + option('tests', type : 'boolean', value : true, description : 'enable tests') + option('installed_tests', type : 'boolean', value : false, description : 'install tests for "as-installed" testing') ++option('installed_test_prefix', type: 'string', value: '', description: 'Prefix for installed tests') +diff --git a/tests/meson.build b/tests/meson.build +index 1e46e2a..aa780d0 100644 +--- a/tests/meson.build ++++ b/tests/meson.build +@@ -1,5 +1,5 @@ +-installed_tests_metadir = join_paths(get_option('datadir'), 'installed-tests', 'libgcab-1.0') +-installed_tests_execdir = join_paths(get_option('libexecdir'), 'installed-tests', 'libgcab-1.0') ++installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', 'libgcab-1.0') ++installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', 'libgcab-1.0') + installed_tests_enabled = get_option('installed_tests') + installed_tests_template_tap = files('template-tap.test.in') + abs_installed_tests_execdir = join_paths(get_option('prefix'), installed_tests_execdir) From 9b99912d8274644f9ec22bb2e0be8f5ec56e1696 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 7 Nov 2019 08:07:51 -0500 Subject: [PATCH 357/377] nixosTests.libgdata: port to python, move to installed-tests --- nixos/tests/all-tests.nix | 1 - nixos/tests/installed-tests/default.nix | 1 + nixos/tests/installed-tests/libgdata.nix | 11 +++++++++++ nixos/tests/libgdata.nix | 21 --------------------- 4 files changed, 12 insertions(+), 22 deletions(-) create mode 100644 nixos/tests/installed-tests/libgdata.nix delete mode 100644 nixos/tests/libgdata.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 5f2972e45a8..e3b7c7a66e6 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -142,7 +142,6 @@ in latestKernel.login = handleTest ./login.nix { latestKernel = true; }; ldap = handleTest ./ldap.nix {}; leaps = handleTest ./leaps.nix {}; - libgdata = handleTest ./libgdata.nix {}; lidarr = handleTest ./lidarr.nix {}; lightdm = handleTest ./lightdm.nix {}; limesurvey = handleTest ./limesurvey.nix {}; diff --git a/nixos/tests/installed-tests/default.nix b/nixos/tests/installed-tests/default.nix index 7809a2ff88d..9c816670658 100644 --- a/nixos/tests/installed-tests/default.nix +++ b/nixos/tests/installed-tests/default.nix @@ -72,6 +72,7 @@ in glib-networking = callInstalledTest ./glib-networking.nix {}; gnome-photos = callInstalledTest ./gnome-photos.nix {}; graphene = callInstalledTest ./graphene.nix {}; + libgdata = callInstalledTest ./libgdata.nix {}; libxmlb = callInstalledTest ./libxmlb.nix {}; ostree = callInstalledTest ./ostree.nix {}; xdg-desktop-portal = callInstalledTest ./xdg-desktop-portal.nix {}; diff --git a/nixos/tests/installed-tests/libgdata.nix b/nixos/tests/installed-tests/libgdata.nix new file mode 100644 index 00000000000..f11a7bc1bc5 --- /dev/null +++ b/nixos/tests/installed-tests/libgdata.nix @@ -0,0 +1,11 @@ +{ pkgs, makeInstalledTest, ... }: + +makeInstalledTest { + tested = pkgs.libgdata; + + testConfig = { + # # GLib-GIO-DEBUG: _g_io_module_get_default: Found default implementation dummy (GDummyTlsBackend) for ‘gio-tls-backend’ + # Bail out! libgdata:ERROR:../gdata/tests/common.c:134:gdata_test_init: assertion failed (child_error == NULL): TLS support is not available (g-tls-error-quark, 0) + services.gnome3.glib-networking.enable = true; + }; +} diff --git a/nixos/tests/libgdata.nix b/nixos/tests/libgdata.nix deleted file mode 100644 index 10a3ca97dd2..00000000000 --- a/nixos/tests/libgdata.nix +++ /dev/null @@ -1,21 +0,0 @@ -# run installed tests -import ./make-test.nix ({ pkgs, ... }: - -{ - name = "libgdata"; - - meta = { - maintainers = pkgs.libgdata.meta.maintainers; - }; - - machine = { pkgs, ... }: { - environment.systemPackages = with pkgs; [ gnome-desktop-testing ]; - # # GLib-GIO-DEBUG: _g_io_module_get_default: Found default implementation dummy (GDummyTlsBackend) for ‘gio-tls-backend’ - # Bail out! libgdata:ERROR:../gdata/tests/common.c:134:gdata_test_init: assertion failed (child_error == NULL): TLS support is not available (g-tls-error-quark, 0) - services.gnome3.glib-networking.enable = true; - }; - - testScript = '' - $machine->succeed("gnome-desktop-testing-runner -d '${pkgs.libgdata.installedTests}/share'"); - ''; -}) From 9693d3922bb9127eb5a00d1d182a5cfbae02544a Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 7 Nov 2019 08:09:26 -0500 Subject: [PATCH 358/377] all-tests.nix: remove gjs.nix --- nixos/tests/all-tests.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index e3b7c7a66e6..636c4e93e9b 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -94,7 +94,6 @@ in gitea = handleTest ./gitea.nix {}; gitlab = handleTest ./gitlab.nix {}; gitolite = handleTest ./gitolite.nix {}; - gjs = handleTest ./gjs.nix {}; glusterfs = handleTest ./glusterfs.nix {}; gnome3-xorg = handleTest ./gnome3-xorg.nix {}; gnome3 = handleTest ./gnome3.nix {}; From 653d84b71741d5541ec8f700e0b1db45a4a6807a Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 7 Nov 2019 08:11:00 -0500 Subject: [PATCH 359/377] glib-networking: correct test attr --- pkgs/development/libraries/glib-networking/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/glib-networking/default.nix b/pkgs/development/libraries/glib-networking/default.nix index a571fffebf0..802a18dfda5 100644 --- a/pkgs/development/libraries/glib-networking/default.nix +++ b/pkgs/development/libraries/glib-networking/default.nix @@ -79,7 +79,7 @@ stdenv.mkDerivation rec { }; tests = { - installedTests = nixosTests.glib-networking; + installedTests = nixosTests.installed-tests.glib-networking; }; }; From 4e75be5cd6886166d2eb3e707313dc6c77d3621c Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 7 Nov 2019 08:11:08 -0500 Subject: [PATCH 360/377] graphene: correct test attr --- pkgs/development/libraries/graphene/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/graphene/default.nix b/pkgs/development/libraries/graphene/default.nix index f1a9dacd4e2..e540604c9cb 100644 --- a/pkgs/development/libraries/graphene/default.nix +++ b/pkgs/development/libraries/graphene/default.nix @@ -60,7 +60,7 @@ stdenv.mkDerivation rec { passthru = { tests = { - installedTests = nixosTests.graphene; + installedTests = nixosTests.installed-tests.graphene; }; }; From 630cb4151e7343f2fd72eaede9f065d5a921b38a Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 7 Nov 2019 08:11:16 -0500 Subject: [PATCH 361/377] libgdata: correct test attr --- pkgs/development/libraries/libgdata/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libgdata/default.nix b/pkgs/development/libraries/libgdata/default.nix index c7ff6d10da3..6830d47df74 100644 --- a/pkgs/development/libraries/libgdata/default.nix +++ b/pkgs/development/libraries/libgdata/default.nix @@ -74,7 +74,7 @@ stdenv.mkDerivation rec { }; tests = { - installedTests = nixosTests.libgdata; + installedTests = nixosTests.installed-tests.libgdata; }; }; From 25454dbad8eb29b4a60fcee792f5a85fea61fda7 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 7 Nov 2019 08:11:25 -0500 Subject: [PATCH 362/377] fwupd: correct test attr --- pkgs/os-specific/linux/firmware/fwupd/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/firmware/fwupd/default.nix b/pkgs/os-specific/linux/firmware/fwupd/default.nix index 75144799d01..78569327219 100644 --- a/pkgs/os-specific/linux/firmware/fwupd/default.nix +++ b/pkgs/os-specific/linux/firmware/fwupd/default.nix @@ -262,7 +262,7 @@ stdenv.mkDerivation rec { ]; tests = { - installedTests = nixosTests.fwupd; + installedTests = nixosTests.installed-tests.fwupd; }; }; From 8267058ad7ff04d8061d929538dafa7770bc4b52 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 7 Nov 2019 08:38:08 -0500 Subject: [PATCH 363/377] libxmlb: correct test attr --- pkgs/development/libraries/libxmlb/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libxmlb/default.nix b/pkgs/development/libraries/libxmlb/default.nix index 0469cf13b0c..75fffa83d24 100644 --- a/pkgs/development/libraries/libxmlb/default.nix +++ b/pkgs/development/libraries/libxmlb/default.nix @@ -62,7 +62,7 @@ stdenv.mkDerivation rec { passthru = { tests = { - installed-tests = nixosTests.libxmlb; + installed-tests = nixosTests.installed-tests.libxmlb; }; }; From 40151a94d340a5d3fd401dc0e75eaa452fd41fea Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 7 Nov 2019 08:38:31 -0500 Subject: [PATCH 364/377] flatpak: add test to passthru --- pkgs/development/libraries/flatpak/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/flatpak/default.nix b/pkgs/development/libraries/flatpak/default.nix index edb3c27ebf5..c0cbb763d36 100644 --- a/pkgs/development/libraries/flatpak/default.nix +++ b/pkgs/development/libraries/flatpak/default.nix @@ -1,6 +1,6 @@ { stdenv, fetchurl, autoreconfHook, docbook_xml_dtd_412, docbook_xml_dtd_42, docbook_xml_dtd_43, docbook_xsl, which, libxml2 , gobject-introspection, gtk-doc, intltool, libxslt, pkgconfig, xmlto, appstream-glib, substituteAll, glibcLocales, yacc, xdg-dbus-proxy, p11-kit -, bubblewrap, bzip2, dbus, glib, gpgme, json-glib, libarchive, libcap, libseccomp, coreutils, gettext, hicolor-icon-theme, fuse +, bubblewrap, bzip2, dbus, glib, gpgme, json-glib, libarchive, libcap, libseccomp, coreutils, gettext, hicolor-icon-theme, fuse, nixosTests , libsoup, lzma, ostree, polkit, python3, systemd, xorg, valgrind, glib-networking, wrapGAppsHook, gnome3, gsettings-desktop-schemas, librsvg }: stdenv.mkDerivation rec { @@ -76,6 +76,12 @@ stdenv.mkDerivation rec { patchShebangs tests ''; + passthru = { + tests = { + installedTests = nixosTests.installed-tests.flatpak; + }; + }; + meta = with stdenv.lib; { description = "Linux application sandboxing and distribution framework"; homepage = https://flatpak.org/; From 7529fd15d59e97bcd990773bfb2c577bcfb25802 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 7 Nov 2019 08:38:41 -0500 Subject: [PATCH 365/377] gdk-pixbuf: add test to passthru --- pkgs/development/libraries/gdk-pixbuf/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/gdk-pixbuf/default.nix b/pkgs/development/libraries/gdk-pixbuf/default.nix index 4cf28b7dbee..f4c554395d4 100644 --- a/pkgs/development/libraries/gdk-pixbuf/default.nix +++ b/pkgs/development/libraries/gdk-pixbuf/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fixDarwinDylibNames, meson, ninja, pkgconfig, gettext, python3, libxml2, libxslt, docbook_xsl +{ stdenv, fetchurl, nixosTests, fixDarwinDylibNames, meson, ninja, pkgconfig, gettext, python3, libxml2, libxslt, docbook_xsl , docbook_xml_dtd_43, gtk-doc, glib, libtiff, libjpeg, libpng, libX11, gnome3 , jasper, gobject-introspection, doCheck ? false, makeWrapper }: @@ -85,6 +85,10 @@ in stdenv.mkDerivation rec { packageName = pname; }; + tests = { + installedTests = nixosTests.installed-tests.gdk-pixbuf; + }; + # gdk_pixbuf_moduledir variable from gdk-pixbuf-2.0.pc moduleDir = "lib/gdk-pixbuf-2.0/2.10.0/loaders"; }; From 1891b0030dcd84885fc56e234d45014f11f285b7 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 7 Nov 2019 08:38:54 -0500 Subject: [PATCH 366/377] xdg-desktop-portal: add test to passthru --- pkgs/development/libraries/xdg-desktop-portal/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/xdg-desktop-portal/default.nix b/pkgs/development/libraries/xdg-desktop-portal/default.nix index 4be7bd1474c..d16c5d670e5 100644 --- a/pkgs/development/libraries/xdg-desktop-portal/default.nix +++ b/pkgs/development/libraries/xdg-desktop-portal/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, substituteAll, autoreconfHook, pkgconfig, libxml2, glib, pipewire, fontconfig, flatpak, gsettings-desktop-schemas, acl, dbus, fuse, geoclue2, json-glib, wrapGAppsHook }: +{ stdenv, fetchFromGitHub, nixosTests, substituteAll, autoreconfHook, pkgconfig, libxml2, glib, pipewire, fontconfig, flatpak, gsettings-desktop-schemas, acl, dbus, fuse, geoclue2, json-glib, wrapGAppsHook }: stdenv.mkDerivation rec { pname = "xdg-desktop-portal"; @@ -35,6 +35,12 @@ stdenv.mkDerivation rec { "installed_test_metadir=$(installedTests)/share/installed-tests/xdg-desktop-portal" ]; + passthru = { + tests = { + installedTests = nixosTests.installed-tests.xdg-desktop-portal; + }; + }; + meta = with stdenv.lib; { description = "Desktop integration portals for sandboxed apps"; license = licenses.lgpl21; From 40910462a8a170808d1ca9515c92f0fc0b794278 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 7 Nov 2019 08:39:09 -0500 Subject: [PATCH 367/377] flatpak-builder: add test to passthru --- pkgs/development/tools/flatpak-builder/default.nix | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/flatpak-builder/default.nix b/pkgs/development/tools/flatpak-builder/default.nix index f7d344506d5..1bb5c23645d 100644 --- a/pkgs/development/tools/flatpak-builder/default.nix +++ b/pkgs/development/tools/flatpak-builder/default.nix @@ -1,6 +1,7 @@ { stdenv , fetchurl , substituteAll +, nixosTests , autoreconfHook , docbook_xml_dtd_412 @@ -131,7 +132,16 @@ in stdenv.mkDerivation rec { ''; passthru = { - installedTestsDependencies = [ gnupg ostree python2 gnumake ]; + installedTestsDependencies = [ + gnupg + ostree + python2 + gnumake + ]; + + tests = { + installedTests = nixosTests.installed-tests.flatpak-builder; + }; }; meta = with stdenv.lib; { From 247422c1873c616ee16b4931c38e2d11eb5ae2fd Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 7 Nov 2019 08:39:26 -0500 Subject: [PATCH 368/377] colord: add test to passthru --- pkgs/tools/misc/colord/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pkgs/tools/misc/colord/default.nix b/pkgs/tools/misc/colord/default.nix index 91fb208f5c0..54379ec08f0 100644 --- a/pkgs/tools/misc/colord/default.nix +++ b/pkgs/tools/misc/colord/default.nix @@ -1,5 +1,6 @@ { stdenv , fetchurl +, nixosTests , bash-completion , glib , polkit @@ -97,6 +98,12 @@ stdenv.mkDerivation rec { PKG_CONFIG_BASH_COMPLETION_COMPLETIONSDIR= "${placeholder "out"}/share/bash-completion/completions"; PKG_CONFIG_UDEV_UDEVDIR = "${placeholder "out"}/lib/udev"; + passthru = { + tests = { + installedTests = nixosTests.installed-tests.colord; + }; + }; + meta = with stdenv.lib; { description = "System service to manage, install and generate color profiles to accurately color manage input and output devices"; homepage = https://www.freedesktop.org/software/colord/; From 3e09be839a5774af2d6fe77bb2b9646207920571 Mon Sep 17 00:00:00 2001 From: worldofpeace Date: Thu, 7 Nov 2019 08:39:54 -0500 Subject: [PATCH 369/377] ostree: add test to passthru --- pkgs/tools/misc/ostree/default.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/misc/ostree/default.nix b/pkgs/tools/misc/ostree/default.nix index 4c5e4a50ef6..8ec9fc1d488 100644 --- a/pkgs/tools/misc/ostree/default.nix +++ b/pkgs/tools/misc/ostree/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, fetchpatch, pkgconfig, gtk-doc, gobject-introspection, gjs +{ stdenv, fetchurl, fetchpatch, pkgconfig, gtk-doc, gobject-introspection, gjs, nixosTests , glib, systemd, xz, e2fsprogs, libsoup, gpgme, which, autoconf, automake, libtool, fuse, utillinuxMinimal, libselinux , libarchive, libcap, bzip2, yacc, libxslt, docbook_xsl, docbook_xml_dtd_42, python3 }: @@ -54,6 +54,12 @@ stdenv.mkDerivation rec { "installed_test_metadir=${placeholder "installedTests"}/share/installed-tests/libostree" ]; + passthru = { + tests = { + installedTests = nixosTests.installed-tests.ostree; + }; + }; + meta = with stdenv.lib; { description = "Git for operating system binaries"; homepage = https://ostree.readthedocs.io/en/latest/; From fae720c861d7a26f27b6eb4f981a16d3160bad79 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 7 Nov 2019 14:49:05 +0100 Subject: [PATCH 370/377] gcab: propagate dependencies --- pkgs/development/libraries/gcab/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/libraries/gcab/default.nix b/pkgs/development/libraries/gcab/default.nix index 2598b85269f..c05bb95913e 100644 --- a/pkgs/development/libraries/gcab/default.nix +++ b/pkgs/development/libraries/gcab/default.nix @@ -50,6 +50,11 @@ stdenv.mkDerivation rec { zlib ]; + # required by libgcab-1.0.pc + propagatedBuildInputs = [ + glib + ]; + mesonFlags = [ "-Dinstalled_tests=true" "-Dinstalled_test_prefix=${placeholder ''installedTests''}" From 2c09cfc097daef5b85d21fe906441b5702bb2101 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Wed, 23 Oct 2019 20:22:39 +0200 Subject: [PATCH 371/377] nixos-rebuild: add explicit option to enable (remote) sudo Add --use-remote-sudo option. When set, remote commands will be prefixed with 'sudo'. This allows using sudo remotely _without_ having to use sudo locally (when using --build-host/--taget-host). --- nixos/doc/manual/man-nixos-rebuild.xml | 14 ++++++++++++++ nixos/modules/installer/tools/nixos-rebuild.sh | 9 +++++---- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/nixos/doc/manual/man-nixos-rebuild.xml b/nixos/doc/manual/man-nixos-rebuild.xml index c697b7ee047..495dbc8859b 100644 --- a/nixos/doc/manual/man-nixos-rebuild.xml +++ b/nixos/doc/manual/man-nixos-rebuild.xml @@ -494,6 +494,20 @@ + + + + + + + + When set, nixos-rebuild prefixes remote commands that run on + the and + systems with sudo. Setting this option allows + deploying as a non-root user. + + + diff --git a/nixos/modules/installer/tools/nixos-rebuild.sh b/nixos/modules/installer/tools/nixos-rebuild.sh index 891f374df53..c53dc1000c4 100644 --- a/nixos/modules/installer/tools/nixos-rebuild.sh +++ b/nixos/modules/installer/tools/nixos-rebuild.sh @@ -90,6 +90,11 @@ while [ "$#" -gt 0 ]; do targetHost="$1" shift 1 ;; + --use-remote-sudo) + # note the trailing space + maybeSudo="sudo " + shift 1 + ;; *) echo "$0: unknown option \`$i'" exit 1 @@ -97,10 +102,6 @@ while [ "$#" -gt 0 ]; do esac done -if [ -n "$SUDO_USER" ]; then - maybeSudo="sudo " -fi - if [ -z "$buildHost" -a -n "$targetHost" ]; then buildHost="$targetHost" fi From 82af060040c4e127cd6819cc1c24afbf33b20c91 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Thu, 31 Oct 2019 21:28:49 +0000 Subject: [PATCH 372/377] ocamlPackages.lwt3: remove at 3.3.0 --- pkgs/development/ocaml-modules/lwt/3.x.nix | 39 ---------------------- pkgs/top-level/ocaml-packages.nix | 4 --- 2 files changed, 43 deletions(-) delete mode 100644 pkgs/development/ocaml-modules/lwt/3.x.nix diff --git a/pkgs/development/ocaml-modules/lwt/3.x.nix b/pkgs/development/ocaml-modules/lwt/3.x.nix deleted file mode 100644 index c8371feb905..00000000000 --- a/pkgs/development/ocaml-modules/lwt/3.x.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ stdenv, fetchzip, pkgconfig, ncurses, libev, dune -, ocaml, findlib, cppo -, ocaml-migrate-parsetree, ppx_tools_versioned, result -, withP4 ? true -, camlp4 ? null -}: - -stdenv.mkDerivation rec { - version = "3.3.0"; - name = "ocaml${ocaml.version}-lwt-${version}"; - - src = fetchzip { - url = "https://github.com/ocsigen/lwt/archive/${version}.tar.gz"; - sha256 = "0n87hcyl4svy0risj439wyfq6bl77qxq3nraqgdr1qbz5lskbq2j"; - }; - - preConfigure = '' - ocaml src/util/configure.ml -use-libev true -use-camlp4 ${if withP4 then "true" else "false"} - ''; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ ncurses ocaml findlib dune cppo - ocaml-migrate-parsetree ppx_tools_versioned ] - ++ stdenv.lib.optional withP4 camlp4; - propagatedBuildInputs = [ libev result ]; - - installPhase = '' - ocaml src/util/install_filter.ml - ${dune.installPhase} - ''; - - meta = { - homepage = "https://ocsigen.org/lwt/"; - description = "A cooperative threads library for OCaml"; - maintainers = [ stdenv.lib.maintainers.vbgl ]; - license = stdenv.lib.licenses.lgpl21; - inherit (ocaml.meta) platforms; - }; -} diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 36aa85d570c..38b0d43706a 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -422,10 +422,6 @@ let lwt2 = callPackage ../development/ocaml-modules/lwt/legacy.nix { }; - lwt3 = if lib.versionOlder "4.02" ocaml.version - then callPackage ../development/ocaml-modules/lwt/3.x.nix { } - else throw "lwt3 is not available for OCaml ${ocaml.version}"; - lwt4 = callPackage ../development/ocaml-modules/lwt/4.x.nix { }; ocaml_lwt = if lib.versionOlder "4.02" ocaml.version then lwt4 else lwt2; From 5f6f75fcec8aecc6abc26b7b5deb3936a0d5703e Mon Sep 17 00:00:00 2001 From: James Kay Date: Mon, 7 Oct 2019 14:29:31 +0100 Subject: [PATCH 373/377] glfw: 3.2.1 -> 3.3 --- pkgs/development/libraries/glfw/3.x.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/glfw/3.x.nix b/pkgs/development/libraries/glfw/3.x.nix index 6532d6f81b5..cf988d32399 100644 --- a/pkgs/development/libraries/glfw/3.x.nix +++ b/pkgs/development/libraries/glfw/3.x.nix @@ -1,16 +1,17 @@ -{ stdenv, lib, fetchFromGitHub, cmake, libGL, libXrandr, libXinerama, libXcursor, libX11 +{ stdenv, lib, fetchFromGitHub, cmake +, libGL, libXrandr, libXinerama, libXcursor, libX11, libXi, libXext , Cocoa, Kernel, fixDarwinDylibNames }: stdenv.mkDerivation rec { - version = "3.2.1"; + version = "3.3"; pname = "glfw"; src = fetchFromGitHub { owner = "glfw"; repo = "GLFW"; rev = version; - sha256 = "0gq6ad38b3azk0w2yy298yz2vmg2jmf9g0ydidqbmiswpk25ills"; + sha256 = "1f1hqpqffzg46z33ybs2c3akmkly7b3qmgp5byk50nvad6g2pm4p"; }; enableParallelBuilding = true; @@ -19,7 +20,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; - buildInputs = [ libX11 libXrandr libXinerama libXcursor ] + buildInputs = [ libX11 libXrandr libXinerama libXcursor libXi libXext ] ++ lib.optionals stdenv.isDarwin [ Cocoa Kernel fixDarwinDylibNames ]; cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ]; @@ -32,7 +33,7 @@ stdenv.mkDerivation rec { description = "Multi-platform library for creating OpenGL contexts and managing input, including keyboard, mouse, joystick and time"; homepage = https://www.glfw.org/; license = licenses.zlib; - maintainers = with maintainers; [ marcweber ]; + maintainers = with maintainers; [ marcweber twey ]; platforms = platforms.unix; }; } From 8de49b53a2e54a5e6dfcd19793406124080fdcc5 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Date: Wed, 6 Nov 2019 13:43:43 -0800 Subject: [PATCH 374/377] vimPlugins: update --- pkgs/misc/vim-plugins/generated.nix | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 7385c86ffdc..777854d1acd 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -2104,12 +2104,12 @@ let papercolor-theme = buildVimPluginFrom2Nix { pname = "papercolor-theme"; - version = "2019-07-07"; + version = "2019-11-06"; src = fetchFromGitHub { owner = "NLKNguyen"; repo = "papercolor-theme"; - rev = "20f3b25cdd772d4483eb8ced453f94f93b6126e1"; - sha256 = "1yck7f48v9rz7wq2q2b372bv07qmpj562ncwfdiavsgy6wms3p4b"; + rev = "ddd09867ed4e020b3ba2eb47dc3ef365da5b0fed"; + sha256 = "1dhbnd99xs6l5alqhn9m1nynmr9sbvrqj2137l23ysisprl3rgmr"; }; }; @@ -2137,12 +2137,12 @@ let plantuml-syntax = buildVimPluginFrom2Nix { pname = "plantuml-syntax"; - version = "2019-10-17"; + version = "2019-11-06"; src = fetchFromGitHub { owner = "aklt"; repo = "plantuml-syntax"; - rev = "08f69d9dfc314021eef8802f1acbce051bf7fda0"; - sha256 = "040ya0grhalylnaqrjgdlw0f7mfl87pz5y3f624gqq73pcf36skk"; + rev = "82ff416ce99cc9f69b1af54b8832eaf6cdbeaea6"; + sha256 = "1297h9jipfx2xw5dqh1286g2syv5c18g15644lqn11s62skqxd16"; }; }; @@ -4713,12 +4713,12 @@ let vim-ruby = buildVimPluginFrom2Nix { pname = "vim-ruby"; - version = "2019-09-05"; + version = "2019-11-06"; src = fetchFromGitHub { owner = "vim-ruby"; repo = "vim-ruby"; - rev = "1c70532339889b7794a52b956f389b4f9ab9b3eb"; - sha256 = "1rj06j71f08b1may9pm27xf6k19bcw3jq3jbwndd975qram7zcr0"; + rev = "d37f5a52a97239dcd503a3a84bb32dfc3200b5f7"; + sha256 = "158wdfkskxxqzjm0dls3sza4nfrp2dqxwsdiiqfhar4vm2n7x8yp"; }; }; @@ -4944,12 +4944,12 @@ let vim-startify = buildVimPluginFrom2Nix { pname = "vim-startify"; - version = "2019-10-27"; + version = "2019-11-06"; src = fetchFromGitHub { owner = "mhinz"; repo = "vim-startify"; - rev = "bba214f6b39d782c15f2d97fbc98fd0d18ace909"; - sha256 = "0cmqklc553wqxs72qnwqsp1nchsxi46kfyz01zr5bdxzjg4afyis"; + rev = "2ea908578955c9a4ab6d0337531c0f122b51c182"; + sha256 = "0014w64g9p3rq7mk9ri3hhmgyr0wrmxgv24gcaw5hr90cr58gs6b"; }; }; From b417fededc650023df0c70362b6dc1375c212306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9-Patrick=20Bubel?= Date: Tue, 5 Nov 2019 19:37:47 +0100 Subject: [PATCH 375/377] pythonPackages.jsonrpclib-pelix: remove moredread as maintainer --- pkgs/development/python-modules/jsonrpclib-pelix/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/jsonrpclib-pelix/default.nix b/pkgs/development/python-modules/jsonrpclib-pelix/default.nix index 4697fb0c113..2d017ca1101 100644 --- a/pkgs/development/python-modules/jsonrpclib-pelix/default.nix +++ b/pkgs/development/python-modules/jsonrpclib-pelix/default.nix @@ -18,6 +18,6 @@ buildPythonPackage rec { description = "JSON RPC client library - Pelix compatible fork"; homepage = https://pypi.python.org/pypi/jsonrpclib-pelix/; license = lib.licenses.asl20; - maintainers = with maintainers; [ moredread ]; + maintainers = with maintainers; [ ]; }; } From 060f3125fcf34c116e50f98ec12c1f813043050c Mon Sep 17 00:00:00 2001 From: Nathan van Doorn Date: Thu, 7 Nov 2019 18:42:51 +0000 Subject: [PATCH 376/377] vimPlugins: Update --- pkgs/misc/vim-plugins/generated.nix | 113 +++++++++++++++------------- 1 file changed, 62 insertions(+), 51 deletions(-) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index 777854d1acd..bcb15c39304 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -61,12 +61,12 @@ let ale = buildVimPluginFrom2Nix { pname = "ale"; - version = "2019-10-29"; + version = "2019-11-07"; src = fetchFromGitHub { owner = "w0rp"; repo = "ale"; - rev = "2d9380d75c5c27a3241925d24ab3be8977a43207"; - sha256 = "1xn9c8j3z7344a1cczpccig1hg1kzq286ch60n22jrm6fq732znc"; + rev = "db6b1b5ecc17558f87f55b159f90ebf36677b6b3"; + sha256 = "1sm6s0zn3gdm3bjp912ydqzskynzi2rw9v8q80g8p277c9vil28q"; }; }; @@ -92,6 +92,17 @@ let }; }; + antonys-macro-repeater = buildVimPluginFrom2Nix { + pname = "antonys-macro-repeater"; + version = "2017-09-10"; + src = fetchFromGitHub { + owner = "ckarnell"; + repo = "antonys-macro-repeater"; + rev = "61784d86b2654f3e261b9cc33360c5197704e266"; + sha256 = "1cq5r091qbxjs9s12f7bb2fdm43gxwpnnh2l8nhj0n69jfk7gblw"; + }; + }; + argtextobj-vim = buildVimPluginFrom2Nix { pname = "argtextobj-vim"; version = "2010-10-18"; @@ -402,12 +413,12 @@ let coc-lists = buildVimPluginFrom2Nix { pname = "coc-lists"; - version = "2019-10-16"; + version = "2019-11-07"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc-lists"; - rev = "25cd38285df23766fa8c543c307f9ddf65120902"; - sha256 = "0smilk9mi6d4v1p03wqigvri8vk0k30fb8gqlqz5gpxdf3wwn90v"; + rev = "f1cb662a5d23f792c6920f122d200731a77150b9"; + sha256 = "1j5n859fyi7wvyqhqvcd81y2h7qiddwqfz3kqx3ri0br0j4hvwc4"; }; }; @@ -446,12 +457,12 @@ let coc-python = buildVimPluginFrom2Nix { pname = "coc-python"; - version = "2019-08-20"; + version = "2019-11-07"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc-python"; - rev = "65ff16f71ead209e83d34c639594a66df2e19c49"; - sha256 = "11bmf8rzdkgrmanyfmjckm2s3nby143lnra80q9bj2fs3dh9l5hd"; + rev = "01cf6f3833d44fb83c38655b496212625329c90b"; + sha256 = "0vn9fjhhlgciv7kwda4hn2lg7fisxgdsg47sbqz75qirnixw8mjv"; }; }; @@ -556,12 +567,12 @@ let coc-tsserver = buildVimPluginFrom2Nix { pname = "coc-tsserver"; - version = "2019-10-31"; + version = "2019-11-07"; src = fetchFromGitHub { owner = "neoclide"; repo = "coc-tsserver"; - rev = "6de5817d03ddcdadf2a513e6d057e71b715ceb92"; - sha256 = "1k5wbv8a8h43zscm6r4axfd9hajb6kfmz8bqazhzbl423rbss1pn"; + rev = "c7c4eea74cf28d22ff5373828fda411588065c30"; + sha256 = "0dckx6p72llkp31gvfs4qp2jpc658av0xjpqbqqy7vi0y487jxq4"; }; }; @@ -766,12 +777,12 @@ let ctrlp-vim = buildVimPluginFrom2Nix { pname = "ctrlp-vim"; - version = "2019-09-30"; + version = "2019-11-07"; src = fetchFromGitHub { owner = "ctrlpvim"; repo = "ctrlp.vim"; - rev = "6bca8770a04c099e8c6ec7c7ea58cf9a17c8e44d"; - sha256 = "1h0k9s5adpplrd5zga8078khdld02wxrwwg47q6n0sz5f40vjncp"; + rev = "44c8e24956d7dcfee3ee6083a0573fed31d136ed"; + sha256 = "0g1j4g2p48pwcvbj2p36122q71x1xybq5aqqyz40n16sjjrvcz02"; }; }; @@ -832,12 +843,12 @@ let denite-nvim = buildVimPluginFrom2Nix { pname = "denite-nvim"; - version = "2019-10-27"; + version = "2019-11-07"; src = fetchFromGitHub { owner = "Shougo"; repo = "denite.nvim"; - rev = "18ab1648891e360345e1d9f3b004fb2eabf69ee7"; - sha256 = "03pxdw9g2j0szvpncvxhwd2wx3v1fffx5il7ld3mkqm8ymi0b88l"; + rev = "8962d57791f6c373053ee3e6175659c5158ecd47"; + sha256 = "004w7dp7shbgicqkzs8v2x0dapf0kx4h0g55q0si3rrsha2gmw10"; }; }; @@ -1212,12 +1223,12 @@ let ghcid = buildVimPluginFrom2Nix { pname = "ghcid"; - version = "2019-11-02"; + version = "2019-11-06"; src = fetchFromGitHub { owner = "ndmitchell"; repo = "ghcid"; - rev = "b3b376e42389463ffc5e450af40f79d6b6343a17"; - sha256 = "08gvkgmka199vxkxxgdlwk9hacqm8b9icycl4ddglx0sn6w6y9vg"; + rev = "d73f77a98d20673926a586cc471e557887f4a5d4"; + sha256 = "0kq2qzb5rrdav51jlhg6f8ib2zq6crfic9295jz0gryzc9hm4ynq"; }; }; @@ -1344,12 +1355,12 @@ let iceberg-vim = buildVimPluginFrom2Nix { pname = "iceberg-vim"; - version = "2019-08-31"; + version = "2019-11-07"; src = fetchFromGitHub { owner = "cocopon"; repo = "iceberg.vim"; - rev = "ddc3e4ea485771e4f0b939fd8259f3152eb1bd29"; - sha256 = "0128yxhafndllc383ncw4ka0r7q8mwvb3nx70f4plb6m3f07x8rm"; + rev = "dc4b4b5838d126c22c44229a3ee170f6ac79ba86"; + sha256 = "1hicambipbgwf22fax782gpfmcndcpikj3bpf8v91wd5fxm7ik74"; }; }; @@ -1884,12 +1895,12 @@ let neosnippet-vim = buildVimPluginFrom2Nix { pname = "neosnippet-vim"; - version = "2019-11-03"; + version = "2019-11-07"; src = fetchFromGitHub { owner = "Shougo"; repo = "neosnippet.vim"; - rev = "23c97432929721af9130a163faa442dce76b1184"; - sha256 = "0hlb1wqh0lzl65xfb3as8f2sdrw4wfp9z7nwdg8rfzxgnbb2wxpp"; + rev = "b8350cbbcdc951e1bac962f8339b011e2632d03f"; + sha256 = "11k3a8qgkl5wrk0wxhpnsvpcf5ymbb4kmnlp0k253ga6yhlxspmx"; }; }; @@ -1906,12 +1917,12 @@ let neoterm = buildVimPluginFrom2Nix { pname = "neoterm"; - version = "2019-09-21"; + version = "2019-11-07"; src = fetchFromGitHub { owner = "kassio"; repo = "neoterm"; - rev = "f6c22fda80455b52957b3fd11d94acc44db21250"; - sha256 = "1r1fx958qhbs8xq31wrp5jyfvqjrs611xywv7avpwy9991rh33xv"; + rev = "d13859a24612d1577f04a1eb62efccfc6b5825b8"; + sha256 = "0mq0bn4sdb1q1wyz458qqqzvf3vw2srjn6hzj5cp4zmdy4954ibj"; }; }; @@ -2743,12 +2754,12 @@ let ultisnips = buildVimPluginFrom2Nix { pname = "ultisnips"; - version = "2019-11-05"; + version = "2019-11-07"; src = fetchFromGitHub { owner = "SirVer"; repo = "ultisnips"; - rev = "84c84d5e64633e56c6e652c7dd6a9ca45ba9fa5a"; - sha256 = "04m1rhi69wkv0nspgyibj66wplj1imbdw3311ab8qsvqm6wmz60w"; + rev = "74dae03d02183b4416e2a3f8a80b69fefc2e5aee"; + sha256 = "0iyj84k8gygz7ybxlw04yk81z7bs9ridisi1yak3iphwqxh5nj1z"; }; }; @@ -4229,12 +4240,12 @@ let vim-lsc = buildVimPluginFrom2Nix { pname = "vim-lsc"; - version = "2019-10-29"; + version = "2019-11-06"; src = fetchFromGitHub { owner = "natebosch"; repo = "vim-lsc"; - rev = "d6bb42bf75bd5dfd28b1f3216749475f940abc5b"; - sha256 = "0d68cajna2q92ikpyzbhbia6wq6v5n4pnz7zcw8bp4zayj5rv48c"; + rev = "44307620170d66b6e050cd02ac171143cc35ad2e"; + sha256 = "0bndxb4dyr4av5ivm06gnm9647lsd4zma9dzc8cjihbvagpayllq"; }; }; @@ -4460,12 +4471,12 @@ let vim-pandoc = buildVimPluginFrom2Nix { pname = "vim-pandoc"; - version = "2019-10-28"; + version = "2019-11-07"; src = fetchFromGitHub { owner = "vim-pandoc"; repo = "vim-pandoc"; - rev = "4f1d28c7c10376b8f03ea89e31be71419549fbb9"; - sha256 = "1wc7fcamblpjym4vs38spdlpj58r0lm33c1fxzbrl107yj4902w3"; + rev = "9275cdb54b55eda88f3f0066783ea72410ccf678"; + sha256 = "0532bq9667dfz79fg4blrzc6d9y1cz2xr5h7jda3psrj27adrlxk"; }; }; @@ -4889,12 +4900,12 @@ let vim-snippets = buildVimPluginFrom2Nix { pname = "vim-snippets"; - version = "2019-11-05"; + version = "2019-11-07"; src = fetchFromGitHub { owner = "honza"; repo = "vim-snippets"; - rev = "efecc996d48ca4a2df835ebfe4c72724238fabd4"; - sha256 = "1pnw795yqdfj5djpkzpshknl6g4lb1jr1hrcpyl43l5wpgm7nxn5"; + rev = "5d259617f5198e511a759ccf4fb3000921abae21"; + sha256 = "1hxk0ab1r25m1mc09lvw6rsg9wrjrl0bgxql8slqpa7mqrkp47rn"; }; }; @@ -5263,12 +5274,12 @@ let vim-visual-multi = buildVimPluginFrom2Nix { pname = "vim-visual-multi"; - version = "2019-10-23"; + version = "2019-11-07"; src = fetchFromGitHub { owner = "mg979"; repo = "vim-visual-multi"; - rev = "55fb6a5fe58292e5c2c76a52a3c5143ed6198604"; - sha256 = "1k81cnn685xyqxhng6vndnvd7770dj3smdlfqjns4dm69bs76md9"; + rev = "3eb10e09315e83dcc7470e95b2fc18b3b1d71a31"; + sha256 = "0p73ccbfa4b3x4kxzys5k8rk85y4pwdbws8ngjc9axfybg0nx0iy"; }; }; @@ -5450,12 +5461,12 @@ let vimtex = buildVimPluginFrom2Nix { pname = "vimtex"; - version = "2019-11-03"; + version = "2019-11-06"; src = fetchFromGitHub { owner = "lervag"; repo = "vimtex"; - rev = "878b8e860e0ef5ef52082579db4b6cf131689709"; - sha256 = "1ivnlwkyai2y20x4m7p91h3p9y70139ys736ssm4igjjd50dcihf"; + rev = "ed84cd409a77711b5a0ac07ec2f8f2aa5b352ad2"; + sha256 = "0gnjdpirahc4axh9c8fykvk0lcffhq26457pn4agd0q3qzjiivzf"; }; }; @@ -5650,12 +5661,12 @@ let zig-vim = buildVimPluginFrom2Nix { pname = "zig-vim"; - version = "2019-09-26"; + version = "2019-11-06"; src = fetchFromGitHub { owner = "zig-lang"; repo = "zig.vim"; - rev = "08ba9f9354698c3ab85bf84b8390ce909d3bc221"; - sha256 = "1m44hm7jgv1v5z88mi5ha0p1lrffxx2h0p25vxq12zd2x834vghf"; + rev = "0d6b1d13ab47759be3d9e6743bc23f0df143b04e"; + sha256 = "1vhikp9cbjdgcpf5asxlnr2fvysc9vx51v2i7b94kh4kk7ps08yz"; }; }; From 31315ec730db037d3e558ced42959b26ed557432 Mon Sep 17 00:00:00 2001 From: Nathan van Doorn Date: Thu, 7 Nov 2019 18:46:35 +0000 Subject: [PATCH 377/377] vimPlugins.vim-metamath: init at 2017-02-10 --- pkgs/misc/vim-plugins/generated.nix | 11 +++++++++++ pkgs/misc/vim-plugins/overrides.nix | 4 ++++ pkgs/misc/vim-plugins/vim-plugin-names | 1 + 3 files changed, 16 insertions(+) diff --git a/pkgs/misc/vim-plugins/generated.nix b/pkgs/misc/vim-plugins/generated.nix index bcb15c39304..1eb8ede88df 100644 --- a/pkgs/misc/vim-plugins/generated.nix +++ b/pkgs/misc/vim-plugins/generated.nix @@ -4293,6 +4293,17 @@ let }; }; + vim-metamath = buildVimPluginFrom2Nix { + pname = "vim-metamath"; + version = "2017-02-10"; + src = fetchFromGitHub { + owner = "david-a-wheeler"; + repo = "vim-metamath"; + rev = "50aff63608256909159f1b8fc3f09ba61b2bb9bd"; + sha256 = "0gwqafhr18wv9ygq47cxwi0k4gj1xll4z8s61w9l9vwaiy5znssh"; + }; + }; + vim-misc = buildVimPluginFrom2Nix { pname = "vim-misc"; version = "2015-05-21"; diff --git a/pkgs/misc/vim-plugins/overrides.nix b/pkgs/misc/vim-plugins/overrides.nix index 0c05217b819..73dd2bdec5e 100644 --- a/pkgs/misc/vim-plugins/overrides.nix +++ b/pkgs/misc/vim-plugins/overrides.nix @@ -379,6 +379,10 @@ self: super: { ''; }); + vim-metamath = super.vim-metamath.overrideAttrs(old: { + preInstall = "cd vim"; + }); + vim-snipmate = super.vim-snipmate.overrideAttrs(old: { dependencies = with super; [ vim-addon-mw-utils tlib_vim ]; }); diff --git a/pkgs/misc/vim-plugins/vim-plugin-names b/pkgs/misc/vim-plugins/vim-plugin-names index 57f265775f6..45ed7300160 100644 --- a/pkgs/misc/vim-plugins/vim-plugin-names +++ b/pkgs/misc/vim-plugins/vim-plugin-names @@ -57,6 +57,7 @@ dag/vim-fish dannyob/quickfixstatus darfink/starsearch.vim dart-lang/dart-vim-plugin +david-a-wheeler/vim-metamath davidhalter/jedi-vim dcharbon/vim-flatbuffers deoplete-plugins/deoplete-dictionary