From 42af3b3ab73379e8ce9ec604e0c4e3fd2afc0194 Mon Sep 17 00:00:00 2001 From: Pasquale Date: Fri, 28 Jun 2019 17:28:37 +0200 Subject: [PATCH 01/31] nixos: add programs.kdeconnect option --- nixos/modules/module-list.nix | 1 + nixos/modules/programs/kdeconnect.nix | 35 +++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 nixos/modules/programs/kdeconnect.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 6b8c8255c4db..1dd1054cdacb 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -112,6 +112,7 @@ ./programs/iftop.nix ./programs/iotop.nix ./programs/java.nix + ./programs/kdeconnect.nix ./programs/kbdlight.nix ./programs/less.nix ./programs/light.nix diff --git a/nixos/modules/programs/kdeconnect.nix b/nixos/modules/programs/kdeconnect.nix new file mode 100644 index 000000000000..673449b9f633 --- /dev/null +++ b/nixos/modules/programs/kdeconnect.nix @@ -0,0 +1,35 @@ +{ config, pkgs, lib, ... }: +with lib; +{ + options.programs.kdeconnect = { + enable = mkEnableOption '' + kdeconnect. + + Note that it will open the TCP and UDP port from + 1714 to 1764 as they are needed for it to function properly. + You can use the to use + gnomeExtensions.gsconnect as an alternative + implementation if you use Gnome. + ''; + package = mkOption { + default = pkgs.kdeconnect; + defaultText = "pkgs.kdeconnect"; + type = types.package; + example = literalExample "pkgs.gnomeExtensions.gsconnect"; + description = '' + The package providing the implementation for kdeconnect. + ''; + }; + }; + config = + let + cfg = config.programs.kdeconnect; + in + mkIf cfg.enable { + environment.systemPackages = [ cfg.package ]; + networking.firewall = rec { + allowedTCPPortRanges = [ { from = 1714; to = 1764; } ]; + allowedUDPPortRanges = allowedTCPPortRanges; + }; + }; +} From e3cd6444584dc2d018a39ad7f94769caf043e621 Mon Sep 17 00:00:00 2001 From: Ning Shang Date: Fri, 16 Apr 2021 10:15:25 -0700 Subject: [PATCH 02/31] iso-image: Use fixed-order mcopy instead of file globbing mcopy file globbing is non-deterministic with respect to the underlying file system. As a result, the current mcopy approach is less likely to reproduce efi.img on different machines. We replace mcopy file globbing with fixed-order mmd and mcopy operations for better determinism. We also use faketime on mmd for the same reason. We use faketime, mmd, and mcopy directly, becase they are already in PATH. Thank misuzu@ for the feedback. --- nixos/modules/installer/cd-dvd/iso-image.nix | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix index 324b38070e47..5910bfc05ac2 100644 --- a/nixos/modules/installer/cd-dvd/iso-image.nix +++ b/nixos/modules/installer/cd-dvd/iso-image.nix @@ -415,7 +415,24 @@ let echo "Image size: $image_size" truncate --size=$image_size "$out" faketime "2000-01-01 00:00:00" mkfs.vfat -i 12345678 -n EFIBOOT "$out" - mcopy -psvm -i "$out" ./EFI ./boot :: + + # Force a fixed order in mcopy for better determinism, and avoid file globbing + for d in $(find EFI -type d | sort); do + faketime "2000-01-01 00:00:00" mmd -i "$out" "::/$d" + done + + for d in $(find boot -type d | sort); do + faketime "2000-01-01 00:00:00" mmd -i "$out" "::/$d" + done + + for f in $(find EFI -type f | sort); do + mcopy -pvm -i "$out" "$f" "::/$f" + done + + for f in $(find boot -type f | sort); do + mcopy -pvm -i "$out" "$f" "::/$f" + done + # Verify the FAT partition. fsck.vfat -vn "$out" ''; # */ From 4db7eb476f30a819eacd1459d78bf8fe5b3bccb3 Mon Sep 17 00:00:00 2001 From: Ning Shang Date: Thu, 20 May 2021 11:01:17 -0700 Subject: [PATCH 03/31] iso-image: Workaround for better determinism in du output The value of du output depends on the underlying file system, and thus is not fully deterministic. This workaround rounds up the disk usage size to the nearest multiple of 1MB, to increase the probability that two du output values on two different file systems fall within the same 1MB window. Note that this workaround won't make du output 100% reproducible, but will increase the probability of getting deterministic builds across different file systems. --- nixos/modules/installer/cd-dvd/iso-image.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix index 5910bfc05ac2..c3d12bda28d7 100644 --- a/nixos/modules/installer/cd-dvd/iso-image.nix +++ b/nixos/modules/installer/cd-dvd/iso-image.nix @@ -405,7 +405,8 @@ let "${config.system.build.initialRamdisk}/${config.system.boot.loader.initrdFile}" ./boot/ touch --date=@0 ./EFI ./boot - usage_size=$(du -sb --apparent-size . | tr -cd '[:digit:]') + # Round up to the nearest multiple of 1MB, for more deterministic du output + usage_size=$(( $(du -s --block-size=1M --apparent-size . | tr -cd '[:digit:]') * 1024 * 1024 )) # Make the image 110% as big as the files need to make up for FAT overhead image_size=$(( ($usage_size * 110) / 100 )) # Make the image fit blocks of 1M From 657e924ad853e099cbc36be50478e9877aa05a25 Mon Sep 17 00:00:00 2001 From: Ning Shang Date: Thu, 20 May 2021 12:17:04 -0700 Subject: [PATCH 04/31] iso-image: More concise code for fixed order mmd and mcopy operations Thanks @misuzu for the suggestions. --- nixos/modules/installer/cd-dvd/iso-image.nix | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix index c3d12bda28d7..62fc097f9ddb 100644 --- a/nixos/modules/installer/cd-dvd/iso-image.nix +++ b/nixos/modules/installer/cd-dvd/iso-image.nix @@ -418,19 +418,11 @@ let faketime "2000-01-01 00:00:00" mkfs.vfat -i 12345678 -n EFIBOOT "$out" # Force a fixed order in mcopy for better determinism, and avoid file globbing - for d in $(find EFI -type d | sort); do + for d in $(find EFI boot -type d | sort); do faketime "2000-01-01 00:00:00" mmd -i "$out" "::/$d" done - for d in $(find boot -type d | sort); do - faketime "2000-01-01 00:00:00" mmd -i "$out" "::/$d" - done - - for f in $(find EFI -type f | sort); do - mcopy -pvm -i "$out" "$f" "::/$f" - done - - for f in $(find boot -type f | sort); do + for f in $(find EFI boot -type f | sort); do mcopy -pvm -i "$out" "$f" "::/$f" done From c6b756d7deb868c0cb01b1c599039772e03d5801 Mon Sep 17 00:00:00 2001 From: Tomas Antonio Lopez Date: Fri, 25 Jun 2021 01:10:37 +0900 Subject: [PATCH 05/31] protege-distribution: rewrite patching mechanism Part of the launcher script and configuration were patched via sed commands; make the process clearer by using unified-style patches. --- .../web/protege-distribution/default.nix | 24 ++++++++-------- .../disable-console-log.patch | 28 +++++++++++++++++++ .../protege-distribution/static-path.patch | 16 +++++++++++ 3 files changed, 55 insertions(+), 13 deletions(-) create mode 100644 pkgs/development/web/protege-distribution/disable-console-log.patch create mode 100644 pkgs/development/web/protege-distribution/static-path.patch diff --git a/pkgs/development/web/protege-distribution/default.nix b/pkgs/development/web/protege-distribution/default.nix index 49d28cb17ee8..d614c815588d 100644 --- a/pkgs/development/web/protege-distribution/default.nix +++ b/pkgs/development/web/protege-distribution/default.nix @@ -11,21 +11,19 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ unzip copyDesktopItems ]; + patches = [ + # Replace logic for searching the install directory with a static cd into $out + ./static-path.patch + # Disable console logging, maintaining only file-based logging + ./disable-console-log.patch + ]; + postPatch = '' - # Delete all those commands meant to change directory to the source directory - sed -i -e '3,9d' run.sh - - # Change directory to where the application is stored to avoid heavy patching - # of searchpaths - sed -i -e "2a\ - cd $out/protege" run.sh - - # Set the correct Java executable (Protege is a JRE 8 application) + # Resolve @out@ (introduced by "static-path.patch") to $out, and set the + # correct Java executable (Protege is a JRE 8 application) substituteInPlace run.sh \ - --replace "java -X" "exec ${jre8.outPath}/bin/java -X" \ - - # Silence console logs, since these are not shown in graphical environments - sed -i -e '4,8d;21d' conf/logback.xml + --subst-var-by out $out \ + --replace "java -X" "exec ${jre8.outPath}/bin/java -X" ''; dontConfigure = true; diff --git a/pkgs/development/web/protege-distribution/disable-console-log.patch b/pkgs/development/web/protege-distribution/disable-console-log.patch new file mode 100644 index 000000000000..edd6277ffa3a --- /dev/null +++ b/pkgs/development/web/protege-distribution/disable-console-log.patch @@ -0,0 +1,28 @@ +--- a/conf/logback.xml 2021-06-25 00:49:10.446416341 +0900 ++++ b/conf/logback.xml 2021-06-25 00:50:32.889120465 +0900 +@@ -1,13 +1,6 @@ + + + +- +- +- %highlight(%msg) %n +- +- +- +- + + ${user.home}/.Protege/logs/protege.log + true +@@ -18,9 +11,8 @@ + + + +- + + + + +- +\ No newline at end of file ++ diff --git a/pkgs/development/web/protege-distribution/static-path.patch b/pkgs/development/web/protege-distribution/static-path.patch new file mode 100644 index 000000000000..66762f70ca9f --- /dev/null +++ b/pkgs/development/web/protege-distribution/static-path.patch @@ -0,0 +1,16 @@ +--- a/run.sh 2021-06-24 22:30:20.764897745 +0900 ++++ b/run.sh 2021-06-24 22:29:47.211210142 +0900 +@@ -1,12 +1,6 @@ + #!/usr/bin/env bash + +-SOURCE="${BASH_SOURCE[0]}" +-while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink +- DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" +- SOURCE="$(readlink "$SOURCE")" +- [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located +-done +-cd "$( cd -P "$( dirname "$SOURCE" )" && pwd )" ++cd @out@/protege + + java -Xmx500M -Xms200M \ + -Xss16M \ From 810f43cd154b076b1617e410b93525ec9c53e6f1 Mon Sep 17 00:00:00 2001 From: Tomas Antonio Lopez Date: Fri, 25 Jun 2021 01:37:09 +0900 Subject: [PATCH 06/31] protege-distribution: auto-generate all icon sizes for theme hicolor Previous iteration simply copied the upstream 128x128 .ico into the icon search path; use icoFileToHiColorTheme to produce the complete tree, instead. --- .../web/protege-distribution/default.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/development/web/protege-distribution/default.nix b/pkgs/development/web/protege-distribution/default.nix index d614c815588d..8f2a570fd80a 100644 --- a/pkgs/development/web/protege-distribution/default.nix +++ b/pkgs/development/web/protege-distribution/default.nix @@ -1,4 +1,8 @@ -{ lib, stdenv, fetchurl, unzip, jre8, copyDesktopItems, makeDesktopItem }: +{ lib, stdenv, fetchurl, unzip, jre8 +, copyDesktopItems +, makeDesktopItem +, iconConvTools +}: stdenv.mkDerivation rec { pname = "protege-distribution"; @@ -9,7 +13,7 @@ stdenv.mkDerivation rec { sha256 = "092x22wyisdnhccx817mqq15sxqdfc7iz4whr4mbvzrd9di6ipjq"; }; - nativeBuildInputs = [ unzip copyDesktopItems ]; + nativeBuildInputs = [ unzip copyDesktopItems iconConvTools ]; patches = [ # Replace logic for searching the install directory with a static cd into $out @@ -40,8 +44,8 @@ stdenv.mkDerivation rec { # Move launch script into /bin, giving it a recognizable name install -D run.sh $out/bin/run-protege - # Copy icon to where it can be found - install -D app/Protege.ico $out/share/icons/hicolor/128x128/apps/protege.ico + # Generate and copy icons to where they can be found + icoFileToHiColorTheme app/Protege.ico protege $out # Move everything else under protege/ mkdir $out/protege @@ -54,7 +58,7 @@ stdenv.mkDerivation rec { (makeDesktopItem { name = "Protege"; desktopName = "Protege Desktop"; - icon = "protege.ico"; + icon = "protege"; comment = "OWL2 ontology editor"; exec = "run-protege"; }) From f03b54b8aa8fe3d5bf75624ada2f3db946f0004d Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Fri, 25 Jun 2021 12:56:34 +0200 Subject: [PATCH 07/31] php.extensions.event: 3.0.4 -> 3.0.5 --- pkgs/development/php-packages/event/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/php-packages/event/default.nix b/pkgs/development/php-packages/event/default.nix index 727543e6ee63..ed23bcc4b0b6 100644 --- a/pkgs/development/php-packages/event/default.nix +++ b/pkgs/development/php-packages/event/default.nix @@ -2,8 +2,8 @@ buildPecl { pname = "event"; - version = "3.0.4"; - sha256 = "13yb3zvlx43cncawymiwbqyz8gzpq1g03vd0xjlw9vz75b4mwn1x"; + version = "3.0.5"; + sha256 = "0q5a83mcl97cyry5rd85j5xsjvflnki6s5cm56igjm0szxvgj39c"; configureFlags = [ "--with-event-libevent-dir=${libevent.dev}" From c1e65385bdcf8a374d27647cc32ccc2d661aa319 Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Fri, 25 Jun 2021 12:57:43 +0200 Subject: [PATCH 08/31] php.extensions.igbinary: 3.2.2 -> 3.2.3 --- pkgs/development/php-packages/igbinary/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/php-packages/igbinary/default.nix b/pkgs/development/php-packages/igbinary/default.nix index caedac9acdfd..258b0debbae0 100644 --- a/pkgs/development/php-packages/igbinary/default.nix +++ b/pkgs/development/php-packages/igbinary/default.nix @@ -3,8 +3,8 @@ buildPecl { pname = "igbinary"; - version = "3.2.2"; - sha256 = "0321pb0298fa67qwj5nhhabkjiaxna5mag15ljyrqzpivimvny92"; + version = "3.2.3"; + sha256 = "1ffaqhckkk1qr5dk1fl7f8dm2w4lj4gqrgazzmc67acsdmp7z5f0"; configureFlags = [ "--enable-igbinary" ]; makeFlags = [ "phpincludedir=$(dev)/include" ]; From 68bc5b42240c796849212757008b1320acd04670 Mon Sep 17 00:00:00 2001 From: misuzu Date: Fri, 25 Jun 2021 11:15:39 +0300 Subject: [PATCH 09/31] llvm_12: disable failing 'DebugInfo/X86/vla-multi.ll' on armv7l --- pkgs/development/compilers/llvm/12/llvm/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/compilers/llvm/12/llvm/default.nix b/pkgs/development/compilers/llvm/12/llvm/default.nix index d2365745b982..8413f0f5745b 100644 --- a/pkgs/development/compilers/llvm/12/llvm/default.nix +++ b/pkgs/development/compilers/llvm/12/llvm/default.nix @@ -96,6 +96,7 @@ in stdenv.mkDerivation (rec { rm test/DebugInfo/X86/convert-debugloc.ll rm test/DebugInfo/X86/convert-inlined.ll rm test/DebugInfo/X86/convert-linked.ll + rm test/DebugInfo/X86/vla-multi.ll rm test/tools/dsymutil/X86/op-convert.test '' + optionalString (stdenv.hostPlatform.system == "armv6l-linux") '' # Seems to require certain floating point hardware (NEON?) From adef8f2abb0dbab694f7108afe97e534dccb203f Mon Sep 17 00:00:00 2001 From: zowoq <59103226+zowoq@users.noreply.github.com> Date: Sat, 26 Jun 2021 07:11:04 +1000 Subject: [PATCH 10/31] podman: 3.2.1 -> 3.2.2 https://github.com/containers/podman/releases/tag/v3.2.2 --- 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 0f5eaecb67db..5ab696ed1d57 100644 --- a/pkgs/applications/virtualization/podman/default.nix +++ b/pkgs/applications/virtualization/podman/default.nix @@ -17,13 +17,13 @@ buildGoModule rec { pname = "podman"; - version = "3.2.1"; + version = "3.2.2"; src = fetchFromGitHub { owner = "containers"; repo = "podman"; rev = "v${version}"; - sha256 = "sha256-nnVMK4ST9Z2Oi1yLiFRIc9qAlJF4UEtE90iseHhKGlQ="; + sha256 = "sha256-D1gtKaDZ7/SyySYWmDa3eDHbh2f5B3q1VEYKgl1pXCE="; }; vendorSha256 = null; From 0cd20c12ec2ab2583227cdfc007bf9909f1c166b Mon Sep 17 00:00:00 2001 From: Tomas Antonio Lopez Date: Sat, 26 Jun 2021 01:42:30 +0900 Subject: [PATCH 11/31] protege-distribution: extend desktop file for grouping Specifying 'categories' allows Protege to be consistently grouped inside application launcher submenus. --- pkgs/development/web/protege-distribution/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/web/protege-distribution/default.nix b/pkgs/development/web/protege-distribution/default.nix index 8f2a570fd80a..3b885e651510 100644 --- a/pkgs/development/web/protege-distribution/default.nix +++ b/pkgs/development/web/protege-distribution/default.nix @@ -60,6 +60,7 @@ stdenv.mkDerivation rec { desktopName = "Protege Desktop"; icon = "protege"; comment = "OWL2 ontology editor"; + categories = "Development"; exec = "run-protege"; }) ]; From cb50ba70d7acd1e51f8bf054c483cbb683c99ba6 Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Fri, 25 Jun 2021 13:00:27 +0200 Subject: [PATCH 12/31] php.extensions.imagick: 3.4.4 -> 3.5.0 --- .../php-packages/imagick/default.nix | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/pkgs/development/php-packages/imagick/default.nix b/pkgs/development/php-packages/imagick/default.nix index 1af4f1a23b47..7da324b2e1a2 100644 --- a/pkgs/development/php-packages/imagick/default.nix +++ b/pkgs/development/php-packages/imagick/default.nix @@ -1,23 +1,10 @@ -{ buildPecl, fetchpatch, lib, imagemagick, pkg-config, pcre2 }: +{ buildPecl, lib, imagemagick, pkg-config, pcre2 }: buildPecl { pname = "imagick"; - version = "3.4.4"; - sha256 = "0xvhaqny1v796ywx83w7jyjyd0nrxkxf34w9zi8qc8aw8qbammcd"; - - patches = [ - # Fix compatibility with PHP 8. - (fetchpatch { - url = "https://github.com/Imagick/imagick/pull/336.patch"; - sha256 = "nuRdh02qaMx0s/5OzlfWjyYgZG1zgrYnAjsZ/UVIrUM="; - }) - # Fix detection of ImageMagick 7. - (fetchpatch { - url = "https://github.com/Imagick/imagick/commit/09551fbf38c16cdaf4ade7c08744501cd82d2747.patch"; - sha256 = "qUeQHP08kKOzuQdEpR8RSZ18Yhi0U9z24KwQcAx1UVg="; - }) - ]; + version = "3.5.0"; + sha256 = "0afjyll6rr79am6d1p041bl4dj44hp9z4gzmlhrkvkdsdz1vfpbr"; configureFlags = [ "--with-imagick=${imagemagick.dev}" ]; nativeBuildInputs = [ pkg-config ]; From 406ed4af815a45e3ab9260b70f7bd0b6946d6973 Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Fri, 25 Jun 2021 13:05:35 +0200 Subject: [PATCH 13/31] php.extensions.protobuf: 3.17.2 -> 3.17.3 --- pkgs/development/php-packages/protobuf/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/php-packages/protobuf/default.nix b/pkgs/development/php-packages/protobuf/default.nix index 11db92e92e02..87007b1ea12b 100644 --- a/pkgs/development/php-packages/protobuf/default.nix +++ b/pkgs/development/php-packages/protobuf/default.nix @@ -3,8 +3,8 @@ buildPecl { pname = "protobuf"; - version = "3.17.2"; - sha256 = "0i4npj4sl8ihkzxc6m3vv3nlqk952z9bfwnrk90a9yakw5gfhlz5"; + version = "3.17.3"; + sha256 = "05nn6ps271vwrbr9w08lyyzsszabnqhz1x0vbblg0q8y2xrmb6dl"; buildInputs = [ pcre2 ]; From 62abbb3f1680f1b0747ea7e77d33bcb8e51d9b48 Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Fri, 25 Jun 2021 13:02:04 +0200 Subject: [PATCH 14/31] php.packages.php-cs-fixer: 2.18.4 -> 3.0.0 --- pkgs/development/php-packages/php-cs-fixer/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/php-packages/php-cs-fixer/default.nix b/pkgs/development/php-packages/php-cs-fixer/default.nix index c2e6a1292c7b..0c76ff56a604 100644 --- a/pkgs/development/php-packages/php-cs-fixer/default.nix +++ b/pkgs/development/php-packages/php-cs-fixer/default.nix @@ -1,14 +1,14 @@ { mkDerivation, fetchurl, makeWrapper, lib, php }: let pname = "php-cs-fixer"; - version = "2.18.4"; + version = "3.0.0"; in mkDerivation { inherit pname version; src = fetchurl { url = "https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v${version}/php-cs-fixer.phar"; - sha256 = "sha256-ZgnWv7Xd+0XgZ/IPdjVpAEraNNJq2KHB3aUUIG1SirU="; + sha256 = "141rkcr0wbsqnc4s5vg4bk4dmxwigwxa3j0vi5c42b5k1lq3sgwr"; }; phases = [ "installPhase" ]; From 0575bf96ff45545f811d9c7dcd13bf09bd6ec826 Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Fri, 25 Jun 2021 13:03:28 +0200 Subject: [PATCH 15/31] php.packages.phpstan: 0.12.82 -> 0.12.90 --- pkgs/development/php-packages/phpstan/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/php-packages/phpstan/default.nix b/pkgs/development/php-packages/phpstan/default.nix index 902529806a3b..048ae71ff299 100644 --- a/pkgs/development/php-packages/phpstan/default.nix +++ b/pkgs/development/php-packages/phpstan/default.nix @@ -1,14 +1,14 @@ { mkDerivation, fetchurl, makeWrapper, lib, php }: let pname = "phpstan"; - version = "0.12.82"; + version = "0.12.90"; in mkDerivation { inherit pname version; src = fetchurl { url = "https://github.com/phpstan/phpstan/releases/download/${version}/phpstan.phar"; - sha256 = "sha256-fX7YK4z6xUhSJ2jTCy7bRK13TxXSn/qo7E5DeZlv2Nw="; + sha256 = "0f8858w9b421s3dfz8a56g0mik4zyi1lp88lijw4zs2d94dcdl9s"; }; phases = [ "installPhase" ]; From 384d5c2654920277a38600b84b5ec2e08b116c0f Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Fri, 25 Jun 2021 13:08:19 +0200 Subject: [PATCH 16/31] php.packages.psalm: 4.6.1 -> 4.7.3 --- pkgs/development/php-packages/psalm/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/php-packages/psalm/default.nix b/pkgs/development/php-packages/psalm/default.nix index 01160fc35fe6..b5c5550806f2 100644 --- a/pkgs/development/php-packages/psalm/default.nix +++ b/pkgs/development/php-packages/psalm/default.nix @@ -1,14 +1,14 @@ { mkDerivation, fetchurl, makeWrapper, lib, php }: let pname = "psalm"; - version = "4.6.1"; + version = "4.7.3"; in mkDerivation { inherit pname version; src = fetchurl { url = "https://github.com/vimeo/psalm/releases/download/${version}/psalm.phar"; - sha256 = "sha256-YFeTSIfZ2u1KmpoKV5I7pMMvCk3u5ILktsunvoDnBsg="; + sha256 = "0d8gxkpm4rc00a8br5wzjpglkwx95kr15s4z3cvxyf6iik1j5r47"; }; phases = [ "installPhase" ]; From fd1c9b5213f0df7b0bc8cc18512ff02dce54d7b9 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Wed, 10 Feb 2021 00:37:24 +0100 Subject: [PATCH 17/31] apfs: init at unstable-2021-06-25 --- pkgs/os-specific/linux/apfs/default.nix | 35 +++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/os-specific/linux/apfs/default.nix diff --git a/pkgs/os-specific/linux/apfs/default.nix b/pkgs/os-specific/linux/apfs/default.nix new file mode 100644 index 000000000000..e27272a61473 --- /dev/null +++ b/pkgs/os-specific/linux/apfs/default.nix @@ -0,0 +1,35 @@ +{ lib +, stdenv +, fetchFromGitHub +, kernel +}: + +stdenv.mkDerivation { + pname = "apfs"; + version = "unstable-2021-06-25-${kernel.version}"; + + src = fetchFromGitHub { + owner = "linux-apfs"; + repo = "linux-apfs-rw"; + rev = "2ce6d06dc73036d113da5166c59393233bf54229"; + sha256 = "sha256-18HFtPr0qcTIZ8njwEtveiPYO+HGlj90bdUoL47UUY0="; + }; + + hardeningDisable = [ "pic" ]; + nativeBuildInputs = kernel.moduleBuildDependencies; + + makeFlags = [ + "KERNELRELEASE=${kernel.modDirVersion}" + "KERNEL_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" + "INSTALL_MOD_PATH=$(out)" + ]; + + meta = with lib; { + description = "APFS module for linux"; + homepage = "https://github.com/linux-apfs/linux-apfs-rw"; + license = licenses.gpl2Only; + platforms = platforms.linux; + broken = kernel.kernelOlder "4.19"; + maintainers = with maintainers; [ Luflosi ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7cb7d00ea09a..0aebae17bdba 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20827,6 +20827,8 @@ in anbox = callPackage ../os-specific/linux/anbox/kmod.nix { }; + apfs = callPackage ../os-specific/linux/apfs { }; + batman_adv = callPackage ../os-specific/linux/batman-adv {}; bcc = callPackage ../os-specific/linux/bcc { From 0706d3da4ee069fec28a148ce730daaf8d34ffe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 26 Jun 2021 14:34:56 +0200 Subject: [PATCH 18/31] pythonPackages.dtlssocket: init at 0.1.12 --- .../python-modules/dtlssocket/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/python-modules/dtlssocket/default.nix diff --git a/pkgs/development/python-modules/dtlssocket/default.nix b/pkgs/development/python-modules/dtlssocket/default.nix new file mode 100644 index 000000000000..28eae55ef9a6 --- /dev/null +++ b/pkgs/development/python-modules/dtlssocket/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchPypi +, autoconf +, cython +}: + +buildPythonPackage rec { + pname = "dtlssocket"; + version = "0.1.12"; + + src = fetchPypi { + pname = "DTLSSocket"; + inherit version; + sha256 = "909a8f52f1890ec9e92fd46ef609daa8875c2a1c262c0b61200e73c6c2dd5099"; + }; + + nativeBuildInputs = [ + autoconf + cython + ]; + + # no tests on PyPI, no tags on GitLab + doCheck = false; + + pythonImportsCheck = [ "DTLSSocket" ]; + + meta = with lib; { + description = "Cython wrapper for tinydtls with a Socket like interface"; + homepage = "https://git.fslab.de/jkonra2m/tinydtls-cython"; + license = licenses.epl10; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f97c847dac53..bf10d95d6b97 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2184,6 +2184,8 @@ in { dsmr-parser = callPackage ../development/python-modules/dsmr-parser { }; + dtlssocket = callPackage ../development/python-modules/dtlssocket { }; + duckdb = callPackage ../development/python-modules/duckdb { inherit (pkgs) duckdb; }; From 06024b15f795df31ff2c4915424ef5632b7e1f94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 26 Jun 2021 14:37:41 +0200 Subject: [PATCH 19/31] python3Packages.pytradfri: init at 7.0.6 --- .../python-modules/pytradfri/default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/python-modules/pytradfri/default.nix diff --git a/pkgs/development/python-modules/pytradfri/default.nix b/pkgs/development/python-modules/pytradfri/default.nix new file mode 100644 index 000000000000..e06a7e681351 --- /dev/null +++ b/pkgs/development/python-modules/pytradfri/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, aiocoap +, dtlssocket +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pytradfri"; + version = "7.0.6"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "home-assistant-libs"; + repo = "pytradfri"; + rev = version; + sha256 = "0ckh2waz3xpz51pmigg1q336igqvvkl2pzncszvblkwv38a0rj3a"; + }; + + propagatedBuildInputs = [ + aiocoap + dtlssocket + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "pytradfri" ]; + + meta = with lib; { + description = "Python package to communicate with the IKEA Trådfri ZigBee Gateway"; + homepage = "https://github.com/home-assistant-libs/pytradfri"; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bf10d95d6b97..14b42c72860a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7130,6 +7130,8 @@ in { cudaSupport = false; }; + pytradfri = callPackage ../development/python-modules/pytradfri { }; + pytrafikverket = callPackage ../development/python-modules/pytrafikverket { }; pytrends = callPackage ../development/python-modules/pytrends { }; From efa58212b1e6b5762358892457657a10f5db1df1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 26 Jun 2021 14:38:09 +0200 Subject: [PATCH 20/31] home-assistant: update component-packages.nix --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index a5f6d670f621..85550088a2cc 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -880,7 +880,7 @@ "traccar" = ps: with ps; [ aiohttp-cors stringcase ]; # missing inputs: pytraccar "trace" = ps: with ps; [ ]; "trackr" = ps: with ps; [ ]; # missing inputs: pytrackr - "tradfri" = ps: with ps; [ ]; # missing inputs: pytradfri[async] + "tradfri" = ps: with ps; [ pytradfri ]; "trafikverket_train" = ps: with ps; [ pytrafikverket ]; "trafikverket_weatherstation" = ps: with ps; [ pytrafikverket ]; "transmission" = ps: with ps; [ transmissionrpc ]; From d886c446fedefcbaf1bbf5ddd274e82ed14d5ac8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 26 Jun 2021 14:41:07 +0200 Subject: [PATCH 21/31] home-assistant: test tradfri component --- pkgs/servers/home-assistant/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index 985fb15bc3ec..4ce2106daefe 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -685,6 +685,7 @@ in with py.pkgs; buildPythonApplication rec { "toon" "tplink" "trace" + "tradfri" "transmission" "trend" "tts" From 193e721cb2dccea1a6b08a5841fee38eef3fa5ae Mon Sep 17 00:00:00 2001 From: Hunter Jones Date: Fri, 25 Jun 2021 20:07:50 -0500 Subject: [PATCH 22/31] siril: 0.99.8.1 -> 0.99.10.1 --- .../science/astronomy/siril/default.nix | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/pkgs/applications/science/astronomy/siril/default.nix b/pkgs/applications/science/astronomy/siril/default.nix index fd49957aa355..b50cb4b71d0d 100644 --- a/pkgs/applications/science/astronomy/siril/default.nix +++ b/pkgs/applications/science/astronomy/siril/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitLab, fetchpatch, pkg-config, meson, ninja +{ lib, stdenv, fetchFromGitLab, pkg-config, meson, ninja , git, criterion, gtk3, libconfig, gnuplot, opencv, json-glib , fftwFloat, cfitsio, gsl, exiv2, librtprocess, wcslib, ffmpeg , libraw, libtiff, libpng, libjpeg, libheif, ffms, wrapGAppsHook @@ -6,23 +6,15 @@ stdenv.mkDerivation rec { pname = "siril"; - version = "0.99.8.1"; + version = "0.99.10.1"; src = fetchFromGitLab { owner = "free-astro"; repo = pname; rev = version; - sha256 = "0h3slgpj6zdc0rwmyr9zb0vgf53283hpwb7h26skdswmggsk90i5"; + sha256 = "sha256-gqV+pJNaU+GnYiUo/imofgNdeM+AtDg/pSH7aoqhkYA="; }; - patches = [ - # Backport fix for broken build on glib-2.68 - (fetchpatch { - url = "https://gitlab.com/free-astro/siril/-/commit/d319fceca5b00f156e1c5e3512d3ac1f41beb16a.diff"; - sha256 = "00lq9wq8z48ly3hmkgzfqbdjaxr0hzyl2qwbj45bdnxfwqragh5m"; - }) - ]; - nativeBuildInputs = [ meson ninja pkg-config git criterion wrapGAppsHook ]; @@ -47,7 +39,8 @@ stdenv.mkDerivation rec { homepage = "https://www.siril.org/"; description = "Astrophotographic image processing tool"; license = licenses.gpl3Plus; + changelog = "https://gitlab.com/free-astro/siril/-/blob/HEAD/ChangeLog"; maintainers = with maintainers; [ hjones2199 ]; - platforms = [ "x86_64-linux" ]; + platforms = platforms.linux; }; } From 94d07b7492416e2f6b8c18f229d1c13f4f48349c Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Sat, 26 Jun 2021 09:46:46 +0200 Subject: [PATCH 23/31] php: Run nixpkgs-fmt on all php related files --- nixos/tests/php/default.nix | 5 +- nixos/tests/php/fpm.nix | 32 +- nixos/tests/php/httpd.nix | 18 +- nixos/tests/php/pcre.nix | 20 +- pkgs/build-support/build-pecl.nix | 10 +- pkgs/development/interpreters/php/7.4.nix | 49 +- pkgs/development/interpreters/php/8.0.nix | 48 +- pkgs/development/interpreters/php/generic.nix | 262 ++--- .../php-packages/mongodb/default.nix | 14 +- pkgs/top-level/php-packages.nix | 894 ++++++++++-------- 10 files changed, 789 insertions(+), 563 deletions(-) diff --git a/nixos/tests/php/default.nix b/nixos/tests/php/default.nix index cf78c9db53b7..c0386385753f 100644 --- a/nixos/tests/php/default.nix +++ b/nixos/tests/php/default.nix @@ -1,5 +1,5 @@ { system ? builtins.currentSystem -, config ? {} +, config ? { } , pkgs ? import ../../.. { inherit system config; } , php ? pkgs.php }: @@ -8,7 +8,8 @@ let php' = php.buildEnv { extensions = { enabled, all }: with all; enabled ++ [ apcu ]; }; -in { +in +{ fpm = import ./fpm.nix { inherit system pkgs; php = php'; }; httpd = import ./httpd.nix { inherit system pkgs; php = php'; }; pcre = import ./pcre.nix { inherit system pkgs; php = php'; }; diff --git a/nixos/tests/php/fpm.nix b/nixos/tests/php/fpm.nix index b11f85d39cb6..31a79bb4dbe3 100644 --- a/nixos/tests/php/fpm.nix +++ b/nixos/tests/php/fpm.nix @@ -1,4 +1,4 @@ -import ../make-test-python.nix ({pkgs, lib, php, ...}: { +import ../make-test-python.nix ({ pkgs, lib, php, ... }: { name = "php-${php.version}-fpm-nginx-test"; meta.maintainers = lib.teams.php.members; @@ -8,21 +8,23 @@ import ../make-test-python.nix ({pkgs, lib, php, ...}: { services.nginx = { enable = true; - virtualHosts."phpfpm" = let - testdir = pkgs.writeTextDir "web/index.php" "/dev/null' - done - '' + '' - ./buildconf --copy --force + export EXTENSION_DIR=$out/lib/php/extensions + '' + # PKG_CONFIG need not be a relative path + + lib.optionalString (!lib.versionAtLeast version "7.4") '' + for i in $(find . -type f -name "*.m4"); do + substituteInPlace $i \ + --replace 'test -x "$PKG_CONFIG"' 'type -P "$PKG_CONFIG" >/dev/null' + done + '' + '' + ./buildconf --copy --force - if test -f $src/genfiles; then - ./genfiles - fi - '' + lib.optionalString stdenv.isDarwin '' - substituteInPlace configure --replace "-lstdc++" "-lc++" - ''; + if test -f $src/genfiles; then + ./genfiles + fi + '' + lib.optionalString stdenv.isDarwin '' + substituteInPlace configure --replace "-lstdc++" "-lc++" + ''; postInstall = '' test -d $out/etc || mkdir $out/etc @@ -264,8 +285,8 @@ let outputs = [ "out" "dev" ]; passthru = { - buildEnv = mkBuildEnv {} []; - withExtensions = mkWithExtensions {} []; + buildEnv = mkBuildEnv { } [ ]; + withExtensions = mkWithExtensions { } [ ]; inherit ztsSupport; }; @@ -278,4 +299,5 @@ let outputsToInstall = [ "out" "dev" ]; }; }; -in generic +in +generic diff --git a/pkgs/development/php-packages/mongodb/default.nix b/pkgs/development/php-packages/mongodb/default.nix index bec701a7fc59..b65862750e72 100644 --- a/pkgs/development/php-packages/mongodb/default.nix +++ b/pkgs/development/php-packages/mongodb/default.nix @@ -1,5 +1,15 @@ -{ stdenv, buildPecl, lib, pcre2, pkg-config, cyrus_sasl, icu64 -, openssl, snappy, zlib, darwin }: +{ stdenv +, buildPecl +, lib +, pcre2 +, pkg-config +, cyrus_sasl +, icu64 +, openssl +, snappy +, zlib +, darwin +}: buildPecl { pname = "mongodb"; diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index 744e40c95dd2..e518ee68f7b8 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -1,9 +1,49 @@ -{ stdenv, lib, pkgs, fetchgit, phpPackage, autoconf, pkg-config, re2c -, gettext, bzip2, curl, libxml2, openssl, gmp, icu64, oniguruma, libsodium -, html-tidy, libzip, zlib, pcre2, libxslt, aspell, openldap, cyrus_sasl -, uwimap, pam, libiconv, enchant1, libXpm, gd, libwebp, libjpeg, libpng -, freetype, libffi, freetds, postgresql, sqlite, net-snmp, unixODBC, libedit -, readline, rsync, fetchpatch, valgrind +{ stdenv +, lib +, pkgs +, fetchgit +, phpPackage +, autoconf +, pkg-config +, aspell +, bzip2 +, curl +, cyrus_sasl +, enchant1 +, fetchpatch +, freetds +, freetype +, gd +, gettext +, gmp +, html-tidy +, icu64 +, libXpm +, libedit +, libffi +, libiconv +, libjpeg +, libpng +, libsodium +, libwebp +, libxml2 +, libxslt +, libzip +, net-snmp +, oniguruma +, openldap +, openssl +, pam +, pcre2 +, postgresql +, re2c +, readline +, rsync +, sqlite +, unixODBC +, uwimap +, valgrind +, zlib }: lib.makeScope pkgs.newScope (self: with self; { @@ -129,401 +169,475 @@ lib.makeScope pkgs.newScope (self: with self; { xdebug = callPackage ../development/php-packages/xdebug { }; yaml = callPackage ../development/php-packages/yaml { }; - } // (let - # Function to build a single php extension based on the php version. - # - # Name passed is the name of the extension and is automatically used - # to add the configureFlag "--enable-${name}", which can be overriden. - # - # Build inputs is used for extra deps that may be needed. And zendExtension - # will mark the extension as a zend extension or not. - mkExtension = { - name - , configureFlags ? [ "--enable-${name}" ] - , internalDeps ? [] - , postPhpize ? "" - , buildInputs ? [] - , zendExtension ? false - , doCheck ? true - , ... - }@args: stdenv.mkDerivation ((builtins.removeAttrs args [ "name" ]) // { - pname = "php-${name}"; - extensionName = name; + } // ( + let + # Function to build a single php extension based on the php version. + # + # Name passed is the name of the extension and is automatically used + # to add the configureFlag "--enable-${name}", which can be overriden. + # + # Build inputs is used for extra deps that may be needed. And zendExtension + # will mark the extension as a zend extension or not. + mkExtension = + { name + , configureFlags ? [ "--enable-${name}" ] + , internalDeps ? [ ] + , postPhpize ? "" + , buildInputs ? [ ] + , zendExtension ? false + , doCheck ? true + , ... + }@args: stdenv.mkDerivation ((builtins.removeAttrs args [ "name" ]) // { + pname = "php-${name}"; + extensionName = name; - inherit (php.unwrapped) version src; - sourceRoot = "php-${php.version}/ext/${name}"; + inherit (php.unwrapped) version src; + sourceRoot = "php-${php.version}/ext/${name}"; - enableParallelBuilding = true; - nativeBuildInputs = [ php.unwrapped autoconf pkg-config re2c ]; - inherit configureFlags internalDeps buildInputs - zendExtension doCheck; + enableParallelBuilding = true; + nativeBuildInputs = [ php.unwrapped autoconf pkg-config re2c ]; + inherit configureFlags internalDeps buildInputs + zendExtension doCheck; - prePatch = "pushd ../.."; - postPatch = "popd"; + prePatch = "pushd ../.."; + postPatch = "popd"; - preConfigure = '' - nullglobRestore=$(shopt -p nullglob) - shopt -u nullglob # To make ?-globbing work + preConfigure = '' + nullglobRestore=$(shopt -p nullglob) + shopt -u nullglob # To make ?-globbing work - # Some extensions have a config0.m4 or config9.m4 - if [ -f config?.m4 ]; then - mv config?.m4 config.m4 - fi + # Some extensions have a config0.m4 or config9.m4 + if [ -f config?.m4 ]; then + mv config?.m4 config.m4 + fi - $nullglobRestore - phpize - ${postPhpize} - ${lib.concatMapStringsSep "\n" - (dep: "mkdir -p ext; ln -s ${dep.dev}/include ext/${dep.extensionName}") - internalDeps} - ''; - checkPhase = "runHook preCheck; NO_INTERACTON=yes make test; runHook postCheck"; - outputs = [ "out" "dev" ]; - installPhase = '' - mkdir -p $out/lib/php/extensions - cp modules/${name}.so $out/lib/php/extensions/${name}.so - mkdir -p $dev/include - ${rsync}/bin/rsync -r --filter="+ */" \ - --filter="+ *.h" \ - --filter="- *" \ - --prune-empty-dirs \ - . $dev/include/ - ''; + $nullglobRestore + phpize + ${postPhpize} + ${lib.concatMapStringsSep "\n" + (dep: "mkdir -p ext; ln -s ${dep.dev}/include ext/${dep.extensionName}") + internalDeps} + ''; + checkPhase = "runHook preCheck; NO_INTERACTON=yes make test; runHook postCheck"; + outputs = [ "out" "dev" ]; + installPhase = '' + mkdir -p $out/lib/php/extensions + cp modules/${name}.so $out/lib/php/extensions/${name}.so + mkdir -p $dev/include + ${rsync}/bin/rsync -r --filter="+ */" \ + --filter="+ *.h" \ + --filter="- *" \ + --prune-empty-dirs \ + . $dev/include/ + ''; - meta = { - description = "PHP upstream extension: ${name}"; - inherit (php.meta) maintainers homepage license; - }; - }); + meta = { + description = "PHP upstream extension: ${name}"; + inherit (php.meta) maintainers homepage license; + }; + }); - # This list contains build instructions for different modules that one may - # want to build. - # - # These will be passed as arguments to mkExtension above. - extensionData = [ - { name = "bcmath"; } - { name = "bz2"; buildInputs = [ bzip2 ]; configureFlags = [ "--with-bz2=${bzip2.dev}" ]; } - { name = "calendar"; } - { name = "ctype"; } - { name = "curl"; - buildInputs = [ curl ]; - configureFlags = [ "--with-curl=${curl.dev}" ]; - doCheck = false; } - { name = "dba"; } - { name = "dom"; - buildInputs = [ libxml2 ]; - patches = [ - # https://github.com/php/php-src/pull/7030 - (fetchpatch { - url = "https://github.com/php/php-src/commit/4cc261aa6afca2190b1b74de39c3caa462ec6f0b.patch"; - sha256 = "11qsdiwj1zmpfc2pgh6nr0sn7qa1nyjg4jwf69cgwnd57qfjcy4k"; - excludes = [ "ext/dom/tests/bug43364.phpt" "ext/dom/tests/bug80268.phpt" ]; - }) - ]; - # For some reason `patch` fails to remove these files correctly. - # Since `postPatch` is already used in `mkExtension`, we have to make it here. - preCheck = '' - rm tests/bug43364.phpt - rm tests/bug80268.phpt - ''; - configureFlags = [ "--enable-dom" ] - # Required to build on darwin. - ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; } - { name = "enchant"; - buildInputs = [ enchant1 ]; - configureFlags = [ "--with-enchant=${enchant1}" ]; - # enchant1 doesn't build on darwin. - enable = (!stdenv.isDarwin); - doCheck = false; } - { name = "exif"; doCheck = false; } - { name = "ffi"; buildInputs = [ libffi ]; enable = lib.versionAtLeast php.version "7.4"; } - { name = "fileinfo"; buildInputs = [ pcre2 ]; } - { name = "filter"; buildInputs = [ pcre2 ]; } - { name = "ftp"; buildInputs = [ openssl ]; } - { name = "gd"; - buildInputs = [ zlib gd ]; - configureFlags = [ - "--enable-gd" - "--with-external-gd=${gd.dev}" - "--enable-gd-jis-conv" - ]; - doCheck = false; - enable = lib.versionAtLeast php.version "7.4"; } - { name = "gd"; - buildInputs = [ zlib gd libXpm ]; - configureFlags = [ - "--with-gd=${gd.dev}" - "--with-freetype-dir=${freetype.dev}" - "--with-jpeg-dir=${libjpeg.dev}" - "--with-png-dir=${libpng.dev}" - "--with-webp-dir=${libwebp}" - "--with-xpm-dir=${libXpm.dev}" - "--with-zlib-dir=${zlib.dev}" - "--enable-gd-jis-conv" - ]; - doCheck = false; - enable = lib.versionOlder php.version "7.4"; } - { name = "gettext"; - buildInputs = [ gettext ]; - patches = lib.optionals (lib.versionOlder php.version "7.4") [ - (fetchpatch { - url = "https://github.com/php/php-src/commit/632b6e7aac207194adc3d0b41615bfb610757f41.patch"; - sha256 = "0xn3ivhc4p070vbk5yx0mzj2n7p04drz3f98i77amr51w0vzv046"; - }) - ]; - postPhpize = ''substituteInPlace configure --replace 'as_fn_error $? "Cannot locate header file libintl.h" "$LINENO" 5' ':' ''; - configureFlags = [ "--with-gettext=${gettext}" ]; } - { name = "gmp"; - buildInputs = [ gmp ]; - configureFlags = [ "--with-gmp=${gmp.dev}" ]; } - { name = "hash"; enable = lib.versionOlder php.version "7.4"; } - { name = "iconv"; - configureFlags = [ - "--with-iconv${lib.optionalString stdenv.isDarwin "=${libiconv}"}" - ]; - patches = lib.optionals (lib.versionOlder php.version "8.0") [ - # Header path defaults to FHS location, preventing the configure script from detecting errno support. - (fetchpatch { - url = "https://github.com/fossar/nix-phps/raw/263861a8c9bdafd7abe44db6db4ef0179643680c/pkgs/iconv-header-path.patch"; - sha256 = "7GHnEUu+hcsQ4h3itDwk6p46ZKfib9JZ2XpWlXrdn6E="; - }) - ]; - doCheck = false; } - { name = "imap"; - buildInputs = [ uwimap openssl pam pcre2 ]; - configureFlags = [ "--with-imap=${uwimap}" "--with-imap-ssl" ]; - # uwimap doesn't build on darwin. - enable = (!stdenv.isDarwin); } - { name = "intl"; - buildInputs = [ icu64 ]; - patches = lib.optionals (lib.versionOlder php.version "7.4") [ - (fetchpatch { - url = "https://github.com/php/php-src/commit/93a9b56c90c334896e977721bfb3f38b1721cec6.patch"; - sha256 = "055l40lpyhb0rbjn6y23qkzdhvpp7inbnn6x13cpn4inmhjqfpg4"; - }) - ]; - } - { name = "json"; enable = lib.versionOlder php.version "8.0"; } - { name = "ldap"; - buildInputs = [ openldap cyrus_sasl ]; - configureFlags = [ - "--with-ldap" - "LDAP_DIR=${openldap.dev}" - "LDAP_INCDIR=${openldap.dev}/include" - "LDAP_LIBDIR=${openldap.out}/lib" - ] ++ lib.optionals stdenv.isLinux [ - "--with-ldap-sasl=${cyrus_sasl.dev}" - ]; - doCheck = false; } - { name = "mbstring"; buildInputs = [ oniguruma ] ++ lib.optionals (lib.versionAtLeast php.version "8.0") [ - pcre2 - ]; doCheck = false; } - { name = "mysqli"; - internalDeps = [ php.extensions.mysqlnd ]; - configureFlags = [ "--with-mysqli=mysqlnd" "--with-mysql-sock=/run/mysqld/mysqld.sock" ]; - doCheck = false; } - { name = "mysqlnd"; - buildInputs = [ zlib openssl ]; - # The configure script doesn't correctly add library link - # flags, so we add them to the variable used by the Makefile - # when linking. - MYSQLND_SHARED_LIBADD = "-lssl -lcrypto"; - # The configure script builds a config.h which is never - # included. Let's include it in the main header file - # included by all .c-files. - patches = [ - (pkgs.writeText "mysqlnd_config.patch" '' - --- a/ext/mysqlnd/mysqlnd.h - +++ b/ext/mysqlnd/mysqlnd.h - @@ -1,3 +1,6 @@ - +#ifdef HAVE_CONFIG_H - +#include "config.h" - +#endif - /* - +----------------------------------------------------------------------+ - | Copyright (c) The PHP Group | - '') - ] ++ lib.optionals (lib.versionOlder php.version "7.4.8") [ - (pkgs.writeText "mysqlnd_fix_compression.patch" '' - --- a/ext/mysqlnd/mysqlnd.h - +++ b/ext/mysqlnd/mysqlnd.h - @@ -48,7 +48,7 @@ - #define MYSQLND_DBG_ENABLED 0 - #endif + # This list contains build instructions for different modules that one may + # want to build. + # + # These will be passed as arguments to mkExtension above. + extensionData = [ + { name = "bcmath"; } + { name = "bz2"; buildInputs = [ bzip2 ]; configureFlags = [ "--with-bz2=${bzip2.dev}" ]; } + { name = "calendar"; } + { name = "ctype"; } + { + name = "curl"; + buildInputs = [ curl ]; + configureFlags = [ "--with-curl=${curl.dev}" ]; + doCheck = false; + } + { name = "dba"; } + { + name = "dom"; + buildInputs = [ libxml2 ]; + patches = [ + # https://github.com/php/php-src/pull/7030 + (fetchpatch { + url = "https://github.com/php/php-src/commit/4cc261aa6afca2190b1b74de39c3caa462ec6f0b.patch"; + sha256 = "11qsdiwj1zmpfc2pgh6nr0sn7qa1nyjg4jwf69cgwnd57qfjcy4k"; + excludes = [ "ext/dom/tests/bug43364.phpt" "ext/dom/tests/bug80268.phpt" ]; + }) + ]; + # For some reason `patch` fails to remove these files correctly. + # Since `postPatch` is already used in `mkExtension`, we have to make it here. + preCheck = '' + rm tests/bug43364.phpt + rm tests/bug80268.phpt + ''; + configureFlags = [ "--enable-dom" ] + # Required to build on darwin. + ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; + } + { + name = "enchant"; + buildInputs = [ enchant1 ]; + configureFlags = [ "--with-enchant=${enchant1}" ]; + # enchant1 doesn't build on darwin. + enable = (!stdenv.isDarwin); + doCheck = false; + } + { name = "exif"; doCheck = false; } + { name = "ffi"; buildInputs = [ libffi ]; enable = lib.versionAtLeast php.version "7.4"; } + { name = "fileinfo"; buildInputs = [ pcre2 ]; } + { name = "filter"; buildInputs = [ pcre2 ]; } + { name = "ftp"; buildInputs = [ openssl ]; } + { + name = "gd"; + buildInputs = [ zlib gd ]; + configureFlags = [ + "--enable-gd" + "--with-external-gd=${gd.dev}" + "--enable-gd-jis-conv" + ]; + doCheck = false; + enable = lib.versionAtLeast php.version "7.4"; + } + { + name = "gd"; + buildInputs = [ zlib gd libXpm ]; + configureFlags = [ + "--with-gd=${gd.dev}" + "--with-freetype-dir=${freetype.dev}" + "--with-jpeg-dir=${libjpeg.dev}" + "--with-png-dir=${libpng.dev}" + "--with-webp-dir=${libwebp}" + "--with-xpm-dir=${libXpm.dev}" + "--with-zlib-dir=${zlib.dev}" + "--enable-gd-jis-conv" + ]; + doCheck = false; + enable = lib.versionOlder php.version "7.4"; + } + { + name = "gettext"; + buildInputs = [ gettext ]; + patches = lib.optionals (lib.versionOlder php.version "7.4") [ + (fetchpatch { + url = "https://github.com/php/php-src/commit/632b6e7aac207194adc3d0b41615bfb610757f41.patch"; + sha256 = "0xn3ivhc4p070vbk5yx0mzj2n7p04drz3f98i77amr51w0vzv046"; + }) + ]; + postPhpize = ''substituteInPlace configure --replace 'as_fn_error $? "Cannot locate header file libintl.h" "$LINENO" 5' ':' ''; + configureFlags = [ "--with-gettext=${gettext}" ]; + } + { + name = "gmp"; + buildInputs = [ gmp ]; + configureFlags = [ "--with-gmp=${gmp.dev}" ]; + } + { name = "hash"; enable = lib.versionOlder php.version "7.4"; } + { + name = "iconv"; + configureFlags = [ + "--with-iconv${lib.optionalString stdenv.isDarwin "=${libiconv}"}" + ]; + patches = lib.optionals (lib.versionOlder php.version "8.0") [ + # Header path defaults to FHS location, preventing the configure script from detecting errno support. + (fetchpatch { + url = "https://github.com/fossar/nix-phps/raw/263861a8c9bdafd7abe44db6db4ef0179643680c/pkgs/iconv-header-path.patch"; + sha256 = "7GHnEUu+hcsQ4h3itDwk6p46ZKfib9JZ2XpWlXrdn6E="; + }) + ]; + doCheck = false; + } + { + name = "imap"; + buildInputs = [ uwimap openssl pam pcre2 ]; + configureFlags = [ "--with-imap=${uwimap}" "--with-imap-ssl" ]; + # uwimap doesn't build on darwin. + enable = (!stdenv.isDarwin); + } + { + name = "intl"; + buildInputs = [ icu64 ]; + patches = lib.optionals (lib.versionOlder php.version "7.4") [ + (fetchpatch { + url = "https://github.com/php/php-src/commit/93a9b56c90c334896e977721bfb3f38b1721cec6.patch"; + sha256 = "055l40lpyhb0rbjn6y23qkzdhvpp7inbnn6x13cpn4inmhjqfpg4"; + }) + ]; + } + { name = "json"; enable = lib.versionOlder php.version "8.0"; } + { + name = "ldap"; + buildInputs = [ openldap cyrus_sasl ]; + configureFlags = [ + "--with-ldap" + "LDAP_DIR=${openldap.dev}" + "LDAP_INCDIR=${openldap.dev}/include" + "LDAP_LIBDIR=${openldap.out}/lib" + ] ++ lib.optionals stdenv.isLinux [ + "--with-ldap-sasl=${cyrus_sasl.dev}" + ]; + doCheck = false; + } + { + name = "mbstring"; + buildInputs = [ oniguruma ] ++ lib.optionals (lib.versionAtLeast php.version "8.0") [ + pcre2 + ]; + doCheck = false; + } + { + name = "mysqli"; + internalDeps = [ php.extensions.mysqlnd ]; + configureFlags = [ "--with-mysqli=mysqlnd" "--with-mysql-sock=/run/mysqld/mysqld.sock" ]; + doCheck = false; + } + { + name = "mysqlnd"; + buildInputs = [ zlib openssl ]; + # The configure script doesn't correctly add library link + # flags, so we add them to the variable used by the Makefile + # when linking. + MYSQLND_SHARED_LIBADD = "-lssl -lcrypto"; + # The configure script builds a config.h which is never + # included. Let's include it in the main header file + # included by all .c-files. + patches = [ + (pkgs.writeText "mysqlnd_config.patch" '' + --- a/ext/mysqlnd/mysqlnd.h + +++ b/ext/mysqlnd/mysqlnd.h + @@ -1,3 +1,6 @@ + +#ifdef HAVE_CONFIG_H + +#include "config.h" + +#endif + /* + +----------------------------------------------------------------------+ + | Copyright (c) The PHP Group | + '') + ] ++ lib.optionals (lib.versionOlder php.version "7.4.8") [ + (pkgs.writeText "mysqlnd_fix_compression.patch" '' + --- a/ext/mysqlnd/mysqlnd.h + +++ b/ext/mysqlnd/mysqlnd.h + @@ -48,7 +48,7 @@ + #define MYSQLND_DBG_ENABLED 0 + #endif - -#if defined(MYSQLND_COMPRESSION_WANTED) && defined(HAVE_ZLIB) - +#if defined(MYSQLND_COMPRESSION_WANTED) - #define MYSQLND_COMPRESSION_ENABLED 1 - #endif - '') - ]; - postPhpize = lib.optionalString (lib.versionOlder php.version "7.4") '' - substituteInPlace configure --replace '$OPENSSL_LIBDIR' '${openssl}/lib' \ - --replace '$OPENSSL_INCDIR' '${openssl.dev}/include' - ''; } - # oci8 (7.4, 7.3, 7.2) - # odbc (7.4, 7.3, 7.2) - { name = "opcache"; - buildInputs = [ pcre2 ] ++ lib.optionals (lib.versionAtLeast php.version "8.0" && !stdenv.isDarwin && lib.meta.availableOn stdenv.hostPlatform valgrind) [ - valgrind.dev - ]; - patches = lib.optionals (lib.versionOlder php.version "7.4") [ - (pkgs.writeText "zend_file_cache_config.patch" '' - --- a/ext/opcache/zend_file_cache.c - +++ b/ext/opcache/zend_file_cache.c - @@ -27,9 +27,9 @@ - #include "ext/standard/md5.h" - #endif + -#if defined(MYSQLND_COMPRESSION_WANTED) && defined(HAVE_ZLIB) + +#if defined(MYSQLND_COMPRESSION_WANTED) + #define MYSQLND_COMPRESSION_ENABLED 1 + #endif + '') + ]; + postPhpize = lib.optionalString (lib.versionOlder php.version "7.4") '' + substituteInPlace configure --replace '$OPENSSL_LIBDIR' '${openssl}/lib' \ + --replace '$OPENSSL_INCDIR' '${openssl.dev}/include' + ''; + } + # oci8 (7.4, 7.3, 7.2) + # odbc (7.4, 7.3, 7.2) + { + name = "opcache"; + buildInputs = [ pcre2 ] ++ lib.optionals (!stdenv.isDarwin && lib.versionAtLeast php.version "8.0") [ + valgrind.dev + ]; + patches = lib.optionals (lib.versionOlder php.version "7.4") [ + (pkgs.writeText "zend_file_cache_config.patch" '' + --- a/ext/opcache/zend_file_cache.c + +++ b/ext/opcache/zend_file_cache.c + @@ -27,9 +27,9 @@ + #include "ext/standard/md5.h" + #endif - +#include "ZendAccelerator.h" - #ifdef HAVE_OPCACHE_FILE_CACHE + +#include "ZendAccelerator.h" + #ifdef HAVE_OPCACHE_FILE_CACHE - -#include "ZendAccelerator.h" - #include "zend_file_cache.h" - #include "zend_shared_alloc.h" - #include "zend_accelerator_util_funcs.h" - '') ]; - zendExtension = true; - doCheck = !(lib.versionOlder php.version "7.4"); - # Tests launch the builtin webserver. - __darwinAllowLocalNetworking = true; } - { name = "openssl"; - buildInputs = [ openssl ]; - configureFlags = [ "--with-openssl" ]; - doCheck = false; } - { name = "pcntl"; } - { name = "pdo"; doCheck = false; } - { name = "pdo_dblib"; - internalDeps = [ php.extensions.pdo ]; - configureFlags = [ "--with-pdo-dblib=${freetds}" ]; - # Doesn't seem to work on darwin. - enable = (!stdenv.isDarwin); - doCheck = false; } - # pdo_firebird (7.4, 7.3, 7.2) - { name = "pdo_mysql"; - internalDeps = with php.extensions; [ pdo mysqlnd ]; - configureFlags = [ "--with-pdo-mysql=mysqlnd" "PHP_MYSQL_SOCK=/run/mysqld/mysqld.sock" ]; - doCheck = false; } - # pdo_oci (7.4, 7.3, 7.2) - { name = "pdo_odbc"; - internalDeps = [ php.extensions.pdo ]; - configureFlags = [ "--with-pdo-odbc=unixODBC,${unixODBC}" ]; - doCheck = false; } - { name = "pdo_pgsql"; - internalDeps = [ php.extensions.pdo ]; - configureFlags = [ "--with-pdo-pgsql=${postgresql}" ]; - doCheck = false; } - { name = "pdo_sqlite"; - internalDeps = [ php.extensions.pdo ]; - buildInputs = [ sqlite ]; - configureFlags = [ "--with-pdo-sqlite=${sqlite.dev}" ]; - doCheck = false; } - { name = "pgsql"; - buildInputs = [ pcre2 ]; - configureFlags = [ "--with-pgsql=${postgresql}" ]; - doCheck = false; } - { name = "posix"; doCheck = false; } - { name = "pspell"; configureFlags = [ "--with-pspell=${aspell}" ]; } - { name = "readline"; - buildInputs = [ libedit readline ]; - configureFlags = [ "--with-readline=${readline.dev}" ]; - postPhpize = lib.optionalString (lib.versionOlder php.version "7.4") '' - substituteInPlace configure --replace 'as_fn_error $? "Please reinstall libedit - I cannot find readline.h" "$LINENO" 5' ':' - ''; - doCheck = false; - } - { name = "session"; doCheck = !(lib.versionAtLeast php.version "8.0"); } - { name = "shmop"; } - { name = "simplexml"; - buildInputs = [ libxml2 pcre2 ]; - configureFlags = [ "--enable-simplexml" ] - # Required to build on darwin. - ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; } - { name = "snmp"; - buildInputs = [ net-snmp openssl ]; - configureFlags = [ "--with-snmp" ]; - # net-snmp doesn't build on darwin. - enable = (!stdenv.isDarwin); - doCheck = false; } - { name = "soap"; - buildInputs = [ libxml2 ]; - configureFlags = [ "--enable-soap" ] - # Required to build on darwin. - ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; - doCheck = false; } - { name = "sockets"; doCheck = false; } - { name = "sodium"; buildInputs = [ libsodium ]; } - { name = "sqlite3"; buildInputs = [ sqlite ]; } - { name = "sysvmsg"; } - { name = "sysvsem"; } - { name = "sysvshm"; } - { name = "tidy"; configureFlags = [ "--with-tidy=${html-tidy}" ]; doCheck = false; } - { name = "tokenizer"; } - { name = "wddx"; - buildInputs = [ libxml2 ]; - internalDeps = [ php.extensions.session ]; - configureFlags = [ "--enable-wddx" "--with-libxml-dir=${libxml2.dev}" ]; - # Removed in php 7.4. - enable = lib.versionOlder php.version "7.4"; } - { name = "xml"; - buildInputs = [ libxml2 ]; - configureFlags = [ "--enable-xml" ] - # Required to build on darwin. - ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; - doCheck = false; } - { name = "xmlreader"; - buildInputs = [ libxml2 ]; - internalDeps = [ php.extensions.dom ]; - NIX_CFLAGS_COMPILE = [ "-I../.." "-DHAVE_DOM" ]; - configureFlags = [ "--enable-xmlreader" ] - # Required to build on darwin. - ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; } - { name = "xmlrpc"; - buildInputs = [ libxml2 libiconv ]; - # xmlrpc was unbundled in 8.0 https://php.watch/versions/8.0/xmlrpc - enable = lib.versionOlder php.version "8.0"; - configureFlags = [ "--with-xmlrpc" ] - # Required to build on darwin. - ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; } - { name = "xmlwriter"; - buildInputs = [ libxml2 ]; - configureFlags = [ "--enable-xmlwriter" ] - # Required to build on darwin. - ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; } - { name = "xsl"; - buildInputs = [ libxslt libxml2 ]; - doCheck = lib.versionOlder php.version "8.0"; - configureFlags = [ "--with-xsl=${libxslt.dev}" ]; } - { name = "zend_test"; } - { name = "zip"; - buildInputs = [ libzip pcre2 ]; - configureFlags = [ "--with-zip" ] - ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-zlib-dir=${zlib.dev}" ] - ++ lib.optionals (lib.versionOlder php.version "7.3") [ "--with-libzip" ]; - doCheck = false; } - { name = "zlib"; - buildInputs = [ zlib ]; - patches = lib.optionals (lib.versionOlder php.version "7.4") [ - # Derived from https://github.com/php/php-src/commit/f16b012116d6c015632741a3caada5b30ef8a699 - ../development/interpreters/php/zlib-darwin-tests.patch - ]; - configureFlags = [ "--with-zlib" ] - ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-zlib-dir=${zlib.dev}" ]; } - ]; + -#include "ZendAccelerator.h" + #include "zend_file_cache.h" + #include "zend_shared_alloc.h" + #include "zend_accelerator_util_funcs.h" + '') + ]; + zendExtension = true; + doCheck = !(lib.versionOlder php.version "7.4"); + # Tests launch the builtin webserver. + __darwinAllowLocalNetworking = true; + } + { + name = "openssl"; + buildInputs = [ openssl ]; + configureFlags = [ "--with-openssl" ]; + doCheck = false; + } + { name = "pcntl"; } + { name = "pdo"; doCheck = false; } + { + name = "pdo_dblib"; + internalDeps = [ php.extensions.pdo ]; + configureFlags = [ "--with-pdo-dblib=${freetds}" ]; + # Doesn't seem to work on darwin. + enable = (!stdenv.isDarwin); + doCheck = false; + } + # pdo_firebird (7.4, 7.3, 7.2) + { + name = "pdo_mysql"; + internalDeps = with php.extensions; [ pdo mysqlnd ]; + configureFlags = [ "--with-pdo-mysql=mysqlnd" "PHP_MYSQL_SOCK=/run/mysqld/mysqld.sock" ]; + doCheck = false; + } + # pdo_oci (7.4, 7.3, 7.2) + { + name = "pdo_odbc"; + internalDeps = [ php.extensions.pdo ]; + configureFlags = [ "--with-pdo-odbc=unixODBC,${unixODBC}" ]; + doCheck = false; + } + { + name = "pdo_pgsql"; + internalDeps = [ php.extensions.pdo ]; + configureFlags = [ "--with-pdo-pgsql=${postgresql}" ]; + doCheck = false; + } + { + name = "pdo_sqlite"; + internalDeps = [ php.extensions.pdo ]; + buildInputs = [ sqlite ]; + configureFlags = [ "--with-pdo-sqlite=${sqlite.dev}" ]; + doCheck = false; + } + { + name = "pgsql"; + buildInputs = [ pcre2 ]; + configureFlags = [ "--with-pgsql=${postgresql}" ]; + doCheck = false; + } + { name = "posix"; doCheck = false; } + { name = "pspell"; configureFlags = [ "--with-pspell=${aspell}" ]; } + { + name = "readline"; + buildInputs = [ libedit readline ]; + configureFlags = [ "--with-readline=${readline.dev}" ]; + postPhpize = lib.optionalString (lib.versionOlder php.version "7.4") '' + substituteInPlace configure --replace 'as_fn_error $? "Please reinstall libedit - I cannot find readline.h" "$LINENO" 5' ':' + ''; + doCheck = false; + } + { name = "session"; doCheck = !(lib.versionAtLeast php.version "8.0"); } + { name = "shmop"; } + { + name = "simplexml"; + buildInputs = [ libxml2 pcre2 ]; + configureFlags = [ "--enable-simplexml" ] + # Required to build on darwin. + ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; + } + { + name = "snmp"; + buildInputs = [ net-snmp openssl ]; + configureFlags = [ "--with-snmp" ]; + # net-snmp doesn't build on darwin. + enable = (!stdenv.isDarwin); + doCheck = false; + } + { + name = "soap"; + buildInputs = [ libxml2 ]; + configureFlags = [ "--enable-soap" ] + # Required to build on darwin. + ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; + doCheck = false; + } + { name = "sockets"; doCheck = false; } + { name = "sodium"; buildInputs = [ libsodium ]; } + { name = "sqlite3"; buildInputs = [ sqlite ]; } + { name = "sysvmsg"; } + { name = "sysvsem"; } + { name = "sysvshm"; } + { name = "tidy"; configureFlags = [ "--with-tidy=${html-tidy}" ]; doCheck = false; } + { name = "tokenizer"; } + { + name = "wddx"; + buildInputs = [ libxml2 ]; + internalDeps = [ php.extensions.session ]; + configureFlags = [ "--enable-wddx" "--with-libxml-dir=${libxml2.dev}" ]; + # Removed in php 7.4. + enable = lib.versionOlder php.version "7.4"; + } + { + name = "xml"; + buildInputs = [ libxml2 ]; + configureFlags = [ "--enable-xml" ] + # Required to build on darwin. + ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; + doCheck = false; + } + { + name = "xmlreader"; + buildInputs = [ libxml2 ]; + internalDeps = [ php.extensions.dom ]; + NIX_CFLAGS_COMPILE = [ "-I../.." "-DHAVE_DOM" ]; + configureFlags = [ "--enable-xmlreader" ] + # Required to build on darwin. + ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; + } + { + name = "xmlrpc"; + buildInputs = [ libxml2 libiconv ]; + # xmlrpc was unbundled in 8.0 https://php.watch/versions/8.0/xmlrpc + enable = lib.versionOlder php.version "8.0"; + configureFlags = [ "--with-xmlrpc" ] + # Required to build on darwin. + ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; + } + { + name = "xmlwriter"; + buildInputs = [ libxml2 ]; + configureFlags = [ "--enable-xmlwriter" ] + # Required to build on darwin. + ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; + } + { + name = "xsl"; + buildInputs = [ libxslt libxml2 ]; + doCheck = lib.versionOlder php.version "8.0"; + configureFlags = [ "--with-xsl=${libxslt.dev}" ]; + } + { name = "zend_test"; } + { + name = "zip"; + buildInputs = [ libzip pcre2 ]; + configureFlags = [ "--with-zip" ] + ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-zlib-dir=${zlib.dev}" ] + ++ lib.optionals (lib.versionOlder php.version "7.3") [ "--with-libzip" ]; + doCheck = false; + } + { + name = "zlib"; + buildInputs = [ zlib ]; + patches = lib.optionals (lib.versionOlder php.version "7.4") [ + # Derived from https://github.com/php/php-src/commit/f16b012116d6c015632741a3caada5b30ef8a699 + ../development/interpreters/php/zlib-darwin-tests.patch + ]; + configureFlags = [ "--with-zlib" ] + ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-zlib-dir=${zlib.dev}" ]; + } + ]; - # Convert the list of attrs: - # [ { name = ; ... } ... ] - # to a list of - # [ { name = ; value = ; } ... ] - # - # which we later use listToAttrs to make all attrs available by name. - # - # Also filter out extensions based on the enable property. - namedExtensions = builtins.map (drv: { - name = drv.name; - value = mkExtension drv; - }) (builtins.filter (i: i.enable or true) extensionData); + # Convert the list of attrs: + # [ { name = ; ... } ... ] + # to a list of + # [ { name = ; value = ; } ... ] + # + # which we later use listToAttrs to make all attrs available by name. + # + # Also filter out extensions based on the enable property. + namedExtensions = builtins.map + (drv: { + name = drv.name; + value = mkExtension drv; + }) + (builtins.filter (i: i.enable or true) extensionData); - # Produce the final attribute set of all extensions defined. - in builtins.listToAttrs namedExtensions); + # Produce the final attribute set of all extensions defined. + in + builtins.listToAttrs namedExtensions + ); }) From 15270b5c83ffcf1e16e8866838367c9147397575 Mon Sep 17 00:00:00 2001 From: Hunter Jones Date: Sat, 26 Jun 2021 13:13:45 -0500 Subject: [PATCH 24/31] indilib: 1.9.0 -> 1.9.1 --- .../libraries/science/astronomy/indilib/default.nix | 4 ++-- .../libraries/science/astronomy/indilib/indi-full.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/science/astronomy/indilib/default.nix b/pkgs/development/libraries/science/astronomy/indilib/default.nix index 7a9a5a80700f..eb0f34db26f5 100644 --- a/pkgs/development/libraries/science/astronomy/indilib/default.nix +++ b/pkgs/development/libraries/science/astronomy/indilib/default.nix @@ -15,13 +15,13 @@ stdenv.mkDerivation rec { pname = "indilib"; - version = "1.9.0"; + version = "1.9.1"; src = fetchFromGitHub { owner = "indilib"; repo = "indi"; rev = "v${version}"; - sha256 = "sha256-YdVBzhz+Gim27/Js5MhEJNukoXp5eK9/dZ+JQVyls0M="; + sha256 = "sha256-qXGTHyXhJrApexQL31fba0ZvnHEyTsY3Tb7aB4GpGn4="; }; nativeBuildInputs = [ diff --git a/pkgs/development/libraries/science/astronomy/indilib/indi-full.nix b/pkgs/development/libraries/science/astronomy/indilib/indi-full.nix index 50aa9fb8b4ac..4ac9a122fd2f 100644 --- a/pkgs/development/libraries/science/astronomy/indilib/indi-full.nix +++ b/pkgs/development/libraries/science/astronomy/indilib/indi-full.nix @@ -1,12 +1,12 @@ { stdenv, lib, callPackage, fetchFromGitHub, indilib }: let - indi-version = "1.9.0"; + indi-version = "1.9.1"; indi-3rdparty-src = fetchFromGitHub { owner = "indilib"; repo = "indi-3rdparty"; rev = "v${indi-version}"; - sha256 = "sha256-5VR1MN52a0ZtaHYw4lD6LWmnvc1oHlfE5GLGbfBKvqE="; + sha256 = "sha256-F0O4WUYdUL6IjJyON/XJp78v4n5rj0unm1xTzEsEH0k="; }; indi-firmware = callPackage ./indi-firmware.nix { version = indi-version; From 1d60b17566f6d046270f0121f80641bbd678e0a8 Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Sat, 26 Jun 2021 21:47:51 +0200 Subject: [PATCH 25/31] chickenPackages_5.chicken: check the binaryVersion (#128202) Co-authored-by: Sandro --- pkgs/development/compilers/chicken/5/chicken.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/development/compilers/chicken/5/chicken.nix b/pkgs/development/compilers/chicken/5/chicken.nix index 9f2554b73436..eb2ec5cbe33b 100644 --- a/pkgs/development/compilers/chicken/5/chicken.nix +++ b/pkgs/development/compilers/chicken/5/chicken.nix @@ -1,7 +1,6 @@ { lib, stdenv, fetchurl, makeWrapper, darwin, bootstrap-chicken ? null }: let - version = "5.2.0"; platform = with stdenv; if isDarwin then "macosx" else if isCygwin then "cygwin" @@ -9,9 +8,9 @@ let else if isSunOS then "solaris" else "linux"; # Should be a sane default in -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "chicken"; - inherit version; + version = "5.2.0"; binaryVersion = 11; @@ -46,13 +45,17 @@ stdenv.mkDerivation { done ''; - # TODO: Assert csi -R files -p '(pathname-file (repository-path))' == binaryVersion + doCheck = true; + postCheck = '' + ./csi -R chicken.pathname -R chicken.platform \ + -p "(assert (equal? \"${toString binaryVersion}\" (pathname-file (car (repository-path)))))" + ''; meta = { - homepage = "http://www.call-cc.org/"; + homepage = "https://call-cc.org/"; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ corngood ]; - platforms = lib.platforms.linux ++ lib.platforms.darwin; # Maybe other Unix + platforms = lib.platforms.unix; description = "A portable compiler for the Scheme programming language"; longDescription = '' CHICKEN is a compiler for the Scheme programming language. From bdd4e033ecfb8da063675429a4a7e3a6c85a6117 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 26 Jun 2021 22:48:24 +0200 Subject: [PATCH 26/31] python3Packages.alpha-vantage: init at 2.3.1 --- .../python-modules/alpha-vantage/default.nix | 49 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/alpha-vantage/default.nix diff --git a/pkgs/development/python-modules/alpha-vantage/default.nix b/pkgs/development/python-modules/alpha-vantage/default.nix new file mode 100644 index 000000000000..7a67f9d6b0d1 --- /dev/null +++ b/pkgs/development/python-modules/alpha-vantage/default.nix @@ -0,0 +1,49 @@ +{ lib +, aiohttp +, aioresponses +, buildPythonPackage +, fetchFromGitHub +, pandas +, pytestCheckHook +, requests +, requests-mock +}: + +buildPythonPackage rec { + pname = "alpha-vantage"; + version = "2.3.1"; + + src = fetchFromGitHub { + owner = "RomelTorres"; + repo = "alpha_vantage"; + rev = version; + sha256 = "0cyw6zw7c7r076rmhnmg905ihwb9r7g511n6gdlph06v74pdls8d"; + }; + + propagatedBuildInputs = [ + aiohttp + requests + ]; + + checkInputs = [ + aioresponses + requests-mock + pandas + pytestCheckHook + ]; + + disabledTestPaths = [ + # Tests require network access + "test_alpha_vantage/test_integration_alphavantage.py" + "test_alpha_vantage/test_integration_alphavantage_async.py" + ]; + + pythonImportsCheck = [ "alpha_vantage" ]; + + meta = with lib; { + description = "Python module for the Alpha Vantage API"; + homepage = "https://github.com/RomelTorres/alpha_vantage"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 1ae54040a22f..9ceb2572202f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -397,6 +397,8 @@ in { alot = callPackage ../development/python-modules/alot { }; + alpha-vantage = callPackage ../development/python-modules/alpha-vantage { }; + altair = callPackage ../development/python-modules/altair { }; amazon_kclpy = callPackage ../development/python-modules/amazon_kclpy { }; From 7387b8215d7dc40723a0486b64d4608040a7584a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 26 Jun 2021 22:49:22 +0200 Subject: [PATCH 27/31] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index c20ad9fd80fa..b6a0d2e02c3f 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -25,7 +25,7 @@ "alert" = ps: with ps; [ ]; "alexa" = ps: with ps; [ aiohttp-cors ]; "almond" = ps: with ps; [ aiohttp-cors pyalmond ]; - "alpha_vantage" = ps: with ps; [ ]; # missing inputs: alpha_vantage + "alpha_vantage" = ps: with ps; [ alpha-vantage ]; "amazon_polly" = ps: with ps; [ boto3 ]; "ambiclimate" = ps: with ps; [ aiohttp-cors ambiclimate ]; "ambient_station" = ps: with ps; [ aioambient ]; From c2e7cb1a5a8373fdbcd4af6da41e98719032e4f2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 26 Jun 2021 22:22:18 +0200 Subject: [PATCH 28/31] python3Packages.fordpass: init at 0.0.4 --- .../python-modules/fordpass/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/fordpass/default.nix diff --git a/pkgs/development/python-modules/fordpass/default.nix b/pkgs/development/python-modules/fordpass/default.nix new file mode 100644 index 000000000000..d3120e7bb6fc --- /dev/null +++ b/pkgs/development/python-modules/fordpass/default.nix @@ -0,0 +1,35 @@ +{ lib +, requests +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +}: + +buildPythonPackage rec { + pname = "fordpass"; + version = "0.0.4"; + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "clarkd"; + repo = "fordpass-python"; + rev = version; + sha256 = "0i1dlswxc2bv1smc5d4r1adbxbl7sgr1swh2cjfajp73vs43xa0m"; + }; + + propagatedBuildInputs = [ + requests + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ "fordpass" ]; + + meta = with lib; { + description = "Python module for the FordPass API"; + homepage = "https://github.com/clarkd/fordpass-python"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 9ceb2572202f..99e72b4dbe0b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2680,6 +2680,8 @@ in { forbiddenfruit = callPackage ../development/python-modules/forbiddenfruit { }; + fordpass = callPackage ../development/python-modules/fordpass { }; + fortiosapi = callPackage ../development/python-modules/fortiosapi { }; FormEncode = callPackage ../development/python-modules/FormEncode { }; From 448547c14b5ac850ae7839492d332822ebea3d29 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 26 Jun 2021 22:04:49 +0200 Subject: [PATCH 29/31] python3Packages.bizkaibus: init at 0.1.4 --- .../python-modules/bizkaibus/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/bizkaibus/default.nix diff --git a/pkgs/development/python-modules/bizkaibus/default.nix b/pkgs/development/python-modules/bizkaibus/default.nix new file mode 100644 index 000000000000..7de8f2ca223c --- /dev/null +++ b/pkgs/development/python-modules/bizkaibus/default.nix @@ -0,0 +1,35 @@ +{ lib +, requests +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +}: + +buildPythonPackage rec { + pname = "bizkaibus"; + version = "0.1.4"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "UgaitzEtxebarria"; + repo = "BizkaibusRTPI"; + rev = version; + sha256 = "1v7k9fclndb4x9npzhzj68kbrc3lb3wr6cwal2x46ib207593ckr"; + }; + + propagatedBuildInputs = [ + requests + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ "bizkaibus" ]; + + meta = with lib; { + description = "Python module to get information about Bizkaibus buses"; + homepage = "https://github.com/UgaitzEtxebarria/BizkaibusRTPI"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 99e72b4dbe0b..8fe4817a9d33 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1099,6 +1099,8 @@ in { bitvavo-aio = callPackage ../development/python-modules/bitvavo-aio { }; + bizkaibus = callPackage ../development/python-modules/bizkaibus { }; + bjoern = callPackage ../development/python-modules/bjoern { }; bkcharts = callPackage ../development/python-modules/bkcharts { }; From 5b45b2fa6f6ac990d4c332cd0800e4a02af8e0b9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 26 Jun 2021 22:05:29 +0200 Subject: [PATCH 30/31] home-assistant: update component-packages --- pkgs/servers/home-assistant/component-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/home-assistant/component-packages.nix b/pkgs/servers/home-assistant/component-packages.nix index b6a0d2e02c3f..4dcc6a32d058 100644 --- a/pkgs/servers/home-assistant/component-packages.nix +++ b/pkgs/servers/home-assistant/component-packages.nix @@ -79,7 +79,7 @@ "bh1750" = ps: with ps; [ smbus-cffi ]; # missing inputs: i2csense "binary_sensor" = ps: with ps; [ ]; "bitcoin" = ps: with ps; [ blockchain ]; - "bizkaibus" = ps: with ps; [ ]; # missing inputs: bizkaibus + "bizkaibus" = ps: with ps; [ bizkaibus ]; "blackbird" = ps: with ps; [ pyblackbird ]; "blebox" = ps: with ps; [ blebox-uniapi ]; "blink" = ps: with ps; [ blinkpy ]; From b99a500a045e73fcabfb141b33fe0b9021966040 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 26 Jun 2021 22:11:48 +0200 Subject: [PATCH 31/31] python3Packages.pyhomepilot: init at 0.0.3 --- .../python-modules/pyhomepilot/default.nix | 35 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/python-modules/pyhomepilot/default.nix diff --git a/pkgs/development/python-modules/pyhomepilot/default.nix b/pkgs/development/python-modules/pyhomepilot/default.nix new file mode 100644 index 000000000000..12c395ff954b --- /dev/null +++ b/pkgs/development/python-modules/pyhomepilot/default.nix @@ -0,0 +1,35 @@ +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +}: + +buildPythonPackage rec { + pname = "pyhomepilot"; + version = "0.0.3"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "nico0302"; + repo = pname; + rev = "v${version}"; + sha256 = "00gmqx8cwsd15iccnlr8ypgqrdg6nw9ha518cfk7pyp8vhw1ziwy"; + }; + + propagatedBuildInputs = [ + aiohttp + ]; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ "pyhomepilot" ]; + + meta = with lib; { + description = "Python module to communicate with the Rademacher HomePilot API"; + homepage = "https://github.com/nico0302/pyhomepilot"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8fe4817a9d33..b18a424ea36a 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6000,6 +6000,8 @@ in { pyhomematic = callPackage ../development/python-modules/pyhomematic { }; + pyhomepilot = callPackage ../development/python-modules/pyhomepilot { }; + pyhs100 = callPackage ../development/python-modules/pyhs100 { }; pyi2cflash = callPackage ../development/python-modules/pyi2cflash { };