diff options
94 files changed, 1571 insertions, 520 deletions
diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 64836b746e0..7ff22fb61fa 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -335,6 +335,12 @@ githubId = 2822871; name = "Alistair Bill"; }; + alkeryn = { + email = "plbraundev@gmail.com"; + github = "Alkeryn"; + githubId = 11599075; + name = "Pierre-Louis Braun"; + }; all = { email = "nix-commits@lists.science.uu.nl"; name = "Nix Committers"; @@ -3385,6 +3391,11 @@ githubId = 10544; name = "Giuluo Eulisse"; }; + ktor = { + email = "kruszewsky@gmail.com"; + github = "ktor"; + name = "Pawel Kruszewski"; + }; ktosiek = { email = "tomasz.kontusz@gmail.com"; github = "ktosiek"; diff --git a/nixos/doc/manual/development/releases.xml b/nixos/doc/manual/development/releases.xml index 3cb16d33cd4..1cdec64f69b 100755 --- a/nixos/doc/manual/development/releases.xml +++ b/nixos/doc/manual/development/releases.xml @@ -220,6 +220,30 @@ </itemizedlist> </section> </section> + <section xml:id="release-managers"> + <title>Release Management Team</title> + <para> + For each release there are two release managers. After each release the + release manager having managed two releases steps down and the release + management team of the last release appoints a new release manager. + </para> + <para> + This makes sure a release management team always consists of one release + manager who already has managed one release and one release manager being + introduced to their role, making it easier to pass on knowledge and + experience. + </para> + <para> + A release manager's role and responsibilities are: + </para> + <itemizedlist> + <listitem><para>manage the release process</para></listitem> + <listitem><para>start discussions about features and changes for a given release</para></listitem> + <listitem><para>create a roadmap</para></listitem> + <listitem><para>release in cooperation with Eelco Dolstra</para></listitem> + <listitem><para>decide which bug fixes, features, etc... get backported after a release</para></listitem> + </itemizedlist> + </section> <section xml:id="release-schedule"> <title>Release schedule</title> diff --git a/nixos/modules/config/vte.nix b/nixos/modules/config/vte.nix index 9024ceddaee..d4a8c926fef 100644 --- a/nixos/modules/config/vte.nix +++ b/nixos/modules/config/vte.nix @@ -42,7 +42,7 @@ in config = mkMerge [ (mkIf config.programs.bash.vteIntegration { - programs.bash.interactiveShellInit = vteInitSnippet; + programs.bash.interactiveShellInit = mkBefore vteInitSnippet; }) (mkIf config.programs.zsh.vteIntegration { diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 79c72fc1422..388f4788b59 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -649,6 +649,7 @@ ./services/networking/nullidentdmod.nix ./services/networking/nylon.nix ./services/networking/ocserv.nix + ./services/networking/ofono.nix ./services/networking/oidentd.nix ./services/networking/openfire.nix ./services/networking/openntpd.nix diff --git a/nixos/modules/programs/environment.nix b/nixos/modules/programs/environment.nix index 4d762314298..66eb8348266 100644 --- a/nixos/modules/programs/environment.nix +++ b/nixos/modules/programs/environment.nix @@ -21,6 +21,7 @@ in PAGER = mkDefault "less -R"; EDITOR = mkDefault "nano"; XCURSOR_PATH = [ "$HOME/.icons" ]; + XDG_CONFIG_DIRS = [ "/etc/xdg" ]; # needs to be before profile-relative paths to allow changes through environment.etc }; environment.profiles = mkAfter diff --git a/nixos/modules/programs/gnupg.nix b/nixos/modules/programs/gnupg.nix index 9618d61a1f5..bcbc994efe9 100644 --- a/nixos/modules/programs/gnupg.nix +++ b/nixos/modules/programs/gnupg.nix @@ -83,7 +83,8 @@ in systemd.user.sockets.dirmngr = mkIf cfg.dirmngr.enable { wantedBy = [ "sockets.target" ]; }; - + + environment.systemPackages = with pkgs; [ cfg.package ]; systemd.packages = [ cfg.package ]; environment.interactiveShellInit = '' diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index e32fa6fded4..65014b4beed 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -178,6 +178,9 @@ with lib; The starting time can be configured via <literal>services.postgresqlBackup.startAt</literal>. '') + # phpfpm + (mkRemovedOptionModule [ "services" "phpfpm" "poolConfigs" ] "Use services.phpfpm.pools instead.") + # zabbixServer (mkRenamedOptionModule [ "services" "zabbixServer" "dbServer" ] [ "services" "zabbixServer" "database" "host" ]) diff --git a/nixos/modules/services/mail/roundcube.nix b/nixos/modules/services/mail/roundcube.nix index e8b2e11bf72..bdedfa1bb70 100644 --- a/nixos/modules/services/mail/roundcube.nix +++ b/nixos/modules/services/mail/roundcube.nix @@ -4,6 +4,7 @@ with lib; let cfg = config.services.roundcube; + fpm = config.services.phpfpm.pools.roundcube; in { options.services.roundcube = { @@ -105,7 +106,7 @@ in extraConfig = '' location ~* \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:/run/phpfpm/roundcube; + fastcgi_pass unix:${fpm.socket}; include ${pkgs.nginx}/conf/fastcgi_params; include ${pkgs.nginx}/conf/fastcgi.conf; } @@ -119,24 +120,27 @@ in enable = true; }; - services.phpfpm.poolConfigs.roundcube = '' - listen = /run/phpfpm/roundcube - listen.owner = nginx - listen.group = nginx - listen.mode = 0660 - user = nginx - pm = dynamic - pm.max_children = 75 - pm.start_servers = 2 - pm.min_spare_servers = 1 - pm.max_spare_servers = 20 - pm.max_requests = 500 - php_admin_value[error_log] = 'stderr' - php_admin_flag[log_errors] = on - php_admin_value[post_max_size] = 25M - php_admin_value[upload_max_filesize] = 25M - catch_workers_output = yes - ''; + services.phpfpm.pools.roundcube = { + user = "nginx"; + phpOptions = '' + error_log = 'stderr' + log_errors = on + post_max_size = 25M + upload_max_filesize = 25M + ''; + settings = mapAttrs (name: mkDefault) { + "listen.owner" = "nginx"; + "listen.group" = "nginx"; + "listen.mode" = "0660"; + "pm" = "dynamic"; + "pm.max_children" = 75; + "pm.start_servers" = 2; + "pm.min_spare_servers" = 1; + "pm.max_spare_servers" = 20; + "pm.max_requests" = 500; + "catch_workers_output" = true; + }; + }; systemd.services.phpfpm-roundcube.after = [ "roundcube-setup.service" ]; systemd.services.roundcube-setup = let diff --git a/nixos/modules/services/misc/zoneminder.nix b/nixos/modules/services/misc/zoneminder.nix index cf56ae89b39..6e83d47df1c 100644 --- a/nixos/modules/services/misc/zoneminder.nix +++ b/nixos/modules/services/misc/zoneminder.nix @@ -2,6 +2,7 @@ let cfg = config.services.zoneminder; + fpm = config.services.phpfpm.pools.zoneminder; pkg = pkgs.zoneminder; dirName = pkg.dirName; @@ -19,8 +20,6 @@ let useCustomDir = cfg.storageDir != null; - socket = "/run/phpfpm/${dirName}.sock"; - zms = "/cgi-bin/zms"; dirs = dirList: [ dirName ] ++ map (e: "${dirName}/${e}") dirList; @@ -274,7 +273,7 @@ in { fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param HTTP_PROXY ""; - fastcgi_pass unix:${socket}; + fastcgi_pass unix:${fpm.socket}; } } ''; @@ -284,30 +283,27 @@ in { phpfpm = lib.mkIf useNginx { pools.zoneminder = { - listen = socket; + inherit user group; phpOptions = '' date.timezone = "${config.time.timeZone}" ${lib.concatStringsSep "\n" (map (e: "extension=${e.pkg}/lib/php/extensions/${e.name}.so") phpExtensions)} ''; - extraConfig = '' - user = ${user} - group = ${group} - - listen.owner = ${user} - listen.group = ${group} - listen.mode = 0660 - - pm = dynamic - pm.start_servers = 1 - pm.min_spare_servers = 1 - pm.max_spare_servers = 2 - pm.max_requests = 500 - pm.max_children = 5 - pm.status_path = /$pool-status - ping.path = /$pool-ping - ''; + settings = lib.mapAttrs (name: lib.mkDefault) { + "listen.owner" = user; + "listen.group" = group; + "listen.mode" = "0660"; + + "pm" = "dynamic"; + "pm.start_servers" = 1; + "pm.min_spare_servers" = 1; + "pm.max_spare_servers" = 2; + "pm.max_requests" = 500; + "pm.max_children" = 5; + "pm.status_path" = "/$pool-status"; + "ping.path" = "/$pool-ping"; + }; }; }; }; diff --git a/nixos/modules/services/networking/ofono.nix b/nixos/modules/services/networking/ofono.nix new file mode 100644 index 00000000000..40ef9433de0 --- /dev/null +++ b/nixos/modules/services/networking/ofono.nix @@ -0,0 +1,44 @@ +# Ofono daemon. +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.services.ofono; + + plugin_path = + lib.concatMapStringsSep ":" + (plugin: "${plugin}/lib/ofono/plugins") + cfg.plugins + ; + +in + +{ + ###### interface + options = { + services.ofono = { + enable = mkEnableOption "Ofono"; + + plugins = mkOption { + type = types.listOf types.package; + default = []; + example = literalExample "[ pkgs.modem-manager-gui ]"; + description = '' + The list of plugins to install. + ''; + }; + }; + }; + + ###### implementation + config = mkIf cfg.enable { + services.dbus.packages = [ pkgs.ofono ]; + + systemd.packages = [ pkgs.ofono ]; + + systemd.services.ofono.environment.OFONO_PLUGIN_PATH = mkIf (cfg.plugins != []) plugin_path; + + }; +} diff --git a/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix b/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix index 6740131dccd..95c8fb16051 100644 --- a/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix +++ b/nixos/modules/services/web-apps/icingaweb2/icingaweb2.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: with lib; let cfg = config.services.icingaweb2; + fpm = config.services.phpfpm.pools.${poolName}; poolName = "icingaweb2"; - phpfpmSocketName = "/var/run/phpfpm/${poolName}.sock"; defaultConfig = { global = { @@ -164,27 +164,26 @@ in { }; config = mkIf cfg.enable { - services.phpfpm.poolConfigs = mkIf (cfg.pool == "${poolName}") { - "${poolName}" = '' - listen = "${phpfpmSocketName}" - listen.owner = nginx - listen.group = nginx - listen.mode = 0600 - user = icingaweb2 - pm = dynamic - pm.max_children = 75 - pm.start_servers = 2 - pm.min_spare_servers = 2 - pm.max_spare_servers = 10 - ''; + services.phpfpm.pools = mkIf (cfg.pool == "${poolName}") { + "${poolName}" = { + user = "icingaweb2"; + phpOptions = '' + extension = ${pkgs.phpPackages.imagick}/lib/php/extensions/imagick.so + date.timezone = "${cfg.timezone}" + ''; + settings = mapAttrs (name: mkDefault) { + "listen.owner" = "nginx"; + "listen.group" = "nginx"; + "listen.mode" = "0600"; + "pm" = "dynamic"; + "pm.max_children" = 75; + "pm.start_servers" = 2; + "pm.min_spare_servers" = 2; + "pm.max_spare_servers" = 10; + }; + }; }; - services.phpfpm.phpOptions = mkIf (cfg.pool == "${poolName}") - '' - extension = ${pkgs.phpPackages.imagick}/lib/php/extensions/imagick.so - date.timezone = "${cfg.timezone}" - ''; - systemd.services."phpfpm-${poolName}".serviceConfig.ReadWritePaths = [ "/etc/icingaweb2" ]; services.nginx = { @@ -208,7 +207,7 @@ in { include ${config.services.nginx.package}/conf/fastcgi.conf; try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:${phpfpmSocketName}; + fastcgi_pass unix:${fpm.socket}; fastcgi_param SCRIPT_FILENAME ${pkgs.icingaweb2}/public/index.php; ''; }; diff --git a/nixos/modules/services/web-apps/limesurvey.nix b/nixos/modules/services/web-apps/limesurvey.nix index 84a94fc446e..2797feb32eb 100644 --- a/nixos/modules/services/web-apps/limesurvey.nix +++ b/nixos/modules/services/web-apps/limesurvey.nix @@ -120,15 +120,15 @@ in }; poolConfig = mkOption { - type = types.lines; - default = '' - pm = dynamic - pm.max_children = 32 - pm.start_servers = 2 - pm.min_spare_servers = 2 - pm.max_spare_servers = 4 - pm.max_requests = 500 - ''; + type = with types; attrsOf (oneOf [ str int bool ]); + default = { + "pm" = "dynamic"; + "pm.max_children" = 32; + "pm.start_servers" = 2; + "pm.min_spare_servers" = 2; + "pm.max_spare_servers" = 4; + "pm.max_requests" = 500; + }; description = '' Options for the LimeSurvey PHP pool. See the documentation on <literal>php-fpm.conf</literal> for details on configuration directives. @@ -203,17 +203,12 @@ in }; services.phpfpm.pools.limesurvey = { - listen = "/run/phpfpm/limesurvey.sock"; - extraConfig = '' - listen.owner = ${config.services.httpd.user}; - listen.group = ${config.services.httpd.group}; - user = ${user}; - group = ${group}; - - env[LIMESURVEY_CONFIG] = ${limesurveyConfig} - - ${cfg.poolConfig} - ''; + inherit user group; + phpEnv.LIMESURVEY_CONFIG = "${limesurveyConfig}"; + settings = { + "listen.owner" = config.services.httpd.user; + "listen.group" = config.services.httpd.group; + } // cfg.poolConfig; }; services.httpd = { @@ -241,7 +236,7 @@ in <Directory "${pkg}/share/limesurvey"> <FilesMatch "\.php$"> <If "-f %{REQUEST_FILENAME}"> - SetHandler "proxy:unix:${fpm.listen}|fcgi://localhost/" + SetHandler "proxy:unix:${fpm.socket}|fcgi://localhost/" </If> </FilesMatch> diff --git a/nixos/modules/services/web-apps/matomo.nix b/nixos/modules/services/web-apps/matomo.nix index 14aca45a342..bf8b9dbcc21 100644 --- a/nixos/modules/services/web-apps/matomo.nix +++ b/nixos/modules/services/web-apps/matomo.nix @@ -225,22 +225,24 @@ in { serviceConfig.UMask = "0007"; }; - services.phpfpm.poolConfigs = let + services.phpfpm.pools = let # workaround for when both are null and need to generate a string, # which is illegal, but as assertions apparently are being triggered *after* config generation, # we have to avoid already throwing errors at this previous stage. socketOwner = if (cfg.nginx != null) then config.services.nginx.user else if (cfg.webServerUser != null) then cfg.webServerUser else ""; in { - ${pool} = '' - listen = "${phpSocket}" - listen.owner = ${socketOwner} - listen.group = root - listen.mode = 0600 - user = ${user} - env[PIWIK_USER_PATH] = ${dataDir} - ${cfg.phpfpmProcessManagerConfig} - ''; + ${pool} = { + listen = phpSocket; + extraConfig = '' + listen.owner = ${socketOwner} + listen.group = root + listen.mode = 0600 + user = ${user} + env[PIWIK_USER_PATH] = ${dataDir} + ${cfg.phpfpmProcessManagerConfig} + ''; + }; }; diff --git a/nixos/modules/services/web-apps/mediawiki.nix b/nixos/modules/services/web-apps/mediawiki.nix index 5bd5977e592..ec2568bf952 100644 --- a/nixos/modules/services/web-apps/mediawiki.nix +++ b/nixos/modules/services/web-apps/mediawiki.nix @@ -312,17 +312,17 @@ in }; poolConfig = mkOption { - type = types.lines; - default = '' - pm = dynamic - pm.max_children = 32 - pm.start_servers = 2 - pm.min_spare_servers = 2 - pm.max_spare_servers = 4 - pm.max_requests = 500 - ''; + type = with types; attrsOf (oneOf [ str int bool ]); + default = { + "pm" = "dynamic"; + "pm.max_children" = 32; + "pm.start_servers" = 2; + "pm.min_spare_servers" = 2; + "pm.max_spare_servers" = 4; + "pm.max_requests" = 500; + }; description = '' - Options for MediaWiki's PHP pool. See the documentation on <literal>php-fpm.conf</literal> + Options for the MediaWiki PHP pool. See the documentation on <literal>php-fpm.conf</literal> for details on configuration directives. ''; }; @@ -379,17 +379,12 @@ in }; services.phpfpm.pools.mediawiki = { - listen = "/run/phpfpm/mediawiki.sock"; - extraConfig = '' - listen.owner = ${config.services.httpd.user} - listen.group = ${config.services.httpd.group} - user = ${user} - group = ${group} - - env[MEDIAWIKI_CONFIG] = ${mediawikiConfig} - - ${cfg.poolConfig} - ''; + inherit user group; + phpEnv.MEDIAWIKI_CONFIG = "${mediawikiConfig}"; + settings = { + "listen.owner" = config.services.httpd.user; + "listen.group" = config.services.httpd.group; + } // cfg.poolConfig; }; services.httpd = { @@ -403,7 +398,7 @@ in <Directory "${pkg}/share/mediawiki"> <FilesMatch "\.php$"> <If "-f %{REQUEST_FILENAME}"> - SetHandler "proxy:unix:${fpm.listen}|fcgi://localhost/" + SetHandler "proxy:unix:${fpm.socket}|fcgi://localhost/" </If> </FilesMatch> diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index a0214a75d93..ada14ad3929 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -4,6 +4,7 @@ with lib; let cfg = config.services.nextcloud; + fpm = config.services.phpfpm.pools.nextcloud; phpPackage = pkgs.php73; phpPackages = pkgs.php73Packages; @@ -410,25 +411,20 @@ in { }; services.phpfpm = { - pools.nextcloud = let - phpAdminValues = (toKeyValue - (foldr (a: b: a // b) {} - (mapAttrsToList (k: v: { "php_admin_value[${k}]" = v; }) - phpOptions))); - in { - phpOptions = phpOptionsExtensions; + pools.nextcloud = { + user = "nextcloud"; + group = "nginx"; + phpOptions = phpOptionsExtensions + phpOptionsStr; phpPackage = phpPackage; - listen = "/run/phpfpm/nextcloud"; - extraConfig = '' - listen.owner = nginx - listen.group = nginx - user = nextcloud - group = nginx - ${cfg.poolConfig} - env[NEXTCLOUD_CONFIG_DIR] = ${cfg.home}/config - env[PATH] = /run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/usr/bin:/bin - ${phpAdminValues} - ''; + phpEnv = { + NEXTCLOUD_CONFIG_DIR = "${cfg.home}/config"; + PATH = "/run/wrappers/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin:/usr/bin:/bin"; + }; + settings = mapAttrs (name: mkDefault) { + "listen.owner" = "nginx"; + "listen.group" = "nginx"; + }; + extraConfig = cfg.poolConfig; }; }; @@ -489,7 +485,7 @@ in { fastcgi_param HTTPS ${if cfg.https then "on" else "off"}; fastcgi_param modHeadersAvailable true; fastcgi_param front_controller_active true; - fastcgi_pass unix:/run/phpfpm/nextcloud; + fastcgi_pass unix:${fpm.socket}; fastcgi_intercept_errors on; fastcgi_request_buffering off; fastcgi_read_timeout 120s; diff --git a/nixos/modules/services/web-apps/restya-board.nix b/nixos/modules/services/web-apps/restya-board.nix index b200a89260a..6a1b4143bc1 100644 --- a/nixos/modules/services/web-apps/restya-board.nix +++ b/nixos/modules/services/web-apps/restya-board.nix @@ -9,11 +9,11 @@ with lib; let cfg = config.services.restya-board; + fpm = config.services.phpfpm.pools.${poolName}; runDir = "/run/restya-board"; poolName = "restya-board"; - phpfpmSocketName = "/run/phpfpm/${poolName}.sock"; in @@ -180,7 +180,7 @@ in services.phpfpm.pools = { "${poolName}" = { - listen = phpfpmSocketName; + inherit (cfg) user group; phpOptions = '' date.timezone = "CET" @@ -191,20 +191,18 @@ in auth_password = ${cfg.email.password} ''} ''; - extraConfig = '' - listen.owner = nginx - listen.group = nginx - listen.mode = 0600 - user = ${cfg.user} - group = ${cfg.group} - pm = dynamic - pm.max_children = 75 - pm.start_servers = 10 - pm.min_spare_servers = 5 - pm.max_spare_servers = 20 - pm.max_requests = 500 - catch_workers_output = 1 - ''; + settings = mapAttrs (name: mkDefault) { + "listen.owner" = "nginx"; + "listen.group" = "nginx"; + "listen.mode" = "0600"; + "pm" = "dynamic"; + "pm.max_children" = 75; + "pm.start_servers" = 10; + "pm.min_spare_servers" = 5; + "pm.max_spare_servers" = 20; + "pm.max_requests" = 500; + "catch_workers_output" = 1; + }; }; }; @@ -241,7 +239,7 @@ in tryFiles = "$uri =404"; extraConfig = '' include ${pkgs.nginx}/conf/fastcgi_params; - fastcgi_pass unix:${phpfpmSocketName}; + fastcgi_pass unix:${fpm.socket}; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PHP_VALUE "upload_max_filesize=9G \n post_max_size=9G \n max_execution_time=200 \n max_input_time=200 \n memory_limit=256M"; diff --git a/nixos/modules/services/web-apps/selfoss.nix b/nixos/modules/services/web-apps/selfoss.nix index cd0f743a5fb..56b7cafffe8 100644 --- a/nixos/modules/services/web-apps/selfoss.nix +++ b/nixos/modules/services/web-apps/selfoss.nix @@ -4,7 +4,6 @@ let cfg = config.services.selfoss; poolName = "selfoss_pool"; - phpfpmSocketName = "/run/phpfpm/${poolName}.sock"; dataDir = "/var/lib/selfoss"; @@ -116,21 +115,22 @@ in config = mkIf cfg.enable { - services.phpfpm.poolConfigs = mkIf (cfg.pool == "${poolName}") { - "${poolName}" = '' - listen = "${phpfpmSocketName}"; - listen.owner = nginx - listen.group = nginx - listen.mode = 0600 - user = nginx - pm = dynamic - pm.max_children = 75 - pm.start_servers = 10 - pm.min_spare_servers = 5 - pm.max_spare_servers = 20 - pm.max_requests = 500 - catch_workers_output = 1 - ''; + services.phpfpm.pools = mkIf (cfg.pool == "${poolName}") { + "${poolName}" = { + user = "nginx"; + settings = mapAttrs (name: mkDefault) { + "listen.owner" = "nginx"; + "listen.group" = "nginx"; + "listen.mode" = "0600"; + "pm" = "dynamic"; + "pm.max_children" = 75; + "pm.start_servers" = 10; + "pm.min_spare_servers" = 5; + "pm.max_spare_servers" = 20; + "pm.max_requests" = 500; + "catch_workers_output" = 1; + }; + }; }; systemd.services.selfoss-config = { diff --git a/nixos/modules/services/web-apps/tt-rss.nix b/nixos/modules/services/web-apps/tt-rss.nix index 1bd9de93735..59b0ee1addc 100644 --- a/nixos/modules/services/web-apps/tt-rss.nix +++ b/nixos/modules/services/web-apps/tt-rss.nix @@ -521,20 +521,19 @@ let services.phpfpm.pools = mkIf (cfg.pool == "${poolName}") { "${poolName}" = { - listen = "/var/run/phpfpm/${poolName}.sock"; - extraConfig = '' - listen.owner = nginx - listen.group = nginx - listen.mode = 0600 - user = ${cfg.user} - pm = dynamic - pm.max_children = 75 - pm.start_servers = 10 - pm.min_spare_servers = 5 - pm.max_spare_servers = 20 - pm.max_requests = 500 - catch_workers_output = 1 - ''; + inherit (cfg) user; + settings = mapAttrs (name: mkDefault) { + "listen.owner" = "nginx"; + "listen.group" = "nginx"; + "listen.mode" = "0600"; + "pm" = "dynamic"; + "pm.max_children" = 75; + "pm.start_servers" = 10; + "pm.min_spare_servers" = 5; + "pm.max_spare_servers" = 20; + "pm.max_requests" = 500; + "catch_workers_output" = 1; + }; }; }; @@ -552,7 +551,7 @@ let locations."~ \.php$" = { extraConfig = '' fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass unix:${config.services.phpfpm.pools.${cfg.pool}.listen}; + fastcgi_pass unix:${config.services.phpfpm.pools.${cfg.pool}.socket}; fastcgi_index index.php; ''; }; diff --git a/nixos/modules/services/web-apps/wordpress.nix b/nixos/modules/services/web-apps/wordpress.nix index 624b0089a03..98dc8458818 100644 --- a/nixos/modules/services/web-apps/wordpress.nix +++ b/nixos/modules/services/web-apps/wordpress.nix @@ -216,15 +216,15 @@ let }; poolConfig = mkOption { - type = types.lines; - default = '' - pm = dynamic - pm.max_children = 32 - pm.start_servers = 2 - pm.min_spare_servers = 2 - pm.max_spare_servers = 4 - pm.max_requests = 500 - ''; + type = with types; attrsOf (oneOf [ str int bool ]); + default = { + "pm" = "dynamic"; + "pm.max_children" = 32; + "pm.start_servers" = 2; + "pm.min_spare_servers" = 2; + "pm.max_spare_servers" = 4; + "pm.max_requests" = 500; + }; description = '' Options for the WordPress PHP pool. See the documentation on <literal>php-fpm.conf</literal> for details on configuration directives. @@ -280,15 +280,11 @@ in services.phpfpm.pools = mapAttrs' (hostName: cfg: ( nameValuePair "wordpress-${hostName}" { - listen = "/run/phpfpm/wordpress-${hostName}.sock"; - extraConfig = '' - listen.owner = ${config.services.httpd.user} - listen.group = ${config.services.httpd.group} - user = ${user} - group = ${group} - - ${cfg.poolConfig} - ''; + inherit user group; + settings = { + "listen.owner" = config.services.httpd.user; + "listen.group" = config.services.httpd.group; + } // cfg.poolConfig; } )) eachSite; @@ -303,7 +299,7 @@ in <Directory "${pkg hostName cfg}/share/wordpress"> <FilesMatch "\.php$"> <If "-f %{REQUEST_FILENAME}"> - SetHandler "proxy:unix:/run/phpfpm/wordpress-${hostName}.sock|fcgi://localhost/" + SetHandler "proxy:unix:${config.services.phpfpm.pools."wordpress-${hostName}".socket}|fcgi://localhost/" </If> </FilesMatch> diff --git a/nixos/modules/services/web-apps/zabbix.nix b/nixos/modules/services/web-apps/zabbix.nix index 4b5334579a9..fa358ffafbc 100644 --- a/nixos/modules/services/web-apps/zabbix.nix +++ b/nixos/modules/services/web-apps/zabbix.nix @@ -133,15 +133,15 @@ in }; poolConfig = mkOption { - type = types.lines; - default = '' - pm = dynamic - pm.max_children = 32 - pm.start_servers = 2 - pm.min_spare_servers = 2 - pm.max_spare_servers = 4 - pm.max_requests = 500 - ''; + type = with types; attrsOf (oneOf [ str int bool ]); + default = { + "pm" = "dynamic"; + "pm.max_children" = 32; + "pm.start_servers" = 2; + "pm.min_spare_servers" = 2; + "pm.max_spare_servers" = 4; + "pm.max_requests" = 500; + }; description = '' Options for the Zabbix PHP pool. See the documentation on <literal>php-fpm.conf</literal> for details on configuration directives. ''; @@ -160,6 +160,8 @@ in ]; services.phpfpm.pools.zabbix = { + inherit user; + group = config.services.httpd.group; phpOptions = '' # https://www.zabbix.com/documentation/current/manual/installation/install memory_limit = 128M @@ -177,15 +179,11 @@ in '' + optionalString (cfg.database.type == "oracle") '' extension=${pkgs.phpPackages.oci8}/lib/php/extensions/oci8.so ''; - listen = "/run/phpfpm/zabbix.sock"; - extraConfig = '' - listen.owner = ${config.services.httpd.user}; - listen.group = ${config.services.httpd.group}; - user = ${user}; - group = ${config.services.httpd.group}; - env[ZABBIX_CONFIG] = ${zabbixConfig} - ${cfg.poolConfig} - ''; + phpEnv.ZABBIX_CONFIG = zabbixConfig; + settings = { + "listen.owner" = config.services.httpd.user; + "listen.group" = config.services.httpd.group; + } // cfg.poolConfig; }; services.httpd = { diff --git a/nixos/modules/services/web-servers/phpfpm/default.nix b/nixos/modules/services/web-servers/phpfpm/default.nix index ffafbc5e92f..e95e71e0d99 100644 --- a/nixos/modules/services/web-servers/phpfpm/default.nix +++ b/nixos/modules/services/web-servers/phpfpm/default.nix @@ -4,41 +4,27 @@ with lib; let cfg = config.services.phpfpm; - enabled = cfg.poolConfigs != {} || cfg.pools != {}; - stateDir = "/run/phpfpm"; + runtimeDir = "/run/phpfpm"; - poolConfigs = - (mapAttrs mapPoolConfig cfg.poolConfigs) // - (mapAttrs mapPool cfg.pools); + toStr = value: + if true == value then "yes" + else if false == value then "no" + else toString value; - mapPoolConfig = n: p: { - phpPackage = cfg.phpPackage; - phpOptions = cfg.phpOptions; - config = p; - }; - - mapPool = n: p: { - phpPackage = p.phpPackage; - phpOptions = p.phpOptions; - config = '' - listen = ${p.listen} - ${p.extraConfig} - ''; - }; - - fpmCfgFile = pool: conf: pkgs.writeText "phpfpm-${pool}.conf" '' + fpmCfgFile = pool: poolOpts: pkgs.writeText "phpfpm-${pool}.conf" '' [global] - error_log = syslog - daemonize = no - ${cfg.extraConfig} + ${concatStringsSep "\n" (mapAttrsToList (n: v: "${n} = ${toStr v}") cfg.settings)} + ${optionalString (cfg.extraConfig != null) cfg.extraConfig} [${pool}] - ${conf} + ${concatStringsSep "\n" (mapAttrsToList (n: v: "${n} = ${toStr v}") poolOpts.settings)} + ${concatStringsSep "\n" (mapAttrsToList (n: v: "env[${n}] = ${toStr v}") poolOpts.phpEnv)} + ${optionalString (poolOpts.extraConfig != null) poolOpts.extraConfig} ''; - phpIni = pool: pkgs.runCommand "php.ini" { - inherit (pool) phpPackage phpOptions; + phpIni = poolOpts: pkgs.runCommand "php.ini" { + inherit (poolOpts) phpPackage phpOptions; preferLocalBuild = true; nixDefaults = '' sendmail_path = "/run/wrappers/bin/sendmail -t -i" @@ -48,13 +34,138 @@ let cat $phpPackage/etc/php.ini $nixDefaultsPath $phpOptionsPath > $out ''; + poolOpts = { name, ... }: + let + poolOpts = cfg.pools."${name}"; + in + { + options = { + socket = mkOption { + type = types.str; + readOnly = true; + description = '' + Path to the unix socket file on which to accept FastCGI requests. + <note><para>This option is read-only and managed by NixOS.</para></note> + ''; + }; + + listen = mkOption { + type = types.str; + default = ""; + example = "/path/to/unix/socket"; + description = '' + The address on which to accept FastCGI requests. + ''; + }; + + phpPackage = mkOption { + type = types.package; + default = cfg.phpPackage; + defaultText = "config.services.phpfpm.phpPackage"; + description = '' + The PHP package to use for running this PHP-FPM pool. + ''; + }; + + phpOptions = mkOption { + type = types.lines; + default = cfg.phpOptions; + defaultText = "config.services.phpfpm.phpOptions"; + description = '' + "Options appended to the PHP configuration file <filename>php.ini</filename> used for this PHP-FPM pool." + ''; + }; + + phpEnv = lib.mkOption { + type = with types; attrsOf str; + default = {}; + description = '' + Environment variables used for this PHP-FPM pool. + ''; + example = literalExample '' + { + HOSTNAME = "$HOSTNAME"; + TMP = "/tmp"; + TMPDIR = "/tmp"; + TEMP = "/tmp"; + } + ''; + }; + + user = mkOption { + type = types.str; + description = "User account under which this pool runs."; + }; + + group = mkOption { + type = types.str; + description = "Group account under which this pool runs."; + }; + + settings = mkOption { + type = with types; attrsOf (oneOf [ str int bool ]); + default = {}; + description = '' + PHP-FPM pool directives. Refer to the "List of pool directives" section of + <link xlink:href="https://www.php.net/manual/en/install.fpm.configuration.php"/> + for details. Note that settings names must be enclosed in quotes (e.g. + <literal>"pm.max_children"</literal> instead of <literal>pm.max_children</literal>). + ''; + example = literalExample '' + { + "pm" = "dynamic"; + "pm.max_children" = 75; + "pm.start_servers" = 10; + "pm.min_spare_servers" = 5; + "pm.max_spare_servers" = 20; + "pm.max_requests" = 500; + } + ''; + }; + + extraConfig = mkOption { + type = with types; nullOr lines; + default = null; + description = '' + Extra lines that go into the pool configuration. + See the documentation on <literal>php-fpm.conf</literal> for + details on configuration directives. + ''; + }; + }; + + config = { + socket = if poolOpts.listen == "" then "${runtimeDir}/${name}.sock" else poolOpts.listen; + group = mkDefault poolOpts.user; + + settings = mapAttrs (name: mkDefault){ + listen = poolOpts.socket; + user = poolOpts.user; + group = poolOpts.group; + }; + }; + }; + in { options = { services.phpfpm = { + settings = mkOption { + type = with types; attrsOf (oneOf [ str int bool ]); + default = {}; + description = '' + PHP-FPM global directives. Refer to the "List of global php-fpm.conf directives" section of + <link xlink:href="https://www.php.net/manual/en/install.fpm.configuration.php"/> + for details. Note that settings names must be enclosed in quotes (e.g. + <literal>"pm.max_children"</literal> instead of <literal>pm.max_children</literal>). + You need not specify the options <literal>error_log</literal> or + <literal>daemonize</literal> here, since they are generated by NixOS. + ''; + }; + extraConfig = mkOption { - type = types.lines; - default = ""; + type = with types; nullOr lines; + default = null; description = '' Extra configuration that should be put in the global section of the PHP-FPM configuration file. Do not specify the options @@ -80,64 +191,56 @@ in { '' date.timezone = "CET" ''; - description = - "Options appended to the PHP configuration file <filename>php.ini</filename>."; - }; - - poolConfigs = mkOption { - default = {}; - type = types.attrsOf types.lines; - example = literalExample '' - { mypool = ''' - listen = /run/phpfpm/mypool - user = nobody - pm = dynamic - pm.max_children = 75 - pm.start_servers = 10 - pm.min_spare_servers = 5 - pm.max_spare_servers = 20 - pm.max_requests = 500 - '''; - } - ''; description = '' - A mapping between PHP-FPM pool names and their configurations. - See the documentation on <literal>php-fpm.conf</literal> for - details on configuration directives. If no pools are defined, - the phpfpm service is disabled. + Options appended to the PHP configuration file <filename>php.ini</filename>. ''; }; pools = mkOption { - type = types.attrsOf (types.submodule (import ./pool-options.nix { - inherit lib config; - })); + type = types.attrsOf (types.submodule poolOpts); default = {}; example = literalExample '' { mypool = { - listen = "/path/to/unix/socket"; + user = "php"; + group = "php"; phpPackage = pkgs.php; - extraConfig = ''' - user = nobody - pm = dynamic - pm.max_children = 75 - pm.start_servers = 10 - pm.min_spare_servers = 5 - pm.max_spare_servers = 20 - pm.max_requests = 500 + settings = ''' + "pm" = "dynamic"; + "pm.max_children" = 75; + "pm.start_servers" = 10; + "pm.min_spare_servers" = 5; + "pm.max_spare_servers" = 20; + "pm.max_requests" = 500; '''; } }''; description = '' - PHP-FPM pools. If no pools or poolConfigs are defined, the PHP-FPM + PHP-FPM pools. If no pools are defined, the PHP-FPM service is disabled. ''; }; }; }; - config = mkIf enabled { + config = mkIf (cfg.pools != {}) { + + warnings = + mapAttrsToList (pool: poolOpts: '' + Using config.services.phpfpm.pools.${pool}.listen is deprecated and will become unsupported in a future release. Please reference the read-only option config.services.phpfpm.pools.${pool}.socket to access the path of your socket. + '') (filterAttrs (pool: poolOpts: poolOpts.listen != "") cfg.pools) ++ + mapAttrsToList (pool: poolOpts: '' + Using config.services.phpfpm.pools.${pool}.extraConfig is deprecated and will become unsupported in a future release. Please migrate your configuration to config.services.phpfpm.pools.${pool}.settings. + '') (filterAttrs (pool: poolOpts: poolOpts.extraConfig != null) cfg.pools) ++ + optional (cfg.extraConfig != null) '' + Using config.services.phpfpm.extraConfig is deprecated and will become unsupported in a future release. Please migrate your configuration to config.services.phpfpm.settings. + '' + ; + + services.phpfpm.settings = { + error_log = "syslog"; + daemonize = false; + }; systemd.slices.phpfpm = { description = "PHP FastCGI Process manager pools slice"; @@ -148,18 +251,15 @@ in { wantedBy = [ "multi-user.target" ]; }; - systemd.services = flip mapAttrs' poolConfigs (pool: poolConfig: + systemd.services = mapAttrs' (pool: poolOpts: nameValuePair "phpfpm-${pool}" { description = "PHP FastCGI Process Manager service for pool ${pool}"; after = [ "network.target" ]; wantedBy = [ "phpfpm.target" ]; partOf = [ "phpfpm.target" ]; - preStart = '' - mkdir -p ${stateDir} - ''; serviceConfig = let - cfgFile = fpmCfgFile pool poolConfig.config; - iniFile = phpIni poolConfig; + cfgFile = fpmCfgFile pool poolOpts; + iniFile = phpIni poolOpts; in { Slice = "phpfpm.slice"; PrivateDevices = true; @@ -168,10 +268,12 @@ in { # XXX: We need AF_NETLINK to make the sendmail SUID binary from postfix work RestrictAddressFamilies = "AF_UNIX AF_INET AF_INET6 AF_NETLINK"; Type = "notify"; - ExecStart = "${poolConfig.phpPackage}/bin/php-fpm -y ${cfgFile} -c ${iniFile}"; + ExecStart = "${poolOpts.phpPackage}/bin/php-fpm -y ${cfgFile} -c ${iniFile}"; ExecReload = "${pkgs.coreutils}/bin/kill -USR2 $MAINPID"; + RuntimeDirectory = "phpfpm"; + RuntimeDirectoryPreserve = true; # Relevant when multiple processes are running }; } - ); + ) cfg.pools; }; } diff --git a/nixos/modules/services/web-servers/phpfpm/pool-options.nix b/nixos/modules/services/web-servers/phpfpm/pool-options.nix deleted file mode 100644 index d9ad7eff71f..00000000000 --- a/nixos/modules/services/web-servers/phpfpm/pool-options.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ lib, config }: - -let - fpmCfg = config.services.phpfpm; -in - -with lib; { - - options = { - - listen = mkOption { - type = types.str; - example = "/path/to/unix/socket"; - description = '' - The address on which to accept FastCGI requests. - ''; - }; - - phpPackage = mkOption { - type = types.package; - default = fpmCfg.phpPackage; - defaultText = "config.services.phpfpm.phpPackage"; - description = '' - The PHP package to use for running this PHP-FPM pool. - ''; - }; - - phpOptions = mkOption { - type = types.lines; - default = fpmCfg.phpOptions; - defaultText = "config.services.phpfpm.phpOptions"; - description = '' - "Options appended to the PHP configuration file <filename>php.ini</filename> used for this PHP-FPM pool." - ''; - }; - - extraConfig = mkOption { - type = types.lines; - example = '' - user = nobody - pm = dynamic - pm.max_children = 75 - pm.start_servers = 10 - pm.min_spare_servers = 5 - pm.max_spare_servers = 20 - pm.max_requests = 500 - ''; - - description = '' - Extra lines that go into the pool configuration. - See the documentation on <literal>php-fpm.conf</literal> for - details on configuration directives. - ''; - }; - }; -} - diff --git a/nixos/modules/virtualisation/libvirtd.nix b/nixos/modules/virtualisation/libvirtd.nix index 394b4ce5656..16b79d86919 100644 --- a/nixos/modules/virtualisation/libvirtd.nix +++ b/nixos/modules/virtualisation/libvirtd.nix @@ -104,6 +104,18 @@ in { ''; }; + onBoot = mkOption { + type = types.enum ["start" "ignore" ]; + default = "start"; + description = '' + Specifies the action to be done to / on the guests when the host boots. + The "start" option starts all guests that were running prior to shutdown + regardless of their autostart settings. The "ignore" option will not + start the formally running guest on boot. However, any guest marked as + autostart will still be automatically started by libvirtd. + ''; + }; + onShutdown = mkOption { type = types.enum ["shutdown" "suspend" ]; default = "suspend"; @@ -221,6 +233,7 @@ in { path = with pkgs; [ coreutils libvirt gawk ]; restartIfChanged = false; + environment.ON_BOOT = "${cfg.onBoot}"; environment.ON_SHUTDOWN = "${cfg.onShutdown}"; }; diff --git a/pkgs/applications/editors/android-studio/default.nix b/pkgs/applications/editors/android-studio/default.nix index 75fb206c9e5..7f57d24b263 100644 --- a/pkgs/applications/editors/android-studio/default.nix +++ b/pkgs/applications/editors/android-studio/default.nix @@ -14,9 +14,9 @@ let }; betaVersion = stableVersion; latestVersion = { # canary & dev - version = "3.6.0.6"; # "Android Studio 3.6 Canary 6" - build = "192.5787298"; - sha256Hash = "1rri8b5nkxj65hq13s5d31fy08llf3ad9s5mn56ridd4nsy2c5df"; + version = "3.6.0.7"; # "Android Studio 3.6 Canary 7" + build = "192.5807797"; + sha256Hash = "1l47miiyd8z7v0hbvda06953pp9ilyrsma83gxqx35ghnc0n7g81"; }; in rec { # Attributes are named by their corresponding release channels diff --git a/pkgs/applications/misc/megasync/default.nix b/pkgs/applications/misc/megasync/default.nix index b3e73986417..7e66b7bf0bb 100644 --- a/pkgs/applications/misc/megasync/default.nix +++ b/pkgs/applications/misc/megasync/default.nix @@ -15,15 +15,19 @@ , libuv , libzen , lsb-release +, mkDerivation , pkgconfig -, qt5 +, qmake +, qtbase +, qtsvg +, qttools , sqlite , swig , unzip , wget }: -stdenv.mkDerivation rec { +mkDerivation rec { name = "megasync-${version}"; version = "4.1.1.0"; @@ -41,8 +45,8 @@ stdenv.mkDerivation rec { doxygen lsb-release pkgconfig - qt5.qmake - qt5.qttools + qmake + qttools swig ]; buildInputs = [ @@ -57,8 +61,8 @@ stdenv.mkDerivation rec { libtool libuv libzen - qt5.qtbase - qt5.qtsvg + qtbase + qtsvg sqlite unzip wget diff --git a/pkgs/applications/misc/netsurf/buildsystem/default.nix b/pkgs/applications/misc/netsurf/buildsystem/default.nix index 882bb75219d..adba3632935 100644 --- a/pkgs/applications/misc/netsurf/buildsystem/default.nix +++ b/pkgs/applications/misc/netsurf/buildsystem/default.nix @@ -3,11 +3,11 @@ stdenv.mkDerivation rec { name = "netsurf-buildsystem-${version}"; - version = "1.7"; + version = "1.8"; src = fetchurl { url = "http://download.netsurf-browser.org/libs/releases/buildsystem-${version}.tar.gz"; - sha256 = "1q23aaycv35ma5471l1gxib8lfq2s9kprrkaqgfc926d04rlbmhw"; + sha256 = "0ffdjwskxlnh8sk40qqfgksbb1nrdzfxsshrscra0p4nqpkj98z6"; }; makeFlags = [ diff --git a/pkgs/applications/networking/modem-manager-gui/default.nix b/pkgs/applications/networking/modem-manager-gui/default.nix index d31f98ef4ba..6dcc35f44d3 100644 --- a/pkgs/applications/networking/modem-manager-gui/default.nix +++ b/pkgs/applications/networking/modem-manager-gui/default.nix @@ -1,7 +1,22 @@ -{ stdenv, pkgconfig, python3, fetchhg, gtk3, glib, gdbm, gtkspell3, itstool, libappindicator-gtk3, perlPackages, glibcLocales, meson, ninja }: +{ stdenv +, pkgconfig +, python3 +, fetchhg +, gtk3 +, glib +, gdbm +, gtkspell3 +, ofono +, itstool +, libappindicator-gtk3 +, perlPackages +, glibcLocales +, meson +, ninja +}: stdenv.mkDerivation rec { - name = "modem-manager-gui-${version}"; + pname = "modem-manager-gui"; version = "0.0.19.1"; src = fetchhg { @@ -10,14 +25,11 @@ stdenv.mkDerivation rec { sha256 = "11iibh36567814h2bz41sa1072b86p1l13xyj670pwkh9k8kw8fd"; }; - LC_ALL = "en_US.utf-8"; - nativeBuildInputs = [ pkgconfig python3 perlPackages.Po4a itstool - glibcLocales meson ninja ]; @@ -27,6 +39,7 @@ stdenv.mkDerivation rec { glib gdbm gtkspell3 + ofono libappindicator-gtk3 ]; diff --git a/pkgs/applications/networking/remote/teamviewer/default.nix b/pkgs/applications/networking/remote/teamviewer/default.nix index 832a6c5e088..9227cad5249 100644 --- a/pkgs/applications/networking/remote/teamviewer/default.nix +++ b/pkgs/applications/networking/remote/teamviewer/default.nix @@ -1,9 +1,9 @@ { mkDerivation, lib, fetchurl, autoPatchelfHook, makeWrapper, xdg_utils, dbus -, qtbase, qtwebkit, qtx11extras, qtquickcontrols, glibc, libXrandr, libX11 +, qtbase, qtwebkit, qtx11extras, qtquickcontrols, glibc +, libXrandr, libX11, libXext, libXdamage, libXtst, libSM, libXfixes , wrapQtAppsHook }: - mkDerivation rec { name = "teamviewer-${version}"; version = "14.5.1691"; @@ -44,8 +44,11 @@ mkDerivation rec { --replace '/lib64/ld-linux-x86-64.so.2' '${glibc.out}/lib/ld-linux-x86-64.so.2' substituteInPlace $out/share/teamviewer/tv_bin/script/tvw_config \ --replace '/var/run/' '/run/' + wrapProgram $out/share/teamviewer/tv_bin/script/teamviewer --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libXrandr libX11 ]}" wrapProgram $out/share/teamviewer/tv_bin/teamviewerd --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libXrandr libX11 ]}" + wrapProgram $out/share/teamviewer/tv_bin/TeamViewer --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libXrandr libX11 ]}" + wrapProgram $out/share/teamviewer/tv_bin/TeamViewer_Desktop --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [libXrandr libX11 libXext libXdamage libXtst libSM libXfixes ]}" wrapQtApp $out/bin/teamviewer ''; diff --git a/pkgs/applications/science/robotics/sumorobot-manager/default.nix b/pkgs/applications/science/robotics/sumorobot-manager/default.nix new file mode 100644 index 00000000000..68b91dafb73 --- /dev/null +++ b/pkgs/applications/science/robotics/sumorobot-manager/default.nix @@ -0,0 +1,43 @@ +{ stdenv, python3, qt5, fetchFromGitHub, wrapPython, pyqt5, pyserial }: + +stdenv.mkDerivation rec { + pname = "sumorobot-manager"; + version = "0.9.0"; + + src = fetchFromGitHub { + owner = "robokoding"; + repo = pname; + rev = "v${version}"; + sha256 = "03zhb54c259a66hsahmv2ajbzwcjnfjj050wbjhw51zqzxinlgqr"; + }; + + buildInputs = [ python3 ]; + pythonPath = [ + pyqt5 pyserial + ]; + + nativeBuildInputs = [ wrapPython qt5.wrapQtAppsHook ]; + + buildPhase = "true"; + + installPhase = '' + mkdir -p $out/opt/sumorobot-manager + cp -r main.py lib res $out/opt/sumorobot-manager + chmod -R 644 $out/opt/sumorobot-manager/lib/* + mkdir $out/bin + makeQtWrapper $out/opt/sumorobot-manager/main.py $out/bin/sumorobot-manager \ + --run "cd $out/opt/sumorobot-manager" + ''; + + preFixup = '' + patchShebangs $out/opt/sumorobot-manager/main.py + wrapPythonProgramsIn "$out/opt" "$pythonPath" + ''; + + meta = with stdenv.lib; { + description = "Desktop App for managing SumoRobots"; + homepage = "https://www.robokoding.com/kits/sumorobot/sumomanager/"; + license = licenses.mit; + maintainers = with maintainers; [ abbradar ]; + }; +} diff --git a/pkgs/applications/version-management/bcompare/default.nix b/pkgs/applications/version-management/bcompare/default.nix new file mode 100644 index 00000000000..3dc7792de2a --- /dev/null +++ b/pkgs/applications/version-management/bcompare/default.nix @@ -0,0 +1,66 @@ +{ autoPatchelfHook, bzip2, cairo, coreutils, fetchurl, gdk-pixbuf, gnome2, gtk2, kcoreaddons, ki18n, kio, kservice, lib, qt4, qt511, qtbase, stdenv, runtimeShell }: + +stdenv.mkDerivation rec { + pname = "bcompare"; + version = "4.2.10.23938"; + + src = fetchurl { + url = "https://www.scootersoftware.com/${pname}-${version}_amd64.deb"; + sha256 = "1825s1lbaj20d712czmaaqg7mkwfb650r53af2y30j29p6yd4wal"; + }; + + unpackPhase = '' + ar x $src + tar xfz data.tar.gz + ''; + + installPhase = '' + mkdir -p $out/bin $out/lib $out/share + cp -R usr/share $out/ + cp -R usr/lib $out/ + cp -R usr/bin $out/ + + # Remove library that refuses to be autoPatchelf'ed + rm $out/lib/beyondcompare/ext/bcompare_ext_kde.amd64.so + + substituteInPlace $out/bin/bcompare \ + --replace "/usr/lib/beyondcompare" "$out/lib/beyondcompare" \ + --replace "/bin/bash" "${runtimeShell}" + + # Create symlink bzip2 library + ln -s ${bzip2.out}/lib/libbz2.so.1 $out/lib/beyondcompare/libbz2.so.1.0 + ''; + + nativeBuildInputs = [ autoPatchelfHook ]; + + buildInputs = [ + stdenv.cc.cc.lib + gtk2 + gnome2.pango + cairo + kio + kservice + ki18n + kcoreaddons + gdk-pixbuf + qt4 + bzip2 + ]; + + dontBuild = true; + dontConfigure = true; + + meta = with stdenv.lib; { + description = "GUI application that allows to quickly and easily compare files and folders"; + longDescription = '' + Beyond Compare is focused. Beyond Compare allows you to quickly and easily compare your files and folders. + By using simple, powerful commands you can focus on the differences you're interested in and ignore those you're not. + You can then merge the changes, synchronize your files, and generate reports for your records. + ''; + homepage = "https://www.scootersoftware.com"; + license = licenses.unfree; + maintainers = [ maintainers.ktor ]; + platforms = [ "x86_64-linux" ]; + }; + +} diff --git a/pkgs/applications/version-management/git-and-tools/default.nix b/pkgs/applications/version-management/git-and-tools/default.nix index c7d77bf3498..e64254ed29f 100644 --- a/pkgs/applications/version-management/git-and-tools/default.nix +++ b/pkgs/applications/version-management/git-and-tools/default.nix @@ -121,6 +121,8 @@ let git-stree = callPackage ./git-stree { }; + git-subrepo = callPackage ./git-subrepo { }; + git-sync = callPackage ./git-sync { }; git-test = callPackage ./git-test { }; diff --git a/pkgs/applications/version-management/git-and-tools/git-subrepo/default.nix b/pkgs/applications/version-management/git-and-tools/git-subrepo/default.nix new file mode 100644 index 00000000000..24a1e1ac937 --- /dev/null +++ b/pkgs/applications/version-management/git-and-tools/git-subrepo/default.nix @@ -0,0 +1,58 @@ +{ stdenv, fetchFromGitHub, git, makeWrapper, which }: + +stdenv.mkDerivation rec { + pname = "git-subrepo"; + version = "0.4.0"; + + src = fetchFromGitHub { + owner = "ingydotnet"; + repo = "git-subrepo"; + rev = version; + sha256 = "05m2dm9gq2nggwnxxdyq2kjj584sn2lxk66pr1qhjxnk81awj9l7"; + }; + + nativeBuildInputs = [ + makeWrapper + which + ]; + + buildInputs = [ + git + ]; + + makeFlags = [ + "PREFIX=${placeholder ''out''}" + "INSTALL_LIB=${placeholder ''out''}/bin" + "INSTALL_MAN=${placeholder ''out''}/share/man/man1" + ]; + + patches = [ + # Allow zsh completion to work even though we aren't installing from a git + # clone. Also submitted upstream as + # https://github.com/ingydotnet/git-subrepo/pull/420 + ./zsh-completion.patch + ]; + + postInstall = '' + ZSH_COMP_DIR="$out/share/zsh/vendor-completions" + mkdir -p "$ZSH_COMP_DIR" + cp share/zsh-completion/_git-subrepo "$ZSH_COMP_DIR/" + + BASH_COMP_DIR="$out/share/bash-completion/completions" + mkdir -p "$BASH_COMP_DIR" + cp share/completion.bash "$BASH_COMP_DIR/git-subrepo" + ''; + + postFixup = '' + wrapProgram $out/bin/git-subrepo \ + --prefix PATH : "${git}/bin" + ''; + + meta = with stdenv.lib; { + homepage = https://github.com/ingydotnet/git-subrepo; + description = "Git submodule alternative"; + license = licenses.mit; + platforms = platforms.linux; + maintainers = [ maintainers.ryantrinkle ]; + }; +} diff --git a/pkgs/applications/version-management/git-and-tools/git-subrepo/zsh-completion.patch b/pkgs/applications/version-management/git-and-tools/git-subrepo/zsh-completion.patch new file mode 100644 index 00000000000..dcba5ba6eea --- /dev/null +++ b/pkgs/applications/version-management/git-and-tools/git-subrepo/zsh-completion.patch @@ -0,0 +1,32 @@ +diff --git a/pkg/bin/generate-completion.pl b/pkg/bin/generate-completion.pl +index 85ae3b8..d3e423c 100644 +--- a/pkg/bin/generate-completion.pl ++++ b/pkg/bin/generate-completion.pl +@@ -82,11 +82,6 @@ sub generate_zsh { + + # DO NOT EDIT. This file generated by pkg/bin/generate-completion.pl. + +-if [[ -z $GIT_SUBREPO_ROOT ]]; then +- echo 'GIT_SUBREPO_ROOT is null; has `/path/to/git-subrepo/.rc` been sourced?' +- return 3 +-fi +- + _git-subrepo() { + typeset -A opt_args + local curcontext="$curcontext" state line context +diff --git a/share/zsh-completion/_git-subrepo b/share/zsh-completion/_git-subrepo +index fc82be2..a8069d9 100644 +--- a/share/zsh-completion/_git-subrepo ++++ b/share/zsh-completion/_git-subrepo +@@ -3,11 +3,6 @@ + + # DO NOT EDIT. This file generated by pkg/bin/generate-completion.pl. + +-if [[ -z $GIT_SUBREPO_ROOT ]]; then +- echo 'GIT_SUBREPO_ROOT is null; has `/path/to/git-subrepo/.rc` been sourced?' +- return 3 +-fi +- + _git-subrepo() { + typeset -A opt_args + local curcontext="$curcontext" state line context diff --git a/pkgs/applications/window-managers/compton/default.nix b/pkgs/applications/window-managers/compton/default.nix index 843c331f91c..0941329bdbe 100644 --- a/pkgs/applications/window-managers/compton/default.nix +++ b/pkgs/applications/window-managers/compton/default.nix @@ -5,15 +5,13 @@ , libXinerama, libXext, xwininfo, libxdg_basedir }: stdenv.mkDerivation rec { pname = "compton"; - version = "7"; - - COMPTON_VERSION = "v${version}"; + version = "7.2"; src = fetchFromGitHub { owner = "yshui"; repo = "compton"; - rev = COMPTON_VERSION; - sha256 = "0f23dv2p1snlpzc91v38q6896ncz4zqzmh2d97yf66j78g21awas"; + rev = "v${version}"; + sha256 = "1vwa5f0nifc1913diqd6cp5k1dlfyc2ijxbcdj1s37ywpx6c63c3"; fetchSubmodules = true; }; @@ -42,11 +40,6 @@ stdenv.mkDerivation rec { "-Dbuild_docs=true" ]; - preBuild = '' - git() { echo "$COMPTON_VERSION"; } - export -f git - ''; - installFlags = [ "PREFIX=$(out)" ]; postInstall = '' diff --git a/pkgs/desktops/pantheon/desktop/elementary-gsettings-schemas/default.nix b/pkgs/desktops/pantheon/desktop/elementary-gsettings-schemas/default.nix index dbcb992c425..b273bbece96 100644 --- a/pkgs/desktops/pantheon/desktop/elementary-gsettings-schemas/default.nix +++ b/pkgs/desktops/pantheon/desktop/elementary-gsettings-schemas/default.nix @@ -44,7 +44,7 @@ runCommand "elementary-gsettings-desktop-schemas" {} cat - > $out/share/gsettings-schemas/nixos-gsettings-overrides/glib-2.0/schemas/nixos-defaults.gschema.override <<- EOF [org.gnome.desktop.background] - picture-uri='${nixos-artwork.wallpapers.simple-dark-gray}/share/artwork/gnome/nix-wallpaper-simple-dark-gray.png' + picture-uri='file://${nixos-artwork.wallpapers.simple-dark-gray}/share/artwork/gnome/nix-wallpaper-simple-dark-gray.png' primary-color='#000000' ${extraGSettingsOverrides} diff --git a/pkgs/development/compilers/graalvm/enterprise-edition.nix b/pkgs/development/compilers/graalvm/enterprise-edition.nix index 73023a7668e..84cb38aa8d1 100644 --- a/pkgs/development/compilers/graalvm/enterprise-edition.nix +++ b/pkgs/development/compilers/graalvm/enterprise-edition.nix @@ -3,26 +3,26 @@ let graalvm8-ee = stdenv.mkDerivation rec { pname = "graalvm8-ee"; - version = "19.1.1"; + version = "19.2.0"; srcs = [ (requireFile { name = "graalvm-ee-linux-amd64-${version}.tar.gz"; - sha256 = "1ayg4chiw08jbrivmsylh6275sn0ygzc0iaic28fk7hhw5dc6r2f"; + sha256 = "1j56lyids48zyjhxk8xl4niy8hk6qzi1aj7c55yfh62id8v6cpbw"; url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html"; }) (requireFile { name = "native-image-installable-svm-svmee-linux-amd64-${version}.jar"; - sha256 = "1mvc4id193gl482fnjcgh4dz29ifqwigqq68ib0i1p3ks1nnj717"; + sha256 = "07c25l27msxccqrbz4bknz0sxsl0z2k8990cdfkbrgxvhxspfnnm"; url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html"; }) (requireFile { name = "python-installable-svm-svmee-linux-amd64-${version}.jar"; - sha256 = "0q7sggqk5myad053dsfw2i1n8v4wspahg1ac7zr3y3srqvdb0xfp"; + sha256 = "1c7kpz56w9p418li97ymixdwywscr85vhn7jkzxq71bj7ia7pxwz"; url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html"; }) (requireFile { name = "ruby-installable-svm-svmee-linux-amd64-${version}.jar"; - sha256 = "1xax1bg155d74jhv7h0qb7vbc95jy4wm4bvbpvr76ivzn7qaml6j"; + sha256 = "13jfm5qpxqxz7f5n9yyvqrv1vwigifrjwk3hssp23maski2ssys1"; url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html"; }) ]; diff --git a/pkgs/development/compilers/solc/default.nix b/pkgs/development/compilers/solc/default.nix index 941f92fd322..f3428393832 100644 --- a/pkgs/development/compilers/solc/default.nix +++ b/pkgs/development/compilers/solc/default.nix @@ -1,9 +1,10 @@ { stdenv, fetchzip, boost, cmake, ncurses, python2 -, z3Support ? true, z3 ? null +, z3Support ? true, z3 ? null, cvc4Support ? true, cvc4 ? null +, cln ? null, gmp ? null }: -assert z3Support -> z3 != null; -assert z3Support -> stdenv.lib.versionAtLeast z3.version "4.6.0"; +assert z3Support -> z3 != null && stdenv.lib.versionAtLeast z3.version "4.6.0"; +assert cvc4Support -> cvc4 != null && cln != null && gmp != null; let jsoncppURL = https://github.com/open-source-parsers/jsoncpp/archive/1.8.4.tar.gz; @@ -16,12 +17,12 @@ in stdenv.mkDerivation rec { name = "solc-${version}"; - version = "0.5.10"; + version = "0.5.11"; # upstream suggests avoid using archive generated by github src = fetchzip { url = "https://github.com/ethereum/solidity/releases/download/v${version}/solidity_${version}.tar.gz"; - sha256 = "1ns562h8blvv32lz462rf5835fs2hgn698mvi6ss5y7ar6k5y5xw"; + sha256 = "0679s5pqbfy7fgpb4f3ppgj8iafxb64g046v8vhp29mf3dsdcnyl"; }; patches = stdenv.lib.optionals buildSharedLibs [ ./patches/shared-libs-install.patch ]; @@ -37,10 +38,14 @@ stdenv.mkDerivation rec { "-DBUILD_SHARED_LIBS=ON" ] ++ stdenv.lib.optionals (!z3Support) [ "-DUSE_Z3=OFF" + ] ++ stdenv.lib.optionals (!cvc4Support) [ + "-DUSE_CVC4=OFF" ]; nativeBuildInputs = [ cmake ]; - buildInputs = [ boost ] ++ stdenv.lib.optionals z3Support [ z3 ]; + buildInputs = [ boost ] + ++ stdenv.lib.optionals z3Support [ z3 ] + ++ stdenv.lib.optionals cvc4Support [ cvc4 cln gmp ]; checkInputs = [ ncurses python2 ]; # Test fails on darwin for unclear reason diff --git a/pkgs/development/libraries/cm256cc/default.nix b/pkgs/development/libraries/cm256cc/default.nix new file mode 100644 index 00000000000..aaf40998102 --- /dev/null +++ b/pkgs/development/libraries/cm256cc/default.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchFromGitHub, cmake, boost } : + +stdenv.mkDerivation rec { + pname = "cm256cc"; + version = "1.0.5"; + + src = fetchFromGitHub { + owner = "f4exb"; + repo = "cm256cc"; + rev = "v${version}"; + sha256 = "0d16y3lhdwr644am4sxqpshpbc3qik6dgr1w2c39vy75w9ff61a0"; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ boost ]; + + meta = with stdenv.lib; { + description = "Fast GF(256) Cauchy MDS Block Erasure Codec in C++"; + homepage = "https://github.com/f4exb/cm256cc"; + platforms = platforms.linux; + maintainers = with maintainers; [ alkeryn ]; + }; +} diff --git a/pkgs/development/libraries/graphene-hardened-malloc/default.nix b/pkgs/development/libraries/graphene-hardened-malloc/default.nix index 1072c8f2cbf..3e21f3c229f 100644 --- a/pkgs/development/libraries/graphene-hardened-malloc/default.nix +++ b/pkgs/development/libraries/graphene-hardened-malloc/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "graphene-hardened-malloc-${version}"; - version = "1"; + version = "2"; src = fetchurl { url = "https://github.com/GrapheneOS/hardened_malloc/archive/${version}.tar.gz"; - sha256 = "1z3kb9fr6w9fcdc42bh8k5b4r10sn5hrwwk4m691qjdgk5hlj3aa"; + sha256 = "0zsl4vl65ic6lw5rzcjzvcxg8makg683abnwvy60zfap8hvijvjb"; }; installPhase = '' diff --git a/pkgs/development/libraries/libcacard/default.nix b/pkgs/development/libraries/libcacard/default.nix index f116360474e..62d70973375 100644 --- a/pkgs/development/libraries/libcacard/default.nix +++ b/pkgs/development/libraries/libcacard/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "libcacard-${version}"; - version = "2.6.1"; + version = "2.7.0"; src = fetchurl { url = "https://www.spice-space.org/download/libcacard/${name}.tar.xz"; - sha256 = "1w6y0kiakhg7dgyf8yqpm4jj6jiv17zhy9lp3d7z32q1pniccxk2"; + sha256 = "0vyvkk4b6xjwq1ccggql13c1x7g4y90clpkqw28257azgn2a1c8n"; }; nativeBuildInputs = [ pkgconfig ]; diff --git a/pkgs/development/libraries/libdazzle/default.nix b/pkgs/development/libraries/libdazzle/default.nix index 28d9152dcee..f7e0a987b06 100644 --- a/pkgs/development/libraries/libdazzle/default.nix +++ b/pkgs/development/libraries/libdazzle/default.nix @@ -2,7 +2,7 @@ , gtk-doc, docbook_xsl, docbook_xml_dtd_43, glibcLocales, dbus, xvfb_run, glib, gtk3, gnome3 }: let - version = "3.32.2"; + version = "3.32.3"; pname = "libdazzle"; in stdenv.mkDerivation { @@ -13,7 +13,7 @@ stdenv.mkDerivation { src = fetchurl { url = "mirror://gnome/sources/libdazzle/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; - sha256 = "0hgi7gnkna9n42nh7p81crrw0jjj22yr8acych60wxh6hzxqsgs1"; + sha256 = "1s37hv12ikfzhvh86qzgmfcjm3wvp12l2vsr0whl5xmm2harp3bc"; }; nativeBuildInputs = [ ninja meson pkgconfig vala gobject-introspection libxml2 gtk-doc docbook_xsl docbook_xml_dtd_43 glibcLocales dbus xvfb_run ]; diff --git a/pkgs/development/libraries/libgig/default.nix b/pkgs/development/libraries/libgig/default.nix index 08fce9c521e..56f160838e6 100644 --- a/pkgs/development/libraries/libgig/default.nix +++ b/pkgs/development/libraries/libgig/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "libgig-${version}"; - version = "4.1.0"; + version = "4.2.0"; src = fetchurl { url = "https://download.linuxsampler.org/packages/${name}.tar.bz2"; - sha256 = "02xx6bqxzgkvrawwnzrnxx1ypk244q4kpwfd58266f9ji8kq18h6"; + sha256 = "1zs5yy124bymfyapsnljr6rv2lnn5inwchm0xnwiw44b2d39l8hn"; }; nativeBuildInputs = [ autoconf automake libtool pkgconfig ]; diff --git a/pkgs/development/libraries/libspf2/default.nix b/pkgs/development/libraries/libspf2/default.nix new file mode 100644 index 00000000000..d4b11270428 --- /dev/null +++ b/pkgs/development/libraries/libspf2/default.nix @@ -0,0 +1,43 @@ +{ stdenv, fetchurl, autoreconfHook }: + +with stdenv.lib; + +stdenv.mkDerivation rec { + pname = "libspf2"; + version = "1.2.10"; + + src = fetchurl { + url = "https://www.libspf2.org/spf/libspf2-${version}.tar.gz"; + sha256 = "1j91p0qiipzf89qxq4m1wqhdf01hpn1h5xj4djbs51z23bl3s7nr"; + }; + + patches = [ + (fetchurl { + name = "0001-gcc-variadic-macros.patch"; + url = "https://github.com/shevek/libspf2/commit/5852828582f556e73751076ad092f72acf7fc8b6.patch"; + sha256 = "1v6ashqzpr0xidxq0vpkjd8wd66cj8df01kyzj678ljzcrax35hk"; + }) + ]; + + postPatch = '' + # disable static bins compilation + sed -i \ + -e '/bin_PROGRAMS/s/spfquery_static//' src/spfquery/Makefile.am \ + -e '/bin_PROGRAMS/s/spftest_static//' src/spftest/Makefile.am \ + -e '/bin_PROGRAMS/s/spfd_static//' src/spfd/Makefile.am \ + -e '/bin_PROGRAMS/s/spf_example_static//' src/spf_example/Makefile.am + ''; + + # autoreconf necessary because we modified automake files + nativeBuildInputs = [ autoreconfHook ]; + + doCheck = true; + + meta = { + description = "Implementation of the Sender Policy Framework for SMTP authorization"; + homepage = https://www.libspf2.org; + license = with licenses; [ lgpl21Plus bsd2 ]; + maintainers = with maintainers; [ pacien ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/development/libraries/libvirt/default.nix b/pkgs/development/libraries/libvirt/default.nix index d8446351945..125259a6bee 100644 --- a/pkgs/development/libraries/libvirt/default.nix +++ b/pkgs/development/libraries/libvirt/default.nix @@ -129,6 +129,7 @@ in stdenv.mkDerivation rec { binPath = [ iptables iproute pmutils numad numactl bridge-utils dmidecode dnsmasq ebtables ] ++ optionals enableIscsi [ openiscsi ]; in '' substituteInPlace $out/libexec/libvirt-guests.sh \ + --replace 'ON_BOOT=start' 'ON_BOOT=''${ON_BOOT:-start}' \ --replace 'ON_SHUTDOWN=suspend' 'ON_SHUTDOWN=''${ON_SHUTDOWN:-suspend}' \ --replace "$out/bin" '${gettext}/bin' \ --replace 'lock/subsys' 'lock' \ diff --git a/pkgs/development/libraries/serialdv/default.nix b/pkgs/development/libraries/serialdv/default.nix new file mode 100644 index 00000000000..11f9d301347 --- /dev/null +++ b/pkgs/development/libraries/serialdv/default.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchFromGitHub, cmake }: + +stdenv.mkDerivation rec { + pname = "serialdv"; + version ="1.1.1"; + + src = fetchFromGitHub { + owner = "f4exb"; + repo = "serialdv"; + rev = "v${version}"; + sha256 = "0swalyp8cbs7if6gxbcl7wf83ml8ch3k7ww4hws89rzpjvf070fr"; + }; + + nativeBuildInputs = [ cmake ]; + + meta = with stdenv.lib; { + description = "C++ Minimal interface to encode and decode audio with AMBE3000 based devices in packet mode over a serial link."; + homepage = "https://github.com/f4exb/serialdv"; + platforms = platforms.linux; + maintainers = with maintainers; [ alkeryn ]; + }; +} + diff --git a/pkgs/development/libraries/wiredtiger/default.nix b/pkgs/development/libraries/wiredtiger/default.nix index c45f521dcbb..bccf4f69e9d 100644 --- a/pkgs/development/libraries/wiredtiger/default.nix +++ b/pkgs/development/libraries/wiredtiger/default.nix @@ -26,13 +26,13 @@ let in stdenv.mkDerivation rec { name = "wiredtiger-${version}"; - version = "2.6.1"; + version = "3.2.0"; src = fetchFromGitHub { repo = "wiredtiger"; owner = "wiredtiger"; rev = version; - sha256 = "1nj319w3hvkq3za2dz9m0p1w683gycdb392v1jb910bhzpsq30pd"; + sha256 = "1s27l51p2p3kbdjmccvlg43i7zx84hhchs3779w9giab4nvd0y19"; }; nativeBuildInputs = [ automake autoconf libtool ]; @@ -58,17 +58,10 @@ stdenv.mkDerivation rec { ./autogen.sh ''; - prePatch = stdenv.lib.optionalString stdenv.isDarwin '' - substituteInPlace api/leveldb/leveldb_wt.h --replace \ - '#include "wiredtiger.h"' \ - ''$'#include "wiredtiger.h"\n#include "pthread.h"' - ''; - meta = { homepage = http://wiredtiger.com/; description = ""; license = licenses.gpl2; platforms = intersectLists platforms.unix platforms.x86_64; - broken = true; # Broken by f689a6d1c6796c4a4f116ffec6c4624379e04bc9. }; } diff --git a/pkgs/development/ocaml-modules/logs/default.nix b/pkgs/development/ocaml-modules/logs/default.nix index 157beaac4bc..22c4216a88f 100644 --- a/pkgs/development/ocaml-modules/logs/default.nix +++ b/pkgs/development/ocaml-modules/logs/default.nix @@ -5,7 +5,9 @@ let webpage = "https://erratique.ch/software/${pname}"; in -assert stdenv.lib.versionAtLeast ocaml.version "4.01.0"; +if !stdenv.lib.versionAtLeast ocaml.version "4.03" +then throw "logs is not available for OCaml ${ocaml.version}" +else stdenv.mkDerivation rec { name = "ocaml-${pname}-${version}"; diff --git a/pkgs/development/ocaml-modules/lwt_log/default.nix b/pkgs/development/ocaml-modules/lwt_log/default.nix index 7eea297e3ee..8286ee16619 100644 --- a/pkgs/development/ocaml-modules/lwt_log/default.nix +++ b/pkgs/development/ocaml-modules/lwt_log/default.nix @@ -2,7 +2,7 @@ buildDunePackage rec { pname = "lwt_log"; - version = "1.1.0"; + version = "1.1.1"; minimumOCamlVersion = "4.02"; @@ -10,7 +10,7 @@ buildDunePackage rec { owner = "aantron"; repo = pname; rev = version; - sha256 = "1c58gkqfvyf2j11jwj2nh4iq999wj9xpnmr80hz9d0nk9fv333pi"; + sha256 = "1n12i1rmn9cjn6p8yr6qn5dwbrwvym7ckr7bla04a1xnq8qlcyj7"; }; propagatedBuildInputs = [ lwt ]; diff --git a/pkgs/development/ocaml-modules/ocurl/default.nix b/pkgs/development/ocaml-modules/ocurl/default.nix index 4b6bea31b40..0b90cd4b6aa 100644 --- a/pkgs/development/ocaml-modules/ocurl/default.nix +++ b/pkgs/development/ocaml-modules/ocurl/default.nix @@ -1,10 +1,10 @@ { stdenv, pkgconfig, ocaml, findlib, fetchurl, curl, ncurses }: stdenv.mkDerivation rec { - name = "ocurl-0.8.1"; + name = "ocurl-0.8.2"; src = fetchurl { url = "http://ygrek.org.ua/p/release/ocurl/${name}.tar.gz"; - sha256 = "08ldzbx1k3mbjc01fmzsn86ll4paf331bcjss6iig6y6hgc9q3ry"; + sha256 = "1ax3xdlzgb1zg7d0wr9nwgmh6a45a764m0wk8p6mx07ad94hz0q9"; }; buildInputs = [ pkgconfig ocaml findlib ncurses ]; diff --git a/pkgs/development/ocaml-modules/otr/default.nix b/pkgs/development/ocaml-modules/otr/default.nix index ac853c94094..caa2d01a441 100644 --- a/pkgs/development/ocaml-modules/otr/default.nix +++ b/pkgs/development/ocaml-modules/otr/default.nix @@ -1,35 +1,22 @@ -{ stdenv, fetchFromGitHub, ocaml, ocamlbuild, findlib, topkg -, ppx_tools, ppx_sexp_conv, cstruct, ppx_cstruct, sexplib, rresult, nocrypto -, astring +{ lib, fetchFromGitHub, buildDunePackage +, cstruct, sexplib0, rresult, nocrypto, astring }: -if !stdenv.lib.versionAtLeast ocaml.version "4.03" -then throw "otr is not available for OCaml ${ocaml.version}" -else - -stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-otr-${version}"; - version = "0.3.4"; +buildDunePackage rec { + pname = "otr"; + version = "0.3.6"; src = fetchFromGitHub { owner = "hannesm"; repo = "ocaml-otr"; rev = "${version}"; - sha256 = "0ixf0jvccmcbhk5mhzqakfzimvz200wkdkq3z2d0bdzyggslbdl4"; + sha256 = "0iz6p85a0jxng9aq9blqsky173zaqfr6wlc5j48ad55lgwzlbih5"; }; - buildInputs = [ ocaml ocamlbuild findlib topkg ppx_tools ppx_sexp_conv ppx_cstruct ]; - propagatedBuildInputs = [ cstruct sexplib rresult nocrypto astring ]; - - buildPhase = "${topkg.run} build --tests true"; - - inherit (topkg) installPhase; + propagatedBuildInputs = [ cstruct sexplib0 rresult nocrypto astring ]; doCheck = true; - checkPhase = "${topkg.run} test"; - - meta = with stdenv.lib; { - inherit (ocaml.meta) platforms; + meta = with lib; { homepage = https://github.com/hannesm/ocaml-otr; description = "Off-the-record messaging protocol, purely in OCaml"; license = licenses.bsd2; diff --git a/pkgs/development/ocaml-modules/ppx_tools_versioned/default.nix b/pkgs/development/ocaml-modules/ppx_tools_versioned/default.nix index 363b774aaeb..03cadad7ff4 100644 --- a/pkgs/development/ocaml-modules/ppx_tools_versioned/default.nix +++ b/pkgs/development/ocaml-modules/ppx_tools_versioned/default.nix @@ -1,23 +1,19 @@ -{ stdenv, fetchFromGitHub, ocaml, findlib, ocaml-migrate-parsetree }: +{ lib, fetchFromGitHub, buildDunePackage, ocaml-migrate-parsetree }: -stdenv.mkDerivation rec { - name = "ocaml${ocaml.version}-ppx_tools_versioned-${version}"; - version = "5.1"; +buildDunePackage rec { + pname = "ppx_tools_versioned"; + version = "5.2.3"; src = fetchFromGitHub { - owner = "let-def"; - repo = "ppx_tools_versioned"; + owner = "ocaml-ppx"; + repo = pname; rev = version; - sha256 = "1c7kvca67qpyr4hiy492yik5x31lmkhyhy5wpl0l0fbx7fr7l624"; + sha256 = "1hcmpnw26zf70a71r3d2c2c0mn8q084gdn1r36ynng6fv9hq6j0y"; }; - buildInputs = [ ocaml findlib ]; - propagatedBuildInputs = [ ocaml-migrate-parsetree ]; - createFindlibDestdir = true; - - meta = with stdenv.lib; { + meta = with lib; { homepage = https://github.com/let-def/ppx_tools_versioned; description = "Tools for authors of syntactic tools (such as ppx rewriters)"; license = licenses.gpl2; diff --git a/pkgs/development/python-modules/gevent-websocket/default.nix b/pkgs/development/python-modules/gevent-websocket/default.nix index 78986ec7d30..6c9df6b571b 100644 --- a/pkgs/development/python-modules/gevent-websocket/default.nix +++ b/pkgs/development/python-modules/gevent-websocket/default.nix @@ -3,20 +3,19 @@ , fetchPypi , isPy3k , gevent +, gunicorn }: buildPythonPackage rec { pname = "gevent-websocket"; version = "0.10.1"; - # SyntaxError in tests. - disabled = isPy3k; src = fetchPypi { inherit pname version; sha256 = "1c2zv2rahp1gil3cj66hfsqgy0n35hz9fny3ywhr2319d0lz7bky"; }; - propagatedBuildInputs = [ gevent ]; + propagatedBuildInputs = [ gevent gunicorn ]; meta = with stdenv.lib; { homepage = https://www.gitlab.com/noppo/gevent-websocket; diff --git a/pkgs/development/python-modules/pyowm/default.nix b/pkgs/development/python-modules/pyowm/default.nix index 1392956ef03..1b8fffa1d29 100644 --- a/pkgs/development/python-modules/pyowm/default.nix +++ b/pkgs/development/python-modules/pyowm/default.nix @@ -1,9 +1,11 @@ -{ lib, buildPythonPackage, fetchPypi, requests, geojson }: +{ lib, buildPythonPackage, fetchPypi, pythonOlder, requests, geojson }: buildPythonPackage rec { pname = "pyowm"; version = "2.10.0"; + disabled = pythonOlder "3.3"; + src = fetchPypi { inherit pname version; sha256 = "8fd41a18536f4d6c432bc6d9ea69994efb1ea9b43688cf19523659b6f4d86cf7"; @@ -14,8 +16,7 @@ buildPythonPackage rec { # This may actually break the package. postPatch = '' substituteInPlace setup.py \ - --replace "requests>=2.18.2,<2.19" "requests" \ - --replace "geojson>=2.3.0,<2.4" "geojson<2.5,>=2.3.0" + --replace "requests>=2.18.2,<2.19" "requests" ''; # No tests in archive diff --git a/pkgs/development/python-modules/xapian/default.nix b/pkgs/development/python-modules/xapian/default.nix new file mode 100644 index 00000000000..c15f2682e63 --- /dev/null +++ b/pkgs/development/python-modules/xapian/default.nix @@ -0,0 +1,43 @@ +{ lib, buildPythonPackage, fetchurl, python +, sphinx +, xapian +}: + +let + pythonSuffix = lib.optionalString python.isPy3k "3"; +in +buildPythonPackage rec { + pname = "xapian"; + inherit (xapian) version; + format = "other"; + + src = fetchurl { + url = "https://oligarchy.co.uk/xapian/${version}/xapian-bindings-${version}.tar.xz"; + sha256 = "0j9awiiw9zf97r60m848absq43k37gghpyw7acxqjazfzd71fxvm"; + }; + + configureFlags = [ + "--with-python${pythonSuffix}" + "PYTHON${pythonSuffix}_LIB=${placeholder "out"}/${python.sitePackages}" + ]; + + preConfigure = '' + export XAPIAN_CONFIG=${xapian}/bin/xapian-config + ''; + + buildInputs = [ sphinx xapian ]; + + doCheck = true; + + checkPhase = '' + ${python.interpreter} python${pythonSuffix}/smoketest.py + ${python.interpreter} python${pythonSuffix}/pythontest.py + ''; + + meta = with lib; { + description = "Python Bindings for Xapian"; + homepage = https://xapian.org/; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ jonringer ]; + }; +} diff --git a/pkgs/development/tools/cloudfoundry-cli/default.nix b/pkgs/development/tools/cloudfoundry-cli/default.nix index f17399747f9..93809551f1d 100644 --- a/pkgs/development/tools/cloudfoundry-cli/default.nix +++ b/pkgs/development/tools/cloudfoundry-cli/default.nix @@ -2,7 +2,7 @@ buildGoPackage rec { name = "cloudfoundry-cli-${version}"; - version = "6.45.0"; + version = "6.46.1"; goPackagePath = "code.cloudfoundry.org/cli"; @@ -12,7 +12,7 @@ buildGoPackage rec { owner = "cloudfoundry"; repo = "cli"; rev = "v${version}"; - sha256 = "1nq78670limq8lydysadk0kb1r88w55fr8cqxqxw0zy58vy1jzr4"; + sha256 = "0dqrkimwhw016icgyf4cyipzy6vdz5jgickm33xxd9018dh3ibwq"; }; makeTarget = let hps = stdenv.hostPlatform.system; in diff --git a/pkgs/development/tools/misc/d-feet/default.nix b/pkgs/development/tools/misc/d-feet/default.nix index b96f65c2ecc..cc256bc23bd 100644 --- a/pkgs/development/tools/misc/d-feet/default.nix +++ b/pkgs/development/tools/misc/d-feet/default.nix @@ -1,22 +1,64 @@ -{ stdenv, pkgconfig, fetchurl, itstool, intltool, libxml2, glib, gtk3 -, python3Packages, wrapGAppsHook, gnome3, libwnck3, gobject-introspection }: +{ stdenv +, pkgconfig +, fetchurl +, meson +, ninja +, glib +, gtk3 +, python3 +, wrapGAppsHook +, gnome3 +, libwnck3 +, gobject-introspection +, gettext +, itstool +}: -let +python3.pkgs.buildPythonApplication rec { pname = "d-feet"; - version = "0.3.14"; -in python3Packages.buildPythonApplication rec { - name = "${pname}-${version}"; + version = "0.3.15"; + format = "other"; src = fetchurl { - url = "mirror://gnome/sources/d-feet/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz"; - sha256 = "1m8lwiwl5jhi0x7y6x5zmd3hjplgvdjrb8a8jg74rvkygslj1p7f"; + url = "mirror://gnome/sources/d-feet/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz"; + sha256 = "1cgxgpj546jgpyns6z9nkm5k48lid8s36mvzj8ydkjqws2d19zqz"; }; - nativeBuildInputs = [ pkgconfig itstool intltool wrapGAppsHook libxml2 ]; - buildInputs = [ glib gtk3 gnome3.adwaita-icon-theme libwnck3 gobject-introspection ]; + nativeBuildInputs = [ + gettext + gobject-introspection + itstool + meson + ninja + pkgconfig + python3 + wrapGAppsHook + ]; + + buildInputs = [ + glib + gnome3.adwaita-icon-theme + gtk3 + libwnck3 + ]; + + propagatedBuildInputs = with python3.pkgs; [ + pygobject3 + ]; + + mesonFlags = [ + "-Dtests=false" # needs dbus + ]; - propagatedBuildInputs = with python3Packages; [ pygobject3 pep8 ]; + # Temporary fix + # See https://github.com/NixOS/nixpkgs/issues/56943 + strictDeps = false; + + postPatch = '' + chmod +x meson_post_install.py + patchShebangs meson_post_install.py + ''; passthru = { updateScript = gnome3.updateScript { @@ -26,17 +68,15 @@ in python3Packages.buildPythonApplication rec { }; }; - meta = { + meta = with stdenv.lib; { description = "D-Feet is an easy to use D-Bus debugger"; - longDescription = '' D-Feet can be used to inspect D-Bus interfaces of running programs and invoke methods on those interfaces. ''; - homepage = https://wiki.gnome.org/Apps/DFeet; - platforms = stdenv.lib.platforms.all; - license = stdenv.lib.licenses.gpl2; - maintainers = with stdenv.lib.maintainers; [ ktosiek ]; + platforms = platforms.linux; + license = licenses.gpl2; + maintainers = with maintainers; [ ktosiek ]; }; } diff --git a/pkgs/development/tools/ofono-phonesim/default.nix b/pkgs/development/tools/ofono-phonesim/default.nix new file mode 100644 index 00000000000..137f56bee59 --- /dev/null +++ b/pkgs/development/tools/ofono-phonesim/default.nix @@ -0,0 +1,47 @@ +{ stdenv +, mkDerivation +, fetchFromGitHub +, autoreconfHook +, pkgconfig +, qtbase +, qtscript +}: + +mkDerivation rec { + pname = "ofono-phonesim"; + version = "unstable-2014-04-22"; + + src = fetchFromGitHub { + owner = "jpakkane"; + repo = "ofono-phonesim"; + rev = "baa41f04e6a86c5289d7185cad8a6f08a5c3ed0a"; + sha256 = "0ywalvvf3dfbn81ml21gji1n2hywh2nmakynakjzyyskcqjn2wiz"; + }; + + patches = [ + ./qt5-compat.patch + ]; + + nativeBuildInputs = [ + autoreconfHook + pkgconfig + ]; + + buildInputs = [ + qtbase + qtscript + ]; + + makeFlags = [ + "MOC=${qtbase.dev}/bin/moc" + "UIC=${qtbase.dev}/bin/uic" + ]; + + meta = with stdenv.lib; { + description = "Phone Simulator for modem testing"; + homepage = https://github.com/jpakkane/ofono-phonesim; + license = licenses.gpl2; + maintainers = with maintainers; [ jtojnar ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/development/tools/ofono-phonesim/qt5-compat.patch b/pkgs/development/tools/ofono-phonesim/qt5-compat.patch new file mode 100644 index 00000000000..e2e9dcebd6b --- /dev/null +++ b/pkgs/development/tools/ofono-phonesim/qt5-compat.patch @@ -0,0 +1,48 @@ +diff --git a/configure.ac b/configure.ac +index 2436292..993df87 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -21,18 +21,18 @@ AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization], + fi + ]) + +-PKG_CHECK_MODULES(QT, QtCore QtGui QtXml QtNetwork QtScript QtDBus, dummy=yes, ++PKG_CHECK_MODULES(QT, Qt5Core Qt5Gui Qt5Widgets Qt5Xml Qt5Network Qt5Script Qt5DBus, dummy=yes, + AC_MSG_ERROR(Qt is required)) + AC_SUBST(QT_CFLAGS) + AC_SUBST(QT_LIBS) + + AC_MSG_CHECKING(for moc) +-MOC="`$PKG_CONFIG --variable=moc_location QtCore`" ++MOC="`$PKG_CONFIG --variable=moc_location Qt5Core`" + AC_SUBST(MOC) + AC_MSG_RESULT($MOC) + + AC_MSG_CHECKING(for uic) +-UIC="`$PKG_CONFIG --variable=uic_location QtCore`" ++UIC="`$PKG_CONFIG --variable=uic_location Qt5Core`" + AC_SUBST(UIC) + AC_MSG_RESULT($UIC) + +diff --git a/src/control.cpp b/src/control.cpp +index e1838a6..880da68 100644 +--- a/src/control.cpp ++++ b/src/control.cpp +@@ -22,7 +22,7 @@ + #include <qslider.h> + #include <qcheckbox.h> + #include <qcombobox.h> +-#include <QtGui/qmessagebox.h> ++#include <QMessageBox> + #include <qfiledialog.h> + #include <Qt> + #include <qbuffer.h> +@@ -31,7 +31,7 @@ + #include <QFileInfo> + #include <QFile> + #include <QDir> +-#include <QtGui/QHeaderView> ++#include <QHeaderView> + + #define TWO_BYTE_MAX 65535 + #define FOUR_CHAR 4 diff --git a/pkgs/development/tools/parsing/tree-sitter/default.nix b/pkgs/development/tools/parsing/tree-sitter/default.nix new file mode 100644 index 00000000000..989107a2fbe --- /dev/null +++ b/pkgs/development/tools/parsing/tree-sitter/default.nix @@ -0,0 +1,106 @@ +{ lib, stdenv +, fetchgit, fetchFromGitHub, fetchurl +, writeShellScript, runCommand +, rustPlatform, jq, nix-prefetch-git, xe, curl +}: + +# TODO: move to carnix or https://github.com/kolloch/crate2nix +let + # to update: + # 1) change all these hashes + # 2) nix-build -A tree-sitter.updater.update-all-grammars + # 3) run the script that is output by that (it updates ./grammars) + version = "0.15.7"; + sha256 = "0q6w8wl4a4s49xlgbv531pandzrj3n12hc1cwfshzcgikx303dg0"; + sha256Js = "11ig4cc2m85siyhafh4hq9sjb5if4gfwsf9k87izkxpiyflda0wp"; + sha256Wasm = "1zm4bvjri8ivhah3sy22mx6jbvibgbn2hk67d148j3nyka3y4gc0"; + cargoSha256 = "0ls9cb2p6cgqvnrmx72n79ga7687n8mzhh7n8n1pzv11r6cah9ki"; + + + src = fetchFromGitHub { + owner = "tree-sitter"; + repo = "tree-sitter"; + rev = version; + inherit sha256; + fetchSubmodules = true; + }; + + fetchDist = {file, sha256}: fetchurl { + url = "https://github.com/tree-sitter/tree-sitter/releases/download/${version}/${file}"; + inherit sha256; + }; + + # TODO: not distributed anymore; needed for the web-ui module, + # see also the disable-web-ui patch. + # TODO: build those instead of downloading prebuilt + # js = fetchDist { + # file = "tree-sitter.js"; + # sha256 = sha256Js; + # }; + # wasm = fetchDist { + # file = "tree-sitter.wasm"; + # sha256 = sha256Wasm; + # }; + + update-all-grammars = import ./update.nix { + inherit writeShellScript nix-prefetch-git curl jq xe src; + }; + + grammars = + let fetch = + (v: fetchgit {inherit (v) url rev sha256 fetchSubmodules; }); + in runCommand "grammars" {} ('' + mkdir $out + '' + (lib.concatStrings (lib.mapAttrsToList + (name: grammar: "ln -s ${fetch grammar} $out/${name}\n") + (import ./grammars)))); + + +in rustPlatform.buildRustPackage { + pname = "tree-sitter"; + inherit version; + inherit src; + + patches = [ + # the web ui requires tree-sitter compiled to js and wasm + ./disable-web-ui.patch + ]; + + postPatch = '' + # needed for the tests + rm -rf test/fixtures/grammars + ln -s ${grammars} test/fixtures/grammars + ''; + + passthru = { + updater = { + inherit update-all-grammars; + }; + inherit grammars; + }; + + inherit cargoSha256; + + meta = { + homepage = "https://github.com/tree-sitter/tree-sitter"; + description = "A parser generator tool and an incremental parsing library"; + longDescription = '' + Tree-sitter is a parser generator tool and an incremental parsing library. + It can build a concrete syntax tree for a source file and efficiently update the syntax tree as the source file is edited. + + Tree-sitter aims to be: + + * General enough to parse any programming language + * Fast enough to parse on every keystroke in a text editor + * Robust enough to provide useful results even in the presence of syntax errors + * Dependency-free so that the runtime library (which is written in pure C) can be embedded in any application + ''; + platforms = lib.platforms.all; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ Profpatsch ]; + # Darwin needs some more work with default libraries + # Aarch has test failures with how tree-sitter compiles the generated C files + broken = stdenv.isDarwin || stdenv.isAarch64; + }; + +} diff --git a/pkgs/development/tools/parsing/tree-sitter/disable-web-ui.patch b/pkgs/development/tools/parsing/tree-sitter/disable-web-ui.patch new file mode 100644 index 00000000000..6065aa9e7fd --- /dev/null +++ b/pkgs/development/tools/parsing/tree-sitter/disable-web-ui.patch @@ -0,0 +1,37 @@ +diff --git a/cli/src/lib.rs b/cli/src/lib.rs +index 33a9904f..633032d7 100644 +--- a/cli/src/lib.rs ++++ b/cli/src/lib.rs +@@ -8,7 +8,7 @@ pub mod parse; + pub mod test; + pub mod util; + pub mod wasm; +-pub mod web_ui; ++// pub mod web_ui; + + #[cfg(test)] + mod tests; +diff --git a/cli/src/main.rs b/cli/src/main.rs +index 23e7fc1a..9d784c8a 100644 +--- a/cli/src/main.rs ++++ b/cli/src/main.rs +@@ -4,7 +4,7 @@ use std::{env, fs, u64}; + use std::path::Path; + use std::process::exit; + use tree_sitter_cli::{ +- config, error, generate, highlight, loader, logger, parse, test, wasm, web_ui, ++ config, error, generate, highlight, loader, logger, parse, test, wasm, + }; + + const BUILD_VERSION: &'static str = env!("CARGO_PKG_VERSION"); +@@ -250,7 +250,9 @@ fn run() -> error::Result<()> { + let grammar_path = current_dir.join(matches.value_of("path").unwrap_or("")); + wasm::compile_language_to_wasm(&grammar_path, matches.is_present("docker"))?; + } else if matches.subcommand_matches("web-ui").is_some() { +- web_ui::serve(¤t_dir); ++ print!("ERROR: web-ui is not available in the nixpkgs tree-sitter-cli at the moment."); ++ std::process::exit(1); ++ // web_ui::serve(¤t_dir); + } + + Ok(()) diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/default.nix b/pkgs/development/tools/parsing/tree-sitter/grammars/default.nix new file mode 100644 index 00000000000..b6451bce728 --- /dev/null +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/default.nix @@ -0,0 +1,15 @@ +{ + bash = (builtins.fromJSON (builtins.readFile ./tree-sitter-bash.json)); + c = (builtins.fromJSON (builtins.readFile ./tree-sitter-c.json)); + cpp = (builtins.fromJSON (builtins.readFile ./tree-sitter-cpp.json)); + embedded-template = (builtins.fromJSON (builtins.readFile ./tree-sitter-embedded-template.json)); + go = (builtins.fromJSON (builtins.readFile ./tree-sitter-go.json)); + html = (builtins.fromJSON (builtins.readFile ./tree-sitter-html.json)); + javascript = (builtins.fromJSON (builtins.readFile ./tree-sitter-javascript.json)); + json = (builtins.fromJSON (builtins.readFile ./tree-sitter-json.json)); + python = (builtins.fromJSON (builtins.readFile ./tree-sitter-python.json)); + # wasn’t able to check out with fetchgit + # ruby = (builtins.fromJSON (builtins.readFile ./tree-sitter-ruby.json)); + rust = (builtins.fromJSON (builtins.readFile ./tree-sitter-rust.json)); + typescript = (builtins.fromJSON (builtins.readFile ./tree-sitter-typescript.json)); +} diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-bash.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-bash.json new file mode 100644 index 00000000000..c367d24d09f --- /dev/null +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-bash.json @@ -0,0 +1,7 @@ +{ + "url": "https://github.com/tree-sitter/tree-sitter-bash", + "rev": "7b8adcf484e27b6c1a707ce28123e55dd4b7a844", + "date": "2019-07-26T14:05:41-06:00", + "sha256": "047p51ab4fqm55xqss6z74iyj1hlndql97dv9fifckczx3d5xn5g", + "fetchSubmodules": false +} diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-c.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-c.json new file mode 100644 index 00000000000..1342f7d092b --- /dev/null +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-c.json @@ -0,0 +1,7 @@ +{ + "url": "https://github.com/tree-sitter/tree-sitter-c", + "rev": "22decdc361767838dd36f1da4125b35b5b9a3c28", + "date": "2019-07-02T15:49:42-07:00", + "sha256": "03f9g49l4g2l4hlafr3xhvi8d3a491k5zz4bxpq7391l5wgjy3zi", + "fetchSubmodules": false +} diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-cpp.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-cpp.json new file mode 100644 index 00000000000..8c7d10f2654 --- /dev/null +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-cpp.json @@ -0,0 +1,7 @@ +{ + "url": "https://github.com/tree-sitter/tree-sitter-cpp", + "rev": "f5afa0ee48ad1dc067ed6fe1aa2cfd2a3ea5d443", + "date": "2019-08-06T17:23:46-07:00", + "sha256": "1w9zjqj232fcagqfqd8qi4kmvr655s4ivllrm27973sda4xq557h", + "fetchSubmodules": false +} diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-embedded-template.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-embedded-template.json new file mode 100644 index 00000000000..89940ffec8c --- /dev/null +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-embedded-template.json @@ -0,0 +1,7 @@ +{ + "url": "https://github.com/tree-sitter/tree-sitter-embedded-template", + "rev": "71955edec8cb762f63e94cf062fc96b52b9ae609", + "date": "2019-07-17T15:55:22-07:00", + "sha256": "1ar2n1z2h194lb3isbdkmvhn8w78j4a62nbh105w3jl1sxb4qpsa", + "fetchSubmodules": false +} diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-go.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-go.json new file mode 100644 index 00000000000..6a354f5c2e2 --- /dev/null +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-go.json @@ -0,0 +1,7 @@ +{ + "url": "https://github.com/tree-sitter/tree-sitter-go", + "rev": "475571bb5bdb9b229c6be3843d4c71ba747688fd", + "date": "2019-07-17T15:51:06-07:00", + "sha256": "1cg5qpifrvpnsi0iy26g156xib2qa55vlna41hw6c70kx8ibvl9z", + "fetchSubmodules": false +} diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-html.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-html.json new file mode 100644 index 00000000000..732d2dda40b --- /dev/null +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-html.json @@ -0,0 +1,7 @@ +{ + "url": "https://github.com/tree-sitter/tree-sitter-html", + "rev": "aeb2f456b8c6a60b8475d075889d476a165cde57", + "date": "2019-07-17T15:57:54-07:00", + "sha256": "0ba8zi65kja6p7f5h7pa7kxqa3mj29ysjrvl84am24vy5ik4zz3z", + "fetchSubmodules": false +} diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-javascript.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-javascript.json new file mode 100644 index 00000000000..a1e29e1504e --- /dev/null +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-javascript.json @@ -0,0 +1,7 @@ +{ + "url": "https://github.com/tree-sitter/tree-sitter-javascript", + "rev": "a730b5c210904e2e3c1f601125a059fde1b35850", + "date": "2019-08-08T14:13:17-07:00", + "sha256": "1cr0vikbzrklksjj07fh34a5cabkgbpkbxwiw2alnana3zzzdhnq", + "fetchSubmodules": false +} diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-json.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-json.json new file mode 100644 index 00000000000..2bb0dcd4d8f --- /dev/null +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-json.json @@ -0,0 +1,7 @@ +{ + "url": "https://github.com/tree-sitter/tree-sitter-json", + "rev": "337f55be9b9b1ccb0baa7763bfe014a94acea7ea", + "date": "2019-05-23T11:02:26-04:00", + "sha256": "0amh4qrjj3fli9c0z6p61z9d7496sqq54i1gh2vrghgnbbyaa6mz", + "fetchSubmodules": false +} diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-python.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-python.json new file mode 100644 index 00000000000..f46695edfa8 --- /dev/null +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-python.json @@ -0,0 +1,7 @@ +{ + "url": "https://github.com/tree-sitter/tree-sitter-python", + "rev": "4c22de0944cd42a5c86ade7ef7097033604796f8", + "date": "2019-07-30T15:35:03-04:00", + "sha256": "1p12h7hj1ak15fyk4gw9wcmgzydd4z5mikhjp54mn1q4vfw175p3", + "fetchSubmodules": false +} diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-ruby.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-ruby.json new file mode 100644 index 00000000000..e2f9928c870 --- /dev/null +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-ruby.json @@ -0,0 +1,7 @@ +{ + "url": "https://github.com/tree-sitter/tree-sitter-ruby", + "rev": "db91c934ff9d3d4ea67111a0f581532c49c3a6b3", + "date": "2019-07-26T15:51:54-06:00", + "sha256": "1ir1nqpz0c0hnsqzp90w2iw1gy3z3nqil2fm4n3zmid5di7c98dg", + "fetchSubmodules": false +} diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-rust.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-rust.json new file mode 100644 index 00000000000..328b337ed5a --- /dev/null +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-rust.json @@ -0,0 +1,7 @@ +{ + "url": "https://github.com/tree-sitter/tree-sitter-rust", + "rev": "3f956b18a6b0a576ed238cc69d5e3f413bd547b1", + "date": "2019-07-18T11:44:02-07:00", + "sha256": "0dwxg3pqirqm1lvl5x0q9djavfri9ffk5diygqzjnx53rwqhyzj8", + "fetchSubmodules": false +} diff --git a/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-typescript.json b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-typescript.json new file mode 100644 index 00000000000..61507888154 --- /dev/null +++ b/pkgs/development/tools/parsing/tree-sitter/grammars/tree-sitter-typescript.json @@ -0,0 +1,7 @@ +{ + "url": "https://github.com/tree-sitter/tree-sitter-typescript", + "rev": "ab9ab6cced868ee3e096f33fa21fd9d356c92e1a", + "date": "2019-08-08T14:27:32-07:00", + "sha256": "11r0vj1dhv0my2cr442mwvaav8ljygsns20w51mwg7328vlz90q3", + "fetchSubmodules": false +} diff --git a/pkgs/development/tools/parsing/tree-sitter/update.nix b/pkgs/development/tools/parsing/tree-sitter/update.nix new file mode 100644 index 00000000000..aa87df6bed1 --- /dev/null +++ b/pkgs/development/tools/parsing/tree-sitter/update.nix @@ -0,0 +1,68 @@ +{ writeShellScript, nix-prefetch-git +, curl, jq, xe +, src }: + +let + # print all the grammar names mentioned in the fetch-fixtures script + getGrammarNames = writeShellScript "get-grammars.sh" '' + set -euo pipefail + sed -ne 's/^fetch_grammar \(\S*\).*$/\1/p' \ + ${src}/script/fetch-fixtures + ''; + + # TODO + urlEscape = x: x; + # TODO + urlEscapeSh = writeShellScript "escape-url" ''printf '%s' "$1"''; + + # generic bash script to find the latest github release for a repo + latestGithubRelease = { owner }: writeShellScript "latest-github-release" '' + set -euo pipefail + repo="$1" + res=$(${curl}/bin/curl \ + --silent \ + "https://api.github.com/repos/${urlEscape owner}/$(${urlEscapeSh} "$repo")/releases/latest") + if [[ "$(printf "%s" "$res" | ${jq}bin/jq '.message')" =~ "rate limit" ]]; then + echo "rate limited" >&2 + fi + release=$(printf "%s" "$res" | ${jq}/bin/jq '.tag_name') + # github sometimes returns an empty list even tough there are releases + if [ "$release" = "null" ]; then + echo "uh-oh, latest for $repo is not there, using HEAD" >&2 + release="HEAD" + fi + echo "$release" + ''; + + # update one tree-sitter grammar repo and print their nix-prefetch-git output + updateGrammar = { owner }: writeShellScript "update-grammar.sh" '' + set -euo pipefail + repo="$1" + latest="$(${latestGithubRelease { inherit owner; }} "$repo")" + echo "Fetching latest release ($latest) of $repo …" >&2 + ${nix-prefetch-git}/bin/nix-prefetch-git \ + --quiet \ + --no-deepClone \ + --url "https://github.com/${urlEscape owner}/$(${urlEscapeSh} "$repo")" \ + --rev "$latest" + ''; + + update-all-grammars = writeShellScript "update-all-grammars.sh" '' + set -euo pipefail + grammarNames=$(${getGrammarNames}) + outputDir="${toString ./.}/grammars" + mkdir -p "$outputDir" + updateCommand=$(printf \ + '${updateGrammar { owner = "tree-sitter"; }} "$1" > "%s/$1.json"' \ + "$outputDir") + printf '%s' "$grammarNames" \ + | ${xe}/bin/xe printf "tree-sitter-%s\n" {} \ + | ${xe}/bin/xe -j2 -s "$updateCommand" + ( echo "{" + printf '%s' "$grammarNames" \ + | ${xe}/bin/xe -s 'printf " %s = (builtins.fromJSON (builtins.readFile ./tree-sitter-%s.json));\n" "$1" "$1"' + echo "}" ) \ + > "$outputDir/default.nix" + ''; + +in update-all-grammars diff --git a/pkgs/development/tools/rust/cargo-expand/default.nix b/pkgs/development/tools/rust/cargo-expand/default.nix index d7e37e61d50..43b3a88f6ee 100644 --- a/pkgs/development/tools/rust/cargo-expand/default.nix +++ b/pkgs/development/tools/rust/cargo-expand/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "cargo-expand"; - version = "0.4.14"; + version = "0.4.15"; src = fetchFromGitHub { owner = "dtolnay"; repo = pname; rev = version; - sha256 = "0i59m34lav3cmrazaxfraj3jk5mdi5fgaq8p7l4s8qr1fpmmw9vy"; + sha256 = "155b4azkrr0qfg52mk7934zavwsbl28i28hi1inb23d509hrr5ky"; }; - cargoSha256 = "1sjbcgscgvjq4qpcljrsj1dyxbr10jl6wpp27xh3bv8c2rv4bzz8"; + cargoSha256 = "050q4rk1x3jghinxg6gszi993a6zbg41vg535dlvvsqi36l278qc"; buildInputs = [ llvmPackages.libclang ] ++ stdenv.lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; diff --git a/pkgs/misc/scrcpy/default.nix b/pkgs/misc/scrcpy/default.nix index 20ba1295c42..bfca574cd49 100644 --- a/pkgs/misc/scrcpy/default.nix +++ b/pkgs/misc/scrcpy/default.nix @@ -2,6 +2,7 @@ , meson , ninja , pkgconfig +, fetchpatch , platform-tools , ffmpeg @@ -9,10 +10,10 @@ }: let - version = "1.8"; + version = "1.10"; prebuilt_server = fetchurl { url = "https://github.com/Genymobile/scrcpy/releases/download/v${version}/scrcpy-server-v${version}.jar"; - sha256 = "1h755k5xpchlm7wq2yk5mlwjnh7y4yhviffixacby0srj3pmb443"; + sha256 = "144k25x6ha89l9p5a1dm6r3fqvgqszzwrhvkvk0r44vg0i71msyb"; }; in stdenv.mkDerivation rec { @@ -23,7 +24,7 @@ stdenv.mkDerivation rec { owner = "Genymobile"; repo = pname; rev = "v${version}"; - sha256 = "1cx7y3w699s3i8s53l1mb7lkrnbix457hf17liwh00jzb0i7aga7"; + sha256 = "0hhncqcs49n9g8sgvwbyvkaq4b1dhrpn7qgnaj6grjcb0i27vzaq"; }; # postPatch: @@ -39,12 +40,18 @@ stdenv.mkDerivation rec { buildInputs = [ ffmpeg SDL2 ]; + # FIXME: remove on update to > 1.10 + patches = [(fetchpatch { + url = "https://github.com/Genymobile/scrcpy/commit/c05056343b56be65ae887f8b7ead61a8072622b9.diff"; + sha256 = "1xh24gr2g2i9rk0zyv19jx54hswrq12ssp227vxbhsbamin9ir5b"; + })]; + # Manually install the server jar to prevent Meson from "fixing" it preConfigure = '' echo -n > server/meson.build ''; - mesonFlags = ["-Doverride_server_path=${prebuilt_server}"]; + mesonFlags = [ "-Doverride_server_path=${prebuilt_server}" ]; postInstall = '' mkdir -p "$out/share/scrcpy" ln -s "${prebuilt_server}" "$out/share/scrcpy/scrcpy-server.jar" diff --git a/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix b/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix index 76a0ae2fcf1..4516af19a4e 100644 --- a/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix +++ b/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix @@ -1,13 +1,13 @@ { stdenv, buildPackages, fetchgit, fetchpatch, perl, buildLinux, ... } @ args: buildLinux (args // rec { - version = "5.1.2019.07.13"; + version = "5.1.2019.08.21"; modDirVersion = "5.1.0"; src = fetchgit { url = "https://evilpiepirate.org/git/bcachefs.git"; - rev = "22776fe9902b0b06d6aa18cd4c7f0c5ad35a95fa"; - sha256 = "0ly4vxawj8skh55c541zll3b8g6igiaq7aj33fklfjh0icmgzs60"; + rev = "ece184f718c2b678738bc2c42906e90eeb8ba7dc"; + sha256 = "08cbisgcww8fklpxwqkm2c8ddz0mm7v11ycp7ch0kalwdv2f81lr"; }; extraConfig = "BCACHEFS_FS m"; diff --git a/pkgs/servers/limesurvey/default.nix b/pkgs/servers/limesurvey/default.nix index ad1038bbc47..21863018087 100644 --- a/pkgs/servers/limesurvey/default.nix +++ b/pkgs/servers/limesurvey/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "limesurvey"; - version = "3.17.1+190408"; + version = "3.17.12+190823"; src = fetchFromGitHub { owner = "LimeSurvey"; repo = "LimeSurvey"; rev = version; - sha256 = "0d6dgw9af492vn5yg2hq82ipq4p80c19lhky0dpwrm5kv67kxbhv"; + sha256 = "1i7jpxndrbya5ggl4babscwzmxx4c0jwri5kpl7h2ihqrn90m4b5"; }; phpConfig = writeText "config.php" '' @@ -18,9 +18,13 @@ stdenv.mkDerivation rec { ''; installPhase = '' + runHook preInstall + mkdir -p $out/share/limesurvey cp -r . $out/share/limesurvey cp ${phpConfig} $out/share/limesurvey/application/config/config.php + + runHook postInstall ''; meta = with stdenv.lib; { diff --git a/pkgs/servers/mail/exim/default.nix b/pkgs/servers/mail/exim/default.nix index a537a4c6d00..25a94cd27bf 100644 --- a/pkgs/servers/mail/exim/default.nix +++ b/pkgs/servers/mail/exim/default.nix @@ -3,6 +3,7 @@ , enableMySQL ? false, mysql, zlib , enableAuthDovecot ? false, dovecot , enablePAM ? false, pam +, enableSPF ? true, libspf2 }: stdenv.mkDerivation rec { @@ -18,7 +19,8 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optional enableLDAP openldap ++ stdenv.lib.optionals enableMySQL [ mysql.connector-c zlib ] ++ stdenv.lib.optional enableAuthDovecot dovecot - ++ stdenv.lib.optional enablePAM pam; + ++ stdenv.lib.optional enablePAM pam + ++ stdenv.lib.optional enableSPF libspf2; preBuild = '' sed ' @@ -64,6 +66,10 @@ stdenv.mkDerivation rec { s:^\(EXTRALIBS_EXIM\)=\(.*\):\1=\2 -lpam: s:^# \(EXTRALIBS_EXIM\)=.*:\1=-lpam: ''} + ${stdenv.lib.optionalString enableSPF '' + s:^# \(SUPPORT_SPF\)=.*:\1=yes: + s:^# \(LDFLAGS += -lspf2\):\1: + ''} #/^\s*#.*/d #/^\s*$/d ' < src/EDITME > Local/Makefile diff --git a/pkgs/servers/plex/raw.nix b/pkgs/servers/plex/raw.nix index 94e8519fcc9..16007c3e8fc 100644 --- a/pkgs/servers/plex/raw.nix +++ b/pkgs/servers/plex/raw.nix @@ -8,14 +8,14 @@ # server, and the FHS userenv and corresponding NixOS module should # automatically pick up the changes. stdenv.mkDerivation rec { - version = "1.16.4.1469-6d5612c2f"; + version = "1.16.5.1488-deeb86e7f"; pname = "plexmediaserver"; name = "${pname}-${version}"; # Fetch the source src = fetchurl { url = "https://downloads.plex.tv/plex-media-server-new/${version}/redhat/plexmediaserver-${version}.x86_64.rpm"; - sha256 = "16ifgqsxgpqyd1m0xmwrrv4cic1yccklv1jlv7fhq8wc6vz9l6lx"; + sha256 = "0kgcbq3jfvmigza8a9ak215q2cpi18vh96gx01hppk51m9ibkrwi"; }; outputs = [ "out" "basedb" ]; diff --git a/pkgs/shells/bash/bash-5.0-patches.nix b/pkgs/shells/bash/bash-5.0-patches.nix index 560aef16644..90bbc5e37dd 100644 --- a/pkgs/shells/bash/bash-5.0-patches.nix +++ b/pkgs/shells/bash/bash-5.0-patches.nix @@ -8,4 +8,6 @@ patch: [ (patch "005" "0xl2kyzm84nlyklrqzkn73ixabhzfhn9x91lzcmis89cppclvxav") (patch "006" "0844749ixk1z60437nkznzms1f0nzh9an62kj7sny6r0zyk2k1fn") (patch "007" "16xg37gp1b8zlj5969w8mcrparwqlcbj9695vn3qhgb7wdz1xd0p") +(patch "008" "1qyp19krjh8zxvb0jgwmyjz40djslwcf4xi7kc1ab0iaca44bipf") +(patch "009" "00yrjjqd95s81b21qq3ba1y7h879q8jaajlkjggc6grhcwbs4g7d") ] diff --git a/pkgs/tools/X11/xdg-user-dirs/default.nix b/pkgs/tools/X11/xdg-user-dirs/default.nix index c72fab015d9..066b566be1f 100644 --- a/pkgs/tools/X11/xdg-user-dirs/default.nix +++ b/pkgs/tools/X11/xdg-user-dirs/default.nix @@ -11,8 +11,9 @@ stdenv.mkDerivation rec { buildInputs = [ libxslt docbook_xsl makeWrapper ]; preFixup = '' + # fallback values need to be last wrapProgram "$out/bin/xdg-user-dirs-update" \ - --prefix XDG_CONFIG_DIRS : "$out/etc/xdg" + --suffix XDG_CONFIG_DIRS : "$out/etc/xdg" ''; meta = with stdenv.lib; { diff --git a/pkgs/tools/X11/xpra/default.nix b/pkgs/tools/X11/xpra/default.nix index 863c02fb23d..ffede7d58b2 100644 --- a/pkgs/tools/X11/xpra/default.nix +++ b/pkgs/tools/X11/xpra/default.nix @@ -14,11 +14,11 @@ let xf86videodummy = callPackage ./xf86videodummy { }; in buildPythonApplication rec { pname = "xpra"; - version = "2.5"; + version = "2.5.3"; src = fetchurl { url = "https://xpra.org/src/${pname}-${version}.tar.xz"; - sha256 = "0q6c7ijgpp2wk6jlh0pzqki1w60i36wyl2zfwkg0gpdh40ypab3x"; + sha256 = "1ys35lj28903alccks9p055psy1fsk1nxi8ncchvw8bfxkkkvbys"; }; patches = [ @@ -56,7 +56,7 @@ in buildPythonApplication rec { propagatedBuildInputs = with python3.pkgs; [ pillow rencode pycrypto cryptography pycups lz4 dbus-python netifaces numpy pygobject3 pycairo gst-python pam - pyopengl paramiko opencv python-uinput pyxdg + pyopengl paramiko opencv4 python-uinput pyxdg ipaddress idna ]; diff --git a/pkgs/tools/X11/xpra/fix-paths.patch b/pkgs/tools/X11/xpra/fix-paths.patch index ac8107235be..eb982682586 100644 --- a/pkgs/tools/X11/xpra/fix-paths.patch +++ b/pkgs/tools/X11/xpra/fix-paths.patch @@ -1,15 +1,8 @@ +gdiff --git a/setup.py b/setup.py +index 8d3df15..6156206 100755 --- a/setup.py +++ b/setup.py -@@ -1885,7 +1885,7 @@ - if OSX: - pycairo = "py3cairo" - else: -- pycairo = "pycairo" -+ pycairo = "py3cairo" - cython_add(Extension("xpra.client.gtk3.cairo_workaround", - ["xpra/client/gtk3/cairo_workaround.pyx"], - **pkgconfig(pycairo) -@@ -2363,10 +2363,7 @@ +@@ -2359,10 +2359,7 @@ if v4l2_ENABLED: v4l2_pkgconfig = pkgconfig() #fuly warning: cython makes this difficult, #we have to figure out if "device_caps" exists in the headers: @@ -21,14 +14,16 @@ kwargs = {"ENABLE_DEVICE_CAPS" : ENABLE_DEVICE_CAPS} make_constants("xpra", "codecs", "v4l2", "constants", **kwargs) cython_add(Extension("xpra.codecs.v4l2.pusher", +diff --git a/xpra/x11/bindings/keyboard_bindings.pyx b/xpra/x11/bindings/keyboard_bindings.pyx +index bd7023d..064c6b5 100644 --- a/xpra/x11/bindings/keyboard_bindings.pyx +++ b/xpra/x11/bindings/keyboard_bindings.pyx -@@ -19,7 +19,7 @@ - +@@ -21,7 +21,7 @@ from libc.stdlib cimport free, malloc + DEF PATH_MAX = 1024 DEF DFLT_XKB_RULES_FILE = b"base" -DEF DFLT_XKB_CONFIG_ROOT = b"/usr/share/X11/xkb" +DEF DFLT_XKB_CONFIG_ROOT = b"@xkeyboardconfig@/share/X11/xkb" - + ################################### # Headers, python magic diff --git a/pkgs/tools/filesystems/bcachefs-tools/default.nix b/pkgs/tools/filesystems/bcachefs-tools/default.nix index e3ee04f6e2e..95923f202cf 100644 --- a/pkgs/tools/filesystems/bcachefs-tools/default.nix +++ b/pkgs/tools/filesystems/bcachefs-tools/default.nix @@ -3,12 +3,12 @@ stdenv.mkDerivation rec { pname = "bcachefs-tools"; - version = "2019-07-13"; + version = "2019-08-21"; src = fetchgit { url = "https://evilpiepirate.org/git/bcachefs-tools.git"; - rev = "692eadd6ca9b45f12971126b326b6a89d7117e67"; - sha256 = "0d2kqy5p89qjrk38iqfk9zsh14c2x40d21kic9kcybdhalfq5q31"; + rev = "72a408f84846fe702b8db4f158b678ee20bbf835"; + sha256 = "0y5700afv1x1i3wnp3g71i3zhyhkwmx79j0irxr63fmg47n0ys1i"; }; enableParallelBuilding = true; diff --git a/pkgs/tools/misc/calamares/default.nix b/pkgs/tools/misc/calamares/default.nix index 8a269e3eb4b..61d0bf60a4d 100644 --- a/pkgs/tools/misc/calamares/default.nix +++ b/pkgs/tools/misc/calamares/default.nix @@ -7,12 +7,12 @@ stdenv.mkDerivation rec { name = "${pname}-${version}"; pname = "calamares"; - version = "3.2.8"; + version = "3.2.11"; # release including submodule src = fetchurl { url = "https://github.com/${pname}/${pname}/releases/download/v${version}/${name}.tar.gz"; - sha256 = "1ymyl12fzxc5jjfbw4pfmgzp036w0dai76f7anilw2bnwfzq5g62"; + sha256 = "1djrc8p6kll8szycyj86v02jphiw2xwfhn563siykphfqr0jknlw"; }; buildInputs = [ diff --git a/pkgs/tools/networking/ofono/0001-Search-connectors-in-OFONO_PLUGIN_PATH.patch b/pkgs/tools/networking/ofono/0001-Search-connectors-in-OFONO_PLUGIN_PATH.patch new file mode 100644 index 00000000000..eb97209a693 --- /dev/null +++ b/pkgs/tools/networking/ofono/0001-Search-connectors-in-OFONO_PLUGIN_PATH.patch @@ -0,0 +1,120 @@ +From 0e0994c9716700c9484b3dccb25f98a9a59d1744 Mon Sep 17 00:00:00 2001 +From: Jan Tojnar <jtojnar@gmail.com> +Date: Fri, 23 Aug 2019 18:42:51 +0200 +Subject: [PATCH] Search connectors in OFONO_PLUGIN_PATH + +Previously, the connectors would only be looked for in a single +directory, specified during compilation. This patch allows to +traverse a list of directories provided by an environment variable. +--- + src/plugin.c | 77 ++++++++++++++++++++++++++++++++++------------------ + 1 file changed, 50 insertions(+), 27 deletions(-) + +diff --git a/src/plugin.c b/src/plugin.c +index 924a45ec..f05055c3 100644 +--- a/src/plugin.c ++++ b/src/plugin.c +@@ -99,35 +99,12 @@ static gboolean check_plugin(struct ofono_plugin_desc *desc, + return TRUE; + } + +-#include "builtin.h" +- +-int __ofono_plugin_init(const char *pattern, const char *exclude) +-{ +- gchar **patterns = NULL; +- gchar **excludes = NULL; +- GSList *list; +- GDir *dir; ++static handle_dir(const gchar *plugin_path, const gchar **patterns, const gchar **excludes) { + const gchar *file; + gchar *filename; +- unsigned int i; +- +- DBG(""); +- +- if (pattern) +- patterns = g_strsplit_set(pattern, ":, ", -1); +- +- if (exclude) +- excludes = g_strsplit_set(exclude, ":, ", -1); +- +- for (i = 0; __ofono_builtin[i]; i++) { +- if (check_plugin(__ofono_builtin[i], +- patterns, excludes) == FALSE) +- continue; +- +- add_plugin(NULL, __ofono_builtin[i]); +- } ++ GDir *dir; + +- dir = g_dir_open(PLUGINDIR, 0, NULL); ++ dir = g_dir_open(plugin_path, 0, NULL); + if (dir != NULL) { + while ((file = g_dir_read_name(dir)) != NULL) { + void *handle; +@@ -137,7 +114,7 @@ int __ofono_plugin_init(const char *pattern, const char *exclude) + g_str_has_suffix(file, ".so") == FALSE) + continue; + +- filename = g_build_filename(PLUGINDIR, file, NULL); ++ filename = g_build_filename(plugin_path, file, NULL); + + handle = dlopen(filename, RTLD_NOW); + if (handle == NULL) { +@@ -168,6 +145,52 @@ int __ofono_plugin_init(const char *pattern, const char *exclude) + + g_dir_close(dir); + } ++} ++ ++#include "builtin.h" ++ ++int __ofono_plugin_init(const char *pattern, const char *exclude) ++{ ++ gchar **patterns = NULL; ++ gchar **excludes = NULL; ++ GSList *list; ++ unsigned int i; ++ ++ DBG(""); ++ ++ if (pattern) ++ patterns = g_strsplit_set(pattern, ":, ", -1); ++ ++ if (exclude) ++ excludes = g_strsplit_set(exclude, ":, ", -1); ++ ++ for (i = 0; __ofono_builtin[i]; i++) { ++ if (check_plugin(__ofono_builtin[i], ++ patterns, excludes) == FALSE) ++ continue; ++ ++ add_plugin(NULL, __ofono_builtin[i]); ++ } ++ ++ ++ const gchar *plugin_path; ++ ++ plugin_path = g_getenv ("OFONO_PLUGIN_PATH"); ++ ++ if (!plugin_path) { ++ gchar **plugin_path_list; ++ gsize i; ++ ++ plugin_path_list = g_strsplit (plugin_path, G_SEARCHPATH_SEPARATOR_S, 0); ++ ++ for (i = 0; plugin_path_list[i]; i++) { ++ handle_dir(plugin_path_list, patterns, excludes); ++ } ++ ++ g_strfreev(plugin_path_list); ++ } ++ ++ handle_dir(PLUGINDIR, patterns, excludes); + + for (list = plugins; list; list = list->next) { + struct ofono_plugin *plugin = list->data; +-- +2.22.0 + diff --git a/pkgs/tools/networking/ofono/default.nix b/pkgs/tools/networking/ofono/default.nix index 1e5bd6b66f5..21d1f9ee067 100644 --- a/pkgs/tools/networking/ofono/default.nix +++ b/pkgs/tools/networking/ofono/default.nix @@ -22,6 +22,10 @@ stdenv.mkDerivation rec { sha256 = "1qzysmzpgbh6zc3x9xh931wxcazka9wwx727c2k66z9gal2n6n66"; }; + patches = [ + ./0001-Search-connectors-in-OFONO_PLUGIN_PATH.patch + ]; + nativeBuildInputs = [ autoreconfHook pkgconfig @@ -37,7 +41,7 @@ stdenv.mkDerivation rec { ]; configureFlags = [ - "--with-dbusconfdir=${placeholder ''out''}/etc/dbus-1/system.d" + "--with-dbusconfdir=${placeholder ''out''}/share" "--with-systemdunitdir=${placeholder ''out''}/lib/systemd/system" "--enable-external-ell" ]; diff --git a/pkgs/tools/nix/nixpkgs-fmt/default.nix b/pkgs/tools/nix/nixpkgs-fmt/default.nix index 34715c8673a..51e4e22bc5b 100644 --- a/pkgs/tools/nix/nixpkgs-fmt/default.nix +++ b/pkgs/tools/nix/nixpkgs-fmt/default.nix @@ -1,13 +1,13 @@ { lib, rustPlatform, fetchFromGitHub }: rustPlatform.buildRustPackage rec { pname = "nixpkgs-fmt"; - version = "0.2.0"; + version = "0.3.1"; src = fetchFromGitHub { owner = "nix-community"; repo = pname; rev = "v${version}"; - sha256 = "0sa0263pkpi423f1rdyg90axw9sdmgj8ma1mza0v46qzkwynwgh3"; + sha256 = "0nz4njmrwacizz9z89ligxr2gyggk65vq9cmd6s4hn133gajf2n1"; }; cargoSha256 = "0p3qa1asdvw2npav4281lzndjczrzac6fr8z4y61m7rbn363s8sa"; diff --git a/pkgs/tools/security/nmap/default.nix b/pkgs/tools/security/nmap/default.nix index bf9c7a4fc46..1b66dab35c8 100644 --- a/pkgs/tools/security/nmap/default.nix +++ b/pkgs/tools/security/nmap/default.nix @@ -31,11 +31,11 @@ in stdenv.mkDerivation rec { ++ optionals stdenv.cc.isClang [( # Fixes a compile error due an ambiguous reference to bind(2) in # nping/EchoServer.cc, which is otherwise resolved to std::bind. - # Also fixes a missing include. # https://github.com/nmap/nmap/pull/1363 fetchpatch { url = "https://github.com/nmap/nmap/commit/5bbe66f1bd8cbd3718f5805139e2e8139e6849bb.diff"; - sha256 = "088r8ylpc9hachsxs4r17cqfa1ncyspbjvkc573lill7rk1r9m0s"; + includes = [ "nping/EchoServer.cc" ]; + sha256 = "0xcph9mycy57yryjg253frxyz87c4135rrbndlqw1400c8jxq70c"; } )]; diff --git a/pkgs/tools/system/acpica-tools/default.nix b/pkgs/tools/system/acpica-tools/default.nix index 95fa1047fe5..94da72c54b3 100644 --- a/pkgs/tools/system/acpica-tools/default.nix +++ b/pkgs/tools/system/acpica-tools/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "acpica-tools"; - version = "20190703"; + version = "20190816"; src = fetchurl { url = "https://acpica.org/sites/acpica/files/acpica-unix-${version}.tar.gz"; - sha256 = "031m124a109vv6fx667h4ca2iav0xszrlvif9zcfxcaxbjsn6991"; + sha256 = "0p7ws106hf8bir9yb1a5m6v3wmvqagxmk3l9rpp4i89vib44vv3s"; }; NIX_CFLAGS_COMPILE = "-O3"; @@ -24,7 +24,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ bison flex ]; - installFlags = [ "PREFIX=$(out)" ]; + installFlags = [ "PREFIX=${placeholder "out"}" ]; meta = with stdenv.lib; { description = "ACPICA Tools"; diff --git a/pkgs/tools/typesetting/scdoc/default.nix b/pkgs/tools/typesetting/scdoc/default.nix index f2a48e5db04..3145d580dc6 100644 --- a/pkgs/tools/typesetting/scdoc/default.nix +++ b/pkgs/tools/typesetting/scdoc/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { name = "scdoc-${version}"; - version = "1.9.6"; + version = "1.9.7"; src = fetchurl { url = "https://git.sr.ht/~sircmpwn/scdoc/archive/${version}.tar.gz"; - sha256 = "0a2rxn0pihknvyvfvzib42v9c7zfdg8pi95q40fywwjb9clz59c9"; + sha256 = "0y9p03dzdaszx02jbkdf3vcs52fqml591cmic5jdch5yznrg03ky"; }; postPatch = '' diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 84e88b918da..a61a26f7b4a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -157,6 +157,8 @@ in cmark = callPackage ../development/libraries/cmark { }; + cm256cc = callPackage ../development/libraries/cm256cc { }; + conftest = callPackage ../development/tools/conftest {}; corgi = callPackage ../development/tools/corgi { }; @@ -1784,7 +1786,7 @@ in massren = callPackage ../tools/misc/massren { }; - megasync = callPackage ../applications/misc/megasync { }; + megasync = libsForQt5.callPackage ../applications/misc/megasync { }; meritous = callPackage ../games/meritous { }; @@ -4516,6 +4518,8 @@ in libsidplayfp = callPackage ../development/libraries/libsidplayfp { }; + libspf2 = callPackage ../development/libraries/libspf2 { }; + libsrs2 = callPackage ../development/libraries/libsrs2 { }; libtermkey = callPackage ../development/libraries/libtermkey { }; @@ -5148,6 +5152,8 @@ in offlineimap = callPackage ../tools/networking/offlineimap { }; + ofono-phonesim = libsForQt5.callPackage ../development/tools/ofono-phonesim/default.nix { }; + oh-my-zsh = callPackage ../shells/zsh/oh-my-zsh { }; ola = callPackage ../applications/misc/ola { }; @@ -6254,6 +6260,8 @@ in sunxi-tools = callPackage ../development/tools/sunxi-tools { }; + sumorobot-manager = python3Packages.callPackage ../applications/science/robotics/sumorobot-manager { }; + super = callPackage ../tools/security/super { }; supertux-editor = callPackage ../applications/editors/supertux-editor { }; @@ -8364,6 +8372,8 @@ in gputils = null; }; + serialdv = callPackage ../development/libraries/serialdv { }; + serpent = callPackage ../development/compilers/serpent { }; shmig = callPackage ../development/tools/database/shmig { }; @@ -10065,6 +10075,8 @@ in travis = callPackage ../development/tools/misc/travis { }; + tree-sitter = callPackage ../development/tools/parsing/tree-sitter { }; + trellis = callPackage ../development/tools/trellis { }; ttyd = callPackage ../servers/ttyd { }; @@ -24807,6 +24819,8 @@ in tsung = callPackage ../applications/networking/tsung {}; + bcompare = libsForQt5.callPackage ../applications/version-management/bcompare {}; + qmk_firmware = callPackage ../development/misc/qmk_firmware { avrgcc = pkgsCross.avr.buildPackages.gcc; avrbinutils = pkgsCross.avr.buildPackages.binutils; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4d7ac4075e5..c61bab85fa7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5051,6 +5051,8 @@ in { xarray = callPackage ../development/python-modules/xarray { }; + xapian = callPackage ../development/python-modules/xapian { xapian = pkgs.xapian; }; + xlwt = callPackage ../development/python-modules/xlwt { }; xxhash = callPackage ../development/python-modules/xxhash { }; |