From 370d3af0c40c30f1dad763c35a2db637f70e6176 Mon Sep 17 00:00:00 2001 From: Ambroz Bizjak Date: Fri, 24 May 2019 01:21:57 +0200 Subject: [PATCH 001/112] nixos: Don't set LD_LIBRARY_PATH for graphics drivers that don't need it. A new internal option `hardware.opengl.setLdLibraryPath` is added which controls if `LD_LIBRARY_PATH` should be set to `/run/opengl-driver(-32)/lib`. It is false by default and is meant to be set to true by any driver which requires it. If this option is false, then `opengl.nix` and `xserver.nix` will not set `LD_LIBRARY_PATH`. Currently Mesa and NVidia drivers don't set `setLdLibraryPath` because they work with libglvnd and do not override libraries, while `amdgpu-pro`, `ati` and `parallels-guest` set it to true (the former two really need it, the last one doesn't build so is presumed to). Additionally, the `libPath` attribute within entries of `services.xserver.drivers` is removed. This made `xserver.nix` add the driver path directly to the `LD_LIBRARY_PATH` for the display manager (including X server). Not only is it redundant when the driver is added to `hardware.opengl.package` (assuming that `hardware.opengl.enable` is true), in fact all current drivers except `ati` set it incorrectly to the package path instead of package/lib. This removal of `LD_LIBRARY_PATH` could break certain packages using CUDA, but only those that themselves load `libcuda` or other NVidia driver libraries using `dlopen` (not if they just use `cudatoolkit`). A few have already been fixed but it is practically impossible to test all because most packages using CUDA are libraries/frameworks without a simple way to test. Fixes #11434 if only Mesa or NVidia graphics drivers are used. --- nixos/modules/hardware/opengl.nix | 17 +++++++++++++++-- nixos/modules/hardware/video/amdgpu-pro.nix | 3 ++- nixos/modules/hardware/video/ati.nix | 3 ++- nixos/modules/hardware/video/nvidia.nix | 1 - nixos/modules/services/x11/xserver.nix | 7 +++---- .../modules/virtualisation/parallels-guest.nix | 3 ++- 6 files changed, 24 insertions(+), 10 deletions(-) diff --git a/nixos/modules/hardware/opengl.nix b/nixos/modules/hardware/opengl.nix index 6b7b8069fd44..f068201cfce0 100644 --- a/nixos/modules/hardware/opengl.nix +++ b/nixos/modules/hardware/opengl.nix @@ -118,6 +118,19 @@ in set. This can be used to add OpenCL drivers, VA-API/VDPAU drivers etc. ''; }; + + setLdLibraryPath = mkOption { + type = types.bool; + internal = true; + default = false; + description = '' + Whether the LD_LIBRARY_PATH environment variable + should be set to the locations of driver libraries. Drivers which + rely on overriding libraries should set this to true. Drivers which + support libglvnd and other dispatch libraries + instead of overriding libraries should not set this. + ''; + }; }; }; @@ -145,8 +158,8 @@ in ) ]; - environment.sessionVariables.LD_LIBRARY_PATH = - [ "/run/opengl-driver/lib" ] ++ optional cfg.driSupport32Bit "/run/opengl-driver-32/lib"; + environment.sessionVariables.LD_LIBRARY_PATH = mkIf cfg.setLdLibraryPath + ([ "/run/opengl-driver/lib" ] ++ optional cfg.driSupport32Bit "/run/opengl-driver-32/lib"); environment.variables.XDG_DATA_DIRS = [ "/run/opengl-driver/share" ] ++ optional cfg.driSupport32Bit "/run/opengl-driver-32/share"; diff --git a/nixos/modules/hardware/video/amdgpu-pro.nix b/nixos/modules/hardware/video/amdgpu-pro.nix index ab9e0c92020e..8e91e9d2baa9 100644 --- a/nixos/modules/hardware/video/amdgpu-pro.nix +++ b/nixos/modules/hardware/video/amdgpu-pro.nix @@ -30,10 +30,11 @@ in nixpkgs.config.xorg.abiCompat = "1.19"; services.xserver.drivers = singleton - { name = "amdgpu"; modules = [ package ]; libPath = [ package ]; }; + { name = "amdgpu"; modules = [ package ]; }; hardware.opengl.package = package; hardware.opengl.package32 = package32; + hardware.opengl.setLdLibraryPath = true; boot.extraModulePackages = [ package ]; diff --git a/nixos/modules/hardware/video/ati.nix b/nixos/modules/hardware/video/ati.nix index 6102919f0155..f867bba80630 100644 --- a/nixos/modules/hardware/video/ati.nix +++ b/nixos/modules/hardware/video/ati.nix @@ -21,10 +21,11 @@ in nixpkgs.config.xorg.abiCompat = "1.17"; services.xserver.drivers = singleton - { name = "fglrx"; modules = [ ati_x11 ]; libPath = [ "${ati_x11}/lib" ]; }; + { name = "fglrx"; modules = [ ati_x11 ]; }; hardware.opengl.package = ati_x11; hardware.opengl.package32 = pkgs.pkgsi686Linux.linuxPackages.ati_drivers_x11.override { libsOnly = true; kernel = null; }; + hardware.opengl.setLdLibraryPath = true; environment.systemPackages = [ ati_x11 ]; diff --git a/nixos/modules/hardware/video/nvidia.nix b/nixos/modules/hardware/video/nvidia.nix index 9f2360f41c6e..ecfb97f5769b 100644 --- a/nixos/modules/hardware/video/nvidia.nix +++ b/nixos/modules/hardware/video/nvidia.nix @@ -138,7 +138,6 @@ in services.xserver.drivers = singleton { name = "nvidia"; modules = [ nvidia_x11.bin ]; - libPath = [ nvidia_x11 ]; deviceSection = optionalString optimusCfg.enable '' BusID "${optimusCfg.nvidiaBusId}" diff --git a/nixos/modules/services/x11/xserver.nix b/nixos/modules/services/x11/xserver.nix index e767b0eda312..9c46eed81925 100644 --- a/nixos/modules/services/x11/xserver.nix +++ b/nixos/modules/services/x11/xserver.nix @@ -663,10 +663,9 @@ in restartIfChanged = false; environment = - { - LD_LIBRARY_PATH = concatStringsSep ":" ([ "/run/opengl-driver/lib" ] - ++ concatLists (catAttrs "libPath" cfg.drivers)); - } // cfg.displayManager.job.environment; + optionalAttrs config.hardware.opengl.setLdLibraryPath + { LD_LIBRARY_PATH = pkgs.addOpenGLRunpath.driverLink; } + // cfg.displayManager.job.environment; preStart = '' diff --git a/nixos/modules/virtualisation/parallels-guest.nix b/nixos/modules/virtualisation/parallels-guest.nix index 4e0f2cae299e..828419fb4b9d 100644 --- a/nixos/modules/virtualisation/parallels-guest.nix +++ b/nixos/modules/virtualisation/parallels-guest.nix @@ -47,7 +47,7 @@ in config = mkIf config.hardware.parallels.enable { services.xserver = { drivers = singleton - { name = "prlvideo"; modules = [ prl-tools ]; libPath = [ prl-tools ]; }; + { name = "prlvideo"; modules = [ prl-tools ]; }; screenSection = '' Option "NoMTRR" @@ -65,6 +65,7 @@ in hardware.opengl.package = prl-tools; hardware.opengl.package32 = pkgs.pkgsi686Linux.linuxPackages.prl-tools.override { libsOnly = true; kernel = null; }; + hardware.opengl.setLdLibraryPath = true; services.udev.packages = [ prl-tools ]; From e1208593d3abdcfe4651604164f31b9a1390bf97 Mon Sep 17 00:00:00 2001 From: Tadeo Kondrak Date: Tue, 18 Jun 2019 21:10:17 -0600 Subject: [PATCH 002/112] oppai-ng: init at 3.2.2 --- pkgs/tools/misc/oppai-ng/default.nix | 32 ++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/tools/misc/oppai-ng/default.nix diff --git a/pkgs/tools/misc/oppai-ng/default.nix b/pkgs/tools/misc/oppai-ng/default.nix new file mode 100644 index 000000000000..8352019bb684 --- /dev/null +++ b/pkgs/tools/misc/oppai-ng/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "oppai-ng"; + version = "3.2.2"; + + src = fetchFromGitHub { + owner = "Francesco149"; + repo = pname; + rev = version; + sha256 = "1cq8kvw33dnafs06j54qgc475jma81g7mh0pmiinybfgzypm4fmx"; + }; + + buildPhase = '' + ./build + ./libbuild + ''; + + installPhase = '' + install -D oppai $out/bin/oppai + install -D oppai.c $out/include/oppai.c + install -D liboppai.so $out/lib/liboppai.so + ''; + + meta = with stdenv.lib; { + description = "difficulty and pp calculator for osu!"; + homepage = "https://github.com/Francesco149/oppai-ng"; + license = licenses.unlicense; + maintainers = with maintainers; [ tadeokondrak ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 09a2f6c391db..1573ed4dbf66 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5053,6 +5053,8 @@ in stdenv = clangStdenv; }; + oppai-ng = callPackage ../tools/misc/oppai-ng { }; + update-resolv-conf = callPackage ../tools/networking/openvpn/update-resolv-conf.nix { }; opae = callPackage ../development/libraries/opae { }; From 5a6a65aa3a8e35d5905f621d8fe4fa0a83cc2b16 Mon Sep 17 00:00:00 2001 From: Tadeo Kondrak Date: Sun, 23 Jun 2019 22:29:00 -0600 Subject: [PATCH 003/112] mumble_git: 2018-07-01 -> 2019-07-10 --- pkgs/applications/networking/mumble/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/mumble/default.nix b/pkgs/applications/networking/mumble/default.nix index 321493682302..a5c8162701bf 100644 --- a/pkgs/applications/networking/mumble/default.nix +++ b/pkgs/applications/networking/mumble/default.nix @@ -139,15 +139,15 @@ let }; gitSource = rec { - version = "2018-07-01"; + version = "2019-07-10"; qtVersion = 5; # Needs submodules src = fetchFromGitHub { owner = "mumble-voip"; repo = "mumble"; - rev = "c19ac8c0b0f934d2ff206858d7cb66352d6eb418"; - sha256 = "1mzp1bgn49ycs16d6r8icqq35wq25198fs084vyq6j5f78ni7pvz"; + rev = "41b265584654c7ac216fd3ccb9c141734d3f839b"; + sha256 = "00irlzz5q4drmsfbwrkyy7p7w8a5fc1ip5vyicq3g3cy58dprpqr"; fetchSubmodules = true; }; }; From 6a27d63a882d1daecd1dce9e61135ccea3b0696e Mon Sep 17 00:00:00 2001 From: Ding Xiang Fei Date: Fri, 21 Jun 2019 15:33:37 +0800 Subject: [PATCH 004/112] buildGoPackage: enable cross compilation --- pkgs/development/go-packages/generic/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/go-packages/generic/default.nix b/pkgs/development/go-packages/generic/default.nix index 8e016fadface..b3386aaf24bf 100644 --- a/pkgs/development/go-packages/generic/default.nix +++ b/pkgs/development/go-packages/generic/default.nix @@ -72,14 +72,19 @@ let goPath = if goDeps != null then importGodeps { depsFile = goDeps; } ++ extraSrcs else extraSrcs; - package = go.stdenv.mkDerivation ( + package = stdenv.mkDerivation ( (builtins.removeAttrs args [ "goPackageAliases" "disabled" "extraSrcs"]) // { nativeBuildInputs = [ removeReferencesTo go ] ++ (lib.optional (!dontRenameImports) govers) ++ nativeBuildInputs; buildInputs = buildInputs; - inherit (go) GOOS GOARCH; + inherit (go) GOOS GOARCH GO386 CGO_ENABLED; + + GOHOSTARCH = go.GOHOSTARCH or null; + GOHOSTOS = go.GOHOSTOS or null; + + GOARM = toString (stdenv.lib.intersectLists [(stdenv.hostPlatform.parsed.cpu.version or "")] ["5" "6" "7"]); configurePhase = args.configurePhase or '' runHook preConfigure From d3a534863fbde7de368851aaef35b9aeb6b73eb9 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Thu, 20 Jun 2019 08:47:52 +0300 Subject: [PATCH 005/112] maintainers: add sikmir --- maintainers/maintainer-list.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index c5ab50ba5e36..217674ddd4b4 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4686,6 +4686,11 @@ github = "sigma"; name = "Yann Hodique"; }; + sikmir = { + email = "sikmir@gmail.com"; + github = "sikmir"; + name = "Nikolay Korotkiy"; + }; simonvandel = { email = "simon.vandel@gmail.com"; github = "simonvandel"; From c07fb9cebdf0efc2d3d85f68801b72f45df25d49 Mon Sep 17 00:00:00 2001 From: Ambroz Bizjak Date: Sat, 8 Jun 2019 19:49:47 +0200 Subject: [PATCH 006/112] nixos/opengl: Don't set XDG_DATA_DIRS. This was added in #19936 so that vulkan-loader finds the ICD config files. It is not needed any more after #62869 where it was ensured that the loader looks in /run/opengl-driver(-32)/share. --- nixos/modules/hardware/opengl.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/nixos/modules/hardware/opengl.nix b/nixos/modules/hardware/opengl.nix index 2defab51bc3a..fcd995f5f424 100644 --- a/nixos/modules/hardware/opengl.nix +++ b/nixos/modules/hardware/opengl.nix @@ -148,9 +148,6 @@ in environment.sessionVariables.LD_LIBRARY_PATH = [ "/run/opengl-driver/lib" ] ++ optional cfg.driSupport32Bit "/run/opengl-driver-32/lib"; - environment.variables.XDG_DATA_DIRS = - [ "/run/opengl-driver/share" ] ++ optional cfg.driSupport32Bit "/run/opengl-driver-32/share"; - hardware.opengl.package = mkDefault (makePackage pkgs); hardware.opengl.package32 = mkDefault (makePackage pkgs.pkgsi686Linux); From 54fa84b988d2fdfcc9c2073cbd197a8c1a107197 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Tue, 2 Jul 2019 01:41:46 -0700 Subject: [PATCH 007/112] python37Packages.aiorpcx: 0.17.0 -> 0.18.3 Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/python3.7-aiorpcx/versions --- pkgs/development/python-modules/aiorpcx/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/aiorpcx/default.nix b/pkgs/development/python-modules/aiorpcx/default.nix index a5f54d8e96cf..6350e3f0441a 100644 --- a/pkgs/development/python-modules/aiorpcx/default.nix +++ b/pkgs/development/python-modules/aiorpcx/default.nix @@ -2,12 +2,12 @@ buildPythonPackage rec { pname = "aiorpcx"; - version = "0.17.0"; + version = "0.18.3"; src = fetchPypi { inherit version; pname = "aiorpcX"; - sha256 = "14np5r75rs0v45vsv20vbzmnv3qisvm9mdllj1j9s1633cvcik0k"; + sha256 = "0k545hc7wl6sh1svydzbv6x7sx5pig2pqkl3yxs9riwmvzawx9xp"; }; propagatedBuildInputs = [ attrs ]; From 9837facf21113c5c48ed80dab7d5ce1e387ee2f6 Mon Sep 17 00:00:00 2001 From: David Wood Date: Mon, 1 Jul 2019 16:08:27 +0100 Subject: [PATCH 008/112] nixos/deluge: user, group and web firewall opts. This commit adds new options to the Deluge service: - Allow configuration of the user/group which runs the deluged daemon. - Allow configuration of the user/group which runs the deluge web daemon. - Allow opening firewall for the deluge web daemon. --- nixos/modules/services/torrent/deluge.nix | 76 +++++++++++++++++------ nixos/tests/deluge.nix | 6 +- 2 files changed, 60 insertions(+), 22 deletions(-) diff --git a/nixos/modules/services/torrent/deluge.nix b/nixos/modules/services/torrent/deluge.nix index 01a5890a7845..f2e0c4a89dd6 100644 --- a/nixos/modules/services/torrent/deluge.nix +++ b/nixos/modules/services/torrent/deluge.nix @@ -118,30 +118,55 @@ in { more informations. ''; }; + + user = mkOption { + type = types.str; + default = "deluge"; + description = '' + User account under which deluge runs. + ''; + }; + + group = mkOption { + type = types.str; + default = "deluge"; + description = '' + Group under which deluge runs. + ''; + }; }; deluge.web = { enable = mkEnableOption "Deluge Web daemon"; + port = mkOption { - type = types.port; + type = types.port; default = 8112; description = '' Deluge web UI port. ''; }; + + openFirewall = mkOption { + type = types.bool; + default = false; + description = '' + Open ports in the firewall for deluge web daemon + ''; + }; }; }; }; config = mkIf cfg.enable { - systemd.tmpfiles.rules = [ "d '${configDir}' 0770 deluge deluge" ] + systemd.tmpfiles.rules = [ "d '${configDir}' 0770 ${cfg.user} ${cfg.group}" ] ++ optional (cfg.config ? "download_location") - "d '${cfg.config.download_location}' 0770 deluge deluge" + "d '${cfg.config.download_location}' 0770 ${cfg.user} ${cfg.group}" ++ optional (cfg.config ? "torrentfiles_location") - "d '${cfg.config.torrentfiles_location}' 0770 deluge deluge" + "d '${cfg.config.torrentfiles_location}' 0770 ${cfg.user} ${cfg.group}" ++ optional (cfg.config ? "move_completed_path") - "d '${cfg.config.move_completed_path}' 0770 deluge deluge"; + "d '${cfg.config.move_completed_path}' 0770 ${cfg.user} ${cfg.group}"; systemd.services.deluged = { after = [ "network.target" ]; @@ -157,8 +182,8 @@ in { # To prevent "Quit & shutdown daemon" from working; we want systemd to # manage it! Restart = "on-success"; - User = "deluge"; - Group = "deluge"; + User = cfg.user; + Group = cfg.group; UMask = "0002"; LimitNOFILE = cfg.openFilesLimit; }; @@ -177,26 +202,37 @@ in { --config ${configDir} \ --port ${toString cfg.web.port} ''; - User = "deluge"; - Group = "deluge"; + User = cfg.user; + Group = cfg.group; }; }; - networking.firewall = mkIf (cfg.declarative && cfg.openFirewall && !(cfg.config.random_port or true)) { - allowedTCPPortRanges = singleton (listToRange (cfg.config.listen_ports or listenPortsDefault)); - allowedUDPPortRanges = singleton (listToRange (cfg.config.listen_ports or listenPortsDefault)); - }; + networking.firewall = mkMerge [ + (mkIf (cfg.declarative && cfg.openFirewall && !(cfg.config.random_port or true)) { + allowedTCPPortRanges = singleton (listToRange (cfg.config.listen_ports or listenPortsDefault)); + allowedUDPPortRanges = singleton (listToRange (cfg.config.listen_ports or listenPortsDefault)); + }) + (mkIf (cfg.web.openFirewall) { + allowedTCPPorts = [ cfg.web.port ]; + }) + ]; environment.systemPackages = [ pkgs.deluge ]; - users.users.deluge = { - group = "deluge"; - uid = config.ids.uids.deluge; - home = cfg.dataDir; - createHome = true; - description = "Deluge Daemon user"; + users.users = mkIf (cfg.user == "deluge") { + deluge = { + group = cfg.group; + uid = config.ids.uids.deluge; + home = cfg.dataDir; + createHome = true; + description = "Deluge Daemon user"; + }; }; - users.groups.deluge.gid = config.ids.gids.deluge; + users.groups = mkIf (cfg.group == "deluge") { + deluge = { + gid = config.ids.gids.deluge; + }; + }; }; } diff --git a/nixos/tests/deluge.nix b/nixos/tests/deluge.nix index 22ad84e7bff1..b58030409b5c 100644 --- a/nixos/tests/deluge.nix +++ b/nixos/tests/deluge.nix @@ -8,9 +8,11 @@ import ./make-test.nix ({ pkgs, ...} : { simple = { services.deluge = { enable = true; - web.enable = true; + web = { + enable = true; + openFirewall = true; + }; }; - networking.firewall.allowedTCPPorts = [ 8112 ]; }; declarative = From 16c394fe0f46935a4065a5a1ed43ef1cabd5840a Mon Sep 17 00:00:00 2001 From: David Wood Date: Mon, 1 Jul 2019 17:14:42 +0100 Subject: [PATCH 009/112] nixos/deluge: Add extractor dependencies. This commit adds the "Extractor" plugin dependencies to the PATH of the `deluged` service. --- nixos/modules/services/torrent/deluge.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/nixos/modules/services/torrent/deluge.nix b/nixos/modules/services/torrent/deluge.nix index f2e0c4a89dd6..48ec4d692e2f 100644 --- a/nixos/modules/services/torrent/deluge.nix +++ b/nixos/modules/services/torrent/deluge.nix @@ -134,6 +134,16 @@ in { Group under which deluge runs. ''; }; + + extraPackages = mkOption { + type = types.listOf types.package; + default = []; + description = '' + Extra packages available at runtime to enable Deluge's plugins. For example, + extraction utilities are required for the built-in "Extractor" plugin. + This always contains unzip, gnutar, xz, p7zip and bzip2. + ''; + }; }; deluge.web = { @@ -160,6 +170,9 @@ in { config = mkIf cfg.enable { + # Provide a default set of `extraPackages`. + services.deluge.extraPackages = with pkgs; [ unzip gnutar xz p7zip bzip2 ]; + systemd.tmpfiles.rules = [ "d '${configDir}' 0770 ${cfg.user} ${cfg.group}" ] ++ optional (cfg.config ? "download_location") "d '${cfg.config.download_location}' 0770 ${cfg.user} ${cfg.group}" @@ -172,7 +185,7 @@ in { after = [ "network.target" ]; description = "Deluge BitTorrent Daemon"; wantedBy = [ "multi-user.target" ]; - path = [ pkgs.deluge ]; + path = [ pkgs.deluge ] ++ cfg.extraPackages; serviceConfig = { ExecStart = '' ${pkgs.deluge}/bin/deluged \ From 41dbd56189359217c1091051f92b1998fcbba609 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Sun, 7 Jul 2019 22:04:50 -0700 Subject: [PATCH 010/112] python3Packages.sklearn-deap: mark as broken --- pkgs/development/python-modules/sklearn-deap/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/sklearn-deap/default.nix b/pkgs/development/python-modules/sklearn-deap/default.nix index 190692c43627..63a048abdb2a 100644 --- a/pkgs/development/python-modules/sklearn-deap/default.nix +++ b/pkgs/development/python-modules/sklearn-deap/default.nix @@ -1,4 +1,4 @@ -{ stdenv, buildPythonPackage, fetchFromGitHub, numpy, scipy, deap, scikitlearn, python }: +{ stdenv, buildPythonPackage, fetchFromGitHub, numpy, scipy, deap, scikitlearn, python, isPy3k }: buildPythonPackage rec { pname = "sklearn-deap"; @@ -23,6 +23,7 @@ buildPythonPackage rec { homepage = https://github.com/rsteca/sklearn-deap; license = licenses.lgpl3; maintainers = with maintainers; [ psyanticy ]; + broken = isPy3k; # https://github.com/rsteca/sklearn-deap/issues/65 }; } From fbcf84b950c7353da6aae3d493428d5daa877450 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Sun, 7 Jul 2019 22:05:38 -0700 Subject: [PATCH 011/112] pythonPackages.deap: 1.2.2 -> 1.3.0 --- pkgs/development/python-modules/deap/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/deap/default.nix b/pkgs/development/python-modules/deap/default.nix index fbc915c8eb04..e78a3f5eba03 100644 --- a/pkgs/development/python-modules/deap/default.nix +++ b/pkgs/development/python-modules/deap/default.nix @@ -2,11 +2,11 @@ buildPythonPackage rec { pname = "deap"; - version = "1.2.2"; + version = "1.3.0"; src = fetchPypi { inherit pname version; - sha256 = "95c63e66d755ec206c80fdb2908851c0bef420ee8651ad7be4f0578e9e909bcf"; + sha256 = "102r11pxb36xkq5bjv1lpkss77v278f5xdv6lvkbjdvqryydf3yd"; }; propagatedBuildInputs = [ numpy matplotlib ]; @@ -17,7 +17,7 @@ buildPythonPackage rec { meta = with stdenv.lib; { description = "DEAP is a novel evolutionary computation framework for rapid prototyping and testing of ideas."; - homepage = https://github.com/DEAP/deap; + homepage = "https://github.com/DEAP/deap"; license = licenses.lgpl3; maintainers = with maintainers; [ psyanticy ]; }; From 4bed1fa043a9608f2ba8aebbe1be6382bbe7382d Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Sun, 7 Jul 2019 22:42:33 -0700 Subject: [PATCH 012/112] pythonPackages.pytest-xprocess: init at 0.12.1 --- .../pytest-xprocess/default.nix | 32 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/development/python-modules/pytest-xprocess/default.nix diff --git a/pkgs/development/python-modules/pytest-xprocess/default.nix b/pkgs/development/python-modules/pytest-xprocess/default.nix new file mode 100644 index 000000000000..840a096a085e --- /dev/null +++ b/pkgs/development/python-modules/pytest-xprocess/default.nix @@ -0,0 +1,32 @@ +{ lib, buildPythonPackage, fetchPypi +, psutil +, pytest +}: + +buildPythonPackage rec { + pname = "pytest-xprocess"; + version = "0.12.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "06w2acg0shy0vxrmnxpqclimhgfjys5ql5kmmzr7r1lai46x1q2h"; + }; + + propagatedBuildInputs = [ psutil pytest ]; + + # Remove test QoL package from install_requires + postPatch = '' + substituteInPlace setup.py \ + --replace "'pytest-cache', " "" + ''; + + # There's no tests in repo + doCheck = false; + + meta = with lib; { + description = "Pytest external process plugin"; + homepage = "https://github.com/pytest-dev"; + license = licenses.mit; + maintainers = with maintainers; [ jonringer ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2ec132264a99..0ac7a0b50ca6 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -855,6 +855,8 @@ in { pytest-tornado = callPackage ../development/python-modules/pytest-tornado { }; + pytest-xprocess = callPackage ../development/python-modules/pytest-xprocess { }; + python-binance = callPackage ../development/python-modules/python-binance { }; python-dbusmock = callPackage ../development/python-modules/python-dbusmock { }; From d36d7f1ab2e3ed411a3344a119b8ce97108694b8 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Sun, 7 Jul 2019 22:48:42 -0700 Subject: [PATCH 013/112] pythonPackages.flask-caching: 1.4.0 -> 1.7.2 --- .../python-modules/flask-caching/default.nix | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/flask-caching/default.nix b/pkgs/development/python-modules/flask-caching/default.nix index 84f549231ce6..bd528af6bfab 100644 --- a/pkgs/development/python-modules/flask-caching/default.nix +++ b/pkgs/development/python-modules/flask-caching/default.nix @@ -1,28 +1,26 @@ -{ lib, buildPythonPackage, fetchPypi, flask, pytest, pytestcov }: +{ lib, buildPythonPackage, fetchPypi, flask, pytest, pytestcov, pytest-xprocess }: buildPythonPackage rec { pname = "Flask-Caching"; - version = "1.4.0"; + version = "1.7.2"; src = fetchPypi { inherit pname version; - sha256 = "e34f24631ba240e09fe6241e1bf652863e0cff06a1a94598e23be526bc2e4985"; + sha256 = "17jnnmnpdflv120yhsfbnpick06iias6f2hcxmf1mi1nr35kdqjj"; }; propagatedBuildInputs = [ flask ]; - checkInputs = [ pytest pytestcov ]; + checkInputs = [ pytest pytestcov pytest-xprocess ]; + # backend_cache relies on pytest-cache, which is a stale package from 2013 checkPhase = '' - py.test + pytest -k 'not backend_cache' ''; - # https://github.com/sh4nks/flask-caching/pull/74 - doCheck = false; - meta = with lib; { description = "Adds caching support to your Flask application"; - homepage = https://github.com/sh4nks/flask-caching; + homepage = "https://github.com/sh4nks/flask-caching"; license = licenses.bsd3; }; } From 5aa497fcd6ec23cc108b944bcf2c641c591778d2 Mon Sep 17 00:00:00 2001 From: Jonas Nick Date: Mon, 8 Jul 2019 12:50:40 +0000 Subject: [PATCH 014/112] clightning: 0.7.0 -> 0.7.1 --- pkgs/applications/altcoins/clightning.nix | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/pkgs/applications/altcoins/clightning.nix b/pkgs/applications/altcoins/clightning.nix index 5f81dc76ecf2..481e19c66cdc 100644 --- a/pkgs/applications/altcoins/clightning.nix +++ b/pkgs/applications/altcoins/clightning.nix @@ -4,11 +4,11 @@ with stdenv.lib; stdenv.mkDerivation rec { name = "clightning-${version}"; - version = "0.7.0"; + version = "0.7.1"; src = fetchurl { url = "https://github.com/ElementsProject/lightning/releases/download/v${version}/clightning-v${version}.zip"; - sha256 = "448022c2433cbf19bbd0f726344b0500c0c21ee5cc2291edf6b622f094cb3a15"; + sha256 = "557be34410f27a8d55d9f31a40717a8f5e99829f2bd114c24e7ca1dd5f6b7d85"; }; enableParallelBuilding = true; @@ -18,15 +18,6 @@ stdenv.mkDerivation rec { makeFlags = [ "prefix=$(out) VERSION=v${version}" ]; - patches = [ - # remove after 0.7.0 - (fetchpatch { - name = "fix-0.7.0-build.patch"; - url = "https://github.com/ElementsProject/lightning/commit/ffc03d2bc84dc42f745959fbb6c8007cf0a6f701.patch"; - sha256 = "1m5fiz3m8k3nk09nldii8ij94bg6fqllqgdbiwj3sy12vihs8c4v"; - }) - ]; - configurePhase = '' ./configure --prefix=$out --disable-developer --disable-valgrind ''; From e928aa6f50ab4147adea268e41d7de7af4a2e019 Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Tue, 25 Jun 2019 15:05:29 +0200 Subject: [PATCH 015/112] gitlab-runner: 11.11.2 -> 12.0.2 12.0.1 fixes an issue with git submodule fetching 12.0.2 fixes an issue with concurrent updated --- .../continuous-integration/gitlab-runner/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix b/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix index 07be22ae43f5..a93b791f7e6a 100644 --- a/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix +++ b/pkgs/development/tools/continuous-integration/gitlab-runner/default.nix @@ -1,16 +1,16 @@ { lib, buildGoPackage, fetchFromGitLab, fetchurl }: let - version = "11.11.2"; + version = "12.0.2"; # Gitlab runner embeds some docker images these are prebuilt for arm and x86_64 docker_x86_64 = fetchurl { url = "https://gitlab-runner-downloads.s3.amazonaws.com/v${version}/helper-images/prebuilt-x86_64.tar.xz"; - sha256 = "0q5i9517jsz3mw7hglbnjih7q114350dfd9nyzv7xfk56kc0172w"; + sha256 = "0b1xkksd4rgqvjahp5bf53sk887z2fxwr7rf8vqs9j9aw54zm5cn"; }; docker_arm = fetchurl { url = "https://gitlab-runner-downloads.s3.amazonaws.com/v${version}/helper-images/prebuilt-arm.tar.xz"; - sha256 = "0q7g0ggaxg6akda06an867vbdqjrfcxf4c81b1cxfhbk7whxgxhv"; + sha256 = "1cjl64g3ymnrs9c3fl28aydfzf18ik4vnjcvijv28c3gm1i6chs0"; }; in buildGoPackage rec { @@ -29,7 +29,7 @@ buildGoPackage rec { owner = "gitlab-org"; repo = "gitlab-runner"; rev = "v${version}"; - sha256 = "0bnn89z7p2mrjjlq7i9yfr6ra903vr278qhhy2i126w56dlac6vf"; + sha256 = "0cbh11libcyfdgrvnl1aa11x90ac7zgn1d9myc4dwmqzfdm4kdlb"; }; patches = [ ./fix-shell-path.patch ]; From c793a1d422349537e336b98a3eb6bd7982e2cd7b Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Tue, 9 Jul 2019 13:04:17 -0500 Subject: [PATCH 016/112] gnupg: 2.2.16 -> 2.2.17 https://lists.gnupg.org/pipermail/gnupg-announce/2019q3/000439.html --- pkgs/tools/security/gnupg/22.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/gnupg/22.nix b/pkgs/tools/security/gnupg/22.nix index ecb1df73e397..7a8fb5a32443 100644 --- a/pkgs/tools/security/gnupg/22.nix +++ b/pkgs/tools/security/gnupg/22.nix @@ -16,11 +16,11 @@ assert guiSupport -> pinentry != null; stdenv.mkDerivation rec { name = "gnupg-${version}"; - version = "2.2.16"; + version = "2.2.17"; src = fetchurl { url = "mirror://gnupg/gnupg/${name}.tar.bz2"; - sha256 = "1jqlzp9b3kpfp1dkjqskm67jjrhvf9nh3lzf45321p7m9d2qvgkc"; + sha256 = "056mgy09lvsi03531a437qj58la1j2x1y1scvfi53diris3658mg"; }; depsBuildBuild = [ buildPackages.stdenv.cc ]; From 14a7161fa594e4277231c7f2e0bb5dbeb8e5cd81 Mon Sep 17 00:00:00 2001 From: Ben Hipple Date: Tue, 9 Jul 2019 19:05:59 +0000 Subject: [PATCH 017/112] mirrors.nix: add alsa-project.org for alsa Aside from being an HTTPS endpoint, this is the canonical mirror for alsa project downloads. --- pkgs/build-support/fetchurl/mirrors.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/build-support/fetchurl/mirrors.nix b/pkgs/build-support/fetchurl/mirrors.nix index d9e44afb68df..f2336db8852b 100644 --- a/pkgs/build-support/fetchurl/mirrors.nix +++ b/pkgs/build-support/fetchurl/mirrors.nix @@ -409,9 +409,10 @@ rec { # Alsa Project alsa = [ - ftp://ftp.alsa-project.org/pub/ - http://alsa.cybermirror.org/ - http://www.mirrorservice.org/sites/ftp.alsa-project.org/pub/ - http://alsa.mirror.fr/ + https://www.alsa-project.org/files/pub/ + ftp://ftp.alsa-project.org/pub/ + http://alsa.cybermirror.org/ + http://www.mirrorservice.org/sites/ftp.alsa-project.org/pub/ + http://alsa.mirror.fr/ ]; } From b86a3e46b378a087ea57fd043fd59324665d24c9 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 9 Jun 2019 12:54:31 +0200 Subject: [PATCH 018/112] mautrix-whatsapp: 2019-02-24 -> 2019-07-04 Bump to the latest revision of `mautrix-whatsapp` to regain compatibility with matrix-synapse 0.99.5. Please note that it was necessary to alter some of the sources in `deps.nix`, please read the comment at the top of the file for further information. --- pkgs/servers/mautrix-whatsapp/default.nix | 6 +- pkgs/servers/mautrix-whatsapp/deps.nix | 82 +++++++++++++---------- 2 files changed, 49 insertions(+), 39 deletions(-) diff --git a/pkgs/servers/mautrix-whatsapp/default.nix b/pkgs/servers/mautrix-whatsapp/default.nix index f6526ab1f715..824f8ea20259 100644 --- a/pkgs/servers/mautrix-whatsapp/default.nix +++ b/pkgs/servers/mautrix-whatsapp/default.nix @@ -2,15 +2,15 @@ buildGoPackage rec { name = "mautrix-unstable-${version}"; - version = "2019-02-24"; + version = "2019-07-04"; goPackagePath = "maunium.net/go/mautrix-whatsapp"; src = fetchFromGitHub { owner = "tulir"; repo = "mautrix-whatsapp"; - rev = "485acf6de654b8fb70007876c074fb004eb9717b"; - sha256 = "1v7h3s8h0aiq6g06h9j1sidw8y5aiw24sgdh9knr1c90pvvc7pmv"; + rev = "29f5ae45c4b22f463003b23e355b951831f08b3e"; + sha256 = "12209m3x01i7bnnkg57ag1ivsk6n6pqaqfin7y02irgi3i3rm31r"; }; goDeps = ./deps.nix; diff --git a/pkgs/servers/mautrix-whatsapp/deps.nix b/pkgs/servers/mautrix-whatsapp/deps.nix index 8624889e3468..2dd35846bf5d 100644 --- a/pkgs/servers/mautrix-whatsapp/deps.nix +++ b/pkgs/servers/mautrix-whatsapp/deps.nix @@ -1,21 +1,22 @@ +# NOTE: this file isn't entirely generated, while performing the bump +# from 2019-02-24 to 2019-06-01, a lot of stuff broke during `vgo2nix` as the +# tool is unable to parse `replace` statements atm. +# +# The following sources were altered manually: +# * github.com/Rhymen/go-whatsapp -> github.com/tulir/go-whatsapp (at 36ed380bdc18) +# * github.com/golang/protobuf: v1.2.0 -> v1.3.1 +# * maunium.net/go/mautrix: v0.1.0-alpha3 -> ca5d9535b6cc +# * maunium.net/go/mautrix-appservice: v0.1.0-alpha3 -> 6e6c9bb47548 + # file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix) [ - { - goPackagePath = "github.com/Baozisoftware/qrcode-terminal-go"; - fetch = { - type = "git"; - url = "https://github.com/Baozisoftware/qrcode-terminal-go"; - rev = "c0650d8dff0f"; - sha256 = "166h9zy9y7ygayhybg7d080hpdcf1mvkf3rwnq5lqg8i3cg71s7b"; - }; - } { goPackagePath = "github.com/Rhymen/go-whatsapp"; fetch = { type = "git"; - url = "https://github.com/Rhymen/go-whatsapp"; - rev = "c1173899de99"; - sha256 = "1f46zpbfgv3k38lgdrcwqf4cm34dgqxlfs9qzg380in61460lcri"; + url = "https://github.com/tulir/go-whatsapp"; + rev = "36ed380bdc188e35fe804d6dd4809ee170136670"; + sha256 = "1ida4j5hgqc5djwfsaqp8g6iynn150rwj42kqk9q2srwz5075n4p"; }; } { @@ -32,8 +33,8 @@ fetch = { type = "git"; url = "https://github.com/golang/protobuf"; - rev = "v1.2.0"; - sha256 = "0kf4b59rcbb1cchfny2dm9jyznp8ri2hsb14n8iak1q8986xa0ab"; + rev = "v1.3.1"; + sha256 = "15am4s4646qy6iv0g3kkqq52rzykqjhm4bf08dk0fy2r58knpsyl"; }; } { @@ -41,8 +42,8 @@ fetch = { type = "git"; url = "https://github.com/gorilla/mux"; - rev = "v1.7.0"; - sha256 = "09cn5v1gxrrrydzyllp1asbhgm5xsawb92as7cg9jqg6iyqajvlc"; + rev = "v1.6.2"; + sha256 = "0pvzm23hklxysspnz52mih6h1q74vfrdhjfm1l3sa9r8hhqmmld2"; }; } { @@ -54,13 +55,22 @@ sha256 = "00i4vb31nsfkzzk7swvx3i75r2d960js3dri1875vypk3v2s0pzk"; }; } + { + goPackagePath = "github.com/lib/pq"; + fetch = { + type = "git"; + url = "https://github.com/lib/pq"; + rev = "v1.1.1"; + sha256 = "0g64wlg1l1ybq4x44idksl4pgm055s58jxc6r6x4qhqm5q76h0km"; + }; + } { goPackagePath = "github.com/mattn/go-colorable"; fetch = { type = "git"; url = "https://github.com/mattn/go-colorable"; - rev = "v0.1.1"; - sha256 = "0l640974j804c1yyjfgyxqlsivz0yrzmbql4mhcw2azryigkp08p"; + rev = "v0.0.9"; + sha256 = "1nwjmsppsjicr7anq8na6md7b1z84l9ppnlr045hhxjvbkqwalvx"; }; } { @@ -68,8 +78,8 @@ fetch = { type = "git"; url = "https://github.com/mattn/go-isatty"; - rev = "v0.0.5"; - sha256 = "114d5xm8rfxplzd7nxz97gfngb4bhqy102szl084d1afcxsvm4aa"; + rev = "v0.0.4"; + sha256 = "0zs92j2cqaw9j8qx1sdxpv3ap0rgbs0vrvi72m40mg8aa36gd39w"; }; } { @@ -82,7 +92,16 @@ }; } { - goPackagePath = "github.com/russross/blackfriday"; + goPackagePath = "github.com/pkg/errors"; + fetch = { + type = "git"; + url = "https://github.com/pkg/errors"; + rev = "v0.8.1"; + sha256 = "0g5qcb4d4fd96midz0zdk8b9kz8xkzwfa8kr1cliqbg8sxsy5vd1"; + }; + } + { + goPackagePath = "gopkg.in/russross/blackfriday.v2"; fetch = { type = "git"; url = "https://github.com/russross/blackfriday"; @@ -113,8 +132,8 @@ fetch = { type = "git"; url = "https://go.googlesource.com/crypto"; - rev = "ffb98f73852f"; - sha256 = "0hil543q2zq8wxsz6ljrfnrhhxg5j0mrjfwskf2x6q0ppqizsa4h"; + rev = "b8fe1690c613"; + sha256 = "1mbfpbrirsz8fsdkibm9l4sccpm774p9201mpmfh4hxshz3girq3"; }; } { @@ -135,15 +154,6 @@ sha256 = "1bb0mw6ckb1k7z8v3iil2qlqwfj408fvvp8m1cik2b46p7snyjhm"; }; } - { - goPackagePath = "golang.org/x/sys"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/sys"; - rev = "cd391775e71e"; - sha256 = "12wk5ylx0jjajipr68yn50wcd0c9shzhq9y4an40ldnv4bsdp2rj"; - }; - } { goPackagePath = "gopkg.in/check.v1"; fetch = { @@ -185,8 +195,8 @@ fetch = { type = "git"; url = "https://github.com/tulir/mautrix-go.git"; - rev = "v0.1.0-alpha.3"; - sha256 = "12nlyij57ss2a5d1f1k1vsmjjvxp1fannlrbnp2jsj6rrsq0d2wr"; + rev = "ca5d9535b6ccee8fdf473f9cc935932ef3e53ae7"; + sha256 = "1qrh77c8vh2k6ffwf0cymjmhcp7d0rdad1ixqx5r1xig27f7v0qg"; }; } { @@ -194,8 +204,8 @@ fetch = { type = "git"; url = "https://github.com/tulir/mautrix-appservice-go.git"; - rev = "v0.1.0-alpha.3"; - sha256 = "17y11wgqbrafbq6bnn4rp2lzd50fjz9d6f8j3382jsara7ps95vr"; + rev = "6e6c9bb4754849443cb3c64d9510f8d2eb3e668d"; + sha256 = "1zwsfvgxs2zbc6yvgnk16w2wkh891kihrzar3qzz9cvsgjznlyvy"; }; } ] From ed00a4d772c8705a8dc5f8f160cbf102cf199fd0 Mon Sep 17 00:00:00 2001 From: Tadeo Kondrak Date: Wed, 10 Jul 2019 05:13:06 -0600 Subject: [PATCH 019/112] oppai-ng: 3.2.2 -> 3.2.3 --- pkgs/tools/misc/oppai-ng/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/misc/oppai-ng/default.nix b/pkgs/tools/misc/oppai-ng/default.nix index 8352019bb684..46b2fd444ec4 100644 --- a/pkgs/tools/misc/oppai-ng/default.nix +++ b/pkgs/tools/misc/oppai-ng/default.nix @@ -1,14 +1,16 @@ -{ stdenv, fetchFromGitHub }: +{ stdenv +, fetchFromGitHub +}: stdenv.mkDerivation rec { pname = "oppai-ng"; - version = "3.2.2"; + version = "3.2.3"; src = fetchFromGitHub { owner = "Francesco149"; repo = pname; rev = version; - sha256 = "1cq8kvw33dnafs06j54qgc475jma81g7mh0pmiinybfgzypm4fmx"; + sha256 = "1wrnpnx1yl0pdzmla4knlpcwy7baamy2wpdypnbdqxrn0zkw7kzk"; }; buildPhase = '' @@ -23,7 +25,7 @@ stdenv.mkDerivation rec { ''; meta = with stdenv.lib; { - description = "difficulty and pp calculator for osu!"; + description = "Difficulty and pp calculator for osu!"; homepage = "https://github.com/Francesco149/oppai-ng"; license = licenses.unlicense; maintainers = with maintainers; [ tadeokondrak ]; From 95ce3f54ddee7551646cf589f5e056e5eb2463ee Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Wed, 10 Jul 2019 09:16:28 -0400 Subject: [PATCH 020/112] vscode: 1.36.0 -> 1.36.1 --- pkgs/applications/editors/vscode/vscode.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/vscode/vscode.nix b/pkgs/applications/editors/vscode/vscode.nix index c8db515e47df..438292b7683c 100644 --- a/pkgs/applications/editors/vscode/vscode.nix +++ b/pkgs/applications/editors/vscode/vscode.nix @@ -11,13 +11,13 @@ let archive_fmt = if system == "x86_64-darwin" then "zip" else "tar.gz"; sha256 = { - "x86_64-linux" = "02h71b9m9w4nc8g9iy2kafg041brli4zwv7pv6i1qg6p5cf2jdfx"; - "x86_64-darwin" = "1awq0rwiizwbjqf7crv59qr7m7rmgpfba0b4qx2bpx1mn25fmq56"; + "x86_64-linux" = "1ck13xpnfklfc81jd8d5md09fcp0gjypacdqj276mzhr5mig29cd"; + "x86_64-darwin" = "0xpzm372swv0by22saxib16fvvvfjr7d68aj3l5dsl5c9a8v23qj"; }.${system}; in callPackage ./generic.nix rec { - version = "1.36.0"; + version = "1.36.1"; pname = "vscode"; executableName = "code" + lib.optionalString isInsiders "-insiders"; From 269469122f94c8f1a2c82481b8cec5632725bfbd Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Wed, 10 Jul 2019 09:16:39 -0400 Subject: [PATCH 021/112] vscodium: 1.36.0 -> 1.36.1 --- pkgs/applications/editors/vscode/vscodium.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/vscode/vscodium.nix b/pkgs/applications/editors/vscode/vscodium.nix index f651ee0653d5..fbcc6d0c7374 100644 --- a/pkgs/applications/editors/vscode/vscodium.nix +++ b/pkgs/applications/editors/vscode/vscodium.nix @@ -11,13 +11,13 @@ let archive_fmt = if system == "x86_64-darwin" then "zip" else "tar.gz"; sha256 = { - "x86_64-linux" = "09vmq87az0f91xwyfby85pnn4mg0rlf7pyvs5bkrxv0r8jxxfpq7"; - "x86_64-darwin" = "16yzzmlf3v9aj7dyglqjxdksabv0cc98w6kdv5rbfw865hj4bbck"; + "x86_64-linux" = "1ay4zvkbln2wf2j1d71mn13b6p2fqvzgz45mzrgaqwsszhbg4xzp"; + "x86_64-darwin" = "17r9krb1qd92ybx078hkw9zlyym6kbnmbl91vjdilsq77bkf9jmw"; }.${system}; in callPackage ./generic.nix rec { - version = "1.36.0"; + version = "1.36.1"; pname = "vscodium"; executableName = "codium"; From 9efdd2e43477aa4b7e8b6d8da62e351125964991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Sun, 19 May 2019 14:05:54 +0200 Subject: [PATCH 022/112] knot-resolver: 3.2.1 -> 4.0.0 https://lists.nic.cz/pipermail/knot-resolver-users/2019/000136.html Similar commit worked fine for me, including the nixos service. I'd like to still improve the service to support easy passing of sockets to http module. --- nixos/modules/services/networking/kresd.nix | 7 +- pkgs/servers/dns/knot-resolver/default.nix | 91 +++++++++++---------- 2 files changed, 52 insertions(+), 46 deletions(-) diff --git a/nixos/modules/services/networking/kresd.nix b/nixos/modules/services/networking/kresd.nix index ca34ff9df4ef..fc516c01230a 100644 --- a/nixos/modules/services/networking/kresd.nix +++ b/nixos/modules/services/networking/kresd.nix @@ -80,8 +80,11 @@ in # Syntax depends on being IPv6 or IPv4. (iface: if elem ":" (stringToCharacters iface) then "[${iface}]:53" else "${iface}:53") cfg.interfaces; - socketConfig.ListenDatagram = listenStreams; - socketConfig.FreeBind = true; + socketConfig = { + ListenDatagram = listenStreams; + FreeBind = true; + FileDescriptorName = "dns"; + }; }; systemd.sockets.kresd-tls = mkIf (cfg.listenTLS != []) rec { diff --git a/pkgs/servers/dns/knot-resolver/default.nix b/pkgs/servers/dns/knot-resolver/default.nix index ce84bb7cb417..8d9e2d7a5b9a 100644 --- a/pkgs/servers/dns/knot-resolver/default.nix +++ b/pkgs/servers/dns/knot-resolver/default.nix @@ -1,68 +1,70 @@ -{ stdenv, fetchurl, fetchpatch, runCommand, pkgconfig, hexdump, which -, knot-dns, luajit, libuv, lmdb, gnutls, nettle -, cmocka, systemd, dns-root-data, makeWrapper +{ stdenv, fetchurl +# native deps. +, runCommand, pkgconfig, meson, ninja, makeWrapper +# build+runtime deps. +, knot-dns, luajitPackages, libuv, gnutls, lmdb, systemd, dns-root-data +# test-only deps. +, cmocka, which, cacert , extraFeatures ? false /* catch-all if defaults aren't enough */ -, luajitPackages }: let # un-indented, over the whole file result = if extraFeatures then wrapped-full else unwrapped; -inherit (stdenv.lib) optional; +inherit (stdenv.lib) optional optionals concatStringsSep; +lua = luajitPackages; + +# FIXME: remove these usages once resolving +# https://github.com/NixOS/nixpkgs/pull/63108#issuecomment-508670438 +exportLuaPathsFor = luaPkgs: '' + export LUA_PATH='${ concatStringsSep ";" (map lua.getLuaPath luaPkgs)}' + export LUA_CPATH='${concatStringsSep ";" (map lua.getLuaCPath luaPkgs)}' +''; unwrapped = stdenv.mkDerivation rec { name = "knot-resolver-${version}"; - version = "3.2.1"; + version = "4.0.0"; src = fetchurl { url = "https://secure.nic.cz/files/knot-resolver/${name}.tar.xz"; - sha256 = "d1396888ec3a63f19dccdf2b7dbcb0d16a5d8642766824b47f4c21be90ce362b"; + sha256 = "37161d931e64535ce38c33b9635f06a43cd1541945bf2c79a55e37f230de1631"; }; - patches = [ - (fetchpatch { - name = "support-libzscanner-2.8.diff"; - url = "https://gitlab.labs.nic.cz/knot/knot-resolver/commit/186f263.diff"; - sha256 = "19zqigvc7m2a4j6bk9whx7gj0v009568rz5qwk052z7pzfikr8mk"; - }) - ]; - - # Short-lived cross fix, as upstream is migrating to meson anyway. - postPatch = '' - substituteInPlace platform.mk --replace "objdump" "$OBJDUMP" - ''; - outputs = [ "out" "dev" ]; - configurePhase = "patchShebangs scripts/"; + preConfigure = '' + patchShebangs scripts/ + '' + + stdenv.lib.optionalString doInstallCheck (exportLuaPathsFor [ lua.cqueues lua.basexx ]); - nativeBuildInputs = [ pkgconfig which hexdump ]; + nativeBuildInputs = [ pkgconfig meson ninja ]; # http://knot-resolver.readthedocs.io/en/latest/build.html#requirements - buildInputs = [ knot-dns luajit libuv gnutls nettle lmdb ] - ++ optional stdenv.isLinux systemd # sd_notify + buildInputs = [ knot-dns lua.lua libuv gnutls lmdb ] + ++ optional stdenv.isLinux systemd # passing sockets, sd_notify ## optional dependencies; TODO: libedit, dnstap ; - checkInputs = [ cmocka ]; - - makeFlags = [ - "PREFIX=$(out)" - "ROOTHINTS=${dns-root-data}/root.hints" - "KEYFILE_DEFAULT=${dns-root-data}/root.ds" + mesonFlags = [ + "-Dkeyfile_default=${dns-root-data}/root.ds" + "-Droot_hints=${dns-root-data}/root.hints" + "-Dinstall_kresd_conf=disabled" # not really useful; examples are inside share/doc/ + "--default-library=static" # not used by anyone + ] + ++ optionals doInstallCheck [ + "-Dunit_tests=enabled" + "-Dconfig_tests=enabled" + #"-Dextra_tests=enabled" # not suitable as in-distro tests; many deps, too. ]; - CFLAGS = [ "-O2" "-DNDEBUG" ]; - - enableParallelBuilding = true; - - doCheck = true; - doInstallCheck = false; # FIXME - preInstallCheck = '' - patchShebangs tests/config/runtest.sh - ''; postInstall = '' - rm "$out"/etc/knot-resolver/root.hints # using system-wide instead + rm "$out"/lib/libkres.a + ''; + + doInstallCheck = stdenv.hostPlatform == stdenv.buildPlatform; + installCheckInputs = [ cmocka which cacert ]; + installCheckPhase = '' + meson test --print-errorlogs ''; meta = with stdenv.lib; { @@ -93,11 +95,12 @@ wrapped-full = preferLocalBuild = true; allowSubstitutes = false; } - '' + (exportLuaPathsFor luaPkgs + + '' mkdir -p "$out"/{bin,share} makeWrapper '${unwrapped}/bin/kresd' "$out"/bin/kresd \ - --set LUA_PATH '${concatStringsSep ";" (map getLuaPath luaPkgs)}' \ - --set LUA_CPATH '${concatStringsSep ";" (map getLuaCPath luaPkgs)}' + --set LUA_PATH "$LUA_PATH" \ + --set LUA_CPATH "$LUA_CPATH" ln -sr '${unwrapped}/share/man' "$out"/share/ ln -sr "$out"/{bin,sbin} @@ -105,6 +108,6 @@ wrapped-full = echo "Checking that 'http' module loads, i.e. lua search paths work:" echo "modules.load('http')" > test-http.lua echo -e 'quit()' | env -i "$out"/bin/kresd -a 127.0.0.1#53535 -c test-http.lua - ''; + ''); in result From f15625a6c03bb056945d6ca18b292c95adf109a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Wed, 10 Jul 2019 16:52:57 +0200 Subject: [PATCH 023/112] knot-resolver: 4.0.0 -> 4.1.0 (security) https://lists.nic.cz/pipermail/knot-resolver-users/2019/000189.html Fixes DNS spoofing problems: CVE-2019-10190 CVE-2019-10191 but also minor things, adds new features, etc. In particular aarch64 should work now, at least as long as not using some lua library that suffers from the same problem with lightuserdata, e.g. cqueues does suffer from this. --- pkgs/servers/dns/knot-resolver/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/servers/dns/knot-resolver/default.nix b/pkgs/servers/dns/knot-resolver/default.nix index 8d9e2d7a5b9a..deb2c21aebaf 100644 --- a/pkgs/servers/dns/knot-resolver/default.nix +++ b/pkgs/servers/dns/knot-resolver/default.nix @@ -23,11 +23,11 @@ exportLuaPathsFor = luaPkgs: '' unwrapped = stdenv.mkDerivation rec { name = "knot-resolver-${version}"; - version = "4.0.0"; + version = "4.1.0"; src = fetchurl { url = "https://secure.nic.cz/files/knot-resolver/${name}.tar.xz"; - sha256 = "37161d931e64535ce38c33b9635f06a43cd1541945bf2c79a55e37f230de1631"; + sha256 = "2fe470f9bb1007667cdd448f758087244b7195a0234c2b100a9beeed0a2d3e68"; }; outputs = [ "out" "dev" ]; @@ -61,7 +61,8 @@ unwrapped = stdenv.mkDerivation rec { rm "$out"/lib/libkres.a ''; - doInstallCheck = stdenv.hostPlatform == stdenv.buildPlatform; + # aarch64: see https://github.com/wahern/cqueues/issues/223 + doInstallCheck = with stdenv; hostPlatform == buildPlatform && !hostPlatform.isAarch64; installCheckInputs = [ cmocka which cacert ]; installCheckPhase = '' meson test --print-errorlogs @@ -71,8 +72,7 @@ unwrapped = stdenv.mkDerivation rec { description = "Caching validating DNS resolver, from .cz domain registry"; homepage = https://knot-resolver.cz; license = licenses.gpl3Plus; - # Platforms using negative pointers for stack won't work ATM due to LuaJIT impl. - platforms = filter (p: p != "aarch64-linux") platforms.unix; + platforms = platforms.unix; maintainers = [ maintainers.vcunat /* upstream developer */ ]; }; }; From c120141888a99949f47853d6a485b047c170079e Mon Sep 17 00:00:00 2001 From: xrelkd <46590321+xrelkd@users.noreply.github.com> Date: Wed, 10 Jul 2019 23:48:31 +0800 Subject: [PATCH 024/112] kube-router: 0.2.5 -> 0.3.1 --- .../networking/cluster/kube-router/default.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/networking/cluster/kube-router/default.nix b/pkgs/applications/networking/cluster/kube-router/default.nix index 2a43c23e73aa..a3cb55ce329c 100644 --- a/pkgs/applications/networking/cluster/kube-router/default.nix +++ b/pkgs/applications/networking/cluster/kube-router/default.nix @@ -1,17 +1,16 @@ -{ stdenv, buildGoPackage, fetchFromGitHub }: +{ lib, buildGoPackage, fetchFromGitHub }: buildGoPackage rec { - name = "kube-router-${version}"; - version = "0.2.5"; - rev = "v${version}"; + pname = "kube-router"; + version = "0.3.1"; goPackagePath = "github.com/cloudnativelabs/kube-router"; src = fetchFromGitHub { - inherit rev; owner = "cloudnativelabs"; - repo = "kube-router"; - sha256 = "1j6q6kg4qj75v2mdy9ivvwq8mx9fpdf0w08959l8imrp5byd56wv"; + repo = pname; + rev = "v${version}"; + sha256 = "06azrghcxp6n4bvrqxpwhmg60qk4jqcrkl1lh1rardlzhl71lk1h"; }; buildFlagsArray = '' @@ -22,7 +21,7 @@ buildGoPackage rec { ${goPackagePath}/pkg/cmd.buildDate=Nix ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = "https://www.kube-router.io/"; description = "All-in-one router, firewall and service proxy for Kubernetes"; license = licenses.asl20; From 75369ad991095cb63f915d62203384da1f061b24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20=C4=8Cun=C3=A1t?= Date: Wed, 10 Jul 2019 18:26:26 +0200 Subject: [PATCH 025/112] knot-resolver: disable part of tests on darwin, for now --- pkgs/servers/dns/knot-resolver/default.nix | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/dns/knot-resolver/default.nix b/pkgs/servers/dns/knot-resolver/default.nix index deb2c21aebaf..34791cfdd71d 100644 --- a/pkgs/servers/dns/knot-resolver/default.nix +++ b/pkgs/servers/dns/knot-resolver/default.nix @@ -51,11 +51,10 @@ unwrapped = stdenv.mkDerivation rec { "-Dinstall_kresd_conf=disabled" # not really useful; examples are inside share/doc/ "--default-library=static" # not used by anyone ] - ++ optionals doInstallCheck [ - "-Dunit_tests=enabled" - "-Dconfig_tests=enabled" + ++ optional doInstallCheck "-Dunit_tests=enabled" + ++ optional (doInstallCheck && !stdenv.isDarwin) "-Dconfig_tests=enabled" #"-Dextra_tests=enabled" # not suitable as in-distro tests; many deps, too. - ]; + ; postInstall = '' rm "$out"/lib/libkres.a From d5e4bd654c31a8f6259ccae7c8b232eef75a9e4a Mon Sep 17 00:00:00 2001 From: gnidorah Date: Wed, 10 Jul 2019 20:20:57 +0300 Subject: [PATCH 026/112] mako: install dbus service file --- pkgs/applications/misc/mako/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/misc/mako/default.nix b/pkgs/applications/misc/mako/default.nix index f076a2838eb4..32aa15b09e49 100644 --- a/pkgs/applications/misc/mako/default.nix +++ b/pkgs/applications/misc/mako/default.nix @@ -1,6 +1,7 @@ { stdenv, fetchFromGitHub, meson, ninja, pkgconfig, scdoc , systemd, pango, cairo, gdk_pixbuf -, wayland, wayland-protocols }: +, wayland, wayland-protocols +, fetchpatch }: stdenv.mkDerivation rec { pname = "mako"; @@ -13,6 +14,14 @@ stdenv.mkDerivation rec { sha256 = "17azdc37xsbmx13fkfp23vg9lznrv9fh6nhagn64wdq3nhsxm3b6"; }; + # to be removed with next release + patches = [ + (fetchpatch { + url = "https://github.com/emersion/mako/commit/ca8e763f06756136c534b1bbd2e5b536be6b1995.patch"; + sha256 = "09mi7nn2vwc69igxxc6y2m36n3snhsz0ady99yabhrzl17k4ryds"; + }) + ]; + nativeBuildInputs = [ meson ninja pkgconfig scdoc wayland-protocols ]; buildInputs = [ systemd pango cairo gdk_pixbuf wayland ]; From b363ef8258dc4c1d22d966782c9223d6d6e6414f Mon Sep 17 00:00:00 2001 From: xrelkd <46590321+xrelkd@users.noreply.github.com> Date: Thu, 11 Jul 2019 10:46:43 +0800 Subject: [PATCH 027/112] overmind: 2.0.1 -> 2.0.2 --- pkgs/applications/misc/overmind/default.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/misc/overmind/default.nix b/pkgs/applications/misc/overmind/default.nix index c1255b6152ea..918924df0b97 100644 --- a/pkgs/applications/misc/overmind/default.nix +++ b/pkgs/applications/misc/overmind/default.nix @@ -1,25 +1,25 @@ -{ stdenv, buildGoPackage, fetchFromGitHub, tmux, which, makeWrapper }: +{ lib, buildGoPackage, fetchFromGitHub, tmux, which, makeWrapper }: buildGoPackage rec { - name = "overmind-${version}"; - version = "2.0.1"; + pname = "overmind"; + version = "2.0.2"; goPackagePath = "github.com/DarthSim/overmind"; nativeBuildInputs = [ makeWrapper ]; postInstall = '' - wrapProgram "$bin/bin/overmind" --prefix PATH : "${stdenv.lib.makeBinPath [ tmux which ]}" + wrapProgram "$bin/bin/overmind" --prefix PATH : "${lib.makeBinPath [ tmux which ]}" ''; src = fetchFromGitHub { owner = "DarthSim"; - repo = "overmind"; + repo = pname; rev = "v${version}"; - sha256 = "1j3cpcfgacn5ic19sgrs1djn5jr4d7j7lxaz0vbaf414lrl76qz8"; + sha256 = "0cns19gqkfxsiiyfxhb05cjp1iv2fb40x47gp8djrwwzcd1r6zxh"; }; - meta = with stdenv.lib; { - homepage = https://github.com/DarthSim/overmind; + meta = with lib; { + homepage = "https://github.com/DarthSim/overmind"; description = "Process manager for Procfile-based applications and tmux"; license = with licenses; [ mit ]; maintainers = [ maintainers.adisbladis ]; From 841893119d28eeb86f75c4cdbc51472a3a4b1a73 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Wed, 10 Jul 2019 13:02:19 -0700 Subject: [PATCH 028/112] zpaq: fix version and pull from github --- pkgs/tools/archivers/zpaq/default.nix | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/pkgs/tools/archivers/zpaq/default.nix b/pkgs/tools/archivers/zpaq/default.nix index 48b3a91b971a..c99221b36ba1 100644 --- a/pkgs/tools/archivers/zpaq/default.nix +++ b/pkgs/tools/archivers/zpaq/default.nix @@ -1,17 +1,16 @@ -{ stdenv, fetchurl, perl, unzip }: +{ stdenv, fetchFromGitHub, perl, unzip }: + stdenv.mkDerivation rec { name = "zpaq-${version}"; - version = "715"; + version = "7.15"; - src = let - mungedVersion = with stdenv.lib; concatStrings (splitString "." version); - in fetchurl { - sha256 = "066l94yyladlfzri877nh2dhkvspagjn3m5bmv725fmhkr9c4pp8"; - url = "http://mattmahoney.net/dc/zpaq${mungedVersion}.zip"; + src = fetchFromGitHub { + owner = "zpaq"; + repo = "zpaq"; + rev = version; + sha256 = "0v44rlg9gvwc4ggr2lhcqll8ppal3dk7zsg5bqwcc5lg3ynk2pz4"; }; - sourceRoot = "."; - nativeBuildInputs = [ perl /* for pod2man */ ]; buildInputs = [ unzip ]; From 2ad00ba35ff041c75f58ac17f88c3a968dd1b3e6 Mon Sep 17 00:00:00 2001 From: xrelkd <46590321+xrelkd@users.noreply.github.com> Date: Thu, 11 Jul 2019 00:04:32 +0800 Subject: [PATCH 029/112] clair: 2.0.7 -> 2.0.8 --- pkgs/tools/admin/clair/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/admin/clair/default.nix b/pkgs/tools/admin/clair/default.nix index 8f521ed36d09..a6d8a046907f 100644 --- a/pkgs/tools/admin/clair/default.nix +++ b/pkgs/tools/admin/clair/default.nix @@ -2,15 +2,15 @@ buildGoPackage rec { pname = "clair"; - version = "2.0.7"; + version = "2.0.8"; goPackagePath = "github.com/coreos/clair"; src = fetchFromGitHub { owner = "coreos"; - repo = "clair"; + repo = pname; rev = "v${version}"; - sha256 = "0n4pxdw71hd1rxzgf422fvycpjkrxxnvcidys0hpjy7gs88zjz5x"; + sha256 = "1gwn533fdz8daz1db7w7g7mhls7d5a4vndn47blkpbx2yxdwdh62"; }; nativeBuildInputs = [ makeWrapper ]; @@ -22,8 +22,8 @@ buildGoPackage rec { meta = with lib; { description = "Vulnerability Static Analysis for Containers"; - homepage = https://github.com/coreos/clair; + homepage = "https://github.com/coreos/clair"; license = licenses.asl20; - maintainers = [ maintainers.marsam ]; + maintainers = with maintainers; [ marsam ]; }; } From 7a999937716bff4a910fa2bfe471a4d7115b232f Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Wed, 10 Jul 2019 09:16:17 -0400 Subject: [PATCH 030/112] nvidia_x11: 430.26 -> 430.34 --- pkgs/os-specific/linux/nvidia-x11/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/nvidia-x11/default.nix b/pkgs/os-specific/linux/nvidia-x11/default.nix index de6efdb0c2d9..3a80f4aa1de5 100644 --- a/pkgs/os-specific/linux/nvidia-x11/default.nix +++ b/pkgs/os-specific/linux/nvidia-x11/default.nix @@ -22,10 +22,10 @@ rec { beta = stable; stable_430 = generic { - version = "430.26"; - sha256_64bit = "1rnfxl4dxa3jjidfdvfjmg1a8nc787ss15cakrp2wwrn8jlr9av6"; - settingsSha256 = "0rjsj697s9jfls7iz1hs7aqp36ihf3l82yz1x1w9wdvlw94a3nym"; - persistencedSha256 = "1n554i4g37hs49bb631x692ygfncn7a5hzb6mh9kx7hmv69yzazh"; + version = "430.34"; + sha256_64bit = "0c3x25gilibbgazvp20d5sfmmgcf0gfqf024nzzqryxg4m05h39b"; + settingsSha256 = "1xpf9gbpq5xynxm6f401ab09aa243h1sk2vcxvzjwqgcil36zzad"; + persistencedSha256 = "00dd0m87nwqfv9i23bvbqgcz10x9mvfxg9249nvhp4y3ha65rms6"; }; # Last one supporting x86 From 126c5d0be8ae0b9d961d819b35f02d8bfa343994 Mon Sep 17 00:00:00 2001 From: taku0 Date: Tue, 9 Jul 2019 15:12:58 +0900 Subject: [PATCH 031/112] flashplayer: 32.0.0.207 -> 32.0.0.223 --- .../networking/browsers/chromium/plugins.nix | 4 ++-- .../browsers/mozilla-plugins/flashplayer/default.nix | 10 +++++----- .../mozilla-plugins/flashplayer/standalone.nix | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/applications/networking/browsers/chromium/plugins.nix b/pkgs/applications/networking/browsers/chromium/plugins.nix index f6eb283f76ad..eca2bc0d99f7 100644 --- a/pkgs/applications/networking/browsers/chromium/plugins.nix +++ b/pkgs/applications/networking/browsers/chromium/plugins.nix @@ -100,11 +100,11 @@ let flash = stdenv.mkDerivation rec { name = "flashplayer-ppapi-${version}"; - version = "32.0.0.207"; + version = "32.0.0.223"; src = fetchzip { url = "https://fpdownload.adobe.com/pub/flashplayer/pdc/${version}/flash_player_ppapi_linux.x86_64.tar.gz"; - sha256 = "09bbrlnw343ygcibyjfa27r8gjdg1dcxx85d3v4v93wfi29nl789"; + sha256 = "0xm6jcdip4gki267ldw106l5j43im0ji2zjsarvi7n2nvvnwwgnl"; stripRoot = false; }; diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix index 1c8d60fc709c..b4d0b91deac6 100644 --- a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix +++ b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/default.nix @@ -74,7 +74,7 @@ let in stdenv.mkDerivation rec { name = "flashplayer-${version}"; - version = "32.0.0.207"; + version = "32.0.0.223"; src = fetchurl { url = @@ -85,14 +85,14 @@ stdenv.mkDerivation rec { sha256 = if debug then if arch == "x86_64" then - "0v5dlqaapr29qyb2pm57yafnmxdxin7shn1xqsx2sc9xwmvmaw7v" + "165zsh4dzzsy38kc8yxp0jdygk4qid5xd642gchlky7z6fwza223" else - "0ygxcvn6srjg9clayfri86c64inwidp9qk25hbsbyr8m8gghpwqb" + "1by2zqw9xgvpf1jnbf5qjl3kcjn5wxznl44f47f8h2gkgcnrf749" else if arch == "x86_64" then - "1y1c65vfsvapqsl2q6vm75m5jyksjwnfs6f6ijcpg0dmf5f4fypy" + "07hbg98pgpp81v2sr4vw8siava7wkg1r6hg8i6rg00w9mhvn9vcz" else - "1h9samf24l0ix6188p940h7l989nwkzlrvv7qdxczj3p62zzvqfy"; + "1z2nmznmwvg3crdj3gbz2bxvi8dq2jk5yiwk79y90h199nsan1n2"; }; nativeBuildInputs = [ unzip ]; diff --git a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/standalone.nix b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/standalone.nix index 09e59b100f3f..585c0be26d1d 100644 --- a/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/standalone.nix +++ b/pkgs/applications/networking/browsers/mozilla-plugins/flashplayer/standalone.nix @@ -50,7 +50,7 @@ stdenv.mkDerivation rec { name = "flashplayer-standalone-${version}"; - version = "32.0.0.207"; + version = "32.0.0.223"; src = fetchurl { url = @@ -60,9 +60,9 @@ stdenv.mkDerivation rec { "https://fpdownload.macromedia.com/pub/flashplayer/updaters/32/flash_player_sa_linux.x86_64.tar.gz"; sha256 = if debug then - "0z08da6xhjvsxn9xymcnpphap2h0ydj784ms1f950l84rdl4qrr4" + "1f3098vfznnx8d7rimgbalr2728jhzwca9val7pdi9b8yf9labwk" else - "0d2pxggrzamrg143bvic0qa2v70jpplnahihfa4q2rbvy0l3i2pq"; + "005iyajgp55ww25rcyxg5g0kbzddp6izfly9p4agahmzlzv18y4h"; }; nativeBuildInputs = [ unzip ]; From d206b3787f2c57d0f7e762b8605d002b08bba828 Mon Sep 17 00:00:00 2001 From: xrelkd <46590321+xrelkd@users.noreply.github.com> Date: Wed, 10 Jul 2019 11:35:42 +0800 Subject: [PATCH 032/112] acpica-tools: 20190509 -> 20190703 --- pkgs/tools/system/acpica-tools/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/system/acpica-tools/default.nix b/pkgs/tools/system/acpica-tools/default.nix index 662b87f3e859..95fa1047fe54 100644 --- a/pkgs/tools/system/acpica-tools/default.nix +++ b/pkgs/tools/system/acpica-tools/default.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, bison, flex }: stdenv.mkDerivation rec { - name = "acpica-tools-${version}"; - version = "20190509"; + pname = "acpica-tools"; + version = "20190703"; src = fetchurl { url = "https://acpica.org/sites/acpica/files/acpica-unix-${version}.tar.gz"; - sha256 = "06k22kfnjzf3mpvrb7xl2pfnh28q3n8wcgdjchl1j2hik5pan97i"; + sha256 = "031m124a109vv6fx667h4ca2iav0xszrlvif9zcfxcaxbjsn6991"; }; NIX_CFLAGS_COMPILE = "-O3"; From 19f841097f750e521c465ef4522a245f1ceba572 Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Mon, 8 Jul 2019 02:01:03 -0700 Subject: [PATCH 033/112] pythonPackages.msrest: 0.6.7 -> 0.6.8 --- pkgs/development/python-modules/msrest/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/msrest/default.nix b/pkgs/development/python-modules/msrest/default.nix index 77a3e22f75c3..ba3dd00bfe49 100644 --- a/pkgs/development/python-modules/msrest/default.nix +++ b/pkgs/development/python-modules/msrest/default.nix @@ -18,12 +18,12 @@ }: buildPythonPackage rec { - version = "0.6.7"; + version = "0.6.8"; pname = "msrest"; src = fetchPypi { inherit pname version; - sha256 = "07136g3j7zgcvkxki4v6q1p2dm1nzzc28181s8dwic0y4ml8qlq5"; + sha256 = "0yd43fnmfxkvk3idkyn67ziwjgkwkn261kicr3szjibpqjqcpsf9"; }; propagatedBuildInputs = [ From 00898f0adaac797612d9d447cc632a0238a20653 Mon Sep 17 00:00:00 2001 From: Matt Melling Date: Sat, 6 Jul 2019 22:07:40 +0100 Subject: [PATCH 034/112] pythonPackages.spacy: loosen dependency version bounds --- pkgs/development/python-modules/spacy/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/spacy/default.nix b/pkgs/development/python-modules/spacy/default.nix index 80524154f671..178be8bd86ac 100644 --- a/pkgs/development/python-modules/spacy/default.nix +++ b/pkgs/development/python-modules/spacy/default.nix @@ -34,7 +34,9 @@ buildPythonPackage rec { prePatch = '' substituteInPlace setup.py \ - --replace "plac<1.0.0,>=0.9.6" "plac>=0.9.6" + --replace "plac<1.0.0,>=0.9.6" "plac>=0.9.6" \ + --replace "regex==" "regex>=" \ + --replace "wheel>=0.32.0,<0.33.0" "wheel>=0.32.0" ''; propagatedBuildInputs = [ From 36af740c1d85aea485551b74b58c5a2108b57d72 Mon Sep 17 00:00:00 2001 From: xrelkd <46590321+xrelkd@users.noreply.github.com> Date: Tue, 9 Jul 2019 23:16:11 +0800 Subject: [PATCH 035/112] cargo-xbuild: 0.5.12 -> 0.5.13 --- pkgs/development/tools/rust/cargo-xbuild/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-xbuild/default.nix b/pkgs/development/tools/rust/cargo-xbuild/default.nix index 413e1c2debff..2a6c778cc273 100644 --- a/pkgs/development/tools/rust/cargo-xbuild/default.nix +++ b/pkgs/development/tools/rust/cargo-xbuild/default.nix @@ -2,13 +2,13 @@ rustPlatform.buildRustPackage rec { pname = "cargo-xbuild"; - version = "0.5.12"; + version = "0.5.13"; src = fetchFromGitHub { owner = "rust-osdev"; repo = pname; rev = "v${version}"; - sha256 = "1vjsss2zrja4kpr83vw6g0hf9xdx658wjhdiymzndbcf32qrx7x1"; + sha256 = "1y072acbbgic8qqhnjhxwbjflqx78hnwqn8ffq0axfgzhc6bppgk"; }; cargoSha256 = "1r9i79lymfwpbcx2lp509v435qpkl9bqly1ya369p41n5yprrcjv"; From cebff2882f14e4fcbc7ab6748ab3af0d553dcffb Mon Sep 17 00:00:00 2001 From: Elis Hirwing Date: Mon, 8 Jul 2019 08:05:12 +0200 Subject: [PATCH 036/112] phpPackages.phpstan: 0.11.8 -> 0.11.12 Changelog: https://github.com/phpstan/phpstan/releases/tag/0.11.9 Changelog: https://github.com/phpstan/phpstan/releases/tag/0.11.10 Changelog: https://github.com/phpstan/phpstan/releases/tag/0.11.11 Changelog: https://github.com/phpstan/phpstan/releases/tag/0.11.12 --- pkgs/top-level/php-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/php-packages.nix b/pkgs/top-level/php-packages.nix index eb389587c03b..080754b4b1ff 100644 --- a/pkgs/top-level/php-packages.nix +++ b/pkgs/top-level/php-packages.nix @@ -372,12 +372,12 @@ let }; phpstan = mkDerivation rec { - version = "0.11.8"; + version = "0.11.12"; pname = "phpstan"; src = pkgs.fetchurl { url = "https://github.com/phpstan/phpstan/releases/download/${version}/phpstan.phar"; - sha256 = "0xdf0kq5jpbqs6dwyv2fggd3cxjjq16xk5nxz1hgh5d58x5yh14n"; + sha256 = "12k74108f7a3k7ms8n4c625vpxrq75qamw1k1q09ndzmbn3i7c9b"; }; phases = [ "installPhase" ]; From dbb5c800e2e971db6a44fea2fe2869faed5fd950 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 8 Jul 2019 17:05:01 -0500 Subject: [PATCH 037/112] lesspipe: 1.82 -> 1.83 --- pkgs/tools/misc/lesspipe/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/lesspipe/default.nix b/pkgs/tools/misc/lesspipe/default.nix index d5352ec26dcd..9bb46f113fd0 100644 --- a/pkgs/tools/misc/lesspipe/default.nix +++ b/pkgs/tools/misc/lesspipe/default.nix @@ -1,8 +1,8 @@ { stdenv, fetchFromGitHub, substituteAll, perl, file, ncurses }: stdenv.mkDerivation rec { - name = "lesspipe-${version}"; - version = "1.82"; + pname = "lesspipe"; + version = "1.83"; buildInputs = [ perl ]; preConfigure = "patchShebangs ."; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { owner = "wofr06"; repo = "lesspipe"; rev = version; - sha256 = "0vb7bpap8vy003ha10hc7hxl17y47sgdnrjpihgqxkn8k0bfqbbq"; + sha256 = "1vqch6k4fz5pyf8szlnqm3qhlvgs9l4njd13yczjh4kpaxpn0rxb"; }; patches = [ From c763b8db0677b9f43dafd291ad22160f0d8881e0 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 8 Jul 2019 16:58:29 -0500 Subject: [PATCH 038/112] radiotray-ng: 0.2.5 -> 0.2.6 --- pkgs/applications/audio/radiotray-ng/default.nix | 9 +++++---- .../audio/radiotray-ng/no-dl-googletest.patch | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/audio/radiotray-ng/default.nix b/pkgs/applications/audio/radiotray-ng/default.nix index 91d82d686d03..c0186a146bee 100644 --- a/pkgs/applications/audio/radiotray-ng/default.nix +++ b/pkgs/applications/audio/radiotray-ng/default.nix @@ -39,14 +39,14 @@ let pythonInputs = with python2.pkgs; [ python2 lxml ]; in stdenv.mkDerivation rec { - name = "radiotray-ng-${version}"; - version = "0.2.5"; + pname = "radiotray-ng"; + version = "0.2.6"; src = fetchFromGitHub { owner = "ebruck"; repo = "radiotray-ng"; rev = "v${version}"; - sha256 = "1crvpn1mgrv7bd2k683mpgs59785mkrjvmp1f14iyq4qrr0f9zzi"; + sha256 = "0khrfxjas2ldh0kksq7l811srqy16ahjxchvz0hhykx5hykymxlb"; }; nativeBuildInputs = [ cmake pkgconfig wrapGAppsHook makeWrapper ]; @@ -64,9 +64,10 @@ stdenv.mkDerivation rec { patches = [ ./no-dl-googletest.patch ]; postPatch = '' - for x in debian/CMakeLists.txt include/radiotray-ng/common.hpp data/*.desktop; do + for x in package/CMakeLists.txt include/radiotray-ng/common.hpp data/*.desktop; do substituteInPlace $x --replace /usr $out done + substituteInPlace package/CMakeLists.txt --replace /etc/xdg/autostart $out/etc/xdg/autostart # We don't find the radiotray-ng-notification icon otherwise substituteInPlace data/radiotray-ng.desktop \ diff --git a/pkgs/applications/audio/radiotray-ng/no-dl-googletest.patch b/pkgs/applications/audio/radiotray-ng/no-dl-googletest.patch index 3578d2d72b03..3aee97516560 100644 --- a/pkgs/applications/audio/radiotray-ng/no-dl-googletest.patch +++ b/pkgs/applications/audio/radiotray-ng/no-dl-googletest.patch @@ -1,4 +1,4 @@ -From 2ce91cd2244e61d54e0c0a3b26851912240b0667 Mon Sep 17 00:00:00 2001 +From b6f7a9e2e0194c6baed63a33b7beff359080b8d9 Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Sat, 16 Mar 2019 11:40:00 -0500 Subject: [PATCH] don't download googletest @@ -9,7 +9,7 @@ Subject: [PATCH] don't download googletest 2 files changed, 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index fc1b9de..301c266 100644 +index ddba1be..3396705 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,25 +70,7 @@ endif() @@ -51,5 +51,5 @@ index 859c048..58ab5c2 100644 target_include_directories(${target} PRIVATE ${JSONCPP_INCLUDE_DIRS}) gtest_discover_tests(${target}) -- -2.21.GIT +2.22.0 From 0426ae63f8ae0cafe1758196bc684c85f80fe42d Mon Sep 17 00:00:00 2001 From: Charlie Dyson Date: Fri, 5 Jul 2019 20:10:52 +0100 Subject: [PATCH 039/112] fix: #64340 building python wheels in non-standard store --- .../interpreters/python/build-python-package-wheel.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/build-python-package-wheel.nix b/pkgs/development/interpreters/python/build-python-package-wheel.nix index 7be0a4c304a3..e3c4e13c0e2d 100644 --- a/pkgs/development/interpreters/python/build-python-package-wheel.nix +++ b/pkgs/development/interpreters/python/build-python-package-wheel.nix @@ -8,7 +8,7 @@ attrs // { unpackPhase = '' mkdir dist - cp $src dist/"''${src#*-}" + cp "$src" "dist/$(stripHash "$src")" ''; # Wheels are pre-compiled From f72d7c49d58e0ab1ea948e015eeee9b4b5af4036 Mon Sep 17 00:00:00 2001 From: Tom McLaughlin Date: Thu, 11 Jul 2019 01:29:36 -0700 Subject: [PATCH 040/112] Add optional Jupyter kernelspec options from the spec (#55989) --- pkgs/applications/editors/jupyter/kernel.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/editors/jupyter/kernel.nix b/pkgs/applications/editors/jupyter/kernel.nix index 38c61dba751b..b34a956410e1 100644 --- a/pkgs/applications/editors/jupyter/kernel.nix +++ b/pkgs/applications/editors/jupyter/kernel.nix @@ -37,15 +37,15 @@ in installPhase = '' mkdir kernels - ${concatStringsSep "\n" (mapAttrsToList (kernelName: kernel: + ${concatStringsSep "\n" (mapAttrsToList (kernelName: unfilteredKernel: let - config = builtins.toJSON { - display_name = if (kernel.displayName != "") - then kernel.displayName - else kernelName; - argv = kernel.argv; - language = kernel.language; - }; + allowedKernelKeys = ["argv" "displayName" "language" "interruptMode" "env" "metadata" "logo32" "logo64"]; + kernel = traceVal (filterAttrs (n: v: (any (x: x == n) allowedKernelKeys)) unfilteredKernel); + config = builtins.toJSON ( + kernel + // {display_name = if (kernel.displayName != "") then kernel.displayName else kernelName;} + // (optionalAttrs (kernel ? interruptMode) { interrupt_mode = kernel.interruptMode; }) + ); logo32 = if (kernel.logo32 != null) then "ln -s ${kernel.logo32} 'kernels/${kernelName}/logo-32x32.png';" From 95395fbf549908e8fe59922653e9dadd4da4792e Mon Sep 17 00:00:00 2001 From: Paul Myjavec Date: Tue, 9 Jul 2019 16:40:22 +0900 Subject: [PATCH 041/112] saml2aws: 2.10.0 -> 2.15.0 --- pkgs/tools/security/saml2aws/default.nix | 5 +- pkgs/tools/security/saml2aws/deps.nix | 81 ++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/security/saml2aws/default.nix b/pkgs/tools/security/saml2aws/default.nix index 7ccb9efcdd5d..888d3bb4018a 100644 --- a/pkgs/tools/security/saml2aws/default.nix +++ b/pkgs/tools/security/saml2aws/default.nix @@ -2,7 +2,8 @@ buildGoPackage rec { name = "saml2aws-${version}"; - version = "2.10.0"; + pname = "saml2aws"; + version = "2.15.0"; goPackagePath = "github.com/versent/saml2aws"; goDeps = ./deps.nix; @@ -15,7 +16,7 @@ buildGoPackage rec { rev = "v${version}"; owner = "Versent"; repo = "saml2aws"; - sha256 = "00m8x57fgry601w5f9dxnxdqbbqjiv7c0rsx47iv9qsp0w7l50c5"; + sha256 = "0pn4zdzisgan7vvgi7hp8716wsb2x33gq55c7fw1aa2qwy0bq3gp"; }; meta = with stdenv.lib; { diff --git a/pkgs/tools/security/saml2aws/deps.nix b/pkgs/tools/security/saml2aws/deps.nix index 6069f0b184ad..08a26db91b10 100644 --- a/pkgs/tools/security/saml2aws/deps.nix +++ b/pkgs/tools/security/saml2aws/deps.nix @@ -1,5 +1,14 @@ # file generated from Gopkg.lock using dep2nix (https://github.com/nixcloud/dep2nix) [ + { + goPackagePath = "github.com/99designs/keyring"; + fetch = { + type = "git"; + url = "https://github.com/99designs/keyring"; + rev = "82da6802f65f1ac7963cfc3b7c62ae12dab8ee5d"; + sha256 = "105ddy9vkjr6cmcm85qnxxlnsmkx2svm6bd80rzr9n6zyc5hhk7b"; + }; + } { goPackagePath = "github.com/AlecAivazis/survey"; fetch = { @@ -63,6 +72,15 @@ sha256 = "09j8cavbhqqdxjqrkwbc40g8p0i49zf3184rpjm5p2rjbprcghcc"; }; } + { + goPackagePath = "github.com/aulanov/go.dbus"; + fetch = { + type = "git"; + url = "https://github.com/aulanov/go.dbus"; + rev = "25c3068a42a0b50b877953fb249dbcffc6bd1bca"; + sha256 = "0jh4jyxqhsl1rkzabhln7chw1jkzhqw2nn0mw79cmn8fyafi0rgn"; + }; + } { goPackagePath = "github.com/aws/aws-sdk-go"; fetch = { @@ -108,6 +126,15 @@ sha256 = "0d4jfmak5p6lb7n2r6yvf5p1zcw0l8j74kn55ghvr7zr7b7axm6c"; }; } + { + goPackagePath = "github.com/dvsekhvalnov/jose2go"; + fetch = { + type = "git"; + url = "https://github.com/dvsekhvalnov/jose2go"; + rev = "f21a8cedbbae609f623613ec8f81125c243212e6"; + sha256 = "1nzwvk6nqi7nm2wq4mr2q6k5p0qzsl0kmwx7kgkqsg1zh53250ld"; + }; + } { goPackagePath = "github.com/fatih/color"; fetch = { @@ -126,6 +153,33 @@ sha256 = "0fx123601aiqqn0yr9vj6qp1bh8gp240w4qdm76irs73q8dxlk7a"; }; } + { + goPackagePath = "github.com/godbus/dbus"; + fetch = { + type = "git"; + url = "https://github.com/godbus/dbus"; + rev = "2ff6f7ffd60f0f2410b3105864bdd12c7894f844"; + sha256 = "1c107893nbdfc297i9y0smljmqs167mw26i24509qd09dmvr998y"; + }; + } + { + goPackagePath = "github.com/gsterjov/go-libsecret"; + fetch = { + type = "git"; + url = "https://github.com/gsterjov/go-libsecret"; + rev = "a6f4afe4910cad8688db3e0e9b9ac92ad22d54e1"; + sha256 = "09zaiadnll83vs22ib89agg7anj0blw5fywvmckxllsgif6ak6v7"; + }; + } + { + goPackagePath = "github.com/headzoo/surf"; + fetch = { + type = "git"; + url = "https://github.com/headzoo/surf"; + rev = "a4a8c16c01dc47ef3a25326d21745806f3e6797a"; + sha256 = "1dzcp0wdh3qmm5s5hixk9vj2s2kcvkpbhjdwz7kh2crvnavdgwh6"; + }; + } { goPackagePath = "github.com/jmespath/go-jmespath"; fetch = { @@ -135,6 +189,15 @@ sha256 = "1vv6hph8j6xgv7gwl9vvhlsaaqsm22sxxqmgmldi4v11783pc1ld"; }; } + { + goPackagePath = "github.com/keybase/go-keychain"; + fetch = { + type = "git"; + url = "https://github.com/keybase/go-keychain"; + rev = "f1daa725cce4049b1715f1e97d6a51880e401e70"; + sha256 = "0wk2zc5f5i5mhdkbyzd60wzc64vybds6kxlmwc41k8mx6d1hxdm6"; + }; + } { goPackagePath = "github.com/mattn/go-colorable"; fetch = { @@ -189,6 +252,15 @@ sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw"; }; } + { + goPackagePath = "github.com/robertkrimen/otto"; + fetch = { + type = "git"; + url = "https://github.com/robertkrimen/otto"; + rev = "15f95af6e78dcd2030d8195a138bd88d4f403546"; + sha256 = "07j7l340lmqwpfscwyb8llk3k37flvs20a4a8vzc85f16xyd9npf"; + }; + } { goPackagePath = "github.com/sirupsen/logrus"; fetch = { @@ -288,4 +360,13 @@ sha256 = "0fx123601aiqqn0yr9vj6qp1bh8gp240w4qdm76irs73q8dxlk7a"; }; } + { + goPackagePath = "gopkg.in/sourcemap.v1"; + fetch = { + type = "git"; + url = "https://github.com/go-sourcemap/sourcemap"; + rev = "6e83acea0053641eff084973fee085f0c193c61a"; + sha256 = "08rf2dl13hbnm3fq2cm0nnsspy9fhf922ln23cz5463cv7h62as4"; + }; + } ] \ No newline at end of file From 39de81af3d3d3b4edd5ddeedb0e4e145a49bfd13 Mon Sep 17 00:00:00 2001 From: 0x4A6F <0x4A6F@users.noreply.github.com> Date: Thu, 30 May 2019 21:31:28 +0000 Subject: [PATCH 042/112] routinator: init at 0.4.0 --- pkgs/servers/routinator/default.nix | 23 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 pkgs/servers/routinator/default.nix diff --git a/pkgs/servers/routinator/default.nix b/pkgs/servers/routinator/default.nix new file mode 100644 index 000000000000..76e469fe6e01 --- /dev/null +++ b/pkgs/servers/routinator/default.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchFromGitHub, rustPlatform }: + +rustPlatform.buildRustPackage rec { + pname = "routinator"; + version = "0.4.0"; + + src = fetchFromGitHub { + owner = "NLnetLabs"; + repo = pname; + rev = "v${version}"; + sha256 = "0ldnak1jszfkwya0aci7ns3293y45jp7iirilnqypklsmmm108r4"; + }; + + cargoSha256 = "0yx5sanblalh5q06cn0mrf5bc5518y1awmvyi5yhh55cz6bg6h1m"; + + meta = with stdenv.lib; { + description = "An RPKI Validator written in Rust"; + homepage = "https://github.com/NLnetLabs/routinator"; + license = licenses.bsd3; + maintainers = [ maintainers."0x4A6F" ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 45b72d011d20..58e74ac2db46 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1848,6 +1848,8 @@ in roundcubePlugins = dontRecurseIntoAttrs (callPackage ../servers/roundcube/plugins { }); + routinator = callPackage ../servers/routinator { }; + rsbep = callPackage ../tools/backup/rsbep { }; rsyslog = callPackage ../tools/system/rsyslog { From 2ae58dfc7906c68cf017178530754cc18aadcfd7 Mon Sep 17 00:00:00 2001 From: Craig Hall Date: Sun, 12 May 2019 16:45:20 +0100 Subject: [PATCH 043/112] nixos/dhcpcd: Before network-online.target Instead of network.target. Fixes #60900 (delayed boot). --- nixos/modules/services/networking/dhcpcd.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/dhcpcd.nix b/nixos/modules/services/networking/dhcpcd.nix index c217ccaa405a..7b2786034552 100644 --- a/nixos/modules/services/networking/dhcpcd.nix +++ b/nixos/modules/services/networking/dhcpcd.nix @@ -162,7 +162,7 @@ in wantedBy = [ "multi-user.target" ] ++ optional (!hasDefaultGatewaySet) "network-online.target"; wants = [ "network.target" "systemd-udev-settle.service" ]; - before = [ "network.target" ]; + before = [ "network-online.target" ]; after = [ "systemd-udev-settle.service" ]; # Stopping dhcpcd during a reconfiguration is undesirable From 48a28c399c3976983eda80890258b0f8913f6f43 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 11 Jul 2019 13:39:30 +0200 Subject: [PATCH 044/112] jupyter-kernel: remove traceVal `traceVal` is only for debugging and should not be delivered. Partial revert of f72d7c49d58e0ab1ea948e015eeee9b4b5af4036, fixes ofBorg eval. --- pkgs/applications/editors/jupyter/kernel.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/editors/jupyter/kernel.nix b/pkgs/applications/editors/jupyter/kernel.nix index b34a956410e1..4a079625d183 100644 --- a/pkgs/applications/editors/jupyter/kernel.nix +++ b/pkgs/applications/editors/jupyter/kernel.nix @@ -40,7 +40,7 @@ in ${concatStringsSep "\n" (mapAttrsToList (kernelName: unfilteredKernel: let allowedKernelKeys = ["argv" "displayName" "language" "interruptMode" "env" "metadata" "logo32" "logo64"]; - kernel = traceVal (filterAttrs (n: v: (any (x: x == n) allowedKernelKeys)) unfilteredKernel); + kernel = filterAttrs (n: v: (any (x: x == n) allowedKernelKeys)) unfilteredKernel; config = builtins.toJSON ( kernel // {display_name = if (kernel.displayName != "") then kernel.displayName else kernelName;} From ab3e932325a674883c2a3e15447194a05ed6c449 Mon Sep 17 00:00:00 2001 From: Georges Dubus Date: Thu, 11 Jul 2019 13:13:18 +0200 Subject: [PATCH 045/112] doc: fix stdenv.xml A duplicated opening tag caused the linter to fail, blocking the whole nixpkgs-unstable channel. --- doc/stdenv.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/doc/stdenv.xml b/doc/stdenv.xml index 1dd8ea8cabab..fbb84b03a8d5 100644 --- a/doc/stdenv.xml +++ b/doc/stdenv.xml @@ -997,7 +997,6 @@ passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ] - dontMakeSourcesWritable From 7f363b034e3db9d08969c261ef2044c5948c94a0 Mon Sep 17 00:00:00 2001 From: Venkateswara Rao Mandela Date: Sun, 19 Aug 2018 23:17:21 +0530 Subject: [PATCH 046/112] nixos/install-grub: include child configs in grub menu Add configs listed under the fine-tune subdirectory to the grub menu. Use specified configuration name for the entry if available. --- .../system/boot/loader/grub/install-grub.pl | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/nixos/modules/system/boot/loader/grub/install-grub.pl b/nixos/modules/system/boot/loader/grub/install-grub.pl index a36b3c180eb4..a09c5dc47618 100644 --- a/nixos/modules/system/boot/loader/grub/install-grub.pl +++ b/nixos/modules/system/boot/loader/grub/install-grub.pl @@ -407,6 +407,29 @@ addEntry("NixOS - Default", $defaultConfig); $conf .= "$extraEntries\n" unless $extraEntriesBeforeNixOS; +# Find all the children of the current default configuration +# Do not search for grand children +my @links = sort (glob "$defaultConfig/fine-tune/*"); +foreach my $link (@links) { + + my $entryName = ""; + + my $cfgName = readFile("$link/configuration-name"); + + my $date = strftime("%F", localtime(lstat($link)->mtime)); + my $version = + -e "$link/nixos-version" + ? readFile("$link/nixos-version") + : basename((glob(dirname(Cwd::abs_path("$link/kernel")) . "/lib/modules/*"))[0]); + + if ($cfgName) { + $entryName = $cfgName; + } else { + $entryName = "($date - $version)"; + } + addEntry("NixOS - $entryName", $link); +} + my $grubBootPath = $grubBoot->path; # extraEntries could refer to @bootRoot@, which we have to substitute $conf =~ s/\@bootRoot\@/$grubBootPath/g; From c400ab55d692d862a938b0c9d02fdc1cd402c6ff Mon Sep 17 00:00:00 2001 From: Venkateswara Rao Mandela Date: Thu, 7 Mar 2019 15:00:11 +0530 Subject: [PATCH 047/112] nixos/tests: installer: restructure simple test data --- nixos/tests/installer.nix | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 07659b60b3b8..2db9d283f2bd 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -304,6 +304,22 @@ let ''; }; + # The (almost) simplest partitioning scheme: a swap partition and + # one big filesystem partition. + simple-test-config = { createPartitions = + '' + $machine->succeed( + "flock /dev/vda parted --script /dev/vda -- mklabel msdos" + . " mkpart primary linux-swap 1M 1024M" + . " mkpart primary ext2 1024M -1s", + "udevadm settle", + "mkswap /dev/vda1 -L swap", + "swapon -L swap", + "mkfs.ext3 -L nixos /dev/vda2", + "mount LABEL=nixos /mnt", + ); + ''; + }; in { @@ -312,21 +328,7 @@ in { # The (almost) simplest partitioning scheme: a swap partition and # one big filesystem partition. - simple = makeInstallerTest "simple" - { createPartitions = - '' - $machine->succeed( - "flock /dev/vda parted --script /dev/vda -- mklabel msdos" - . " mkpart primary linux-swap 1M 1024M" - . " mkpart primary ext2 1024M -1s", - "udevadm settle", - "mkswap /dev/vda1 -L swap", - "swapon -L swap", - "mkfs.ext3 -L nixos /dev/vda2", - "mount LABEL=nixos /mnt", - ); - ''; - }; + simple = makeInstallerTest "simple" simple-test-config; # Simple GPT/UEFI configuration using systemd-boot with 3 partitions: ESP, swap & root filesystem simpleUefiSystemdBoot = makeInstallerTest "simpleUefiSystemdBoot" From b08400a4d2b81e0e680ce08f502c2d2b1c43367f Mon Sep 17 00:00:00 2001 From: Venkateswara Rao Mandela Date: Thu, 7 Mar 2019 15:06:40 +0530 Subject: [PATCH 048/112] nixos/tests: installer: restructure simpleUefiGrub test data --- nixos/tests/installer.nix | 45 ++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 2db9d283f2bd..36206b199e73 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -321,6 +321,28 @@ let ''; }; + simple-uefi-grub-config = + { createPartitions = + '' + $machine->succeed( + "flock /dev/vda parted --script /dev/vda -- mklabel gpt" + . " mkpart ESP fat32 1M 50MiB" # /boot + . " set 1 boot on" + . " mkpart primary linux-swap 50MiB 1024MiB" + . " mkpart primary ext2 1024MiB -1MiB", # / + "udevadm settle", + "mkswap /dev/vda2 -L swap", + "swapon -L swap", + "mkfs.ext3 -L nixos /dev/vda3", + "mount LABEL=nixos /mnt", + "mkfs.vfat -n BOOT /dev/vda1", + "mkdir -p /mnt/boot", + "mount LABEL=BOOT /mnt/boot", + ); + ''; + bootLoader = "grub"; + grubUseEfi = true; + }; in { # !!! `parted mkpart' seems to silently create overlapping partitions. @@ -353,28 +375,7 @@ in { bootLoader = "systemd-boot"; }; - simpleUefiGrub = makeInstallerTest "simpleUefiGrub" - { createPartitions = - '' - $machine->succeed( - "flock /dev/vda parted --script /dev/vda -- mklabel gpt" - . " mkpart ESP fat32 1M 50MiB" # /boot - . " set 1 boot on" - . " mkpart primary linux-swap 50MiB 1024MiB" - . " mkpart primary ext2 1024MiB -1MiB", # / - "udevadm settle", - "mkswap /dev/vda2 -L swap", - "swapon -L swap", - "mkfs.ext3 -L nixos /dev/vda3", - "mount LABEL=nixos /mnt", - "mkfs.vfat -n BOOT /dev/vda1", - "mkdir -p /mnt/boot", - "mount LABEL=BOOT /mnt/boot", - ); - ''; - bootLoader = "grub"; - grubUseEfi = true; - }; + simpleUefiGrub = makeInstallerTest "simpleUefiGrub" simple-uefi-grub-config; # Same as the previous, but now with a separate /boot partition. separateBoot = makeInstallerTest "separateBoot" From 02c9e49eed29e731daf28932e1219d9bc409bfaa Mon Sep 17 00:00:00 2001 From: xrelkd <46590321+xrelkd@users.noreply.github.com> Date: Thu, 11 Jul 2019 20:08:25 +0800 Subject: [PATCH 049/112] cargo-xbuild: 0.5.13 -> 0.5.14 --- pkgs/development/tools/rust/cargo-xbuild/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-xbuild/default.nix b/pkgs/development/tools/rust/cargo-xbuild/default.nix index 2a6c778cc273..b349fbc6bd99 100644 --- a/pkgs/development/tools/rust/cargo-xbuild/default.nix +++ b/pkgs/development/tools/rust/cargo-xbuild/default.nix @@ -2,13 +2,13 @@ rustPlatform.buildRustPackage rec { pname = "cargo-xbuild"; - version = "0.5.13"; + version = "0.5.14"; src = fetchFromGitHub { owner = "rust-osdev"; repo = pname; - rev = "v${version}"; - sha256 = "1y072acbbgic8qqhnjhxwbjflqx78hnwqn8ffq0axfgzhc6bppgk"; + rev = version; + sha256 = "1f87rz17bdpdipc9x2j4gq1zq181gcshhn7vc9pnn6f487hz0bgq"; }; cargoSha256 = "1r9i79lymfwpbcx2lp509v435qpkl9bqly1ya369p41n5yprrcjv"; From bc68f85326cc6dcd1b5785005649dfe10a31c827 Mon Sep 17 00:00:00 2001 From: Venkateswara Rao Mandela Date: Thu, 7 Mar 2019 15:08:28 +0530 Subject: [PATCH 050/112] nixos/tests: add test for showing child configuration in grub menu - Create a child configuration named "Work" with an extra config file. - Name the default configuration as "Home" :-) - Once the VM is setup, reboot and verify that it has booted into default configuration. - Reboot into the "Work" configuration via grub. - Verify that we have booted into the "Work" configuration and that the extra config file is present. This test works for the simple grub configuration and simple UEFI Grub configuration. UEFI Systemd is not included in the test. --- nixos/tests/installer.nix | 71 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 70 insertions(+), 1 deletion(-) diff --git a/nixos/tests/installer.nix b/nixos/tests/installer.nix index 36206b199e73..a136678c6eff 100644 --- a/nixos/tests/installer.nix +++ b/nixos/tests/installer.nix @@ -67,6 +67,7 @@ let # partitions and filesystems. testScriptFun = { bootLoader, createPartitions, grubVersion, grubDevice, grubUseEfi , grubIdentifier, preBootCommands, extraConfig + , testCloneConfig }: let iface = if grubVersion == 1 then "ide" else "virtio"; @@ -85,6 +86,7 @@ let in if !isEfi && !(pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) then throw "Non-EFI boot methods are only supported on i686 / x86_64" else '' + $machine->start; # Make sure that we get a login prompt etc. @@ -185,6 +187,43 @@ let ${preBootCommands} $machine->waitForUnit("network.target"); $machine->shutdown; + + # Tests for validating clone configuration entries in grub menu + ${optionalString testCloneConfig '' + # Reboot Machine + $machine = createMachine({ ${hdFlags} qemuFlags => "${qemuFlags}", name => "clone-default-config" }); + ${preBootCommands} + $machine->waitForUnit("multi-user.target"); + + # Booted configuration name should be Home + # This is not the name that shows in the grub menu. + # The default configuration is always shown as "Default" + $machine->succeed("cat /run/booted-system/configuration-name >&2"); + $machine->succeed("cat /run/booted-system/configuration-name | grep Home"); + + # We should find **not** a file named /etc/gitconfig + $machine->fail("test -e /etc/gitconfig"); + + # Set grub to boot the second configuration + $machine->succeed("grub-reboot 1"); + + $machine->shutdown; + + # Reboot Machine + $machine = createMachine({ ${hdFlags} qemuFlags => "${qemuFlags}", name => "clone-alternate-config" }); + ${preBootCommands} + + $machine->waitForUnit("multi-user.target"); + # Booted configuration name should be Work + $machine->succeed("cat /run/booted-system/configuration-name >&2"); + $machine->succeed("cat /run/booted-system/configuration-name | grep Work"); + + # We should find a file named /etc/gitconfig + $machine->succeed("test -e /etc/gitconfig"); + + $machine->shutdown; + ''} + ''; @@ -194,6 +233,7 @@ let , bootLoader ? "grub" # either "grub" or "systemd-boot" , grubVersion ? 2, grubDevice ? "/dev/vda", grubIdentifier ? "uuid", grubUseEfi ? false , enableOCR ? false, meta ? {} + , testCloneConfig ? false }: makeTest { inherit enableOCR; @@ -269,7 +309,8 @@ let testScript = testScriptFun { inherit bootLoader createPartitions preBootCommands - grubVersion grubDevice grubIdentifier grubUseEfi extraConfig; + grubVersion grubDevice grubIdentifier grubUseEfi extraConfig + testCloneConfig; }; }; @@ -343,6 +384,28 @@ let bootLoader = "grub"; grubUseEfi = true; }; + + clone-test-extraconfig = { extraConfig = + '' + environment.systemPackages = [ pkgs.grub2 ]; + boot.loader.grub.configurationName = "Home"; + nesting.clone = [ + { + boot.loader.grub.configurationName = lib.mkForce "Work"; + + environment.etc = { + "gitconfig".text = " + [core] + gitproxy = none for work.com + "; + }; + } + ]; + ''; + testCloneConfig = true; + }; + + in { # !!! `parted mkpart' seems to silently create overlapping partitions. @@ -352,6 +415,9 @@ in { # one big filesystem partition. simple = makeInstallerTest "simple" simple-test-config; + # Test cloned configurations with the simple grub configuration + simpleClone = makeInstallerTest "simpleClone" (simple-test-config // clone-test-extraconfig); + # Simple GPT/UEFI configuration using systemd-boot with 3 partitions: ESP, swap & root filesystem simpleUefiSystemdBoot = makeInstallerTest "simpleUefiSystemdBoot" { createPartitions = @@ -377,6 +443,9 @@ in { simpleUefiGrub = makeInstallerTest "simpleUefiGrub" simple-uefi-grub-config; + # Test cloned configurations with the uefi grub configuration + simpleUefiGrubClone = makeInstallerTest "simpleUefiGrubClone" (simple-uefi-grub-config // clone-test-extraconfig); + # Same as the previous, but now with a separate /boot partition. separateBoot = makeInstallerTest "separateBoot" { createPartitions = From a5b4ebd47fe8075aaacce06a679b4861741a661e Mon Sep 17 00:00:00 2001 From: Klaas van Schelven Date: Fri, 17 May 2019 14:15:23 +0200 Subject: [PATCH 051/112] pythonPackages.swagger-spec-validator: init at 2.4.3 --- .../swagger-spec-validator/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/swagger-spec-validator/default.nix diff --git a/pkgs/development/python-modules/swagger-spec-validator/default.nix b/pkgs/development/python-modules/swagger-spec-validator/default.nix new file mode 100644 index 000000000000..dc4b99c40a7a --- /dev/null +++ b/pkgs/development/python-modules/swagger-spec-validator/default.nix @@ -0,0 +1,37 @@ +{ lib, buildPythonPackage, fetchFromGitHub, pyyaml, jsonschema, six, pytest, mock }: + +buildPythonPackage rec { + pname = "swagger-spec-validator"; + version = "2.4.3"; + + src = fetchFromGitHub { + owner = "Yelp"; + repo = "swagger_spec_validator"; + rev = "v" + version; + sha256 = "02f8amc6iq2clxxmrz8hirbb57sizaxijp0higqy16shk63ibalw"; + }; + + checkInputs = [ + pytest + mock + ]; + + checkPhase = '' + pytest tests + ''; + + propagatedBuildInputs = [ + pyyaml + jsonschema + six + ]; + + meta = with lib; { + homepage = "https://github.com/Yelp/swagger_spec_validator"; + license = licenses.asl20; + description = "Validation of Swagger specifications"; + maintainers = with maintainers; [ vanschelven ]; + }; +} + + diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ace40b3b2095..a7c05bc2e596 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4898,6 +4898,8 @@ in { svgwrite = callPackage ../development/python-modules/svgwrite { }; + swagger-spec-validator = callPackage ../development/python-modules/swagger-spec-validator { }; + freezegun = callPackage ../development/python-modules/freezegun { }; taskw = callPackage ../development/python-modules/taskw { }; From 2d70cb58b29d29c10492afffbb60a840eb206ff8 Mon Sep 17 00:00:00 2001 From: xrelkd <46590321+xrelkd@users.noreply.github.com> Date: Thu, 11 Jul 2019 00:12:38 +0800 Subject: [PATCH 052/112] archiver: 3.0.0 -> 3.2.0 --- pkgs/applications/misc/archiver/default.nix | 20 ++++---- pkgs/applications/misc/archiver/deps.nix | 56 --------------------- 2 files changed, 9 insertions(+), 67 deletions(-) delete mode 100644 pkgs/applications/misc/archiver/deps.nix diff --git a/pkgs/applications/misc/archiver/default.nix b/pkgs/applications/misc/archiver/default.nix index 25fafb604c33..03f534e1a4da 100644 --- a/pkgs/applications/misc/archiver/default.nix +++ b/pkgs/applications/misc/archiver/default.nix @@ -1,26 +1,24 @@ -{ buildGoPackage +{ buildGoModule , fetchFromGitHub , lib }: -buildGoPackage rec { - name = "archiver-${version}"; - version = "3.0.0"; - - goPackagePath = "github.com/mholt/archiver"; +buildGoModule rec { + pname = "archiver"; + version = "3.2.0"; src = fetchFromGitHub { owner = "mholt"; - repo = "archiver"; + repo = pname; rev = "v${version}"; - sha256 = "1wngv51333h907mp6nbzd9dq6r0x06mag2cij92912jcbzy0q8bk"; + sha256 = "1kq2cyhbniwdabk426j493cs8d4nj35vmznm9031rrdd9ln5h9gl"; }; - goDeps = ./deps.nix; + modSha256 = "13vwgqpw7ypq6mrvwmnl8n38x0h89ymryrrzkf7ya478fp00vclj"; meta = with lib; { - description = "Easily create and extract .zip, .tar, .tar.gz, .tar.bz2, .tar.xz, .tar.lz4, .tar.sz, and .rar (extract-only) files with Go"; - homepage = https://github.com/mholt/archiver; + description = "Easily create & extract archives, and compress & decompress files of various formats"; + homepage = "https://github.com/mholt/archiver"; license = licenses.mit; maintainers = with maintainers; [ kalbasit ]; platforms = platforms.all; diff --git a/pkgs/applications/misc/archiver/deps.nix b/pkgs/applications/misc/archiver/deps.nix deleted file mode 100644 index 4b14fd47711b..000000000000 --- a/pkgs/applications/misc/archiver/deps.nix +++ /dev/null @@ -1,56 +0,0 @@ -[ - { - goPackagePath = "github.com/dsnet/compress"; - fetch = { - type = "git"; - url = "https://github.com/dsnet/compress"; - rev = "cc9eb1d7ad760af14e8f918698f745e80377af4f"; - sha256 = "159liclywmyb6zx88ga5gn42hfl4cpk1660zss87fkx31hdq9fgx"; - }; - } - { - goPackagePath = "github.com/golang/snappy"; - fetch = { - type = "git"; - url = "https://github.com/golang/snappy"; - rev = "2e65f85255dbc3072edf28d6b5b8efc472979f5a"; - sha256 = "05w6mpc4qcy0pv8a2bzng8nf4s5rf5phfang4jwy9rgf808q0nxf"; - }; - } - { - goPackagePath = "github.com/nwaples/rardecode"; - fetch = { - type = "git"; - url = "https://github.com/nwaples/rardecode"; - rev = "197ef08ef68c4454ae5970a9c2692d6056ceb8d7"; - sha256 = "0vvijw7va283dbdvnf4bgkn7bjngxqzk1rzdpy8sl343r62bmh4g"; - }; - } - { - goPackagePath = "github.com/pierrec/lz4"; - fetch = { - type = "git"; - url = "https://github.com/pierrec/lz4"; - rev = "623b5a2f4d2a41e411730dcdfbfdaeb5c0c4564e"; - sha256 = "1hhf7vyz5irrqs7ixdmvsvzmy9izv3ha8jbyy0cs486h61nzqkki"; - }; - } - { - goPackagePath = "github.com/ulikunitz/xz"; - fetch = { - type = "git"; - url = "https://github.com/ulikunitz/xz"; - rev = "590df8077fbcb06ad62d7714da06c00e5dd2316d"; - sha256 = "07mivr4aiw3b8qzwajsxyjlpbkf3my4xx23lv0yryc4pciam5lhy"; - }; - } - { - goPackagePath = "github.com/xi2/xz"; - fetch = { - type = "git"; - url = "https://github.com/xi2/xz"; - rev = "48954b6210f8d154cb5f8484d3a3e1f83489309e"; - sha256 = "178r0fa2dpzxf0sabs7dn0c8fa7vs87zlxk6spkn374ls9pir7nq"; - }; - } -] From e2b348defe4b72f45b720e3ad565a5de28295e86 Mon Sep 17 00:00:00 2001 From: Klaas van Schelven Date: Fri, 17 May 2019 14:42:21 +0200 Subject: [PATCH 053/112] pythonPackages.pytest-flask: init at 0.15.0 --- .../python-modules/pytest-flask/default.nix | 31 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 33 insertions(+) create mode 100644 pkgs/development/python-modules/pytest-flask/default.nix diff --git a/pkgs/development/python-modules/pytest-flask/default.nix b/pkgs/development/python-modules/pytest-flask/default.nix new file mode 100644 index 000000000000..b58b934dadc4 --- /dev/null +++ b/pkgs/development/python-modules/pytest-flask/default.nix @@ -0,0 +1,31 @@ +{ stdenv, buildPythonPackage, fetchPypi, pytest, flask, werkzeug, setuptools_scm }: + +buildPythonPackage rec { + pname = "pytest-flask"; + version = "0.15.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "0jdzrib94vwfpl8524h34aqzqndh3h4xn706v32xh412c8dphx6q"; + }; + + doCheck = false; + + buildInputs = [ + pytest + ]; + + propagatedBuildInputs = [ + flask + werkzeug + ]; + + nativeBuildInputs = [ setuptools_scm ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/pytest-dev/pytest-flask/"; + license = licenses.mit; + description = "A set of py.test fixtures to test Flask applications"; + maintainers = with maintainers; [ vanschelven ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 575237b1ebf2..06fbdf27226b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -808,6 +808,8 @@ in { pytest-env = callPackage ../development/python-modules/pytest-env { }; + pytest-flask = callPackage ../development/python-modules/pytest-flask { }; + pytest-mypy = callPackage ../development/python-modules/pytest-mypy { }; pytest-pylint = callPackage ../development/python-modules/pytest-pylint { }; From 267c8d6b2fea05bc811c8e2c2f4529b1436eeb9a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 11 Jul 2019 15:48:05 +0200 Subject: [PATCH 054/112] fetchurl (and derived functions): Support SRI hashes E.g. fetchFromGitHub { owner = "NixOS"; repo = "nix"; rev = "ad42a784690449873fccb20192bd2150da81c56d"; hash = "sha256-ZXeadXUJMXV5lSLz6TOBeL/SSOVwQ8ywxU5AFMCnbRU="; } --- pkgs/build-support/fetchurl/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/build-support/fetchurl/default.nix b/pkgs/build-support/fetchurl/default.nix index 3ce90cbeab3a..6300587a7d15 100644 --- a/pkgs/build-support/fetchurl/default.nix +++ b/pkgs/build-support/fetchurl/default.nix @@ -49,8 +49,11 @@ in # first element of `urls'). name ? "" - # Different ways of specifying the hash. -, outputHash ? "" +, # SRI hash. + hash ? "" + +, # Legacy ways of specifying the hash. + outputHash ? "" , outputHashAlgo ? "" , md5 ? "" , sha1 ? "" @@ -103,7 +106,8 @@ let else throw "fetchurl requires either `url` or `urls` to be set"; hash_ = - if md5 != "" then throw "fetchurl does not support md5 anymore, please use sha256 or sha512" + if hash != "" then { outputHashAlgo = null; outputHash = hash; } + else if md5 != "" then throw "fetchurl does not support md5 anymore, please use sha256 or sha512" else if (outputHash != "" && outputHashAlgo != "") then { inherit outputHashAlgo outputHash; } else if sha512 != "" then { outputHashAlgo = "sha512"; outputHash = sha512; } else if sha256 != "" then { outputHashAlgo = "sha256"; outputHash = sha256; } From eb0332db399e54ef83496faebe3d39adc1ea133f Mon Sep 17 00:00:00 2001 From: Emmanuel Rosa Date: Sat, 6 Jul 2019 16:56:55 +0700 Subject: [PATCH 055/112] betterlockscreen: add missing runtime dependencies --- pkgs/misc/screensavers/betterlockscreen/default.nix | 10 +++++----- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pkgs/misc/screensavers/betterlockscreen/default.nix b/pkgs/misc/screensavers/betterlockscreen/default.nix index ffa8934cd8bb..cd5db3067f41 100644 --- a/pkgs/misc/screensavers/betterlockscreen/default.nix +++ b/pkgs/misc/screensavers/betterlockscreen/default.nix @@ -1,6 +1,6 @@ { stdenv, makeWrapper, fetchFromGitHub, - imagemagick, i3lock-color, xdpyinfo, xrandr, bc, feh + imagemagick, i3lock-color, xdpyinfo, xrandr, bc, feh, procps, xrdb }: stdenv.mkDerivation rec { @@ -18,11 +18,11 @@ stdenv.mkDerivation rec { patches = [ ./replace-i3lock.patch ]; - installPhase = - let - PATH = + installPhase = + let + PATH = stdenv.lib.makeBinPath - [imagemagick i3lock-color xdpyinfo xrandr bc feh]; + [imagemagick i3lock-color xdpyinfo xrandr bc feh procps xrdb]; in '' mkdir -p $out/bin cp betterlockscreen $out/bin/betterlockscreen diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 93a14e062190..eb58ed9f7fba 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18470,7 +18470,9 @@ in i3lock-pixeled = callPackage ../misc/screensavers/i3lock-pixeled { }; - betterlockscreen = callPackage ../misc/screensavers/betterlockscreen { }; + betterlockscreen = callPackage ../misc/screensavers/betterlockscreen { + inherit (xorg) xrdb; + }; i3minator = callPackage ../tools/misc/i3minator { }; From a745dfac15ace76e521a8d8c0d419a2f59919969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Thu, 11 Jul 2019 16:33:52 +0200 Subject: [PATCH 056/112] pythonPackages.thinc: 7.0.4 -> 7.0.6 7.0.5 and 7.0.6 contain fixes for pickle, unflatten, and threading. https://github.com/explosion/thinc/releases/tag/v7.0.5 https://github.com/explosion/thinc/releases/tag/v7.0.6 Add myself to the list of maintainers, since I seem to be maintaining this ;). --- pkgs/development/python-modules/thinc/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/thinc/default.nix b/pkgs/development/python-modules/thinc/default.nix index 9cb25af7a92e..ebca1346dfb3 100644 --- a/pkgs/development/python-modules/thinc/default.nix +++ b/pkgs/development/python-modules/thinc/default.nix @@ -28,11 +28,11 @@ buildPythonPackage rec { pname = "thinc"; - version = "7.0.4"; + version = "7.0.6"; src = fetchPypi { inherit pname version; - sha256 = "14v8ygjrkj63dwd4pi490ld6i2d8n8wzcf15hnacjjfwij93pa1q"; + sha256 = "12d0766z7ksqpqrvldi46mx0z4zsbgncda4fpvxra1d6vbchf8ba"; }; buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ @@ -81,6 +81,6 @@ buildPythonPackage rec { description = "Practical Machine Learning for NLP in Python"; homepage = https://github.com/explosion/thinc; license = licenses.mit; - maintainers = with maintainers; [ aborsu sdll ]; + maintainers = with maintainers; [ aborsu danieldk sdll ]; }; } From ed056fc87eb443e38bd42707f8e3c8ee6106ac76 Mon Sep 17 00:00:00 2001 From: Roman Kashitsyn Date: Thu, 11 Jul 2019 14:29:43 +0200 Subject: [PATCH 057/112] pythonPackages.sphinxcontrib_plantuml: use top-level plantuml plantuml declared in python packages implicitly captures graphviz python library instead of the top-level package and thus doesn't work property after installation, trying to access /nix/store/-python2.7-graphviz-0.10.1/bin/dot and failing to find it. --- pkgs/top-level/python-packages.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8d7976421aff..65179adf5c27 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -644,8 +644,6 @@ in { pims = callPackage ../development/python-modules/pims { }; - plantuml = callPackage ../tools/misc/plantuml { }; - poetry = callPackage ../development/python-modules/poetry { }; pplpy = callPackage ../development/python-modules/pplpy { }; @@ -4876,7 +4874,9 @@ in { sphinxcontrib_newsfeed = callPackage ../development/python-modules/sphinxcontrib_newsfeed { }; - sphinxcontrib_plantuml = callPackage ../development/python-modules/sphinxcontrib_plantuml { }; + sphinxcontrib_plantuml = callPackage ../development/python-modules/sphinxcontrib_plantuml { + inherit (pkgs) plantuml; + }; sphinxcontrib-spelling = callPackage ../development/python-modules/sphinxcontrib-spelling { }; From f633bf64e9b1f4c75e8e00a755f9d35c6abfb3fe Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Mon, 25 Feb 2019 09:15:49 -0600 Subject: [PATCH 058/112] fwupd: 1.2.3 -> 1.2.8 * use C.UTF-8 instead of en_US * refresh sysconfdir_install patch * extend to vendor-directory.conf * update sysconfdir_install patch * update file listing --- ...d-option-for-installation-sysconfdir.patch | 83 +++++++------------ .../linux/firmware/fwupd/default.nix | 15 ++-- 2 files changed, 39 insertions(+), 59 deletions(-) diff --git a/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch b/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch index d77053f5d397..4903eadef4b5 100644 --- a/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch +++ b/pkgs/os-specific/linux/firmware/fwupd/add-option-for-installation-sysconfdir.patch @@ -1,36 +1,8 @@ -From 44887227f7f617cbf84713ec45685cb4999039ff Mon Sep 17 00:00:00 2001 -From: Jan Tojnar -Date: Tue, 30 Oct 2018 22:26:30 +0100 -Subject: [PATCH] build: Add option for installation sysconfdir - -On NixOS, sysconfdir is read-only by default, and packages are not supposed to -install files there. Instead, NixOS has a concept of modules that declaratively -describe the system configuration. - -We still want to install the config files and certificates to fwupd prefix, -so that the modules can use them as they see fit, but at the same time, we -cannot set sysconfdir=${prefix}/etc because the daemon needs to read the -configuration from the directory created by the module. - -With autotools, we could easily solve this by passing a the sysconfdir inside -prefix only to `make install`, but Meson does not support anything like that. -Until we manage to convince Meson to support install flags, we need to create -our own install flag. ---- - data/meson.build | 4 ++-- - data/pki/meson.build | 8 ++++---- - data/remotes.d/meson.build | 6 +++--- - meson.build | 6 ++++++ - meson_options.txt | 1 + - plugins/redfish/meson.build | 2 +- - plugins/uefi/meson.build | 2 +- - 7 files changed, 18 insertions(+), 11 deletions(-) - diff --git a/data/meson.build b/data/meson.build -index 8dd2ac9a..d4ad1cbc 100644 +index 61664cd6..f10abbba 100644 --- a/data/meson.build +++ b/data/meson.build -@@ -9,7 +9,7 @@ if get_option('tests') and get_option('daemon') +@@ -11,7 +11,7 @@ if get_option('daemon') endif install_data(['daemon.conf'], @@ -39,7 +11,7 @@ index 8dd2ac9a..d4ad1cbc 100644 ) install_data(['org.freedesktop.fwupd.metainfo.xml'], -@@ -17,7 +17,7 @@ install_data(['org.freedesktop.fwupd.metainfo.xml'], +@@ -23,7 +23,7 @@ install_data(['org.freedesktop.fwupd.svg'], ) install_data(['org.freedesktop.fwupd.conf'], @@ -47,7 +19,7 @@ index 8dd2ac9a..d4ad1cbc 100644 + install_dir : join_paths(sysconfdir_install, 'dbus-1', 'system.d') ) - install_data(['metadata.xml'], + if get_option('daemon') diff --git a/data/pki/meson.build b/data/pki/meson.build index eefcc914..dc801fa1 100644 --- a/data/pki/meson.build @@ -85,7 +57,7 @@ index eefcc914..dc801fa1 100644 endif diff --git a/data/remotes.d/meson.build b/data/remotes.d/meson.build -index 824291fc..d0599a00 100644 +index a27c31ef..374e09b6 100644 --- a/data/remotes.d/meson.build +++ b/data/remotes.d/meson.build @@ -3,7 +3,7 @@ if get_option('daemon') and get_option('lvfs') @@ -98,22 +70,22 @@ index 824291fc..d0599a00 100644 i18n.merge_file( input: 'lvfs.metainfo.xml', @@ -37,12 +37,12 @@ configure_file( - output : 'fwupd.conf', - configuration : con2, - install: true, -- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'), -+ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), - ) - configure_file( - input : 'vendor.conf', output : 'vendor.conf', configuration : con2, install: true, - install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'), ++ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), + ) + configure_file( + input : 'vendor-directory.conf', + output : 'vendor-directory.conf', + configuration : con2, + install: true, +- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'), + install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), ) diff --git a/meson.build b/meson.build -index b6df98b3..d672ee37 100644 +index a89f9b3f..736896eb 100644 --- a/meson.build +++ b/meson.build @@ -145,6 +145,12 @@ localstatedir = join_paths(prefix, get_option('localstatedir')) @@ -130,22 +102,33 @@ index b6df98b3..d672ee37 100644 if gio.version().version_compare ('>= 2.55.0') conf.set('HAVE_GIO_2_55_0', '1') diff --git a/meson_options.txt b/meson_options.txt -index 23ef8cdb..db8f93b6 100644 +index 5d4163e8..db81fd1f 100644 --- a/meson_options.txt +++ b/meson_options.txt -@@ -17,6 +17,7 @@ option('plugin_uefi', type : 'boolean', value : true, description : 'enable UEFI - option('plugin_nvme', type : 'boolean', value : true, description : 'enable NVMe support') +@@ -21,6 +21,7 @@ option('plugin_modem_manager', type : 'boolean', value : false, description : 'e option('systemd', type : 'boolean', value : true, description : 'enable systemd support') option('systemdunitdir', type: 'string', value: '', description: 'Directory for systemd units') + option('elogind', type : 'boolean', value : false, description : 'enable elogind support') +option('sysconfdir_install', type: 'string', value: '', description: 'sysconfdir to use during installation') option('tests', type : 'boolean', value : true, description : 'enable tests') option('udevdir', type: 'string', value: '', description: 'Directory for udev rules') option('efi-cc', type : 'string', value : 'gcc', description : 'the compiler to use for EFI modules') +diff --git a/plugins/dell-esrt/meson.build b/plugins/dell-esrt/meson.build +index cb9f4555..b972d7fb 100644 +--- a/plugins/dell-esrt/meson.build ++++ b/plugins/dell-esrt/meson.build +@@ -36,5 +36,5 @@ configure_file( + output : 'dell-esrt.conf', + configuration : con2, + install: true, +- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'), ++ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'), + ) diff --git a/plugins/redfish/meson.build b/plugins/redfish/meson.build -index ef07bd81..d2c7e259 100644 +index 5c88504e..7706da71 100644 --- a/plugins/redfish/meson.build +++ b/plugins/redfish/meson.build -@@ -25,7 +25,7 @@ shared_module('fu_plugin_redfish', +@@ -26,7 +26,7 @@ shared_module('fu_plugin_redfish', ) install_data(['redfish.conf'], @@ -155,10 +138,10 @@ index ef07bd81..d2c7e259 100644 if get_option('tests') diff --git a/plugins/uefi/meson.build b/plugins/uefi/meson.build -index 09ebdf82..02fc0661 100644 +index ac9f5dd8..1ab51b5e 100644 --- a/plugins/uefi/meson.build +++ b/plugins/uefi/meson.build -@@ -73,7 +73,7 @@ executable( +@@ -79,7 +79,7 @@ executable( ) install_data(['uefi.conf'], @@ -167,5 +150,3 @@ index 09ebdf82..02fc0661 100644 ) if get_option('tests') --- -2.19.1 diff --git a/pkgs/os-specific/linux/firmware/fwupd/default.nix b/pkgs/os-specific/linux/firmware/fwupd/default.nix index cf6e2bf60407..48b502448bef 100644 --- a/pkgs/os-specific/linux/firmware/fwupd/default.nix +++ b/pkgs/os-specific/linux/firmware/fwupd/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, substituteAll, gtk-doc, pkgconfig, gobject-introspection, intltool , libgudev, polkit, libxmlb, gusb, sqlite, libarchive, glib-networking -, libsoup, help2man, gpgme, libxslt, elfutils, libsmbios, efivar, glibcLocales -, gnu-efi, libyaml, valgrind, meson, libuuid, colord, docbook_xml_dtd_43, docbook_xsl +, libsoup, help2man, gpgme, libxslt, elfutils, libsmbios, efivar, gnu-efi +, libyaml, valgrind, meson, libuuid, colord, docbook_xml_dtd_43, docbook_xsl , ninja, gcab, gnutls, python3, wrapGAppsHook, json-glib, bash-completion , shared-mime-info, umockdev, vala, makeFontsConf, freefont_ttf , cairo, freetype, fontconfig, pango @@ -18,17 +18,17 @@ let }; in stdenv.mkDerivation rec { pname = "fwupd"; - version = "1.2.3"; + version = "1.2.8"; src = fetchurl { url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz"; - sha256 = "11qpgincndahq96rbm2kgcy9kw5n9cmbbilsrqcqcyk7mvv464sl"; + sha256 = "0qbvq52c0scn1h99i1rf2la6rrhckin6gb02k7l0v3g07mxs20wc"; }; outputs = [ "out" "lib" "dev" "devdoc" "man" "installedTests" ]; nativeBuildInputs = [ - meson ninja gtk-doc pkgconfig gobject-introspection intltool glibcLocales shared-mime-info + meson ninja gtk-doc pkgconfig gobject-introspection intltool shared-mime-info valgrind gcab docbook_xml_dtd_43 docbook_xsl help2man libxslt python wrapGAppsHook vala ]; buildInputs = [ @@ -37,8 +37,6 @@ in stdenv.mkDerivation rec { bash-completion cairo freetype fontconfig pango ]; - LC_ALL = "en_US.UTF-8"; # For po/make-images - patches = [ ./fix-paths.patch ./add-option-for-installation-sysconfdir.patch @@ -114,10 +112,11 @@ in stdenv.mkDerivation rec { # /etc/fwupd/uefi.conf is created by the services.hardware.fwupd NixOS module passthru = { filesInstalledToEtc = [ - "fwupd/remotes.d/fwupd.conf" + "fwupd/remotes.d/dell-esrt.conf" "fwupd/remotes.d/lvfs-testing.conf" "fwupd/remotes.d/lvfs.conf" "fwupd/remotes.d/vendor.conf" + "fwupd/remotes.d/vendor-directory.conf" "pki/fwupd/GPG-KEY-Hughski-Limited" "pki/fwupd/GPG-KEY-Linux-Foundation-Firmware" "pki/fwupd/GPG-KEY-Linux-Vendor-Firmware-Service" From 5dc9fec732d3bdd00ea75bff0cef78406c11d98b Mon Sep 17 00:00:00 2001 From: Will Dietz Date: Fri, 1 Mar 2019 08:31:58 -0600 Subject: [PATCH 059/112] fwupd: patch in paths to tools used as runtime deps --- .../linux/firmware/fwupd/default.nix | 12 +++- .../linux/firmware/fwupd/fix-paths.patch | 58 ++++++++++++++++++- 2 files changed, 68 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/firmware/fwupd/default.nix b/pkgs/os-specific/linux/firmware/fwupd/default.nix index 48b502448bef..a60417d8e231 100644 --- a/pkgs/os-specific/linux/firmware/fwupd/default.nix +++ b/pkgs/os-specific/linux/firmware/fwupd/default.nix @@ -5,6 +5,7 @@ , ninja, gcab, gnutls, python3, wrapGAppsHook, json-glib, bash-completion , shared-mime-info, umockdev, vala, makeFontsConf, freefont_ttf , cairo, freetype, fontconfig, pango +, bubblewrap, efibootmgr, flashrom, tpm2-tools }: # Updating? Keep $out/etc synchronized with passthru.filesInstalledToEtc @@ -38,7 +39,12 @@ in stdenv.mkDerivation rec { ]; patches = [ - ./fix-paths.patch + (substituteAll { + src = ./fix-paths.patch; + inherit flashrom efibootmgr bubblewrap; + tpm2_tools = "${tpm2-tools}"; + }) + ./add-option-for-installation-sysconfdir.patch # installed tests are installed to different output @@ -61,6 +67,10 @@ in stdenv.mkDerivation rec { substituteInPlace meson.build \ --replace "plugin_dir = join_paths(libdir, 'fwupd-plugins-3')" \ "plugin_dir = join_paths('${placeholder "out"}', 'fwupd_plugins-3')" + + substituteInPlace data/meson.build --replace \ + "install_dir: systemd.get_pkgconfig_variable('systemdshutdowndir')" \ + "install_dir: '${placeholder "out"}/lib/systemd/system-shutdown'" ''; # /etc/os-release not available in sandbox diff --git a/pkgs/os-specific/linux/firmware/fwupd/fix-paths.patch b/pkgs/os-specific/linux/firmware/fwupd/fix-paths.patch index d1024438d8a7..51adef2e7870 100644 --- a/pkgs/os-specific/linux/firmware/fwupd/fix-paths.patch +++ b/pkgs/os-specific/linux/firmware/fwupd/fix-paths.patch @@ -1,15 +1,71 @@ +diff --git a/data/builder/meson.build b/data/builder/meson.build +index c7a430c0..e69de29b 100644 --- a/data/builder/meson.build +++ b/data/builder/meson.build @@ -1,3 +0,0 @@ -install_data('README.md', - install_dir : join_paths(localstatedir, 'lib', 'fwupd', 'builder') -) +diff --git a/meson_post_install.sh b/meson_post_install.sh +index 0cbb6f41..d757a81a 100755 --- a/meson_post_install.sh +++ b/meson_post_install.sh -@@ -11,6 +11,4 @@ +@@ -11,6 +11,4 @@ LOCALSTATEDIR=$2 echo 'Updating systemd deps' mkdir -p ${DESTDIR}${SYSTEMDUNITDIR}/system-update.target.wants ln -sf ../fwupd-offline-update.service ${DESTDIR}${SYSTEMDUNITDIR}/system-update.target.wants/fwupd-offline-update.service - echo 'Creating stateful directory' - mkdir -p ${DESTDIR}${LOCALSTATEDIR}/lib/fwupd #fi +diff --git a/plugins/flashrom/fu-plugin-flashrom.c b/plugins/flashrom/fu-plugin-flashrom.c +index 598e0c42..a0a2c4a7 100644 +--- a/plugins/flashrom/fu-plugin-flashrom.c ++++ b/plugins/flashrom/fu-plugin-flashrom.c +@@ -52,7 +52,7 @@ fu_plugin_startup (FuPlugin *plugin, GError **error) + g_autoptr(GError) error_local = NULL; + + /* we need flashrom from the host system */ +- data->flashrom_fn = fu_common_find_program_in_path ("flashrom", &error_local); ++ data->flashrom_fn = fu_common_find_program_in_path ("@flashrom@/bin/flashrom", &error_local); + + /* search for devices */ + hwids = fu_plugin_get_hwids (plugin); +diff --git a/plugins/uefi/fu-plugin-uefi.c b/plugins/uefi/fu-plugin-uefi.c +index 9293715c..e2e77c58 100644 +--- a/plugins/uefi/fu-plugin-uefi.c ++++ b/plugins/uefi/fu-plugin-uefi.c +@@ -416,7 +416,7 @@ fu_plugin_update (FuPlugin *plugin, + fu_plugin_add_report_metadata (plugin, "MissingCapsuleHeader", str); + + /* record boot information to system log for future debugging */ +- efibootmgr_path = fu_common_find_program_in_path ("efibootmgr", NULL); ++ efibootmgr_path = fu_common_find_program_in_path ("@efibootmgr@/bin/efibootmgr", NULL); + if (efibootmgr_path != NULL) { + if (!g_spawn_command_line_sync ("efibootmgr -v", + &boot_variables, NULL, NULL, error)) +diff --git a/plugins/uefi/fu-uefi-pcrs.c b/plugins/uefi/fu-uefi-pcrs.c +index 5c7e5239..01acbf7f 100644 +--- a/plugins/uefi/fu-uefi-pcrs.c ++++ b/plugins/uefi/fu-uefi-pcrs.c +@@ -147,7 +147,7 @@ fu_uefi_pcrs_setup (FuUefiPcrs *self, GError **error) + /* old name, then new name */ + argv0 = fu_common_find_program_in_path ("tpm2_listpcrs", NULL); + if (argv0 == NULL) +- argv0 = fu_common_find_program_in_path ("tpm2_pcrlist", error); ++ argv0 = fu_common_find_program_in_path ("@tpm2_tools@/bin/tpm2_pcrlist", error); + if (argv0 == NULL) + return FALSE; + if (!fu_uefi_pcrs_setup_tpm20 (self, argv0, error)) +diff --git a/src/fu-common.c b/src/fu-common.c +index bd6faeef..45ba2a60 100644 +--- a/src/fu-common.c ++++ b/src/fu-common.c +@@ -436,7 +436,7 @@ fu_common_firmware_builder (GBytes *bytes, + g_return_val_if_fail (error == NULL || *error == NULL, NULL); + + /* find bwrap in the path */ +- bwrap_fn = fu_common_find_program_in_path ("bwrap", error); ++ bwrap_fn = fu_common_find_program_in_path ("@bubblewrap@/bin/bwrap", error); + if (bwrap_fn == NULL) + return NULL; + From f2a81174922c1bd1875e2b1b09c29565226c30db Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 11 Jul 2019 16:06:32 +0200 Subject: [PATCH 060/112] pythonPackages.fetchPypi: put expression in own file Also fixes an evaluation bug. --- .../interpreters/python/fetchpypi.nix | 22 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 18 +-------------- 2 files changed, 23 insertions(+), 17 deletions(-) create mode 100644 pkgs/development/interpreters/python/fetchpypi.nix diff --git a/pkgs/development/interpreters/python/fetchpypi.nix b/pkgs/development/interpreters/python/fetchpypi.nix new file mode 100644 index 000000000000..ece4e136d3f8 --- /dev/null +++ b/pkgs/development/interpreters/python/fetchpypi.nix @@ -0,0 +1,22 @@ +# `fetchPypi` function for fetching artifacts from PyPI. +{ fetchurl +, makeOverridable +}: + +makeOverridable( {format ? "setuptools", ... } @attrs: + let + fetchWheel = {pname, version, sha256, python ? "py2.py3", abi ? "none", platform ? "any"}: + # Fetch a wheel. By default we fetch an universal wheel. + # See https://www.python.org/dev/peps/pep-0427/#file-name-convention for details regarding the optional arguments. + let + url = "https://files.pythonhosted.org/packages/${python}/${builtins.substring 0 1 pname}/${pname}/${pname}-${version}-${python}-${abi}-${platform}.whl"; + in fetchurl {inherit url sha256;}; + fetchSource = {pname, version, sha256, extension ? "tar.gz"}: + # Fetch a source tarball. + let + url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${pname}-${version}.${extension}"; + in fetchurl {inherit url sha256;}; + fetcher = (if format == "wheel" then fetchWheel + else if format == "setuptools" then fetchSource + else throw "Unsupported format ${format}"); + in fetcher (builtins.removeAttrs attrs ["format"]) ) \ No newline at end of file diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 65179adf5c27..3b2e27d30ad5 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -58,23 +58,7 @@ let # See build-setupcfg/default.nix for documentation. buildSetupcfg = import ../build-support/build-setupcfg self; - fetchPypi = makeOverridable( {format ? "setuptools", ... } @attrs: - let - fetchWheel = {pname, version, sha256, python ? "py2.py3", abi ? "none", platform ? "any"}: - # Fetch a wheel. By default we fetch an universal wheel. - # See https://www.python.org/dev/peps/pep-0427/#file-name-convention for details regarding the optional arguments. - let - url = "https://files.pythonhosted.org/packages/${python}/${builtins.substring 0 1 pname}/${pname}/${pname}-${version}-${python}-${abi}-${platform}.whl"; - in pkgs.fetchurl {inherit url sha256;}; - fetchSource = {pname, version, sha256, extension ? "tar.gz"}: - # Fetch a source tarball. - let - url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${pname}-${version}.${extension}"; - in pkgs.fetchurl {inherit url sha256;}; - fetcher = (if format == "wheel" then fetchWheel - else if format == "setuptools" then fetchSource - else throw "Unsupported kind ${kind}"); - in fetcher (builtins.removeAttrs attrs ["format"]) ); + fetchPypi = callPackage ../development/interpreters/python/fetchpypi.nix {}; # Check whether a derivation provides a Python module. hasPythonModule = drv: drv?pythonModule && drv.pythonModule == python; From 30f299027a5d24b51fd7e0f6cf8c8a74495e8ea8 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 11 Jul 2019 16:17:31 +0200 Subject: [PATCH 061/112] pythonPackages.fetchPypi: separate url computation from fetchurl --- .../interpreters/python/fetchpypi.nix | 32 +++++++++++-------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/pkgs/development/interpreters/python/fetchpypi.nix b/pkgs/development/interpreters/python/fetchpypi.nix index ece4e136d3f8..91dd331e6f3e 100644 --- a/pkgs/development/interpreters/python/fetchpypi.nix +++ b/pkgs/development/interpreters/python/fetchpypi.nix @@ -3,20 +3,26 @@ , makeOverridable }: -makeOverridable( {format ? "setuptools", ... } @attrs: - let - fetchWheel = {pname, version, sha256, python ? "py2.py3", abi ? "none", platform ? "any"}: +let + computeUrl = {format ? "setuptools", ... } @attrs: let + computeWheelUrl = {pname, version, python ? "py2.py3", abi ? "none", platform ? "any"}: # Fetch a wheel. By default we fetch an universal wheel. # See https://www.python.org/dev/peps/pep-0427/#file-name-convention for details regarding the optional arguments. - let - url = "https://files.pythonhosted.org/packages/${python}/${builtins.substring 0 1 pname}/${pname}/${pname}-${version}-${python}-${abi}-${platform}.whl"; - in fetchurl {inherit url sha256;}; - fetchSource = {pname, version, sha256, extension ? "tar.gz"}: + "https://files.pythonhosted.org/packages/${python}/${builtins.substring 0 1 pname}/${pname}/${pname}-${version}-${python}-${abi}-${platform}.whl"; + + computeSourceUrl = {pname, version, extension ? "tar.gz"}: # Fetch a source tarball. - let - url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${pname}-${version}.${extension}"; - in fetchurl {inherit url sha256;}; - fetcher = (if format == "wheel" then fetchWheel - else if format == "setuptools" then fetchSource + "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${pname}-${version}.${extension}"; + + compute = (if format == "wheel" then computeWheelUrl + else if format == "setuptools" then computeSourceUrl else throw "Unsupported format ${format}"); - in fetcher (builtins.removeAttrs attrs ["format"]) ) \ No newline at end of file + + in compute (builtins.removeAttrs attrs ["format"]); + +in makeOverridable( {format ? "setuptools", sha256, ... } @attrs: + let + url = computeUrl (builtins.removeAttrs attrs ["sha256"]) ; + in fetchurl { + inherit url sha256; + }) From 807413384443b3e65d8f4624b6650695f7c18e78 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Thu, 11 Jul 2019 16:28:46 +0200 Subject: [PATCH 062/112] pythonPackages.fetchPypi: support SRI hashes --- pkgs/development/interpreters/python/fetchpypi.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/interpreters/python/fetchpypi.nix b/pkgs/development/interpreters/python/fetchpypi.nix index 91dd331e6f3e..e60c9df1f8bb 100644 --- a/pkgs/development/interpreters/python/fetchpypi.nix +++ b/pkgs/development/interpreters/python/fetchpypi.nix @@ -20,9 +20,9 @@ let in compute (builtins.removeAttrs attrs ["format"]); -in makeOverridable( {format ? "setuptools", sha256, ... } @attrs: +in makeOverridable( {format ? "setuptools", sha256 ? "", hash ? "", ... } @attrs: let - url = computeUrl (builtins.removeAttrs attrs ["sha256"]) ; + url = computeUrl (builtins.removeAttrs attrs ["sha256" "hash"]) ; in fetchurl { - inherit url sha256; + inherit url sha256 hash; }) From 8931db9f0b0ca57f3ceb8e7410a28085f7bdbe54 Mon Sep 17 00:00:00 2001 From: Frederik Rietdijk Date: Wed, 10 Jul 2019 11:45:52 +0200 Subject: [PATCH 063/112] make-tarball / lib-tests: reduce duplication The misc.nix and systems.nix tests were invoked at three different places. Let's not that. --- lib/tests/release.nix | 15 ++++----------- pkgs/top-level/make-tarball.nix | 17 ++--------------- 2 files changed, 6 insertions(+), 26 deletions(-) diff --git a/lib/tests/release.nix b/lib/tests/release.nix index d9a8a0067253..737d142d2532 100644 --- a/lib/tests/release.nix +++ b/lib/tests/release.nix @@ -1,11 +1,9 @@ { pkgs ? import ((import ../.).cleanSource ../..) {} }: -pkgs.stdenv.mkDerivation { - name = "nixpkgs-lib-tests"; - buildInputs = [ pkgs.nix ]; +pkgs.runCommandNoCC "nixpkgs-lib-tests" { + buildInputs = [ pkgs.nix (import ./check-eval.nix) ]; NIX_PATH="nixpkgs=${pkgs.path}"; - - buildCommand = '' +} '' datadir="${pkgs.nix}/share" export TEST_ROOT=$(pwd)/test-tmp export NIX_BUILD_HOOK= @@ -22,10 +20,5 @@ pkgs.stdenv.mkDerivation { cd ${pkgs.path}/lib/tests bash ./modules.sh - [[ "$(nix-instantiate --eval --strict misc.nix)" == "[ ]" ]] - - [[ "$(nix-instantiate --eval --strict systems.nix)" == "[ ]" ]] - touch $out - ''; -} +'' diff --git a/pkgs/top-level/make-tarball.nix b/pkgs/top-level/make-tarball.nix index a0c99847274a..6f30bd06a81c 100644 --- a/pkgs/top-level/make-tarball.nix +++ b/pkgs/top-level/make-tarball.nix @@ -6,6 +6,7 @@ , officialRelease , pkgs ? import nixpkgs.outPath {} , nix ? pkgs.nix +, lib-tests ? import ../../lib/tests/release.nix { inherit pkgs; } }: with pkgs; @@ -18,7 +19,7 @@ releaseTools.sourceTarball rec { version = pkgs.lib.fileContents ../../.version; versionSuffix = "pre${toString nixpkgs.revCount}.${nixpkgs.shortRev}"; - buildInputs = [ nix.out jq ]; + buildInputs = [ nix.out jq lib-tests ]; configurePhase = '' eval "$preConfigure" @@ -60,20 +61,6 @@ releaseTools.sourceTarball rec { exit 1 fi - # Run the regression tests in `lib'. - if - # `set -e` doesn't work inside here, so need to && instead :( - res="$(nix-instantiate --eval --strict lib/tests/misc.nix --show-trace)" \ - && [[ "$res" == "[ ]" ]] \ - && res="$(nix-instantiate --eval --strict lib/tests/systems.nix --show-trace)" \ - && [[ "$res" == "[ ]" ]] - then - true - else - echo "regression tests for lib failed, got: $res" - exit 1 - fi - # Check that all-packages.nix evaluates on a number of platforms without any warnings. for platform in i686-linux x86_64-linux x86_64-darwin; do header "checking Nixpkgs on $platform" From fd7ee813b60adbe1d4cda9019493502da0f300c9 Mon Sep 17 00:00:00 2001 From: Marek Mahut Date: Thu, 11 Jul 2019 16:03:48 +0200 Subject: [PATCH 064/112] pythonPackages.anonip: init at 1.0.0 --- .../python-modules/anonip/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 26 insertions(+) create mode 100644 pkgs/development/python-modules/anonip/default.nix diff --git a/pkgs/development/python-modules/anonip/default.nix b/pkgs/development/python-modules/anonip/default.nix new file mode 100644 index 000000000000..de9048bde343 --- /dev/null +++ b/pkgs/development/python-modules/anonip/default.nix @@ -0,0 +1,24 @@ +{ stdenv, lib, buildPythonPackage, fetchFromGitHub, ipaddress, isPy27 }: + +buildPythonPackage rec { + pname = "anonip"; + version = "1.0.0"; + + src = fetchFromGitHub { + owner = "DigitaleGesellschaft"; + repo = "Anonip"; + rev = "v${version}"; + sha256 = "0y5xqivcinp6pwx4whc8ca1n2wxrvff7a2lpbz2dhivilfanmljs"; + }; + + propagatedBuildInputs = lib.optionals isPy27 [ ipaddress ]; + + checkPhase = "python tests.py"; + + meta = with stdenv.lib; { + homepage = "https://github.com/DigitaleGesellschaft/Anonip"; + description = "A tool to anonymize IP-addresses in log-files"; + license = licenses.bsd3; + maintainers = [ maintainers.mmahut ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8d7976421aff..a7939c7cb7ea 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1106,6 +1106,8 @@ in { aniso8601 = callPackage ../development/python-modules/aniso8601 {}; + anonip = callPackage ../development/python-modules/anonip { }; + asgiref = callPackage ../development/python-modules/asgiref { }; python-editor = callPackage ../development/python-modules/python-editor { }; From 16f8a174162c7da0bd50e56961848d2092ab8ee4 Mon Sep 17 00:00:00 2001 From: PsyanticY Date: Tue, 18 Jun 2019 17:45:02 +0100 Subject: [PATCH 065/112] zabbix:1.8 -> 4.0 | remove old packages --- .../services/monitoring/zabbix-server.nix | 67 +++++++---- pkgs/servers/monitoring/zabbix/2.0.nix | 92 ---------------- pkgs/servers/monitoring/zabbix/2.2.nix | 104 ------------------ pkgs/servers/monitoring/zabbix/default.nix | 69 ++++++------ pkgs/top-level/all-packages.nix | 2 - 5 files changed, 79 insertions(+), 255 deletions(-) delete mode 100644 pkgs/servers/monitoring/zabbix/2.0.nix delete mode 100644 pkgs/servers/monitoring/zabbix/2.2.nix diff --git a/nixos/modules/services/monitoring/zabbix-server.nix b/nixos/modules/services/monitoring/zabbix-server.nix index fdeab6af4417..823145d8b906 100644 --- a/nixos/modules/services/monitoring/zabbix-server.nix +++ b/nixos/modules/services/monitoring/zabbix-server.nix @@ -17,6 +17,8 @@ let configFile = pkgs.writeText "zabbix_server.conf" '' + ListenPort = ${cfg.listenPort} + LogFile = ${logDir}/zabbix_server PidFile = ${pidFile} @@ -25,18 +27,18 @@ let DBHost = ${cfg.dbServer} ''} - DBName = zabbix + DBName = ${cfg.dbName} - DBUser = zabbix + DBUser = ${cfg.dbUser} - ${optionalString (cfg.dbPassword != "") '' - DBPassword = ${cfg.dbPassword} - ''} + DBPort = ${cfg.dbPort} + + DBPassword = ${cfg.dbPassword} ${config.services.zabbixServer.extraConfig} ''; - useLocalPostgres = cfg.dbServer == "localhost" || cfg.dbServer == ""; + useLocalMysql = cfg.dbServer == "localhost" || cfg.dbServer == ""; in @@ -64,11 +66,34 @@ in }; services.zabbixServer.dbPassword = mkOption { - default = ""; type = types.str; description = "Password used to connect to the database server."; }; + services.zabbixServer.dbUser = mkOption { + default = "zabbix"; + type = types.str; + description = "User used to connect to the database server."; + }; + + services.zabbixServer.dbPort = mkOption { + default = "3306"; + type = types.str; + description = "Port used to connect to the database server."; + }; + + services.zabbixServer.dbName = mkOption { + default = "zabbix"; + type = types.str; + description = "Port used to connect to the database server."; + }; + + services.zabbixServer.listenPort = mkOption { + default = "10051"; + type = types.str; + description = "Port used to listen to the agent."; + }; + services.zabbixServer.extraConfig = mkOption { default = ""; type = types.lines; @@ -76,14 +101,14 @@ in Configuration that is injected verbatim into the configuration file. ''; }; - }; ###### implementation config = mkIf cfg.enable { - services.postgresql.enable = useLocalPostgres; + services.mysql.enable = useLocalMysql; + services.mysql.package = pkgs.mysql; users.users = singleton { name = "zabbix"; @@ -95,32 +120,28 @@ in { description = "Zabbix Server"; wantedBy = [ "multi-user.target" ]; - after = optional useLocalPostgres "postgresql.service"; + after = optional useLocalMysql "mysql.service"; preStart = '' mkdir -m 0755 -p ${stateDir} ${logDir} ${libDir} chown zabbix ${stateDir} ${logDir} ${libDir} - - if ! test -e "${libDir}/db-created"; then - ${pkgs.su}/bin/su -s "$SHELL" ${config.services.postgresql.superUser} -c '${pkgs.postgresql}/bin/createuser --no-superuser --no-createdb --no-createrole zabbix' || true - ${pkgs.su}/bin/su -s "$SHELL" ${config.services.postgresql.superUser} -c '${pkgs.postgresql}/bin/createdb --owner zabbix zabbix' || true - cat ${pkgs.zabbix.server}/share/zabbix/db/schema/postgresql.sql | ${pkgs.su}/bin/su -s "$SHELL" zabbix -c '${pkgs.postgresql}/bin/psql zabbix' - cat ${pkgs.zabbix.server}/share/zabbix/db/data/images_pgsql.sql | ${pkgs.su}/bin/su -s "$SHELL" zabbix -c '${pkgs.postgresql}/bin/psql zabbix' - cat ${pkgs.zabbix.server}/share/zabbix/db/data/data.sql | ${pkgs.su}/bin/su -s "$SHELL" zabbix -c '${pkgs.postgresql}/bin/psql zabbix' + ${lib.optionalString (useLocalMysql) '' + if ! test -e "${libDir}/db-created"; then + ${pkgs.sudo}/bin/sudo -u ${config.services.mysql.user} ${pkgs.mysql}/bin/mysql -uroot -e 'CREATE DATABASE ${cfg.dbName}' + ${pkgs.sudo}/bin/sudo -u ${config.services.mysql.user} ${pkgs.mysql}/bin/mysql -uroot -e "GRANT ALL ON ${cfg.dbName}.* TO ${cfg.dbUser}@localhost IDENTIFIED BY \"${cfg.dbPassword}\";" + cat ${pkgs.zabbix.server}/share/zabbix/db/schema/mysql.sql | ${pkgs.sudo}/bin/sudo -u zabbix ${pkgs.mysql}/bin/mysql -u${cfg.dbUser} -p${cfg.dbPassword} ${cfg.dbName} + cat ${pkgs.zabbix.server}/share/zabbix/db/data/images.sql | ${pkgs.sudo}/bin/sudo -u zabbix ${pkgs.mysql}/bin/mysql -u${cfg.dbUser} -p${cfg.dbPassword} ${cfg.dbName} + cat ${pkgs.zabbix.server}/share/zabbix/db/data/data.sql | ${pkgs.sudo}/bin/sudo -u zabbix ${pkgs.mysql}/bin/mysql -u${cfg.dbUser} -p${cfg.dbPassword} ${cfg.dbName} touch "${libDir}/db-created" - fi + fi''} ''; path = [ pkgs.nettools ]; - serviceConfig.ExecStart = "@${pkgs.zabbix.server}/sbin/zabbix_server zabbix_server --config ${configFile}"; + serviceConfig.ExecStart = "${pkgs.zabbix.server}/sbin/zabbix_server --config ${configFile}"; serviceConfig.Type = "forking"; - serviceConfig.Restart = "always"; - serviceConfig.RestartSec = 2; serviceConfig.PIDFile = pidFile; }; - }; - } diff --git a/pkgs/servers/monitoring/zabbix/2.0.nix b/pkgs/servers/monitoring/zabbix/2.0.nix deleted file mode 100644 index ce660fa6e88b..000000000000 --- a/pkgs/servers/monitoring/zabbix/2.0.nix +++ /dev/null @@ -1,92 +0,0 @@ -{ stdenv, fetchurl, pkgconfig, postgresql, curl, openssl, zlib -, enableJabber ? false, minmay ? null }: - -assert enableJabber -> minmay != null; - -let - - version = "2.0.21"; - branch = "2.0"; - - src = fetchurl { - url = "mirror://sourceforge/zabbix/zabbix-${version}.tar.gz"; - sha256 = "14g22x2zy5xqnh2xg23xy5gjd49d1i8pks7pkidwdwa9acwgfx71"; - }; - - preConfigure = - '' - substituteInPlace ./configure \ - --replace " -static" "" \ - ${stdenv.lib.optionalString (stdenv.cc.libc != null) '' - --replace /usr/include/iconv.h ${stdenv.lib.getDev stdenv.cc.libc}/include/iconv.h - ''} - ''; - -in - -{ - recurseForDerivations = true; - - server = stdenv.mkDerivation { - name = "zabbix-${version}"; - - inherit src preConfigure; - - configureFlags = [ - "--enable-agent" - "--enable-server" - "--with-postgresql" - "--with-libcurl" - "--with-gettext" - ] ++ stdenv.lib.optional enableJabber "--with-jabber=${minmay}"; - - postPatch = '' - sed -i -e 's/iksemel/minmay/g' configure src/libs/zbxmedia/jabber.c - sed -i \ - -e '/^static ikstransport/,/}/d' \ - -e 's/iks_connect_with\(.*\), &zbx_iks_transport/mmay_connect_via\1/' \ - -e 's/iks/mmay/g' -e 's/IKS/MMAY/g' src/libs/zbxmedia/jabber.c - ''; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ postgresql curl openssl zlib ]; - - postInstall = - '' - mkdir -p $out/share/zabbix - cp -prvd frontends/php $out/share/zabbix/php - mkdir -p $out/share/zabbix/db/data - cp -prvd database/postgresql/data.sql $out/share/zabbix/db/data/data.sql - cp -prvd database/postgresql/images.sql $out/share/zabbix/db/data/images_pgsql.sql - mkdir -p $out/share/zabbix/db/schema - cp -prvd database/postgresql/schema.sql $out/share/zabbix/db/schema/postgresql.sql - ''; - - meta = { - inherit branch; - description = "An enterprise-class open source distributed monitoring solution"; - homepage = https://www.zabbix.com/; - license = "GPL"; - maintainers = [ stdenv.lib.maintainers.eelco ]; - platforms = stdenv.lib.platforms.linux; - }; - }; - - agent = stdenv.mkDerivation { - name = "zabbix-agent-${version}"; - - inherit src preConfigure; - - configureFlags = [ "--enable-agent" ]; - - meta = with stdenv.lib; { - inherit branch; - description = "An enterprise-class open source distributed monitoring solution (client-side agent)"; - homepage = https://www.zabbix.com/; - license = licenses.gpl2; - maintainers = [ maintainers.eelco ]; - platforms = platforms.linux; - }; - }; - -} diff --git a/pkgs/servers/monitoring/zabbix/2.2.nix b/pkgs/servers/monitoring/zabbix/2.2.nix deleted file mode 100644 index ac0e6bb81f8b..000000000000 --- a/pkgs/servers/monitoring/zabbix/2.2.nix +++ /dev/null @@ -1,104 +0,0 @@ -{ stdenv, fetchurl, pkgconfig, postgresql, curl, openssl, zlib -, net_snmp , libssh2, openldap -, enableJabber ? false, minmay ? null -, enableSnmp ? false -, enableSsh ? false -, enableLdap ? false -}: - -assert enableJabber -> minmay != null; - -let - - version = "2.2.20"; - branch = "2.2"; - - src = fetchurl { - url = "mirror://sourceforge/zabbix/zabbix-${version}.tar.gz"; - sha256 = "00pfpyj3vydwx9dn0bklh1p5j0bp2awi4hvv4kgliyav8l0416hk"; - }; - - preConfigure = - '' - substituteInPlace ./configure \ - --replace " -static" "" \ - ${stdenv.lib.optionalString (stdenv.cc.libc != null) '' - --replace /usr/include/iconv.h ${stdenv.lib.getDev stdenv.cc.libc}/include/iconv.h - ''} - ''; - -in - -{ - recurseForDerivations = true; - - server = stdenv.mkDerivation { - name = "zabbix-${version}"; - - inherit src preConfigure; - - configureFlags = [ - "--enable-agent" - "--enable-server" - "--with-postgresql" - "--with-libcurl" - "--with-gettext" - ] - ++ stdenv.lib.optional enableJabber "--with-jabber=${minmay}" - ++ stdenv.lib.optional enableSnmp "--with-net-snmp" - ++ stdenv.lib.optional enableSsh "--with-ssh2=${libssh2.dev}" - ++ stdenv.lib.optional enableLdap "--with-ldap=${openldap.dev}"; - - postPatch = '' - sed -i -e 's/iksemel/minmay/g' configure src/libs/zbxmedia/jabber.c - sed -i \ - -e '/^static ikstransport/,/}/d' \ - -e 's/iks_connect_with\(.*\), &zbx_iks_transport/mmay_connect_via\1/' \ - -e 's/iks/mmay/g' -e 's/IKS/MMAY/g' src/libs/zbxmedia/jabber.c - ''; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ postgresql curl openssl zlib ] - ++ stdenv.lib.optional enableSnmp net_snmp - ++ stdenv.lib.optional enableSsh libssh2 - ++ stdenv.lib.optional enableLdap openldap; - - postInstall = - '' - mkdir -p $out/share/zabbix - cp -prvd frontends/php $out/share/zabbix/php - mkdir -p $out/share/zabbix/db/data - cp -prvd database/postgresql/data.sql $out/share/zabbix/db/data/data.sql - cp -prvd database/postgresql/images.sql $out/share/zabbix/db/data/images_pgsql.sql - mkdir -p $out/share/zabbix/db/schema - cp -prvd database/postgresql/schema.sql $out/share/zabbix/db/schema/postgresql.sql - ''; - - meta = { - inherit branch; - description = "An enterprise-class open source distributed monitoring solution"; - homepage = https://www.zabbix.com/; - license = "GPL"; - maintainers = [ stdenv.lib.maintainers.eelco ]; - platforms = stdenv.lib.platforms.linux; - }; - }; - - agent = stdenv.mkDerivation { - name = "zabbix-agent-${version}"; - - inherit src preConfigure; - - configureFlags = [ "--enable-agent" ]; - - meta = with stdenv.lib; { - inherit branch; - description = "An enterprise-class open source distributed monitoring solution (client-side agent)"; - homepage = https://www.zabbix.com/; - license = licenses.gpl2; - maintainers = [ maintainers.eelco ]; - platforms = platforms.linux; - }; - }; - -} diff --git a/pkgs/servers/monitoring/zabbix/default.nix b/pkgs/servers/monitoring/zabbix/default.nix index 4b6bd5e0b250..47db4a15023c 100644 --- a/pkgs/servers/monitoring/zabbix/default.nix +++ b/pkgs/servers/monitoring/zabbix/default.nix @@ -1,23 +1,13 @@ -{ stdenv, fetchurl, pkgconfig, postgresql, curl, openssl, zlib }: +{ stdenv, fetchurl, pkgconfig, curl, openssl, zlib, pcre, libevent, mysql, libiconv, libxml2 }: let - - version = "1.8.22"; + version = "4.0.9"; src = fetchurl { - url = "mirror://sourceforge/zabbix/zabbix-${version}.tar.gz"; - sha256 = "0cjj3c4j4b9sl3hgh1fck330z9q0gz2k68g227y0paal6k6f54g7"; + url = "https://netix.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/${version}/zabbix-${version}.tar.gz"; + sha256 = "aa0bc9b5e5ca8e1b49b7551e2c5d86e0342c8630cba3a0b0e0e5d9c846e784d1"; }; - preConfigure = - '' - substituteInPlace ./configure \ - --replace " -static" "" \ - ${stdenv.lib.optionalString (stdenv.cc.libc != null) '' - --replace /usr/include/iconv.h ${stdenv.lib.getDev stdenv.cc.libc}/include/iconv.h - ''} - ''; - in { @@ -25,51 +15,62 @@ in server = stdenv.mkDerivation { name = "zabbix-${version}"; - inherit src preConfigure; - + inherit src; + NIX_CFLAGS_COMPILE = "-L${mysql.connector-c}/lib/mysql -I${mysql.connector-c}/include/mysql"; configureFlags = [ - "--enable-agent" "--enable-server" - "--with-pgsql" + "--with-mysql" "--with-libcurl" + "--with-libxml2" + "--with-zlib" + "--with-libpcre=${pcre.dev}" + "--with-libevent=${libevent.dev}" + "--with-iconv=${libiconv}" + "--with-openssl=${openssl.dev}" ]; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ postgresql curl openssl zlib ]; + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ mysql curl openssl zlib pcre libxml2 libevent ] ; postInstall = '' mkdir -p $out/share/zabbix cp -prvd frontends/php $out/share/zabbix/php mkdir -p $out/share/zabbix/db/data - cp -prvd create/data/*.sql $out/share/zabbix/db/data + cp -prvd database/mysql/data.sql $out/share/zabbix/db/data/data.sql + cp -prvd database/mysql/images.sql $out/share/zabbix/db/data/images.sql mkdir -p $out/share/zabbix/db/schema - cp -prvd create/schema/*.sql $out/share/zabbix/db/schema + cp -prvd database/mysql/schema.sql $out/share/zabbix/db/schema/mysql.sql ''; - meta = { - description = "An enterprise-class open source distributed monitoring solution"; - homepage = https://www.zabbix.com/; - license = "GPL"; - maintainers = [ stdenv.lib.maintainers.eelco ]; - platforms = stdenv.lib.platforms.linux; + meta = with stdenv.lib; { + description = "An enterprise-class open source distributed monitoring solution (server)"; + homepage = http://www.zabbix.com/; + license = licenses.gpl2; + maintainers = [ maintainers.psyanticy ]; + platforms = platforms.linux; }; }; agent = stdenv.mkDerivation { name = "zabbix-agent-${version}"; - inherit src preConfigure; + inherit src; - configureFlags = [ "--enable-agent" ]; + configureFlags = [ + "--enable-agent" + "--with-libpcre=${pcre.dev}" + "--with-iconv=${libiconv}" + "--with-openssl=${openssl.dev}" + ]; + buildInputs = [ pcre libiconv openssl ]; meta = with stdenv.lib; { description = "An enterprise-class open source distributed monitoring solution (client-side agent)"; - homepage = https://www.zabbix.com/; + homepage = http://www.zabbix.com/; license = licenses.gpl2; - maintainers = [ maintainers.eelco ]; + maintainers = [ maintainers.psyanticy ]; platforms = platforms.linux; }; }; - -} +} \ No newline at end of file diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 58df7d89b36e..ec9e6a42da81 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14901,8 +14901,6 @@ in zabbix = recurseIntoAttrs (callPackages ../servers/monitoring/zabbix {}); - zabbix20 = callPackage ../servers/monitoring/zabbix/2.0.nix { }; - zabbix22 = callPackage ../servers/monitoring/zabbix/2.2.nix { }; zabbix34 = callPackage ../servers/monitoring/zabbix/3.4.nix { }; zipkin = callPackage ../servers/monitoring/zipkin { }; From faf842081772bdf841c0057062da3f263b612f17 Mon Sep 17 00:00:00 2001 From: xrelkd <46590321+xrelkd@users.noreply.github.com> Date: Tue, 9 Jul 2019 20:27:29 +0800 Subject: [PATCH 066/112] most: 5.0.0a -> 5.1.0 Fix source url Note: There is no version 5.1.0 in "ftp://space.mit.edu/pub/davis/most/". --- pkgs/tools/misc/most/default.nix | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/misc/most/default.nix b/pkgs/tools/misc/most/default.nix index 3471016db5b9..6baaa38f1bb1 100644 --- a/pkgs/tools/misc/most/default.nix +++ b/pkgs/tools/misc/most/default.nix @@ -1,13 +1,20 @@ { stdenv, fetchurl, slang, ncurses }: -stdenv.mkDerivation { - name = "most-5.0.0a"; +stdenv.mkDerivation rec { + pname = "most"; + version = "5.1.0"; src = fetchurl { - url = ftp://space.mit.edu/pub/davis/most/most-5.0.0a.tar.bz2; - sha256 = "1aas904g8x48vsfh3wcr2k6mjzkm5808lfgl2qqhdfdnf4p5mjwl"; + url = "https://www.jedsoft.org/releases/${pname}/${pname}-${version}.tar.gz"; + sha256 = "008537ns659pw2aag15imwjrxj73j26aqq90h285is6kz8gmv06v"; }; + outputs = [ "out" "doc" ]; + + makeFlags = [ + "DOC_DIR=${placeholder ''doc''}/share/doc/most" + ]; + preConfigure = '' sed -i -e "s|-ltermcap|-lncurses|" configure sed -i autoconf/Makefile.in src/Makefile.in \ @@ -19,15 +26,15 @@ stdenv.mkDerivation { buildInputs = [ slang ncurses ]; - meta = { + meta = with stdenv.lib; { description = "A terminal pager similar to 'more' and 'less'"; longDescription = '' MOST is a powerful paging program for Unix, VMS, MSDOS, and win32 systems. Unlike other well-known paging programs most supports multiple windows and can scroll left and right. Why settle for less? ''; - homepage = http://www.jedsoft.org/most/index.html; - license = stdenv.lib.licenses.gpl2; - platforms = stdenv.lib.platforms.unix; + homepage = "https://www.jedsoft.org/most/index.html"; + license = licenses.gpl2; + platforms = platforms.unix; }; } From 769f992fbcc8257cc89e74db1add01796c9c0909 Mon Sep 17 00:00:00 2001 From: arcnmx Date: Thu, 11 Jul 2019 08:20:27 -0700 Subject: [PATCH 067/112] electrum: 3.3.7 -> 3.3.8 --- pkgs/applications/misc/electrum/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix index 0de055df5698..61819f15f3ac 100644 --- a/pkgs/applications/misc/electrum/default.nix +++ b/pkgs/applications/misc/electrum/default.nix @@ -14,14 +14,14 @@ }: let - version = "3.3.7"; + version = "3.3.8"; # Not provided in official source releases, which are what upstream signs. tests = fetchFromGitHub { owner = "spesmilo"; repo = "electrum"; rev = version; - sha256 = "1g2kbbsi6k105q6s0la20h12gz8dzka5kdcjbdhs12jqsjfx3lr0"; + sha256 = "1di8ba77kgapcys0d7h5nx1qqakv3s60c6sp8skw8p69ramsl73c"; extraPostFetch = '' mv $out ./all @@ -36,7 +36,7 @@ python3Packages.buildPythonApplication rec { src = fetchurl { url = "https://download.electrum.org/${version}/Electrum-${version}.tar.gz"; - sha256 = "13ahc4zqpgzmck2r663sqqgz86xsd83r5qqi26mh2vazy1i6pykz"; + sha256 = "1g00cj1pmckd4xis8r032wmraiv3vd3zc803hnyxa2bnhj8z3bg2"; }; postUnpack = '' From 36f9da4ec43b849f913faefa52db49900ce59d53 Mon Sep 17 00:00:00 2001 From: arcnmx Date: Thu, 11 Jul 2019 07:08:57 -0700 Subject: [PATCH 068/112] electrum: optional qt5 and darwin fixes qt5 is often broken on darwin, and it's a massive closure when there's a curses interface and CLI to use instead. --- pkgs/applications/misc/electrum/default.nix | 28 +++++++++++++++------ 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/pkgs/applications/misc/electrum/default.nix b/pkgs/applications/misc/electrum/default.nix index 61819f15f3ac..5233aaf8fcdb 100644 --- a/pkgs/applications/misc/electrum/default.nix +++ b/pkgs/applications/misc/electrum/default.nix @@ -1,4 +1,5 @@ { stdenv, fetchurl, fetchFromGitHub, python3, python3Packages, zbar, secp256k1 +, enableQt ? !stdenv.isDarwin # for updater.nix @@ -16,6 +17,15 @@ let version = "3.3.8"; + libsecp256k1_name = + if stdenv.isLinux then "libsecp256k1.so.0" + else if stdenv.isDarwin then "libsecp256k1.0.dylib" + else "libsecp256k1${stdenv.hostPlatform.extensions.sharedLibrary}"; + + libzbar_name = + if stdenv.isLinux then "libzbar.so.0" + else "libzbar${stdenv.hostPlatform.extensions.sharedLibrary}"; + # Not provided in official source releases, which are what upstream signs. tests = fetchFromGitHub { owner = "spesmilo"; @@ -56,9 +66,7 @@ python3Packages.buildPythonApplication rec { protobuf pyaes pycryptodomex - pyqt5 pysocks - qdarkstyle qrcode requests tlslite-ng @@ -70,15 +78,20 @@ python3Packages.buildPythonApplication rec { # TODO plugins # amodem - ]; + ] ++ stdenv.lib.optionals enableQt [ pyqt5 qdarkstyle ]; preBuild = '' sed -i 's,usr_share = .*,usr_share = "'$out'/share",g' setup.py - sed -i "s|name = 'libzbar.*'|name='${zbar}/lib/libzbar.so'|" electrum/qrscanner.py - substituteInPlace ./electrum/ecc_fast.py --replace libsecp256k1.so.0 ${secp256k1}/lib/libsecp256k1.so.0 - ''; + substituteInPlace ./electrum/ecc_fast.py \ + --replace ${libsecp256k1_name} ${secp256k1}/lib/libsecp256k1${stdenv.hostPlatform.extensions.sharedLibrary} + '' + (if enableQt then '' + substituteInPlace ./electrum/qrscanner.py \ + --replace ${libzbar_name} ${zbar}/lib/libzbar${stdenv.hostPlatform.extensions.sharedLibrary} + '' else '' + sed -i '/qdarkstyle/d' contrib/requirements/requirements.txt + ''); - postInstall = '' + postInstall = stdenv.lib.optionalString stdenv.isLinux '' # Despite setting usr_share above, these files are installed under # $out/nix ... mv $out/${python3.sitePackages}/nix/store"/"*/share $out @@ -123,6 +136,7 @@ python3Packages.buildPythonApplication rec { ''; homepage = https://electrum.org/; license = licenses.mit; + platforms = platforms.all; maintainers = with maintainers; [ ehmry joachifm np ]; }; } From 118af58d33a1b54152db1fabddb0c1cc5350bae4 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Thu, 11 Jul 2019 19:20:40 +0200 Subject: [PATCH 069/112] python-suds-jurko: disable tests to fix the build Fixes https://github.com/NixOS/nixpkgs/issues/64440. --- pkgs/development/python-modules/suds-jurko/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/suds-jurko/default.nix b/pkgs/development/python-modules/suds-jurko/default.nix index efb8383c8fdc..25ff5fd1636a 100644 --- a/pkgs/development/python-modules/suds-jurko/default.nix +++ b/pkgs/development/python-modules/suds-jurko/default.nix @@ -1,7 +1,6 @@ { stdenv , buildPythonPackage , fetchPypi -, pytest_3 , isPyPy }: @@ -16,7 +15,7 @@ buildPythonPackage rec { sha256 = "1s4radwf38kdh3jrn5acbidqlr66sx786fkwi0rgq61hn4n2bdqw"; }; - checkInputs = [ pytest_3 ]; + doCheck = false; postPatch = '' # fails From eda2dbaab255a0d143fa0c30524f1245677da3b3 Mon Sep 17 00:00:00 2001 From: arcnmx Date: Thu, 11 Jul 2019 08:13:09 -0700 Subject: [PATCH 070/112] qt512.qtwebengine: darwin patch This patch is currently applied to 5.11, allowing it to begin building; both packages fail to compile regardless, but it's an improvement. --- .../5.12/qtwebengine-darwin-no-platform-check.patch | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkgs/development/libraries/qt-5/5.12/qtwebengine-darwin-no-platform-check.patch b/pkgs/development/libraries/qt-5/5.12/qtwebengine-darwin-no-platform-check.patch index 364330169bf1..546e753144d0 100644 --- a/pkgs/development/libraries/qt-5/5.12/qtwebengine-darwin-no-platform-check.patch +++ b/pkgs/development/libraries/qt-5/5.12/qtwebengine-darwin-no-platform-check.patch @@ -19,3 +19,15 @@ diff --git a/mkspecs/features/platform.prf b/mkspecs/features/platform.prf } } else { skipBuild("Unknown platform. Qt WebEngine only supports Linux, Windows, and macOS.") +diff --git a/src/core/config/mac_osx.pri b/src/core/config/mac_osx.pri +--- a/src/core/config/mac_osx.pri ++++ b/src/core/config/mac_osx.pri +@@ -5,8 +5,6 @@ load(functions) + # otherwise query for it. + QMAKE_MAC_SDK_VERSION = $$eval(QMAKE_MAC_SDK.$${QMAKE_MAC_SDK}.SDKVersion) + isEmpty(QMAKE_MAC_SDK_VERSION) { +- QMAKE_MAC_SDK_VERSION = $$system("/usr/bin/xcodebuild -sdk $${QMAKE_MAC_SDK} -version SDKVersion 2>/dev/null") +- isEmpty(QMAKE_MAC_SDK_VERSION): error("Could not resolve SDK version for \'$${QMAKE_MAC_SDK}\'") + } + + QMAKE_CLANG_DIR = "/usr" From 842867a97f4c04f37607e873b9b91ce3fb120358 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Thu, 11 Jul 2019 19:46:09 +0200 Subject: [PATCH 071/112] python-m2crypto: update to version 0.35.2 --- pkgs/development/python-modules/m2crypto/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/m2crypto/default.nix b/pkgs/development/python-modules/m2crypto/default.nix index 97ee57fac0c5..cd9781dbc889 100644 --- a/pkgs/development/python-modules/m2crypto/default.nix +++ b/pkgs/development/python-modules/m2crypto/default.nix @@ -9,12 +9,12 @@ buildPythonPackage rec { - version = "0.32.0"; + version = "0.35.2"; pname = "M2Crypto"; src = fetchPypi { inherit pname version; - sha256 = "09d3zs2ivyxbi0fa42mnan0fcplc08q2qd70p1b43sxxdbxcdj99"; + sha256 = "09yirf3w77w6f49q6nxhrjm9c3a4y9s30s1k09chqrw8zdgx8sjc"; }; patches = [ From 48067b5c97472d9a6e9bf24853c69f6b98bab542 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 11 Jul 2019 22:21:51 +0200 Subject: [PATCH 072/112] swayidle: 1.4 -> 1.5 --- pkgs/applications/window-managers/sway/idle.nix | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/window-managers/sway/idle.nix b/pkgs/applications/window-managers/sway/idle.nix index 0f3e2205bd97..c9daed461c55 100644 --- a/pkgs/applications/window-managers/sway/idle.nix +++ b/pkgs/applications/window-managers/sway/idle.nix @@ -5,19 +5,15 @@ stdenv.mkDerivation rec { name = "swayidle-${version}"; - version = "1.4"; + version = "1.5"; src = fetchFromGitHub { owner = "swaywm"; repo = "swayidle"; rev = version; - sha256 = "1fpacy9jwfi3vd94sgsy8qgx5092rm3vsplj2zjbmxkak1gjn56n"; + sha256 = "05qi96j58xqxjiighay1d39rfanxcpn6vlynj23mb5dymxvlaq9n"; }; - postPatch = '' - sed -iE "s/version: '1\.3',/version: '${version}',/" meson.build - ''; - nativeBuildInputs = [ meson ninja pkgconfig scdoc ]; buildInputs = [ wayland wayland-protocols systemd ]; From 63a99ccee4cca6b3df48a28d8c417663a8effa4a Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 11 Jul 2019 22:28:48 +0200 Subject: [PATCH 073/112] gns3Packages.{server,gui}Preview: 2.2.0b3 -> 2.2.0b4 --- pkgs/applications/networking/gns3/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/gns3/default.nix b/pkgs/applications/networking/gns3/default.nix index a3b2bbe90c19..ef4009b0e96c 100644 --- a/pkgs/applications/networking/gns3/default.nix +++ b/pkgs/applications/networking/gns3/default.nix @@ -2,7 +2,7 @@ let stableVersion = "2.1.21"; - previewVersion = "2.2.0b3"; + previewVersion = "2.2.0b4"; addVersion = args: let version = if args.stable then stableVersion else previewVersion; branch = if args.stable then "stable" else "preview"; @@ -18,7 +18,7 @@ in { }; guiPreview = mkGui { stable = false; - sha256Hash = "1bzy95zqinwrrga7qj6gvpzvz34w4ddhvgmpgq3p1lwzixpqg1w7"; + sha256Hash = "03jlg4ncs69gv1dn1zsdm0ipvlg6r0lwf8myxric6vv4ks7qqd3w"; }; serverStable = mkServer { @@ -27,6 +27,6 @@ in { }; serverPreview = mkServer { stable = false; - sha256Hash = "1bq4ww6qhhl0qw6yj7cf7yg54yb4y8mxlnwss6hgbyfv5fz9rxjp"; + sha256Hash = "0mzn62649hmmqq8z2vphqvi0w38jwq8ps4zzbl1dqygbf4gadnqa"; }; } From 1fb1d818608e46ae3def9ace7d8707a903151d9f Mon Sep 17 00:00:00 2001 From: Marek Mahut Date: Sun, 7 Jul 2019 08:07:57 +0200 Subject: [PATCH 074/112] soundtouch: 2.0.0 -> 2.1.2 --- .../libraries/soundtouch/default.nix | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/pkgs/development/libraries/soundtouch/default.nix b/pkgs/development/libraries/soundtouch/default.nix index 95a97f30b6e6..71c7915c2ede 100644 --- a/pkgs/development/libraries/soundtouch/default.nix +++ b/pkgs/development/libraries/soundtouch/default.nix @@ -1,22 +1,24 @@ -{stdenv, fetchurl, autoconf, automake, libtool}: +{stdenv, lib, fetchFromGitLab, autoconf, automake, libtool}: stdenv.mkDerivation rec { - pName = "soundtouch"; - name = "${pName}-2.0.0"; - src = fetchurl { - url = "https://www.surina.net/soundtouch/${name}.tar.gz"; - sha256 = "09cxr02mfyj2bg731bj0i9hh565x8l9p91aclxs8wpqv8b8zf96j"; + pname = "soundtouch"; + version = "2.1.2"; + + src = fetchFromGitLab { + owner = pname; + repo = pname; + rev = version; + sha256 = "174wgm3s0inmbnkrlnspxjwm2014qhjhkbdqa5r8rbfi0nzqxzsz"; }; - buildInputs = [ autoconf automake libtool ]; + nativeBuildInputs = [ autoconf automake libtool ]; preConfigure = "./bootstrap"; - meta = { - description = "A program and library for changing the tempo, pitch and playback rate of audio"; - homepage = http://www.surina.net/soundtouch/; - downloadPage = http://www.surina.net/soundtouch/sourcecode.html; - license = stdenv.lib.licenses.lgpl21; - platforms = stdenv.lib.platforms.all; + meta = with lib; { + description = "A program and library for changing the tempo, pitch and playback rate of audio"; + homepage = "http://www.surina.net/soundtouch/"; + license = licenses.lgpl21; + platforms = platforms.all; }; } From 253f9cf5742b6bd32ac10dcd41d1c26670ca75ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D1=83=D1=85=D0=B0=D1=80=D0=B8=D0=BA?= Date: Thu, 11 Jul 2019 15:31:18 +0300 Subject: [PATCH 075/112] i2p: 0.9.39 -> 0.9.41 --- pkgs/tools/networking/i2p/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/networking/i2p/default.nix b/pkgs/tools/networking/i2p/default.nix index 2745c8c1d84d..7d709df75b60 100644 --- a/pkgs/tools/networking/i2p/default.nix +++ b/pkgs/tools/networking/i2p/default.nix @@ -27,10 +27,10 @@ let wrapper = stdenv.mkDerivation rec { in stdenv.mkDerivation rec { - name = "i2p-0.9.39"; + name = "i2p-0.9.41"; src = fetchurl { url = "https://github.com/i2p/i2p.i2p/archive/${name}.tar.gz"; - sha256 = "0d6g0ffv2b0ghjjp3ndal8n9maw5y0n36vqrylhh5zr1hffvxx9i"; + sha256 = "0adrj56i3pcc9ainj22akjrrvy73carz5jk29qa1h2b9q03di73b"; }; buildInputs = [ jdk ant gettext which ]; patches = [ ./i2p.patch ]; From 9a4456fcc0f7e26a44e5548c967b37b49cd40ad4 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Thu, 11 Jul 2019 18:37:02 -0400 Subject: [PATCH 076/112] zabbix: zabbix.agent, zabbix.proxy-mysql, zabbix.proxy-pgsql, zabbix.proxy-sqlite, zabbix.server-mysql, zabbix.server-pgsql, zabbix.web: init at 3.0, 4.0, and 4.2 --- pkgs/servers/monitoring/zabbix/3.4.nix | 41 ---------- pkgs/servers/monitoring/zabbix/agent.nix | 38 +++++++++ pkgs/servers/monitoring/zabbix/default.nix | 76 ------------------ pkgs/servers/monitoring/zabbix/proxy.nix | 79 +++++++++++++++++++ pkgs/servers/monitoring/zabbix/server.nix | 86 +++++++++++++++++++++ pkgs/servers/monitoring/zabbix/versions.nix | 16 ++++ pkgs/servers/monitoring/zabbix/web.nix | 32 ++++++++ pkgs/top-level/all-packages.nix | 19 ++++- 8 files changed, 268 insertions(+), 119 deletions(-) delete mode 100644 pkgs/servers/monitoring/zabbix/3.4.nix create mode 100644 pkgs/servers/monitoring/zabbix/agent.nix delete mode 100644 pkgs/servers/monitoring/zabbix/default.nix create mode 100644 pkgs/servers/monitoring/zabbix/proxy.nix create mode 100644 pkgs/servers/monitoring/zabbix/server.nix create mode 100644 pkgs/servers/monitoring/zabbix/versions.nix create mode 100644 pkgs/servers/monitoring/zabbix/web.nix diff --git a/pkgs/servers/monitoring/zabbix/3.4.nix b/pkgs/servers/monitoring/zabbix/3.4.nix deleted file mode 100644 index 72e6fa55b003..000000000000 --- a/pkgs/servers/monitoring/zabbix/3.4.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ stdenv, fetchurl, pcre, libiconv, openssl }: - - -let - - version = "3.4.8"; - branch = "3.4"; - - src = fetchurl { - url = "https://netix.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/${version}/zabbix-${version}.tar.gz"; - sha256 = "cec14993d1ec2c9d8c51f6608c9408620f27174db92edc2347bafa7b841ccc07"; - }; - -in - -{ - agent = stdenv.mkDerivation { - name = "zabbix-agent-${version}"; - - inherit src; - - configureFlags = [ - "--enable-agent" - "--with-libpcre=${pcre.dev}" - "--with-iconv=${libiconv}" - "--with-openssl=${openssl.dev}" - ]; - buildInputs = [ pcre libiconv openssl ]; - - meta = with stdenv.lib; { - inherit branch; - description = "An enterprise-class open source distributed monitoring solution (client-side agent)"; - homepage = https://www.zabbix.com/; - license = licenses.gpl2; - maintainers = [ maintainers.eelco ]; - platforms = platforms.linux; - }; - }; - -} - diff --git a/pkgs/servers/monitoring/zabbix/agent.nix b/pkgs/servers/monitoring/zabbix/agent.nix new file mode 100644 index 000000000000..09f43c755f16 --- /dev/null +++ b/pkgs/servers/monitoring/zabbix/agent.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchurl, pkgconfig, libiconv, openssl, pcre }: + +import ./versions.nix ({ version, sha256 }: + stdenv.mkDerivation { + pname = "zabbix-agent"; + inherit version; + + src = fetchurl { + url = "mirror://sourceforge/zabbix/ZABBIX%20Latest%20Stable/${version}/zabbix-${version}.tar.gz"; + inherit sha256; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ + libiconv + openssl + pcre + ]; + + configureFlags = [ + "--enable-agent" + "--with-iconv" + "--with-libpcre" + "--with-openssl=${openssl.dev}" + ]; + + postInstall = '' + cp conf/zabbix_agentd/*.conf $out/etc/zabbix_agentd.conf.d/ + ''; + + meta = with stdenv.lib; { + description = "An enterprise-class open source distributed monitoring solution (client-side agent)"; + homepage = "https://www.zabbix.com/"; + license = licenses.gpl2; + maintainers = with maintainers; [ mmahut psyanticy ]; + platforms = platforms.linux; + }; + }) diff --git a/pkgs/servers/monitoring/zabbix/default.nix b/pkgs/servers/monitoring/zabbix/default.nix deleted file mode 100644 index 47db4a15023c..000000000000 --- a/pkgs/servers/monitoring/zabbix/default.nix +++ /dev/null @@ -1,76 +0,0 @@ -{ stdenv, fetchurl, pkgconfig, curl, openssl, zlib, pcre, libevent, mysql, libiconv, libxml2 }: - -let - version = "4.0.9"; - - src = fetchurl { - url = "https://netix.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/${version}/zabbix-${version}.tar.gz"; - sha256 = "aa0bc9b5e5ca8e1b49b7551e2c5d86e0342c8630cba3a0b0e0e5d9c846e784d1"; - }; - -in - -{ - - server = stdenv.mkDerivation { - name = "zabbix-${version}"; - - inherit src; - NIX_CFLAGS_COMPILE = "-L${mysql.connector-c}/lib/mysql -I${mysql.connector-c}/include/mysql"; - configureFlags = [ - "--enable-server" - "--with-mysql" - "--with-libcurl" - "--with-libxml2" - "--with-zlib" - "--with-libpcre=${pcre.dev}" - "--with-libevent=${libevent.dev}" - "--with-iconv=${libiconv}" - "--with-openssl=${openssl.dev}" - ]; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ mysql curl openssl zlib pcre libxml2 libevent ] ; - - postInstall = - '' - mkdir -p $out/share/zabbix - cp -prvd frontends/php $out/share/zabbix/php - mkdir -p $out/share/zabbix/db/data - cp -prvd database/mysql/data.sql $out/share/zabbix/db/data/data.sql - cp -prvd database/mysql/images.sql $out/share/zabbix/db/data/images.sql - mkdir -p $out/share/zabbix/db/schema - cp -prvd database/mysql/schema.sql $out/share/zabbix/db/schema/mysql.sql - ''; - - meta = with stdenv.lib; { - description = "An enterprise-class open source distributed monitoring solution (server)"; - homepage = http://www.zabbix.com/; - license = licenses.gpl2; - maintainers = [ maintainers.psyanticy ]; - platforms = platforms.linux; - }; - }; - - agent = stdenv.mkDerivation { - name = "zabbix-agent-${version}"; - - inherit src; - - configureFlags = [ - "--enable-agent" - "--with-libpcre=${pcre.dev}" - "--with-iconv=${libiconv}" - "--with-openssl=${openssl.dev}" - ]; - buildInputs = [ pcre libiconv openssl ]; - - meta = with stdenv.lib; { - description = "An enterprise-class open source distributed monitoring solution (client-side agent)"; - homepage = http://www.zabbix.com/; - license = licenses.gpl2; - maintainers = [ maintainers.psyanticy ]; - platforms = platforms.linux; - }; - }; -} \ No newline at end of file diff --git a/pkgs/servers/monitoring/zabbix/proxy.nix b/pkgs/servers/monitoring/zabbix/proxy.nix new file mode 100644 index 000000000000..2062dc6659f8 --- /dev/null +++ b/pkgs/servers/monitoring/zabbix/proxy.nix @@ -0,0 +1,79 @@ +{ stdenv, fetchurl, pkgconfig, libevent, libiconv, openssl, pcre, zlib +, odbcSupport ? true, unixODBC +, snmpSupport ? true, net_snmp +, sshSupport ? true, libssh2 +, sqliteSupport ? false, sqlite +, mysqlSupport ? false, mysql +, postgresqlSupport ? false, postgresql +}: + +# ensure exactly one database type is selected +assert mysqlSupport -> !postgresqlSupport && !sqliteSupport; +assert postgresqlSupport -> !mysqlSupport && !sqliteSupport; +assert sqliteSupport -> !mysqlSupport && !postgresqlSupport; + +let + inherit (stdenv.lib) optional optionalString; +in + import ./versions.nix ({ version, sha256 }: + stdenv.mkDerivation { + pname = "zabbix-proxy"; + inherit version; + + src = fetchurl { + url = "mirror://sourceforge/zabbix/ZABBIX%20Latest%20Stable/${version}/zabbix-${version}.tar.gz"; + inherit sha256; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ + libevent + libiconv + openssl + pcre + zlib + ] + ++ optional odbcSupport unixODBC + ++ optional snmpSupport net_snmp + ++ optional sqliteSupport sqlite + ++ optional sshSupport libssh2 + ++ optional mysqlSupport mysql.connector-c + ++ optional postgresqlSupport postgresql; + + configureFlags = [ + "--enable-proxy" + "--with-iconv" + "--with-libevent" + "--with-libpcre" + "--with-openssl=${openssl.dev}" + "--with-zlib=${zlib}" + ] + ++ optional odbcSupport "--with-unixodbc" + ++ optional snmpSupport "--with-net-snmp" + ++ optional sqliteSupport "--with-sqlite3=${sqlite.dev}" + ++ optional sshSupport "--with-ssh2=${libssh2.dev}" + ++ optional mysqlSupport "--with-mysql" + ++ optional postgresqlSupport "--with-postgresql"; + + prePatch = '' + find database -name data.sql -exec sed -i 's|/usr/bin/||g' {} + + ''; + + postInstall = '' + mkdir -p $out/share/zabbix/database/ + '' + optionalString sqliteSupport '' + mkdir -p $out/share/zabbix/database/sqlite3 + cp -prvd database/sqlite3/*.sql $out/share/zabbix/database/sqlite3/ + '' + optionalString postgresqlSupport '' + mkdir -p $out/share/zabbix/database/postgresql + cp -prvd database/postgresql/schema.sql $out/share/zabbix/database/postgresql/ + ''; + + meta = with stdenv.lib; { + description = "An enterprise-class open source distributed monitoring solution (client-server proxy)"; + homepage = "https://www.zabbix.com/"; + license = licenses.gpl2; + maintainers = [ maintainers.mmahut ]; + platforms = platforms.linux; + }; + }) diff --git a/pkgs/servers/monitoring/zabbix/server.nix b/pkgs/servers/monitoring/zabbix/server.nix new file mode 100644 index 000000000000..51ca38e8cfc8 --- /dev/null +++ b/pkgs/servers/monitoring/zabbix/server.nix @@ -0,0 +1,86 @@ +{ stdenv, fetchurl, pkgconfig, curl, libevent, libiconv, libxml2, openssl, pcre, zlib +, jabberSupport ? true, iksemel +, ldapSupport ? true, openldap +, odbcSupport ? true, unixODBC +, snmpSupport ? true, net_snmp +, sshSupport ? true, libssh2 +, mysqlSupport ? false, mysql +, postgresqlSupport ? false, postgresql +}: + +# ensure exactly one primary database type is selected +assert mysqlSupport -> !postgresqlSupport; +assert postgresqlSupport -> !mysqlSupport; + +let + inherit (stdenv.lib) optional optionalString; +in + import ./versions.nix ({ version, sha256 }: + stdenv.mkDerivation { + pname = "zabbix-server"; + inherit version; + + src = fetchurl { + url = "mirror://sourceforge/zabbix/ZABBIX%20Latest%20Stable/${version}/zabbix-${version}.tar.gz"; + inherit sha256; + }; + + nativeBuildInputs = [ pkgconfig ]; + buildInputs = [ + curl + libevent + libiconv + libxml2 + openssl + pcre + zlib + ] + ++ optional odbcSupport unixODBC + ++ optional jabberSupport iksemel + ++ optional ldapSupport openldap + ++ optional snmpSupport net_snmp + ++ optional sshSupport libssh2 + ++ optional mysqlSupport mysql.connector-c + ++ optional postgresqlSupport postgresql; + + configureFlags = [ + "--enable-server" + "--with-iconv" + "--with-libcurl" + "--with-libevent" + "--with-libpcre" + "--with-libxml2" + "--with-openssl=${openssl.dev}" + "--with-zlib=${zlib}" + ] + ++ optional odbcSupport "--with-unixodbc" + ++ optional jabberSupport "--with-jabber" + ++ optional ldapSupport "--with-ldap=${openldap.dev}" + ++ optional snmpSupport "--with-net-snmp" + ++ optional sshSupport "--with-ssh2=${libssh2.dev}" + ++ optional mysqlSupport "--with-mysql" + ++ optional postgresqlSupport "--with-postgresql"; + + prePatch = '' + find database -name data.sql -exec sed -i 's|/usr/bin/||g' {} + + ''; + + postInstall = '' + mkdir -p $out/share/zabbix/database/ + cp -r include $out/ + '' + optionalString mysqlSupport '' + mkdir -p $out/share/zabbix/database/mysql + cp -prvd database/mysql/*.sql $out/share/zabbix/database/mysql/ + '' + optionalString postgresqlSupport '' + mkdir -p $out/share/zabbix/database/postgresql + cp -prvd database/postgresql/*.sql $out/share/zabbix/database/postgresql/ + ''; + + meta = with stdenv.lib; { + description = "An enterprise-class open source distributed monitoring solution"; + homepage = "https://www.zabbix.com/"; + license = licenses.gpl2; + maintainers = with maintainers; [ mmahut psyanticy ]; + platforms = platforms.linux; + }; + }) diff --git a/pkgs/servers/monitoring/zabbix/versions.nix b/pkgs/servers/monitoring/zabbix/versions.nix new file mode 100644 index 000000000000..7b6b5d8fcccb --- /dev/null +++ b/pkgs/servers/monitoring/zabbix/versions.nix @@ -0,0 +1,16 @@ +generic: { + v42 = generic { + version = "4.2.3"; + sha256 = "0865c1a9vcgg4syhp5133rw9v1h65lp0g1y2f758jb9x9ybrr01s"; + }; + + v40 = generic { + version = "4.0.9"; + sha256 = "1lc4wx3cing5w2qa18yb6232qd70hrfjq7jmnx4ip3nawnswj2xa"; + }; + + v30 = generic { + version = "3.0.28"; + sha256 = "16966danf5ww4lhjg5gx5bnpid8abxh2ymdg6k5mymrman5bcdjj"; + }; +} diff --git a/pkgs/servers/monitoring/zabbix/web.nix b/pkgs/servers/monitoring/zabbix/web.nix new file mode 100644 index 000000000000..c4cf5d044dae --- /dev/null +++ b/pkgs/servers/monitoring/zabbix/web.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchurl, writeText }: + +import ./versions.nix ({ version, sha256 }: + stdenv.mkDerivation rec { + pname = "zabbix-web"; + inherit version; + + src = fetchurl { + url = "mirror://sourceforge/zabbix/ZABBIX%20Latest%20Stable/${version}/zabbix-${version}.tar.gz"; + inherit sha256; + }; + + phpConfig = writeText "zabbix.conf.php" '' + + ''; + + installPhase = '' + mkdir -p $out/share/zabbix/ + cp -a frontends/php/. $out/share/zabbix/ + cp ${phpConfig} $out/share/zabbix/conf/zabbix.conf.php + ''; + + meta = with stdenv.lib; { + description = "An enterprise-class open source distributed monitoring solution (web frontend)"; + homepage = "https://www.zabbix.com/"; + license = licenses.gpl2; + maintainers = [ maintainers.mmahut ]; + platforms = platforms.linux; + }; + }) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 28769eb60ea7..7aaf91bec5a4 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14953,9 +14953,24 @@ in youtrack = callPackage ../servers/jetbrains/youtrack.nix { }; - zabbix = recurseIntoAttrs (callPackages ../servers/monitoring/zabbix {}); + zabbixFor = version: rec { + agent = (callPackages ../servers/monitoring/zabbix/agent.nix {}).${version}; + proxy-mysql = (callPackages ../servers/monitoring/zabbix/proxy.nix { mysqlSupport = true; }).${version}; + proxy-pgsql = (callPackages ../servers/monitoring/zabbix/proxy.nix { postgresqlSupport = true; }).${version}; + proxy-sqlite = (callPackages ../servers/monitoring/zabbix/proxy.nix { sqliteSupport = true; }).${version}; + server-mysql = (callPackages ../servers/monitoring/zabbix/server.nix { mysqlSupport = true; }).${version}; + server-pgsql = (callPackages ../servers/monitoring/zabbix/server.nix { postgresqlSupport = true; }).${version}; + web = (callPackages ../servers/monitoring/zabbix/web.nix {}).${version}; - zabbix34 = callPackage ../servers/monitoring/zabbix/3.4.nix { }; + # backwards compatibility + server = server-pgsql; + }; + + zabbix42 = zabbixFor "v42"; + zabbix40 = zabbixFor "v40"; + zabbix30 = zabbixFor "v30"; + + zabbix = zabbix42; zipkin = callPackage ../servers/monitoring/zipkin { }; From 6891fb4103b52595defac522694b4d42f600d6a1 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Thu, 11 Jul 2019 18:44:51 -0400 Subject: [PATCH 077/112] nixos/zabbixWeb: replace httpd subservice with new module --- nixos/doc/manual/release-notes/rl-1909.xml | 6 +- nixos/modules/misc/ids.nix | 2 +- nixos/modules/module-list.nix | 1 + nixos/modules/services/web-apps/zabbix.nix | 225 ++++++++++++++++++ .../web-servers/apache-httpd/zabbix.nix | 84 ------- 5 files changed, 230 insertions(+), 88 deletions(-) create mode 100644 nixos/modules/services/web-apps/zabbix.nix delete mode 100644 nixos/modules/services/web-servers/apache-httpd/zabbix.nix diff --git a/nixos/doc/manual/release-notes/rl-1909.xml b/nixos/doc/manual/release-notes/rl-1909.xml index 53f5b8bb7321..9a4aac0df550 100644 --- a/nixos/doc/manual/release-notes/rl-1909.xml +++ b/nixos/doc/manual/release-notes/rl-1909.xml @@ -137,9 +137,9 @@ Several of the apache subservices have been replaced with full NixOS - modules including LimeSurvey and WordPress. - These modules can be enabled using the - and options. + modules including LimeSurvey, WordPress, and Zabbix. + These modules can be enabled using the , + , and options. diff --git a/nixos/modules/misc/ids.nix b/nixos/modules/misc/ids.nix index 14ba5a573b18..1047df95cdf5 100644 --- a/nixos/modules/misc/ids.nix +++ b/nixos/modules/misc/ids.nix @@ -516,7 +516,7 @@ tss = 176; #memcached = 177; # unused, removed 2018-01-03 #ntp = 179; # unused - #zabbix = 180; # unused + zabbix = 180; #redis = 181; # unused, removed 2018-01-03 #unifi = 183; # unused #uptimed = 184; # unused diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 1d1995eda25a..32f542290b5d 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -782,6 +782,7 @@ ./services/web-apps/virtlyst.nix ./services/web-apps/wordpress.nix ./services/web-apps/youtrack.nix + ./services/web-apps/zabbix.nix ./services/web-servers/apache-httpd/default.nix ./services/web-servers/caddy.nix ./services/web-servers/fcgiwrap.nix diff --git a/nixos/modules/services/web-apps/zabbix.nix b/nixos/modules/services/web-apps/zabbix.nix new file mode 100644 index 000000000000..4b5334579a99 --- /dev/null +++ b/nixos/modules/services/web-apps/zabbix.nix @@ -0,0 +1,225 @@ +{ config, lib, pkgs, ... }: + +let + + inherit (lib) mkDefault mkEnableOption mkForce mkIf mkMerge mkOption types; + inherit (lib) literalExample mapAttrs optionalString; + + cfg = config.services.zabbixWeb; + fpm = config.services.phpfpm.pools.zabbix; + + user = "zabbix"; + group = "zabbix"; + stateDir = "/var/lib/zabbix"; + + zabbixConfig = pkgs.writeText "zabbix.conf.php" '' + database.user. + ''; + }; + + socket = mkOption { + type = types.nullOr types.path; + default = null; + example = "/run/postgresql"; + description = "Path to the unix socket file to use for authentication."; + }; + }; + + virtualHost = mkOption { + type = types.submodule ({ + options = import ../web-servers/apache-httpd/per-server-options.nix { + inherit lib; + forMainServer = false; + }; + }); + example = { + hostName = "zabbix.example.org"; + enableSSL = true; + adminAddr = "webmaster@example.org"; + sslServerCert = "/var/lib/acme/zabbix.example.org/full.pem"; + sslServerKey = "/var/lib/acme/zabbix.example.org/key.pem"; + }; + description = '' + Apache configuration can be done by adapting services.httpd.virtualHosts.<name>. + See for further information. + ''; + }; + + 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 + ''; + description = '' + Options for the Zabbix PHP pool. See the documentation on php-fpm.conf for details on configuration directives. + ''; + }; + + }; + }; + + # implementation + + config = mkIf cfg.enable { + + systemd.tmpfiles.rules = [ + "d '${stateDir}' 0750 ${user} ${group} - -" + "d '${stateDir}/session' 0750 ${user} ${config.services.httpd.group} - -" + ]; + + services.phpfpm.pools.zabbix = { + phpOptions = '' + # https://www.zabbix.com/documentation/current/manual/installation/install + memory_limit = 128M + post_max_size = 16M + upload_max_filesize = 2M + max_execution_time = 300 + max_input_time = 300 + session.auto_start = 0 + mbstring.func_overload = 0 + always_populate_raw_post_data = -1 + # https://bbs.archlinux.org/viewtopic.php?pid=1745214#p1745214 + session.save_path = ${stateDir}/session + '' + optionalString (config.time.timeZone != null) '' + date.timezone = "${config.time.timeZone}" + '' + 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} + ''; + }; + + services.httpd = { + enable = true; + adminAddr = mkDefault cfg.virtualHost.adminAddr; + extraModules = [ "proxy_fcgi" ]; + virtualHosts = [ (mkMerge [ + cfg.virtualHost { + documentRoot = mkForce "${cfg.package}/share/zabbix"; + extraConfig = '' + + + + SetHandler "proxy:unix:${fpm.listen}|fcgi://localhost/" + + + AllowOverride all + Options -Indexes + DirectoryIndex index.php + + ''; + } + ]) ]; + }; + + users.users.${user} = mapAttrs (name: mkDefault) { + description = "Zabbix daemon user"; + uid = config.ids.uids.zabbix; + inherit group; + }; + + users.groups.${group} = mapAttrs (name: mkDefault) { + gid = config.ids.gids.zabbix; + }; + + }; +} diff --git a/nixos/modules/services/web-servers/apache-httpd/zabbix.nix b/nixos/modules/services/web-servers/apache-httpd/zabbix.nix deleted file mode 100644 index cab16593bcbc..000000000000 --- a/nixos/modules/services/web-servers/apache-httpd/zabbix.nix +++ /dev/null @@ -1,84 +0,0 @@ -{ config, lib, pkgs, serverInfo, ... }: - -with lib; - -let - - # The Zabbix PHP frontend needs to be able to write its - # configuration settings (the connection info to the database) to - # the "conf" subdirectory. So symlink $out/conf to some directory - # outside of the Nix store where we want to keep this stateful info. - # Note that different instances of the frontend will therefore end - # up with their own copies of the PHP sources. !!! Alternatively, - # we could generate zabbix.conf.php declaratively. - zabbixPHP = pkgs.runCommand "${pkgs.zabbix.server.name}-php" {} - '' - cp -rs ${pkgs.zabbix.server}/share/zabbix/php "$out" - chmod -R u+w $out - ln -s "${if config.configFile == null - then "${config.stateDir}/zabbix.conf.php" - else config.configFile}" "$out/conf/zabbix.conf.php" - ''; - -in - -{ - - enablePHP = true; - - phpOptions = - '' - post_max_size = 32M - max_execution_time = 300 - max_input_time = 300 - ''; - - extraConfig = '' - Alias ${config.urlPrefix}/ ${zabbixPHP}/ - - - DirectoryIndex index.php - Order deny,allow - Allow from * - - ''; - - startupScript = pkgs.writeScript "zabbix-startup-hook" '' - mkdir -p ${config.stateDir} - chown -R ${serverInfo.serverConfig.user} ${config.stateDir} - ''; - - # The frontend needs "ps" to find out whether zabbix_server is running. - extraServerPath = [ pkgs.procps ]; - - options = { - - urlPrefix = mkOption { - default = "/zabbix"; - description = " - The URL prefix under which the Zabbix service appears. - Use the empty string to have it appear in the server root. - "; - }; - - configFile = mkOption { - default = null; - type = types.nullOr types.path; - description = '' - The configuration file (zabbix.conf.php) which contains the database - connection settings. If not set, the configuration settings will created - by the web installer. - ''; - }; - - stateDir = mkOption { - default = "/var/lib/zabbix/frontend"; - description = " - Directory where the dynamically generated configuration data - of the PHP frontend will be stored. - "; - }; - - }; - -} From 70092c9acbfb1a7f15814d817686f19e363821f3 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Thu, 11 Jul 2019 18:54:15 -0400 Subject: [PATCH 078/112] nixos/zabbixAgent & nixos/zabbixServer: various module updates --- nixos/modules/rename.nix | 4 + .../services/monitoring/zabbix-agent.nix | 163 +++++--- .../services/monitoring/zabbix-server.nix | 382 ++++++++++++------ 3 files changed, 372 insertions(+), 177 deletions(-) diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 1b77a895d717..e127782e85f5 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -171,6 +171,9 @@ with lib; The starting time can be configured via services.postgresqlBackup.startAt. '') + # zabbixServer + (mkRenamedOptionModule [ "services" "zabbixServer" "dbServer" ] [ "services" "zabbixServer" "database" "host" ]) + # Profile splitting (mkRenamedOptionModule [ "virtualisation" "growPartition" ] [ "boot" "growPartition" ]) @@ -214,6 +217,7 @@ with lib; (mkRemovedOptionModule [ "services" "winstone" ] "The corresponding package was removed from nixpkgs.") (mkRemovedOptionModule [ "services" "mysql" "pidDir" ] "Don't wait for pidfiles, describe dependencies through systemd") (mkRemovedOptionModule [ "services" "mysql" "rootPassword" ] "Use socket authentication or set the password outside of the nix store.") + (mkRemovedOptionModule [ "services" "zabbixServer" "dbPassword" ] "Use services.zabbixServer.database.passwordFile instead.") # ZSH (mkRenamedOptionModule [ "programs" "zsh" "enableSyntaxHighlighting" ] [ "programs" "zsh" "syntaxHighlighting" "enable" ]) diff --git a/nixos/modules/services/monitoring/zabbix-agent.nix b/nixos/modules/services/monitoring/zabbix-agent.nix index 0519e7c2ad6a..b1645f861101 100644 --- a/nixos/modules/services/monitoring/zabbix-agent.nix +++ b/nixos/modules/services/monitoring/zabbix-agent.nix @@ -1,73 +1,118 @@ -# Zabbix agent daemon. { config, lib, pkgs, ... }: -with lib; - let - cfg = config.services.zabbixAgent; - zabbix = cfg.package; + inherit (lib) mkDefault mkEnableOption mkIf mkOption; + inherit (lib) attrValues concatMapStringsSep literalExample optionalString types; - stateDir = "/run/zabbix"; + user = "zabbix-agent"; + group = "zabbix-agent"; - logDir = "/var/log/zabbix"; + moduleEnv = pkgs.symlinkJoin { + name = "zabbix-agent-module-env"; + paths = attrValues cfg.modules; + }; - pidFile = "${stateDir}/zabbix_agentd.pid"; - - configFile = pkgs.writeText "zabbix_agentd.conf" - '' - Server = ${cfg.server} - - LogFile = ${logDir}/zabbix_agentd - - PidFile = ${pidFile} - - StartAgents = 1 - - ${config.services.zabbixAgent.extraConfig} - ''; + configFile = pkgs.writeText "zabbix_agent.conf" '' + LogType = console + Server = ${cfg.server} + ListenIP = ${cfg.listen.ip} + ListenPort = ${toString cfg.listen.port} + ${optionalString (cfg.modules != {}) "LoadModulePath = ${moduleEnv}/lib"} + ${concatMapStringsSep "\n" (name: "LoadModule = ${name}") (builtins.attrNames cfg.modules)} + ${cfg.extraConfig} + ''; in { - - ###### interface + # interface options = { services.zabbixAgent = { + enable = mkEnableOption "the Zabbix Agent"; - enable = mkOption { - default = false; + package = mkOption { + type = types.package; + default = pkgs.zabbix.agent; + defaultText = "pkgs.zabbix.agent"; + description = "The Zabbix package to use."; + }; + + extraPackages = mkOption { + type = types.listOf types.package; + default = with pkgs; [ nettools ]; + defaultText = "[ nettools ]"; + example = "[ nettools mysql ]"; description = '' - Whether to run the Zabbix monitoring agent on this machine. - It will send monitoring data to a Zabbix server. + Packages to be added to the Zabbix PATH. + Typically used to add executables for scripts, but can be anything. ''; }; - package = mkOption { - type = types.attrs; # Note: pkgs.zabbixXY isn't a derivation, but an attrset of { server = ...; agent = ...; }. - default = pkgs.zabbix; - defaultText = "pkgs.zabbix"; - example = literalExample "pkgs.zabbix34"; - description = '' - The Zabbix package to use. + modules = mkOption { + type = types.attrsOf types.package; + description = "A set of modules to load."; + default = {}; + example = literalExample '' + { + "dummy.so" = pkgs.stdenv.mkDerivation { + name = "zabbix-dummy-module-''${cfg.package.version}"; + src = cfg.package.src; + buildInputs = [ cfg.package ]; + sourceRoot = "zabbix-''${cfg.package.version}/src/modules/dummy"; + installPhase = ''' + mkdir -p $out/lib + cp dummy.so $out/lib/ + '''; + }; + } ''; }; server = mkOption { - default = "127.0.0.1"; + type = types.str; description = '' The IP address or hostname of the Zabbix server to connect to. ''; }; + listen = { + ip = mkOption { + type = types.str; + default = "0.0.0.0"; + description = '' + List of comma delimited IP addresses that the agent should listen on. + ''; + }; + + port = mkOption { + type = types.port; + default = 10050; + description = '' + Agent will listen on this port for connections from the server. + ''; + }; + }; + + openFirewall = mkOption { + type = types.bool; + default = false; + description = '' + Open ports in the firewall for the Zabbix Agent. + ''; + }; + + # TODO: for bonus points migrate this to https://github.com/NixOS/rfcs/pull/42 extraConfig = mkOption { default = ""; type = types.lines; description = '' - Configuration that is injected verbatim into the configuration file. + Configuration that is injected verbatim into the configuration file. Refer to + + for details on supported values. ''; }; @@ -75,38 +120,38 @@ in }; - - ###### implementation + # implementation config = mkIf cfg.enable { - users.users = mkIf (!config.services.zabbixServer.enable) (singleton - { name = "zabbix"; - uid = config.ids.uids.zabbix; - description = "Zabbix daemon user"; - }); + networking.firewall = mkIf cfg.openFirewall { + allowedTCPPorts = [ cfg.listen.port ]; + }; - systemd.services."zabbix-agent" = - { description = "Zabbix Agent"; + users.users.${user} = { + description = "Zabbix Agent daemon user"; + inherit group; + }; - wantedBy = [ "multi-user.target" ]; + users.groups.${group} = { }; - path = [ pkgs.nettools ]; + systemd.services."zabbix-agent" = { + description = "Zabbix Agent"; - preStart = - '' - mkdir -m 0755 -p ${stateDir} ${logDir} - chown zabbix ${stateDir} ${logDir} - ''; + wantedBy = [ "multi-user.target" ]; - serviceConfig.ExecStart = "@${zabbix.agent}/sbin/zabbix_agentd zabbix_agentd --config ${configFile}"; - serviceConfig.Type = "forking"; - serviceConfig.RemainAfterExit = true; - serviceConfig.Restart = "always"; - serviceConfig.RestartSec = 2; + path = [ "/run/wrappers" ] ++ cfg.extraPackages; + + serviceConfig = { + ExecStart = "@${cfg.package}/sbin/zabbix_agentd zabbix_agentd -f --config ${configFile}"; + Restart = "always"; + RestartSec = 2; + + User = user; + Group = group; + PrivateTmp = true; }; - - environment.systemPackages = [ zabbix.agent ]; + }; }; diff --git a/nixos/modules/services/monitoring/zabbix-server.nix b/nixos/modules/services/monitoring/zabbix-server.nix index 823145d8b906..11311b466c3f 100644 --- a/nixos/modules/services/monitoring/zabbix-server.nix +++ b/nixos/modules/services/monitoring/zabbix-server.nix @@ -1,147 +1,293 @@ -# Zabbix server daemon. { config, lib, pkgs, ... }: -with lib; - let - cfg = config.services.zabbixServer; + pgsql = config.services.postgresql; + mysql = config.services.mysql; - stateDir = "/run/zabbix"; + inherit (lib) mkDefault mkEnableOption mkIf mkOption; + inherit (lib) attrValues concatMapStringsSep literalExample optional optionalAttrs optionalString types; - logDir = "/var/log/zabbix"; + user = "zabbix"; + group = "zabbix"; + runtimeDir = "/run/zabbix"; + stateDir = "/var/lib/zabbix"; + passwordFile = "${runtimeDir}/zabbix-dbpassword.conf"; - libDir = "/var/lib/zabbix"; + moduleEnv = pkgs.symlinkJoin { + name = "zabbix-server-module-env"; + paths = attrValues cfg.modules; + }; - pidFile = "${stateDir}/zabbix_server.pid"; + configFile = pkgs.writeText "zabbix_server.conf" '' + LogType = console + ListenIP = ${cfg.listen.ip} + ListenPort = ${toString cfg.listen.port} + # TODO: set to cfg.database.socket if database type is pgsql? + DBHost = ${optionalString (cfg.database.createLocally != true) cfg.database.host} + ${optionalString (cfg.database.createLocally != true) "DBPort = ${cfg.database.port}"} + DBName = ${cfg.database.name} + DBUser = ${cfg.database.user} + ${optionalString (cfg.database.passwordFile != null) "Include ${passwordFile}"} + ${optionalString (mysqlLocal && cfg.database.socket != null) "DBSocket = ${cfg.database.socket}"} + SocketDir = ${runtimeDir} + FpingLocation = /run/wrappers/bin/fping + ${optionalString (cfg.modules != {}) "LoadModulePath = ${moduleEnv}/lib"} + ${concatMapStringsSep "\n" (name: "LoadModule = ${name}") (builtins.attrNames cfg.modules)} + ${cfg.extraConfig} + ''; - configFile = pkgs.writeText "zabbix_server.conf" - '' - ListenPort = ${cfg.listenPort} - - LogFile = ${logDir}/zabbix_server - - PidFile = ${pidFile} - - ${optionalString (cfg.dbServer != "localhost") '' - DBHost = ${cfg.dbServer} - ''} - - DBName = ${cfg.dbName} - - DBUser = ${cfg.dbUser} - - DBPort = ${cfg.dbPort} - - DBPassword = ${cfg.dbPassword} - - ${config.services.zabbixServer.extraConfig} - ''; - - useLocalMysql = cfg.dbServer == "localhost" || cfg.dbServer == ""; + mysqlLocal = cfg.database.createLocally && cfg.database.type == "mysql"; + pgsqlLocal = cfg.database.createLocally && cfg.database.type == "pgsql"; in { - - ###### interface + # interface options = { - services.zabbixServer.enable = mkOption { - default = false; - type = types.bool; - description = '' - Whether to run the Zabbix server on this machine. - ''; + services.zabbixServer = { + enable = mkEnableOption "the Zabbix Server"; + + package = mkOption { + type = types.package; + default = if cfg.database.type == "mysql" then pkgs.zabbix.server-mysql else pkgs.zabbix.server-pgsql; + defaultText = "pkgs.zabbix.server-pgsql"; + description = "The Zabbix package to use."; + }; + + extraPackages = mkOption { + type = types.listOf types.package; + default = with pkgs; [ nettools nmap traceroute ]; + defaultText = "[ nettools nmap traceroute ]"; + description = '' + Packages to be added to the Zabbix PATH. + Typically used to add executables for scripts, but can be anything. + ''; + }; + + modules = mkOption { + type = types.attrsOf types.package; + description = "A set of modules to load."; + default = {}; + example = literalExample '' + { + "dummy.so" = pkgs.stdenv.mkDerivation { + name = "zabbix-dummy-module-''${cfg.package.version}"; + src = cfg.package.src; + buildInputs = [ cfg.package ]; + sourceRoot = "zabbix-''${cfg.package.version}/src/modules/dummy"; + installPhase = ''' + mkdir -p $out/lib + cp dummy.so $out/lib/ + '''; + }; + } + ''; + }; + + database = { + type = mkOption { + type = types.enum [ "mysql" "pgsql" ]; + example = "mysql"; + default = "pgsql"; + description = "Database engine to use."; + }; + + host = mkOption { + type = types.str; + default = "localhost"; + description = "Database host address."; + }; + + port = mkOption { + type = types.int; + default = if cfg.database.type == "mysql" then mysql.port else pgsql.port; + description = "Database host port."; + }; + + name = mkOption { + type = types.str; + default = "zabbix"; + description = "Database name."; + }; + + user = mkOption { + type = types.str; + default = "zabbix"; + description = "Database user."; + }; + + passwordFile = mkOption { + type = types.nullOr types.path; + default = null; + example = "/run/keys/zabbix-dbpassword"; + description = '' + A file containing the password corresponding to + . + ''; + }; + + socket = mkOption { + type = types.nullOr types.path; + default = null; + example = "/run/postgresql"; + description = "Path to the unix socket file to use for authentication."; + }; + + createLocally = mkOption { + type = types.bool; + default = true; + description = "Whether to create a local database automatically."; + }; + }; + + listen = { + ip = mkOption { + type = types.str; + default = "0.0.0.0"; + description = '' + List of comma delimited IP addresses that the trapper should listen on. + Trapper will listen on all network interfaces if this parameter is missing. + ''; + }; + + port = mkOption { + type = types.port; + default = 10051; + description = '' + Listen port for trapper. + ''; + }; + }; + + openFirewall = mkOption { + type = types.bool; + default = false; + description = '' + Open ports in the firewall for the Zabbix Server. + ''; + }; + + # TODO: for bonus points migrate this to https://github.com/NixOS/rfcs/pull/42 + extraConfig = mkOption { + default = ""; + type = types.lines; + description = '' + Configuration that is injected verbatim into the configuration file. Refer to + + for details on supported values. + ''; + }; + }; - services.zabbixServer.dbServer = mkOption { - default = "localhost"; - type = types.str; - description = '' - Hostname or IP address of the database server. - Use an empty string ("") to use peer authentication. - ''; - }; - - services.zabbixServer.dbPassword = mkOption { - type = types.str; - description = "Password used to connect to the database server."; - }; - - services.zabbixServer.dbUser = mkOption { - default = "zabbix"; - type = types.str; - description = "User used to connect to the database server."; - }; - - services.zabbixServer.dbPort = mkOption { - default = "3306"; - type = types.str; - description = "Port used to connect to the database server."; - }; - - services.zabbixServer.dbName = mkOption { - default = "zabbix"; - type = types.str; - description = "Port used to connect to the database server."; - }; - - services.zabbixServer.listenPort = mkOption { - default = "10051"; - type = types.str; - description = "Port used to listen to the agent."; - }; - - services.zabbixServer.extraConfig = mkOption { - default = ""; - type = types.lines; - description = '' - Configuration that is injected verbatim into the configuration file. - ''; - }; }; - ###### implementation + # implementation config = mkIf cfg.enable { - services.mysql.enable = useLocalMysql; - services.mysql.package = pkgs.mysql; + assertions = [ + { assertion = cfg.database.createLocally -> cfg.database.user == user; + message = "services.zabbixServer.database.user must be set to ${user} if services.zabbixServer.database.createLocally is set true"; + } + { assertion = cfg.database.createLocally -> cfg.database.passwordFile == null; + message = "a password cannot be specified if services.zabbixServer.database.createLocally is set to true"; + } + ]; - users.users = singleton - { name = "zabbix"; - uid = config.ids.uids.zabbix; - description = "Zabbix daemon user"; + networking.firewall = mkIf cfg.openFirewall { + allowedTCPPorts = [ cfg.listen.port ]; + }; + + services.mysql = optionalAttrs mysqlLocal { + enable = true; + package = mkDefault pkgs.mariadb; + ensureDatabases = [ cfg.database.name ]; + ensureUsers = [ + { name = cfg.database.user; + ensurePermissions = { "${cfg.database.name}.*" = "ALL PRIVILEGES"; }; + } + ]; + }; + + services.postgresql = optionalAttrs pgsqlLocal { + enable = true; + ensureDatabases = [ cfg.database.name ]; + ensureUsers = [ + { name = cfg.database.user; + ensurePermissions = { "DATABASE ${cfg.database.name}" = "ALL PRIVILEGES"; }; + } + ]; + }; + + users.users.${user} = { + description = "Zabbix daemon user"; + uid = config.ids.uids.zabbix; + inherit group; + }; + + users.groups.${group} = { + gid = config.ids.gids.zabbix; + }; + + security.wrappers = { + fping.source = "${pkgs.fping}/bin/fping"; + }; + + systemd.services."zabbix-server" = { + description = "Zabbix Server"; + + wantedBy = [ "multi-user.target" ]; + after = optional mysqlLocal "mysql.service" ++ optional pgsqlLocal "postgresql.service"; + + path = [ "/run/wrappers" ] ++ cfg.extraPackages; + preStart = '' + # pre 19.09 compatibility + if test -e "${runtimeDir}/db-created"; then + mv "${runtimeDir}/db-created" "${stateDir}/" + fi + '' + optionalString pgsqlLocal '' + if ! test -e "${stateDir}/db-created"; then + cat ${cfg.package}/share/zabbix/database/postgresql/schema.sql | ${pgsql.package}/bin/psql ${cfg.database.name} + cat ${cfg.package}/share/zabbix/database/postgresql/images.sql | ${pgsql.package}/bin/psql ${cfg.database.name} + cat ${cfg.package}/share/zabbix/database/postgresql/data.sql | ${pgsql.package}/bin/psql ${cfg.database.name} + touch "${stateDir}/db-created" + fi + '' + optionalString mysqlLocal '' + if ! test -e "${stateDir}/db-created"; then + cat ${cfg.package}/share/zabbix/database/mysql/schema.sql | ${mysql.package}/bin/mysql ${cfg.database.name} + cat ${cfg.package}/share/zabbix/database/mysql/images.sql | ${mysql.package}/bin/mysql ${cfg.database.name} + cat ${cfg.package}/share/zabbix/database/mysql/data.sql | ${mysql.package}/bin/mysql ${cfg.database.name} + touch "${stateDir}/db-created" + fi + '' + optionalString (cfg.database.passwordFile != null) '' + # create a copy of the supplied password file in a format zabbix can consume + touch ${passwordFile} + chmod 0600 ${passwordFile} + echo -n "DBPassword = " > ${passwordFile} + cat ${cfg.database.passwordFile} >> ${passwordFile} + ''; + + serviceConfig = { + ExecStart = "@${cfg.package}/sbin/zabbix_server zabbix_server -f --config ${configFile}"; + Restart = "always"; + RestartSec = 2; + + User = user; + Group = group; + RuntimeDirectory = "zabbix"; + StateDirectory = "zabbix"; + PrivateTmp = true; }; + }; - systemd.services."zabbix-server" = - { description = "Zabbix Server"; + systemd.services.httpd.after = + optional (config.services.zabbixWeb.enable && mysqlLocal) "mysql.service" ++ + optional (config.services.zabbixWeb.enable && pgsqlLocal) "postgresql.service"; - wantedBy = [ "multi-user.target" ]; - after = optional useLocalMysql "mysql.service"; - - preStart = - '' - mkdir -m 0755 -p ${stateDir} ${logDir} ${libDir} - chown zabbix ${stateDir} ${logDir} ${libDir} - ${lib.optionalString (useLocalMysql) '' - if ! test -e "${libDir}/db-created"; then - ${pkgs.sudo}/bin/sudo -u ${config.services.mysql.user} ${pkgs.mysql}/bin/mysql -uroot -e 'CREATE DATABASE ${cfg.dbName}' - ${pkgs.sudo}/bin/sudo -u ${config.services.mysql.user} ${pkgs.mysql}/bin/mysql -uroot -e "GRANT ALL ON ${cfg.dbName}.* TO ${cfg.dbUser}@localhost IDENTIFIED BY \"${cfg.dbPassword}\";" - cat ${pkgs.zabbix.server}/share/zabbix/db/schema/mysql.sql | ${pkgs.sudo}/bin/sudo -u zabbix ${pkgs.mysql}/bin/mysql -u${cfg.dbUser} -p${cfg.dbPassword} ${cfg.dbName} - cat ${pkgs.zabbix.server}/share/zabbix/db/data/images.sql | ${pkgs.sudo}/bin/sudo -u zabbix ${pkgs.mysql}/bin/mysql -u${cfg.dbUser} -p${cfg.dbPassword} ${cfg.dbName} - cat ${pkgs.zabbix.server}/share/zabbix/db/data/data.sql | ${pkgs.sudo}/bin/sudo -u zabbix ${pkgs.mysql}/bin/mysql -u${cfg.dbUser} -p${cfg.dbPassword} ${cfg.dbName} - touch "${libDir}/db-created" - fi''} - ''; - - path = [ pkgs.nettools ]; - - serviceConfig.ExecStart = "${pkgs.zabbix.server}/sbin/zabbix_server --config ${configFile}"; - serviceConfig.Type = "forking"; - serviceConfig.PIDFile = pidFile; - }; }; + } From 4191c80c319581e68561c0888124645b4f499a5a Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Thu, 11 Jul 2019 18:55:58 -0400 Subject: [PATCH 079/112] nixos/zabbixProxy: init module --- nixos/modules/module-list.nix | 1 + .../services/monitoring/zabbix-proxy.nix | 290 ++++++++++++++++++ 2 files changed, 291 insertions(+) create mode 100644 nixos/modules/services/monitoring/zabbix-proxy.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 32f542290b5d..db47e69bd4a4 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -516,6 +516,7 @@ ./services/monitoring/uptime.nix ./services/monitoring/vnstat.nix ./services/monitoring/zabbix-agent.nix + ./services/monitoring/zabbix-proxy.nix ./services/monitoring/zabbix-server.nix ./services/network-filesystems/beegfs.nix ./services/network-filesystems/cachefilesd.nix diff --git a/nixos/modules/services/monitoring/zabbix-proxy.nix b/nixos/modules/services/monitoring/zabbix-proxy.nix new file mode 100644 index 000000000000..c1a45fba4af3 --- /dev/null +++ b/nixos/modules/services/monitoring/zabbix-proxy.nix @@ -0,0 +1,290 @@ +{ config, lib, pkgs, ... }: + +let + cfg = config.services.zabbixProxy; + pgsql = config.services.postgresql; + mysql = config.services.mysql; + + inherit (lib) mkDefault mkEnableOption mkIf mkOption; + inherit (lib) attrValues concatMapStringsSep literalExample optional optionalAttrs optionalString types; + + user = "zabbix"; + group = "zabbix"; + runtimeDir = "/run/zabbix"; + stateDir = "/var/lib/zabbix"; + passwordFile = "${runtimeDir}/zabbix-dbpassword.conf"; + + moduleEnv = pkgs.symlinkJoin { + name = "zabbix-proxy-module-env"; + paths = attrValues cfg.modules; + }; + + configFile = pkgs.writeText "zabbix_proxy.conf" '' + LogType = console + ListenIP = ${cfg.listen.ip} + ListenPort = ${toString cfg.listen.port} + # TODO: set to cfg.database.socket if database type is pgsql? + DBHost = ${optionalString (cfg.database.createLocally != true) cfg.database.host} + ${optionalString (cfg.database.createLocally != true) "DBPort = ${cfg.database.port}"} + DBName = ${cfg.database.name} + DBUser = ${cfg.database.user} + ${optionalString (cfg.database.passwordFile != null) "Include ${passwordFile}"} + ${optionalString (mysqlLocal && cfg.database.socket != null) "DBSocket = ${cfg.database.socket}"} + SocketDir = ${runtimeDir} + FpingLocation = /run/wrappers/bin/fping + ${optionalString (cfg.modules != {}) "LoadModulePath = ${moduleEnv}/lib"} + ${concatMapStringsSep "\n" (name: "LoadModule = ${name}") (builtins.attrNames cfg.modules)} + ${cfg.extraConfig} + ''; + + mysqlLocal = cfg.database.createLocally && cfg.database.type == "mysql"; + pgsqlLocal = cfg.database.createLocally && cfg.database.type == "pgsql"; + +in + +{ + # interface + + options = { + + services.zabbixProxy = { + enable = mkEnableOption "the Zabbix Proxy"; + + package = mkOption { + type = types.package; + default = + if cfg.database.type == "mysql" then pkgs.zabbix.proxy-mysql + else if cfg.database.type == "pgsql" then pkgs.zabbix.proxy-pgsql + else pkgs.zabbix.proxy-sqlite; + defaultText = "pkgs.zabbix.proxy-pgsql"; + description = "The Zabbix package to use."; + }; + + extraPackages = mkOption { + type = types.listOf types.package; + default = with pkgs; [ nettools nmap traceroute ]; + defaultText = "[ nettools nmap traceroute ]"; + description = '' + Packages to be added to the Zabbix PATH. + Typically used to add executables for scripts, but can be anything. + ''; + }; + + modules = mkOption { + type = types.attrsOf types.package; + description = "A set of modules to load."; + default = {}; + example = literalExample '' + { + "dummy.so" = pkgs.stdenv.mkDerivation { + name = "zabbix-dummy-module-''${cfg.package.version}"; + src = cfg.package.src; + buildInputs = [ cfg.package ]; + sourceRoot = "zabbix-''${cfg.package.version}/src/modules/dummy"; + installPhase = ''' + mkdir -p $out/lib + cp dummy.so $out/lib/ + '''; + }; + } + ''; + }; + + database = { + type = mkOption { + type = types.enum [ "mysql" "pgsql" "sqlite" ]; + example = "mysql"; + default = "pgsql"; + description = "Database engine to use."; + }; + + host = mkOption { + type = types.str; + default = "localhost"; + description = "Database host address."; + }; + + port = mkOption { + type = types.int; + default = if cfg.database.type == "mysql" then mysql.port else pgsql.port; + description = "Database host port."; + }; + + name = mkOption { + type = types.str; + default = "zabbix"; + description = "Database name."; + }; + + user = mkOption { + type = types.str; + default = "zabbix"; + description = "Database user."; + }; + + passwordFile = mkOption { + type = types.nullOr types.path; + default = null; + example = "/run/keys/zabbix-dbpassword"; + description = '' + A file containing the password corresponding to + . + ''; + }; + + socket = mkOption { + type = types.nullOr types.path; + default = null; + example = "/run/postgresql"; + description = "Path to the unix socket file to use for authentication."; + }; + + createLocally = mkOption { + type = types.bool; + default = true; + description = "Whether to create a local database automatically."; + }; + }; + + listen = { + ip = mkOption { + type = types.str; + default = "0.0.0.0"; + description = '' + List of comma delimited IP addresses that the trapper should listen on. + Trapper will listen on all network interfaces if this parameter is missing. + ''; + }; + + port = mkOption { + type = types.port; + default = 10051; + description = '' + Listen port for trapper. + ''; + }; + }; + + openFirewall = mkOption { + type = types.bool; + default = false; + description = '' + Open ports in the firewall for the Zabbix Proxy. + ''; + }; + + # TODO: for bonus points migrate this to https://github.com/NixOS/rfcs/pull/42 + extraConfig = mkOption { + default = ""; + type = types.lines; + description = '' + Configuration that is injected verbatim into the configuration file. Refer to + + for details on supported values. + ''; + }; + + }; + + }; + + # implementation + + config = mkIf cfg.enable { + + assertions = [ + { assertion = !config.services.zabbixServer.enable; + message = "Please choose one of services.zabbixServer or services.zabbixProxy."; + } + { assertion = cfg.database.createLocally -> cfg.database.user == user; + message = "services.zabbixProxy.database.user must be set to ${user} if services.zabbixProxy.database.createLocally is set true"; + } + { assertion = cfg.database.createLocally -> cfg.database.passwordFile == null; + message = "a password cannot be specified if services.zabbixProxy.database.createLocally is set to true"; + } + ]; + + networking.firewall = mkIf cfg.openFirewall { + allowedTCPPorts = [ cfg.listen.port ]; + }; + + services.mysql = optionalAttrs mysqlLocal { + enable = true; + package = mkDefault pkgs.mariadb; + ensureDatabases = [ cfg.database.name ]; + ensureUsers = [ + { name = cfg.database.user; + ensurePermissions = { "${cfg.database.name}.*" = "ALL PRIVILEGES"; }; + } + ]; + }; + + services.postgresql = optionalAttrs pgsqlLocal { + enable = true; + ensureDatabases = [ cfg.database.name ]; + ensureUsers = [ + { name = cfg.database.user; + ensurePermissions = { "DATABASE ${cfg.database.name}" = "ALL PRIVILEGES"; }; + } + ]; + }; + + users.users.${user} = { + description = "Zabbix daemon user"; + uid = config.ids.uids.zabbix; + inherit group; + }; + + users.groups.${group} = { + gid = config.ids.gids.zabbix; + }; + + security.wrappers = { + fping.source = "${pkgs.fping}/bin/fping"; + }; + + systemd.services."zabbix-proxy" = { + description = "Zabbix Proxy"; + + wantedBy = [ "multi-user.target" ]; + after = optional mysqlLocal "mysql.service" ++ optional pgsqlLocal "postgresql.service"; + + path = [ "/run/wrappers" ] ++ cfg.extraPackages; + preStart = optionalString pgsqlLocal '' + if ! test -e "${stateDir}/db-created"; then + cat ${cfg.package}/share/zabbix/database/postgresql/schema.sql | ${pgsql.package}/bin/psql ${cfg.database.name} + cat ${cfg.package}/share/zabbix/database/postgresql/images.sql | ${pgsql.package}/bin/psql ${cfg.database.name} + cat ${cfg.package}/share/zabbix/database/postgresql/data.sql | ${pgsql.package}/bin/psql ${cfg.database.name} + touch "${stateDir}/db-created" + fi + '' + optionalString mysqlLocal '' + if ! test -e "${stateDir}/db-created"; then + cat ${cfg.package}/share/zabbix/database/mysql/schema.sql | ${mysql.package}/bin/mysql ${cfg.database.name} + cat ${cfg.package}/share/zabbix/database/mysql/images.sql | ${mysql.package}/bin/mysql ${cfg.database.name} + cat ${cfg.package}/share/zabbix/database/mysql/data.sql | ${mysql.package}/bin/mysql ${cfg.database.name} + touch "${stateDir}/db-created" + fi + '' + optionalString (cfg.database.passwordFile != null) '' + # create a copy of the supplied password file in a format zabbix can consume + touch ${passwordFile} + chmod 0600 ${passwordFile} + echo -n "DBPassword = " > ${passwordFile} + cat ${cfg.database.passwordFile} >> ${passwordFile} + ''; + + serviceConfig = { + ExecStart = "@${cfg.package}/sbin/zabbix_proxy zabbix_proxy -f --config ${configFile}"; + Restart = "always"; + RestartSec = 2; + + User = user; + Group = group; + RuntimeDirectory = "zabbix"; + StateDirectory = "zabbix"; + PrivateTmp = true; + }; + }; + + }; + +} From 6a1de5460b3942df1a45543d294bbe45f4f938db Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Sun, 30 Jun 2019 12:59:01 -0400 Subject: [PATCH 080/112] nixos/httpd: remove broken trac subservice --- nixos/doc/manual/release-notes/rl-1909.xml | 5 + .../web-servers/apache-httpd/trac.nix | 121 ------------------ nixos/tests/trac.nix | 74 ----------- 3 files changed, 5 insertions(+), 195 deletions(-) delete mode 100644 nixos/modules/services/web-servers/apache-httpd/trac.nix delete mode 100644 nixos/tests/trac.nix diff --git a/nixos/doc/manual/release-notes/rl-1909.xml b/nixos/doc/manual/release-notes/rl-1909.xml index 53f5b8bb7321..9dff69ed9eb2 100644 --- a/nixos/doc/manual/release-notes/rl-1909.xml +++ b/nixos/doc/manual/release-notes/rl-1909.xml @@ -318,6 +318,11 @@ The mercurial httpd.extraSubservice has been removed from nixpkgs due to lack of maintainer. + + + The trac httpd.extraSubservice has been removed from nixpkgs because it was unmaintained. + + diff --git a/nixos/modules/services/web-servers/apache-httpd/trac.nix b/nixos/modules/services/web-servers/apache-httpd/trac.nix deleted file mode 100644 index 28b411a64b6f..000000000000 --- a/nixos/modules/services/web-servers/apache-httpd/trac.nix +++ /dev/null @@ -1,121 +0,0 @@ -{ config, lib, pkgs, serverInfo, ... }: - -with lib; - -let - - # Build a Subversion instance with Apache modules and Swig/Python bindings. - subversion = pkgs.subversion.override { - bdbSupport = true; - httpServer = true; - pythonBindings = true; - apacheHttpd = httpd; - }; - - httpd = serverInfo.serverConfig.package; - - versionPre24 = versionOlder httpd.version "2.4"; - -in - -{ - - options = { - - projectsLocation = mkOption { - description = "URL path in which Trac projects can be accessed"; - default = "/projects"; - }; - - projects = mkOption { - description = "List of projects that should be provided by Trac. If they are not defined yet empty projects are created."; - default = []; - example = - [ { identifier = "myproject"; - name = "My Project"; - databaseURL="postgres://root:password@/tracdb"; - subversionRepository="/data/subversion/myproject"; - } - ]; - }; - - user = mkOption { - default = "wwwrun"; - description = "User account under which Trac runs."; - }; - - group = mkOption { - default = "wwwrun"; - description = "Group under which Trac runs."; - }; - - ldapAuthentication = { - enable = mkOption { - default = false; - description = "Enable the ldap authentication in trac"; - }; - - url = mkOption { - default = "ldap://127.0.0.1/dc=example,dc=co,dc=ke?uid?sub?(objectClass=inetOrgPerson)"; - description = "URL of the LDAP authentication"; - }; - - name = mkOption { - default = "Trac server"; - description = "AuthName"; - }; - }; - - }; - - extraModules = singleton - { name = "python"; path = "${pkgs.mod_python}/modules/mod_python.so"; }; - - extraConfig = '' - - SetHandler mod_python - PythonHandler trac.web.modpython_frontend - PythonOption TracEnvParentDir /var/trac/projects - PythonOption TracUriRoot ${config.projectsLocation} - PythonOption PYTHON_EGG_CACHE /var/trac/egg-cache - - ${if config.ldapAuthentication.enable then '' - - AuthType Basic - AuthName "${config.ldapAuthentication.name}" - AuthBasicProvider "ldap" - AuthLDAPURL "${config.ldapAuthentication.url}" - ${if versionPre24 then "authzldapauthoritative Off" else ""} - require valid-user - - '' else ""} - ''; - - globalEnvVars = singleton - { name = "PYTHONPATH"; - value = - makeSearchPathOutput "lib" "lib/${pkgs.python.libPrefix}/site-packages" - [ pkgs.mod_python - pkgs.pythonPackages.trac - pkgs.pythonPackages.setuptools - pkgs.pythonPackages.genshi - pkgs.pythonPackages.psycopg2 - subversion - ]; - }; - - startupScript = pkgs.writeScript "activateTrac" '' - mkdir -p /var/trac - chown ${config.user}:${config.group} /var/trac - - ${concatMapStrings (project: - '' - if [ ! -d /var/trac/${project.identifier} ] - then - export PYTHONPATH=${pkgs.pythonPackages.psycopg2}/lib/${pkgs.python.libPrefix}/site-packages - ${pkgs.pythonPackages.trac}/bin/trac-admin /var/trac/${project.identifier} initenv "${project.name}" "${project.databaseURL}" svn "${project.subversionRepository}" - fi - '' ) (config.projects)} - ''; - -} diff --git a/nixos/tests/trac.nix b/nixos/tests/trac.nix deleted file mode 100644 index 8ec11ebda2cf..000000000000 --- a/nixos/tests/trac.nix +++ /dev/null @@ -1,74 +0,0 @@ -import ./make-test.nix ({ pkgs, ... }: { - name = "trac"; - meta = with pkgs.stdenv.lib.maintainers; { - maintainers = [ eelco ]; - }; - - nodes = { - storage = - { ... }: - { services.nfs.server.enable = true; - services.nfs.server.exports = '' - /repos 192.168.1.0/255.255.255.0(rw,no_root_squash) - ''; - services.nfs.server.createMountPoints = true; - }; - - postgresql = - { pkgs, ... }: - { services.postgresql.enable = true; - services.postgresql.package = pkgs.postgresql; - services.postgresql.enableTCPIP = true; - services.postgresql.authentication = '' - # Generated file; do not edit! - local all all trust - host all all 127.0.0.1/32 trust - host all all ::1/128 trust - host all all 192.168.1.0/24 trust - ''; - }; - - webserver = - { pkgs, ... }: - { fileSystems = pkgs.lib.mkVMOverride - [ { mountPoint = "/repos"; - device = "storage:/repos"; - fsType = "nfs"; - } - ]; - services.httpd.enable = true; - services.httpd.adminAddr = "root@localhost"; - services.httpd.extraSubservices = [ { serviceType = "trac"; } ]; - environment.systemPackages = [ pkgs.pythonPackages.trac pkgs.subversion ]; - }; - - client = - { ... }: - { imports = [ ./common/x11.nix ]; - services.xserver.desktopManager.plasma5.enable = true; - }; - }; - - testScript = - '' - startAll; - - $postgresql->waitForUnit("postgresql"); - $postgresql->succeed("createdb trac"); - - $webserver->succeed("mkdir -p /repos/trac"); - $webserver->succeed("svnadmin create /repos/trac"); - - $webserver->waitForUnit("httpd"); - $webserver->waitForFile("/var/trac"); - $webserver->succeed("mkdir -p /var/trac/projects/test"); - $webserver->succeed("PYTHONPATH=${pkgs.pythonPackages.psycopg2}/lib/${pkgs.python.libPrefix}/site-packages trac-admin /var/trac/projects/test initenv Test postgres://root\@postgresql/trac svn /repos/trac"); - - $client->waitForX; - $client->execute("konqueror http://webserver/projects/test &"); - $client->waitForWindow(qr/Test.*Konqueror/); - $client->sleep(30); # loading takes a long time - - $client->screenshot("screen"); - ''; -}) From 649ec93c37242c2fe6787d7187e88ed5cf755986 Mon Sep 17 00:00:00 2001 From: Aaron Andersen Date: Thu, 11 Jul 2019 19:46:06 -0400 Subject: [PATCH 081/112] foswiki: drop package & httpd subservice --- nixos/doc/manual/release-notes/rl-1909.xml | 6 ++ .../web-servers/apache-httpd/foswiki.nix | 78 ------------------- pkgs/servers/foswiki/default.nix | 44 ----------- pkgs/top-level/all-packages.nix | 2 - 4 files changed, 6 insertions(+), 124 deletions(-) delete mode 100644 nixos/modules/services/web-servers/apache-httpd/foswiki.nix delete mode 100644 pkgs/servers/foswiki/default.nix diff --git a/nixos/doc/manual/release-notes/rl-1909.xml b/nixos/doc/manual/release-notes/rl-1909.xml index 9dff69ed9eb2..2d14096dcadd 100644 --- a/nixos/doc/manual/release-notes/rl-1909.xml +++ b/nixos/doc/manual/release-notes/rl-1909.xml @@ -323,6 +323,12 @@ The trac httpd.extraSubservice has been removed from nixpkgs because it was unmaintained. + + + The foswiki package and associated httpd.extraSubservice have been removed + from nixpkgs due to lack of maintainer. + + diff --git a/nixos/modules/services/web-servers/apache-httpd/foswiki.nix b/nixos/modules/services/web-servers/apache-httpd/foswiki.nix deleted file mode 100644 index 8c1ac8935a47..000000000000 --- a/nixos/modules/services/web-servers/apache-httpd/foswiki.nix +++ /dev/null @@ -1,78 +0,0 @@ -{ config, pkgs, lib, serverInfo, ... }: -let - inherit (pkgs) foswiki; - inherit (serverInfo.serverConfig) user group; - inherit (config) vardir; -in -{ - options.vardir = lib.mkOption { - type = lib.types.path; - default = "/var/www/foswiki"; - description = "The directory where variable foswiki data will be stored and served from."; - }; - - # TODO: this will probably need to be better customizable - extraConfig = - let httpd-conf = pkgs.runCommand "foswiki-httpd.conf" - { preferLocalBuild = true; } - '' - substitute '${foswiki}/foswiki_httpd_conf.txt' "$out" \ - --replace /var/www/foswiki/ "${vardir}/" - ''; - in - '' - RewriteEngine on - RewriteRule /foswiki/(.*) ${vardir}/$1 - - - Require all granted - - - Include ${httpd-conf} - - Options FollowSymlinks - - ''; - - /** This handles initial setup and updates. - It will probably need some tweaking, maybe per-site. */ - startupScript = pkgs.writeScript "foswiki_startup.sh" ( - let storeLink = "${vardir}/package"; in - '' - [ -e '${storeLink}' ] || needs_setup=1 - mkdir -p '${vardir}' - cd '${vardir}' - ln -sf -T '${foswiki}' '${storeLink}' - - if [ -n "$needs_setup" ]; then # do initial setup - mkdir -p bin lib - # setup most of data/ as copies only - cp -r '${foswiki}'/data '${vardir}/' - rm -r '${vardir}'/data/{System,mime.types} - ln -sr -t '${vardir}/data/' '${storeLink}'/data/{System,mime.types} - - ln -sr '${storeLink}/locale' . - - mkdir pub - ln -sr '${storeLink}/pub/System' pub/ - - mkdir templates - ln -sr '${storeLink}'/templates/* templates/ - - ln -sr '${storeLink}/tools' . - - mkdir -p '${vardir}'/working/{logs,tmp} - ln -sr '${storeLink}/working/README' working/ # used to check dir validity - - chown -R '${user}:${group}' . - chmod +w -R . - fi - - # bin/* and lib/* shall always be overwritten, in case files are added - ln -srf '${storeLink}'/bin/* '${vardir}/bin/' - ln -srf '${storeLink}'/lib/* '${vardir}/lib/' - '' - /* Symlinking bin/ one-by-one ensures that ${vardir}/lib/LocalSite.cfg - is used instead of ${foswiki}/... */ - ); -} diff --git a/pkgs/servers/foswiki/default.nix b/pkgs/servers/foswiki/default.nix deleted file mode 100644 index 67d460809e15..000000000000 --- a/pkgs/servers/foswiki/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ stdenv, fetchurl, perlPackages }: - -perlPackages.buildPerlPackage rec { - pname = "foswiki"; - version = "2.1.0"; - - src = fetchurl { - url = "mirror://sourceforge/foswiki/${version}/Foswiki-${version}.tgz"; - sha256 = "03286pb966h99zgickm2f20rgnqwp9wga5wfkdvirv084kjdh8vp"; - }; - - outputs = [ "out" ]; - - buildInputs = with perlPackages; [ - # minimum requirements from INSTALL.html#System_Requirements - AlgorithmDiff ArchiveTar AuthenSASL CGI CGISession CryptPasswdMD5 - EmailMIME Encode Error FileCopyRecursive HTMLParser HTMLTree - IOSocketSSL JSON - LocaleMaketextLexicon LocaleMsgfmt - LWP URI perlPackages.Version - /*# optional dependencies - libapreq2 DBI DBDmysql DBDPg DBDSQLite FCGI FCGIProcManager - CryptSMIME CryptX509 ConvertPEM - */ - ]; - - preConfigure = '' - touch Makefile.PL - patchShebangs . - ''; - configureScript = "bin/configure"; - - # there's even no makefile - doCheck = false; - installPhase = ''cp -r . "$out" ''; - - meta = with stdenv.lib; { - description = "An open, programmable collaboration platform"; - homepage = http://foswiki.org; - license = licenses.gpl2Plus; - platforms = platforms.linux; - }; -} - diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f05b03386aa1..f0ea071f9c59 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -14281,8 +14281,6 @@ in firebird = callPackage ../servers/firebird { icu = null; stdenv = gcc5Stdenv; }; firebirdSuper = firebird.override { icu = icu58; superServer = true; stdenv = gcc5Stdenv; }; - foswiki = callPackage ../servers/foswiki { }; - frab = callPackage ../servers/web-apps/frab { }; freepops = callPackage ../servers/mail/freepops { }; From f4ecf17b20811a9e2cbe1687f026e6ff07a7df85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Thu, 11 Jul 2019 19:57:52 +0200 Subject: [PATCH 082/112] pythonPackages.fasttext: 0.2.0 -> 0.9.1 Changes: - Refactoring of internal classes. - Better unicode handling. - New Python API: https://fasttext.cc/docs/en/python-module.html https://github.com/facebookresearch/fastText/releases/tag/v0.9.1 --- pkgs/development/python-modules/fasttext/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/fasttext/default.nix b/pkgs/development/python-modules/fasttext/default.nix index 05034dc75262..9f1a8b18d7be 100644 --- a/pkgs/development/python-modules/fasttext/default.nix +++ b/pkgs/development/python-modules/fasttext/default.nix @@ -2,13 +2,13 @@ buildPythonPackage rec { pname = "fasttext"; - version = "0.2.0"; + version = "0.9.1"; src = fetchFromGitHub { owner = "facebookresearch"; repo = "fastText"; - rev = version; - sha256 = "1fcrz648r2s80bf7vc0l371xillz5jk3ldaiv9jb7wnsyri831b4"; + rev = "v${version}"; + sha256 = "1cbzz98qn8aypp4r5kwwwc9wiq5bwzv51kcsb15xjfs9lz8h3rii"; }; buildInputs = [ pybind11 ]; From 3a4ba91b4adee51428309946ada713aa5414ef9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20de=20Kok?= Date: Thu, 11 Jul 2019 19:49:07 +0200 Subject: [PATCH 083/112] fasttext: 0.2.0 -> 0.9.1 Changes: - Refactoring of internal classes. - Better unicode handling. https://github.com/facebookresearch/fastText/releases/tag/v0.9.1 --- .../science/machine-learning/fasttext/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/science/machine-learning/fasttext/default.nix b/pkgs/applications/science/machine-learning/fasttext/default.nix index 0ae9a74d0d0a..0de54572862b 100644 --- a/pkgs/applications/science/machine-learning/fasttext/default.nix +++ b/pkgs/applications/science/machine-learning/fasttext/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "fasttext"; - version = "0.2.0"; + version = "0.9.1"; src = fetchFromGitHub { owner = "facebookresearch"; repo = "fastText"; - rev = version; - sha256 = "1fcrz648r2s80bf7vc0l371xillz5jk3ldaiv9jb7wnsyri831b4"; + rev = "v${version}"; + sha256 = "1cbzz98qn8aypp4r5kwwwc9wiq5bwzv51kcsb15xjfs9lz8h3rii"; }; nativeBuildInputs = [ cmake ]; From 6d3021f12c087437cc11303291bb54ea05cdbb11 Mon Sep 17 00:00:00 2001 From: Pradyuman Vig Date: Thu, 11 Jul 2019 19:38:25 -0600 Subject: [PATCH 084/112] maintainers: add pradyuman --- maintainers/maintainer-list.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index ef2ab823acc7..4d670f6f7d16 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -4080,6 +4080,16 @@ github = "pradeepchhetri"; name = "Pradeep Chhetri"; }; + pradyuman = { + email = "me@pradyuman.co"; + github = "pradyuman"; + name = "Pradyuman Vig"; + keys = [ + { longkeyid = "rsa4096/4F74D5361C4CA31E"; + fingerprint = "240B 57DE 4271 2480 7CE3 EAC8 4F74 D536 1C4C A31E"; + } + ]; + }; prikhi = { email = "pavan.rikhi@gmail.com"; github = "prikhi"; From d4858a01e16ed4f812894cbd4467d3b607a1d9d6 Mon Sep 17 00:00:00 2001 From: Pradyuman Vig Date: Thu, 11 Jul 2019 19:44:54 -0600 Subject: [PATCH 085/112] grpcui: init at 0.2.0 --- pkgs/tools/networking/grpcui/default.nix | 23 +++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 25 insertions(+) create mode 100644 pkgs/tools/networking/grpcui/default.nix diff --git a/pkgs/tools/networking/grpcui/default.nix b/pkgs/tools/networking/grpcui/default.nix new file mode 100644 index 000000000000..b256b5b37d93 --- /dev/null +++ b/pkgs/tools/networking/grpcui/default.nix @@ -0,0 +1,23 @@ +{ buildGoModule, fetchFromGitHub, lib }: + +buildGoModule rec { + pname = "grpcui"; + version = "0.2.0"; + + src = fetchFromGitHub { + owner = "fullstorydev"; + repo = pname; + rev = "v${version}"; + sha256 = "0h4xpyd6phj3svjzxh6nd98ym81x4a2v6jxcnqj4psjinwd4p3md"; + }; + + modSha256 = "1hsq2gfhscl4wvld346xrp018sb1g3xvga3d8chlbgw93rmhhszb"; + + meta = with lib; { + description = "An interactive web UI for gRPC, along the lines of postman"; + homepage = "https://github.com/fullstorydev/grpcui"; + license = licenses.mit; + maintainers = with maintainers; [ pradyuman ]; + platforms = platforms.linux ++ platforms.darwin; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 28769eb60ea7..007ec0b2254a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3444,6 +3444,8 @@ in grpcurl = callPackage ../tools/networking/grpcurl { }; + grpcui = callPackage ../tools/networking/grpcui { }; + grub = pkgsi686Linux.callPackage ../tools/misc/grub ({ stdenv = overrideCC stdenv buildPackages.pkgsi686Linux.gcc6; } // (config.grub or {})); From 195e30b74a20f5ddd9b50ee27201c10055c992a2 Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Fri, 21 Jun 2019 23:54:57 +0200 Subject: [PATCH 086/112] distgen: init at 1.3 This tool is mainly used in openshift to build source to image containers. --- pkgs/development/tools/distgen/default.nix | 32 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/development/tools/distgen/default.nix diff --git a/pkgs/development/tools/distgen/default.nix b/pkgs/development/tools/distgen/default.nix new file mode 100644 index 000000000000..dd4cf4d8eb1b --- /dev/null +++ b/pkgs/development/tools/distgen/default.nix @@ -0,0 +1,32 @@ +{ lib, python3 }: + +python3.pkgs.buildPythonApplication rec { + pname = "distgen"; + version = "1.3"; + + src = python3.pkgs.fetchPypi { + inherit pname version; + sha256 = "03jwy08wgp1lp6208vks1hv9g1f3aj45cml6k99mm3nw1jfnlbbq"; + }; + + checkInputs = with python3.pkgs; [ + pytest + mock + ]; + + propagatedBuildInputs = with python3.pkgs; [ + distro + jinja2 + six + pyyaml + ]; + + checkPhase = "make test-unit PYTHON=${python3.executable}"; + + meta = with lib; { + description = "Templating system/generator for distributions"; + license = licenses.gpl2Plus; + homepage = "https://distgen.readthedocs.io/"; + maintainers = with maintainers; [ bachp ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 25fc335963ec..e6e6922c7add 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1423,6 +1423,8 @@ in dislocker = callPackage ../tools/filesystems/dislocker { }; + distgen = callPackage ../development/tools/distgen {}; + distrobuilder = callPackage ../tools/virtualization/distrobuilder { }; ditaa = callPackage ../tools/graphics/ditaa { }; From 345843601aaa2c9fb77af316f00630f4a33a8ac6 Mon Sep 17 00:00:00 2001 From: xrelkd <46590321+xrelkd@users.noreply.github.com> Date: Fri, 12 Jul 2019 10:19:22 +0800 Subject: [PATCH 087/112] youtube-dl: 2019.07.02 -> 2019.07.12 --- pkgs/tools/misc/youtube-dl/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/youtube-dl/default.nix b/pkgs/tools/misc/youtube-dl/default.nix index 8aaa8e22994d..a5dcad2b1195 100644 --- a/pkgs/tools/misc/youtube-dl/default.nix +++ b/pkgs/tools/misc/youtube-dl/default.nix @@ -18,11 +18,11 @@ buildPythonPackage rec { # The websites youtube-dl deals with are a very moving target. That means that # downloads break constantly. Because of that, updates should always be backported # to the latest stable release. - version = "2019.07.02"; + version = "2019.07.12"; src = fetchurl { url = "https://yt-dl.org/downloads/${version}/${pname}-${version}.tar.gz"; - sha256 = "1ci09m2fg23vk92sk3wkg0b2jkph8d06spyn2s3fgr1rwzwazgir"; + sha256 = "1mf8nh972hjpxj01q37jghj32rv21y91fpbwwsqmbmh65dr4k1dn"; }; nativeBuildInputs = [ makeWrapper ]; From 2c6ba83aa0391e71bcda0eb7d8f0b054ff2d060e Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Wed, 19 Jun 2019 10:19:44 +0300 Subject: [PATCH 088/112] qtpbfimageplugin: init at 1.4 --- .../libraries/qtpbfimageplugin/default.nix | 39 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 41 insertions(+) create mode 100644 pkgs/development/libraries/qtpbfimageplugin/default.nix diff --git a/pkgs/development/libraries/qtpbfimageplugin/default.nix b/pkgs/development/libraries/qtpbfimageplugin/default.nix new file mode 100644 index 000000000000..8ad908013bdc --- /dev/null +++ b/pkgs/development/libraries/qtpbfimageplugin/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchFromGitHub, qmake, qtbase, protobuf }: + +stdenv.mkDerivation rec { + pname = "qtpbfimageplugin"; + version = "1.4"; + + src = fetchFromGitHub { + owner = "tumic0"; + repo = "QtPBFImagePlugin"; + rev = version; + sha256 = "0d39i7rmhrmm2df49gd47zm37gnz3fmyr6hfc6hhzvk08jb6956r"; + }; + + nativeBuildInputs = [ qmake ]; + buildInputs = [ qtbase protobuf ]; + + postPatch = '' + # Fix plugin dir + substituteInPlace pbfplugin.pro \ + --replace "\$\$[QT_INSTALL_PLUGINS]" "$out/$qtPluginPrefix" + + # Fix darwin build + substituteInPlace pbfplugin.pro \ + --replace '$$PROTOBUF/lib/libprotobuf-lite.a' '${protobuf}/lib/libprotobuf-lite.dylib' + ''; + + meta = with stdenv.lib; { + description = "Qt image plugin for displaying Mapbox vector tiles"; + longDescription = '' + QtPBFImagePlugin is a Qt image plugin that enables applications capable of + displaying raster MBTiles maps or raster XYZ online maps to also display PBF + vector tiles without (almost) any application modifications. + ''; + homepage = https://github.com/tumic0/QtPBFImagePlugin; + license = licenses.lgpl3; + maintainers = [ maintainers.sikmir ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0b890f34b7f3..0dc6af2eb15f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12987,6 +12987,8 @@ in qtkeychain = callPackage ../development/libraries/qtkeychain { }; + qtpbfimageplugin = libsForQt5.callPackage ../development/libraries/qtpbfimageplugin { }; + qtscriptgenerator = callPackage ../development/libraries/qtscriptgenerator { }; quesoglc = callPackage ../development/libraries/quesoglc { }; From 5236c81af47b478bf377c6c91ad66025cb6067ab Mon Sep 17 00:00:00 2001 From: xrelkd <46590321+xrelkd@users.noreply.github.com> Date: Fri, 12 Jul 2019 11:58:26 +0800 Subject: [PATCH 089/112] mage: 1.7.1 -> 1.8.0 (#64591) --- .../tools/build-managers/mage/default.nix | 28 +++++++++---------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/pkgs/development/tools/build-managers/mage/default.nix b/pkgs/development/tools/build-managers/mage/default.nix index bce8dedbf58a..40ddf742ed5e 100644 --- a/pkgs/development/tools/build-managers/mage/default.nix +++ b/pkgs/development/tools/build-managers/mage/default.nix @@ -1,32 +1,30 @@ -{ buildGoPackage, fetchFromGitHub, lib }: +{ buildGoModule, fetchFromGitHub, lib }: -with lib; - -buildGoPackage rec { - name = "mage-${version}"; - version = "1.7.1"; - - goPackagePath = "github.com/magefile/mage"; - subPackages = [ "." ]; +buildGoModule rec { + pname = "mage"; + version = "1.8.0"; src = fetchFromGitHub { owner = "magefile"; - repo = "mage"; + repo = pname; rev = "v${version}"; - sha256 = "0n4k5dy338rxwzj654smxzlanmd0zws6mdzv0wc4byqjhr7mqhg2"; + sha256 = "0vkzm2k2v3np30kdgz9kpwkhnshbjcn8j1y321djz2h3w23k5h7r"; }; - buildFlagsArray = [ + modSha256 = "0sjjj9z1dhilhpc8pq4154czrb79z9cm044jvn75kxcjv6v5l2m5"; + + buildFlagsArray = [ "-ldflags=" "-X github.com/magefile/mage/mage.commitHash=v${version}" "-X github.com/magefile/mage/mage.gitTag=v${version}" + "-X github.com/magefile/mage/mage.timestamp=1970-01-01T00:00:00Z" ]; - meta = { + meta = with lib; { description = "A Make/Rake-like Build Tool Using Go"; + homepage = "https://magefile.org/"; license = licenses.asl20; - maintainers = [ maintainers.swdunlop ]; - homepage = https://magefile.org/; + maintainers = with maintainers; [ swdunlop ]; platforms = platforms.all; }; } From 5d04dcf4f50fc9cdf6581f0dd555acf99ab086a4 Mon Sep 17 00:00:00 2001 From: Linus Heckemann Date: Thu, 27 Jun 2019 10:50:47 +0200 Subject: [PATCH 090/112] minecraft-server: 1.14 -> 1.14.3 Also removes older versions. --- pkgs/games/minecraft-server/default.nix | 77 +++++++++---------------- pkgs/top-level/all-packages.nix | 7 +-- 2 files changed, 28 insertions(+), 56 deletions(-) diff --git a/pkgs/games/minecraft-server/default.nix b/pkgs/games/minecraft-server/default.nix index cc91d867f1d8..0210fdd055ad 100644 --- a/pkgs/games/minecraft-server/default.nix +++ b/pkgs/games/minecraft-server/default.nix @@ -1,57 +1,34 @@ { stdenv, fetchurl, jre }: +stdenv.mkDerivation rec { + name = "minecraft-server-${version}"; + version = "1.14.3"; -let - common = { version, sha256, url }: - stdenv.mkDerivation (rec { - name = "minecraft-server-${version}"; - inherit version; - - src = fetchurl { - inherit url sha256; - }; - - preferLocalBuild = true; - - installPhase = '' - mkdir -p $out/bin $out/lib/minecraft - cp -v $src $out/lib/minecraft/server.jar - - cat > $out/bin/minecraft-server << EOF - #!/bin/sh - exec ${jre}/bin/java \$@ -jar $out/lib/minecraft/server.jar nogui - EOF - - chmod +x $out/bin/minecraft-server - ''; - - phases = "installPhase"; - - meta = { - description = "Minecraft Server"; - homepage = "https://minecraft.net"; - license = stdenv.lib.licenses.unfreeRedistributable; - platforms = stdenv.lib.platforms.unix; - maintainers = with stdenv.lib.maintainers; [ thoughtpolice tomberek costrouc]; - }; - }); - -in { - minecraft-server_1_14 = common { - version = "1.14"; - url = "https://launcher.mojang.com/v1/objects/f1a0073671057f01aa843443fef34330281333ce/server.jar"; - sha256 = "671e3d334dd601c520bf1aeb96e49038145172bef16bc6c418e969fd8bf8ff6c"; + src = fetchurl { + url = "https://launcher.mojang.com/v1/objects/d0d0fe2b1dc6ab4c65554cb734270872b72dadd6/server.jar"; + sha256 = "0f0v0kqz2v5758551yji1vj6xf43lvbma30v3crz4h7cpzq5c8ll"; }; - minecraft-server_1_13_2 = common { - version = "1.13.2"; - url = "https://launcher.mojang.com/v1/objects/3737db93722a9e39eeada7c27e7aca28b144ffa7/server.jar"; - sha256 = "13h8dxrrgqa1g6sd7aaw26779hcsqsyjm7xm0sknifn54lnamlzz"; - }; + preferLocalBuild = true; - minecraft-server_1_12_2 = common { - version = "1.12.2"; - url = "https://s3.amazonaws.com/Minecraft.Download/versions/1.12.2/minecraft_server.1.12.2.jar"; - sha256 = "0zhnac6yvkdgdaag0gb0fgrkgizbwrpf7s76yqdiknfswrs947zy"; - }; + installPhase = '' + mkdir -p $out/bin $out/lib/minecraft + cp -v $src $out/lib/minecraft/server.jar + cat > $out/bin/minecraft-server << EOF + #!/bin/sh + exec ${jre}/bin/java \$@ -jar $out/lib/minecraft/server.jar nogui + EOF + + chmod +x $out/bin/minecraft-server + ''; + + phases = "installPhase"; + + meta = { + description = "Minecraft Server"; + homepage = "https://minecraft.net"; + license = stdenv.lib.licenses.unfreeRedistributable; + platforms = stdenv.lib.platforms.unix; + maintainers = with stdenv.lib.maintainers; [ thoughtpolice tomberek costrouc]; + }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4ff4c5c3b89a..bed4577ff034 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -21661,12 +21661,7 @@ in minecraft = callPackage ../games/minecraft { }; - minecraft-server = minecraft-server_1_14; - - inherit (callPackages ../games/minecraft-server { }) - minecraft-server_1_14 - minecraft-server_1_13_2 - minecraft-server_1_12_2; + minecraft-server = callPackage ../games/minecraft-server { }; moon-buggy = callPackage ../games/moon-buggy {}; From e72a02e68ce8d6cff0be4b7fa1e3906e88b9516a Mon Sep 17 00:00:00 2001 From: Philipp Middendorf Date: Fri, 21 Jun 2019 11:24:00 +0200 Subject: [PATCH 091/112] SDL_gpu: init at 20190124 --- .../development/libraries/SDL_gpu/default.nix | 36 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 38 insertions(+) create mode 100644 pkgs/development/libraries/SDL_gpu/default.nix diff --git a/pkgs/development/libraries/SDL_gpu/default.nix b/pkgs/development/libraries/SDL_gpu/default.nix new file mode 100644 index 000000000000..dc88b7b12ef3 --- /dev/null +++ b/pkgs/development/libraries/SDL_gpu/default.nix @@ -0,0 +1,36 @@ +{ stdenv, fetchFromGitHub, cmake, SDL2, libGLU }: + +stdenv.mkDerivation rec { + pname = "SDL_gpu-unstable"; + version = "2019-01-24"; + + src = fetchFromGitHub { + owner = "grimfang4"; + repo = "sdl-gpu"; + rev = "e3d350b325a0e0d0b3007f69ede62313df46c6ef"; + sha256 = "0kibcaim01inb6xxn4mr6affn4hm50vz9kahb5k9iz8dmdsrhxy1"; + }; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ SDL2 libGLU ]; + + cmakeFlags = [ + "-DSDL_gpu_BUILD_DEMOS=OFF" + "-DSDL_gpu_BUILD_TOOLS=OFF" + "-DSDL_gpu_BUILD_VIDEO_TEST=OFF" + "-DSDL_gpu_BUILD_TESTS=OFF" + ]; + + patchPhase = '' + sed -ie '210s#''${OUTPUT_DIR}/lib#''${CMAKE_INSTALL_LIBDIR}#' src/CMakeLists.txt + sed -ie '213s#''${OUTPUT_DIR}/lib#''${CMAKE_INSTALL_LIBDIR}#' src/CMakeLists.txt + ''; + + meta = with stdenv.lib; { + description = "A library for high-performance, modern 2D graphics with SDL written in C"; + homepage = "https://github.com/grimfang4/sdl-gpu"; + license = licenses.mit; + maintainers = with maintainers; [ pmiddend ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3e9fe1528a01..41b40d259d50 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13080,6 +13080,8 @@ in SDL_gfx = callPackage ../development/libraries/SDL_gfx { }; + SDL_gpu = callPackage ../development/libraries/SDL_gpu { }; + SDL_image = callPackage ../development/libraries/SDL_image { }; SDL_mixer = callPackage ../development/libraries/SDL_mixer { }; From ed86bbad84c4196174462257c9a116bbc61456c8 Mon Sep 17 00:00:00 2001 From: Daniel Frank Date: Fri, 12 Jul 2019 08:09:51 +0200 Subject: [PATCH 092/112] system.autoUpgrade: optionally allow rebooting the system on kernel change (#64267) * autoUpgrade: optionally allow rebooting the system on kernel change * system.autoUpgrade: Better documentation and readability --- nixos/modules/tasks/auto-upgrade.nix | 30 ++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/nixos/modules/tasks/auto-upgrade.nix b/nixos/modules/tasks/auto-upgrade.nix index 91f4ae79ee91..18753ae0c1ae 100644 --- a/nixos/modules/tasks/auto-upgrade.nix +++ b/nixos/modules/tasks/auto-upgrade.nix @@ -53,6 +53,16 @@ let cfg = config.system.autoUpgrade; in ''; }; + allowReboot = mkOption { + default = false; + type = types.bool; + description = '' + Reboot the system into the new generation instead of a switch + if the new generation uses a different kernel, kernel modules + or initrd than the booted system. + ''; + }; + }; }; @@ -78,11 +88,23 @@ let cfg = config.system.autoUpgrade; in HOME = "/root"; } // config.networking.proxy.envVars; - path = [ pkgs.gnutar pkgs.xz.bin pkgs.gitMinimal config.nix.package.out ]; + path = [ pkgs.coreutils pkgs.gnutar pkgs.xz.bin pkgs.gitMinimal config.nix.package.out ]; - script = '' - ${config.system.build.nixos-rebuild}/bin/nixos-rebuild switch ${toString cfg.flags} - ''; + script = let + nixos-rebuild = "${config.system.build.nixos-rebuild}/bin/nixos-rebuild"; + in + if cfg.allowReboot then '' + ${nixos-rebuild} boot ${toString cfg.flags} + booted="$(readlink /run/booted-system/{initrd,kernel,kernel-modules})" + built="$(readlink /nix/var/nix/profiles/system/{initrd,kernel,kernel-modules})" + if [ "$booted" = "$built" ]; then + ${nixos-rebuild} switch ${toString cfg.flags} + else + /run/current-system/sw/bin/shutdown -r +1 + fi + '' else '' + ${nixos-rebuild} switch ${toString cfg.flags} + ''; startAt = cfg.dates; }; From 7a40b2fe8c1fd0fc023d76784000f8a8e75e172b Mon Sep 17 00:00:00 2001 From: xrelkd <46590321+xrelkd@users.noreply.github.com> Date: Fri, 12 Jul 2019 14:38:14 +0800 Subject: [PATCH 093/112] gitAndTools.hub: 2.12.1 -> 2.12.2 --- .../version-management/git-and-tools/hub/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/version-management/git-and-tools/hub/default.nix b/pkgs/applications/version-management/git-and-tools/hub/default.nix index 44e4b5de9569..82d98b95966b 100644 --- a/pkgs/applications/version-management/git-and-tools/hub/default.nix +++ b/pkgs/applications/version-management/git-and-tools/hub/default.nix @@ -2,7 +2,7 @@ buildGoPackage rec { pname = "hub"; - version = "2.12.1"; + version = "2.12.2"; goPackagePath = "github.com/github/hub"; @@ -13,7 +13,7 @@ buildGoPackage rec { owner = "github"; repo = pname; rev = "v${version}"; - sha256 = "0i9bqcgdidl5zawkpq2fjrimzbb37i1m2fisvj32d27fsp1824bk"; + sha256 = "0sxfmjg26s86m5xa9nbj8287kg12kygxw6gggahal6v7zjhwcvaz"; }; nativeBuildInputs = [ groff utillinux ]; From dfd620068a82913d7702517d4d4984bff3fe53aa Mon Sep 17 00:00:00 2001 From: Tadeo Kondrak Date: Thu, 4 Jul 2019 03:34:33 -0600 Subject: [PATCH 094/112] xbps: 0.53 -> 0.56 --- pkgs/tools/package-management/xbps/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/package-management/xbps/default.nix b/pkgs/tools/package-management/xbps/default.nix index d29b46b87bed..6a96e5b43b50 100644 --- a/pkgs/tools/package-management/xbps/default.nix +++ b/pkgs/tools/package-management/xbps/default.nix @@ -1,19 +1,19 @@ -{ stdenv, fetchFromGitHub, pkgconfig, which, zlib, openssl, libarchive }: +{ stdenv, fetchFromGitHub, pkgconfig, which, zlib, openssl_1_1, libarchive }: stdenv.mkDerivation rec { - name = "xbps-${version}"; - version = "0.53"; + pname = "xbps"; + version = "0.56"; src = fetchFromGitHub { owner = "void-linux"; repo = "xbps"; rev = version; - sha256 = "1zicin2z5j7vg2ixzpd6nahjhrjwdcavm817wzgs9x013b596paa"; + sha256 = "0hqvq6fq62l5sgm4fy3zb0ks889d21mqz4f4my3iifs6c9f50na2"; }; nativeBuildInputs = [ pkgconfig which ]; - buildInputs = [ zlib openssl libarchive ]; + buildInputs = [ zlib openssl_1_1 libarchive ]; patches = [ ./cert-paths.patch ]; From aab48064e9ae6a8eb4b27a1df169736bcc878b38 Mon Sep 17 00:00:00 2001 From: Tadeo Kondrak Date: Tue, 18 Jun 2019 20:58:33 -0600 Subject: [PATCH 095/112] discord-rpc: init at 3.4.0 --- .../libraries/discord-rpc/default.nix | 40 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 ++ 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/libraries/discord-rpc/default.nix diff --git a/pkgs/development/libraries/discord-rpc/default.nix b/pkgs/development/libraries/discord-rpc/default.nix new file mode 100644 index 000000000000..3a8290a6597a --- /dev/null +++ b/pkgs/development/libraries/discord-rpc/default.nix @@ -0,0 +1,40 @@ +{ stdenv +, fetchFromGitHub +, cmake +, rapidjson +, AppKit +, buildExamples ? false +}: + +stdenv.mkDerivation rec { + pname = "discord-rpc"; + version = "3.4.0"; + + src = fetchFromGitHub { + owner = "discordapp"; + repo = pname; + rev = "v${version}"; + sha256 = "04cxhqdv5r92lrpnhxf8702a8iackdf3sfk1050z7pijbijiql2a"; + }; + + nativeBuildInputs = [ + cmake + ]; + + buildInputs = [ + rapidjson + ] ++ stdenv.lib.optional stdenv.isDarwin AppKit; + + cmakeFlags = [ + "-DBUILD_SHARED_LIBS=true" + "-DBUILD_EXAMPLES=${stdenv.lib.boolToString buildExamples}" + ]; + + meta = with stdenv.lib; { + description = "Official library to interface with the Discord client"; + homepage = "https://github.com/discordapp/discord-rpc"; + license = licenses.mit; + maintainers = with maintainers; [ tadeokondrak ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b354e0a7ac80..ab5960dcefb5 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10274,6 +10274,10 @@ in directfb = callPackage ../development/libraries/directfb { }; + discord-rpc = callPackage ../development/libraries/discord-rpc { + inherit (darwin.apple_sdk.frameworks) AppKit; + }; + dlib = callPackage ../development/libraries/dlib { }; docopt_cpp = callPackage ../development/libraries/docopt_cpp { }; From 594dfcd63b0edf6b80cf47b6b3a2fc28eaecfa21 Mon Sep 17 00:00:00 2001 From: xrelkd <46590321+xrelkd@users.noreply.github.com> Date: Fri, 12 Jul 2019 17:31:45 +0800 Subject: [PATCH 096/112] axel: 2.17.1 -> 2.17.3 --- pkgs/tools/networking/axel/default.nix | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/pkgs/tools/networking/axel/default.nix b/pkgs/tools/networking/axel/default.nix index fa435b6c66ad..6aa357dacb64 100644 --- a/pkgs/tools/networking/axel/default.nix +++ b/pkgs/tools/networking/axel/default.nix @@ -1,15 +1,18 @@ -{ stdenv, fetchurl, autoreconfHook, pkgconfig, gettext, libssl }: +{ stdenv, fetchFromGitHub, autoreconfHook, autoconf-archive +, pkgconfig, gettext, libssl }: stdenv.mkDerivation rec { - name = "axel-${version}"; - version = "2.17.1"; + pname = "axel"; + version = "2.17.3"; - src = fetchurl { - url = "https://github.com/axel-download-accelerator/axel/releases/download/v${version}/${name}.tar.xz"; - sha256 = "1mwyps6yvrjxp7mpzc0a2hwr2pw050c63fc9aqjzdzjjw123dfrn"; + src = fetchFromGitHub { + owner = "axel-download-accelerator"; + repo = pname; + rev = "v${version}"; + sha256 = "0kdd2y92plv240ba2j3xrm0f8xygvm1ijghnric4whsnxvmgym7h"; }; - nativeBuildInputs = [ autoreconfHook pkgconfig ]; + nativeBuildInputs = [ autoreconfHook pkgconfig autoconf-archive ]; buildInputs = [ gettext libssl ]; From 7181669da57e06d5069e5f7df57eedf927b488f3 Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Fri, 12 Jul 2019 08:38:21 -0400 Subject: [PATCH 097/112] linux_testing_bcachefs: 5.0.2019.05.29 -> 5.1.2019.07.11 --- pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix b/pkgs/os-specific/linux/kernel/linux-testing-bcachefs.nix index d8b9fc2a61e1..111b5a4cc90e 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.0.2019.05.29"; - modDirVersion = "5.0.0"; + version = "5.1.2019.07.11"; + modDirVersion = "5.1.0"; src = fetchgit { url = "https://evilpiepirate.org/git/bcachefs.git"; - rev = "7e42539c80470cb655bbc46cd0f144de6c644523"; - sha256 = "0f7z3awfzdg56rby6z8dh9v9bzyyfn53zgwxmk367mfi0wqk49d2"; + rev = "44dc1f269553f33cce43628444970efb85a7e802"; + sha256 = "1i32s15r0a844dnp3h9ac37xm9h69g0jn75pqz2gbfrafpk3pac1"; }; extraConfig = "BCACHEFS_FS m"; From e7c72be0fcb9b15b9ddf359642fea76e8ab01b88 Mon Sep 17 00:00:00 2001 From: Edmund Wu Date: Fri, 12 Jul 2019 08:38:35 -0400 Subject: [PATCH 098/112] bcachefs-tools: 2019-05-29 -> 2019-07-11 --- pkgs/tools/filesystems/bcachefs-tools/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/filesystems/bcachefs-tools/default.nix b/pkgs/tools/filesystems/bcachefs-tools/default.nix index 48926a3aade7..5e75346e46b1 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-05-29"; + version = "2019-07-11"; src = fetchgit { url = "https://evilpiepirate.org/git/bcachefs-tools.git"; - rev = "34b93747051055c1076add36f4730c7715e27f07"; - sha256 = "1z6ih0mssa9y9yr3v0dzrflliqz8qfdkjb29p9nqbpg8iqi45fa8"; + rev = "33c91e2ff4e228cb618ca22d642a34ec1c2cf0ef"; + sha256 = "0glldbnda61xwf7309mk48qmxqnipjmcgsibab77nr6v3bg13ip1"; }; enableParallelBuilding = true; From f62f744ac2e7650dd458a9474005e5d5eae18617 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Fri, 12 Jul 2019 18:00:49 +0300 Subject: [PATCH 099/112] gajim: fix audio calling It appears it actually works with this fix! --- .../networking/instant-messengers/gajim/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/gajim/default.nix b/pkgs/applications/networking/instant-messengers/gajim/default.nix index 26dc45144d96..6da7320e9536 100644 --- a/pkgs/applications/networking/instant-messengers/gajim/default.nix +++ b/pkgs/applications/networking/instant-messengers/gajim/default.nix @@ -7,7 +7,7 @@ , xvfb_run, dbus # Optional dependencies -, enableJingle ? true, farstream, gstreamer, gst-plugins-base, gst-libav, gst-plugins-ugly +, enableJingle ? true, farstream, gstreamer, gst-plugins-base, gst-libav, gst-plugins-ugly, libnice , enableE2E ? true , enableSecrets ? true, libsecret , enableRST ? true, docutils @@ -33,14 +33,14 @@ python3.pkgs.buildPythonApplication rec { ''; buildInputs = [ - gobject-introspection gtk3 gnome3.adwaita-icon-theme - ] ++ lib.optionals enableJingle [ farstream gstreamer gst-plugins-base gst-libav gst-plugins-ugly ] + gobject-introspection gtk3 gnome3.adwaita-icon-theme wrapGAppsHook + ] ++ lib.optionals enableJingle [ farstream gstreamer gst-plugins-base gst-libav gst-plugins-ugly libnice ] ++ lib.optional enableSecrets libsecret ++ lib.optional enableSpelling gspell ++ lib.optional enableUPnP gupnp-igd; nativeBuildInputs = [ - gettext wrapGAppsHook + gettext ]; propagatedBuildInputs = with python3.pkgs; [ From 157d56d311aacbbcc8191a7c6ec0fda155b5fea9 Mon Sep 17 00:00:00 2001 From: Amar Paul Date: Fri, 12 Jul 2019 11:26:08 -0400 Subject: [PATCH 100/112] cdrtools: fix for darwin (#64460) --- pkgs/applications/misc/cdrtools/default.nix | 6 +++--- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/misc/cdrtools/default.nix b/pkgs/applications/misc/cdrtools/default.nix index 3738fb83c705..1bbb7d61b01f 100644 --- a/pkgs/applications/misc/cdrtools/default.nix +++ b/pkgs/applications/misc/cdrtools/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, acl, libcap }: +{ stdenv, fetchurl, acl, libcap, Carbon, IOKit }: stdenv.mkDerivation rec { name = "cdrtools-${version}"; @@ -11,7 +11,7 @@ stdenv.mkDerivation rec { patches = [ ./fix-paths.patch ]; - buildInputs = [ acl libcap ]; + buildInputs = if stdenv.isDarwin then [ Carbon IOKit ] else [ acl libcap ]; postPatch = '' sed "/\.mk3/d" -i libschily/Targets.man @@ -28,7 +28,7 @@ stdenv.mkDerivation rec { homepage = https://sourceforge.net/projects/cdrtools/; description = "Highly portable CD/DVD/BluRay command line recording software"; license = with licenses; [ gpl2 lgpl2 cddl ]; - platforms = platforms.linux; + platforms = with platforms; linux ++ darwin; # Licensing issues: This package contains code licensed under CDDL, GPL2 # and LGPL2. There is a debate regarding the legality of distributing this # package in binary form. diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 71962023dd9d..744c25d39966 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -17210,7 +17210,9 @@ in inherit (darwin.apple_sdk.frameworks) Carbon; }; - cdrtools = callPackage ../applications/misc/cdrtools { }; + cdrtools = callPackage ../applications/misc/cdrtools { + inherit (darwin.apple_sdk.frameworks) Carbon IOKit; + }; centerim = callPackage ../applications/networking/instant-messengers/centerim { }; From 8bf1d5c5762889846ec798779d7a700d1f99fcca Mon Sep 17 00:00:00 2001 From: Roman Volosatovs Date: Fri, 5 Jul 2019 01:28:59 +0200 Subject: [PATCH 101/112] zathura-pdf-poppler: fix source url --- pkgs/applications/misc/zathura/pdf-poppler/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/misc/zathura/pdf-poppler/default.nix b/pkgs/applications/misc/zathura/pdf-poppler/default.nix index 98cfb4c6687a..30ab053f923d 100644 --- a/pkgs/applications/misc/zathura/pdf-poppler/default.nix +++ b/pkgs/applications/misc/zathura/pdf-poppler/default.nix @@ -5,8 +5,8 @@ stdenv.mkDerivation rec { name = "zathura-pdf-poppler-${version}"; src = fetchurl { - url = "https://pwmt.org/projects/zathura/plugins/download/${name}.tar.xz"; - sha256 = "1p4jcny0jniygns78mcf0nlm298dszh49qpmjmackrm6dq8hc25y"; + url = "https://git.pwmt.org/pwmt/zathura-pdf-poppler/-/archive/${version}/${name}.tar.gz"; + sha256 = "0c15rnwh42m3ybrhax01bl36w0iynaq8xg6l08riml3cyljypi9l"; }; nativeBuildInputs = [ meson ninja pkgconfig zathura_core ]; From c9b88d0d79728e91061f55ec06f1ada1700e56a3 Mon Sep 17 00:00:00 2001 From: xrelkd <46590321+xrelkd@users.noreply.github.com> Date: Sat, 13 Jul 2019 01:12:14 +0800 Subject: [PATCH 102/112] debootstrap: 1.0.114 -> 1.0.115 --- pkgs/tools/misc/debootstrap/default.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/tools/misc/debootstrap/default.nix b/pkgs/tools/misc/debootstrap/default.nix index 0a3ae5c28e97..ec594de0c341 100644 --- a/pkgs/tools/misc/debootstrap/default.nix +++ b/pkgs/tools/misc/debootstrap/default.nix @@ -14,14 +14,14 @@ let binPath = stdenv.lib.makeBinPath [ wget ]; in stdenv.mkDerivation rec { - name = "debootstrap-${version}"; - version = "1.0.114"; + pname = "debootstrap"; + version = "1.0.115"; src = fetchurl { # git clone git://git.debian.org/d-i/debootstrap.git # I'd like to use the source. However it's lacking the lanny script ? (still true?) - url = "mirror://debian/pool/main/d/debootstrap/debootstrap_${version}.tar.gz"; - sha256 = "14lw18bhxap1g15q0rhslacj1bcrl69wrqcx6azmbvd92rl4bqd8"; + url = "mirror://debian/pool/main/d/${pname}/${pname}_${version}.tar.gz"; + sha256 = "1s6ln7r6y91f0xmzbf9x4yx53hzcpiaa76i9dbmpy0ibw1ji30g4"; }; nativeBuildInputs = [ makeWrapper ]; @@ -57,11 +57,11 @@ in stdenv.mkDerivation rec { runHook postInstall ''; - meta = { + meta = with stdenv.lib; { description = "Tool to create a Debian system in a chroot"; homepage = https://wiki.debian.org/Debootstrap; - license = stdenv.lib.licenses.mit; - maintainers = [ stdenv.lib.maintainers.marcweber ]; - platforms = stdenv.lib.platforms.linux; + license = licenses.mit; + maintainers = with maintainers; [ marcweber ]; + platforms = platforms.linux; }; } From 362be9608c3e0dc5216e9d1d5f5c1a5643b7f7b1 Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Fri, 12 Jul 2019 22:31:26 +0200 Subject: [PATCH 103/112] python.pkgs.scipy: inherit the correct version (#64678) Because of the missing `rec` the inherited version was actually the nixpkgs version. AS a result, the output name depended on how nixpkgs was fetched, introducing impurity. --- pkgs/top-level/python-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 04e134581085..4f10313bb50f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4402,7 +4402,7 @@ in { scipy = let scipy_ = callPackage ../development/python-modules/scipy { }; - scipy_1_2 = scipy_.overridePythonAttrs(oldAttrs: { + scipy_1_2 = scipy_.overridePythonAttrs(oldAttrs: rec { version = "1.2.1"; src = oldAttrs.src.override { inherit version; From dbaa1406a29091f91a166b56b1f0c5996485c1c7 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Fri, 12 Jul 2019 22:40:07 +0200 Subject: [PATCH 104/112] dynamips: 0.2.20 -> 0.2.21 --- pkgs/applications/virtualization/dynamips/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/virtualization/dynamips/default.nix b/pkgs/applications/virtualization/dynamips/default.nix index 9419939d1c74..cce5a674f7cd 100644 --- a/pkgs/applications/virtualization/dynamips/default.nix +++ b/pkgs/applications/virtualization/dynamips/default.nix @@ -3,13 +3,13 @@ stdenv.mkDerivation rec { name = "${pname}-${version}"; pname = "dynamips"; - version = "0.2.20"; + version = "0.2.21"; src = fetchFromGitHub { owner = "GNS3"; repo = pname; rev = "v${version}"; - sha256 = "1841h0m0k0p3c3ify4imafjk7jigcj2zlr8rn3iyp7jnafkxqik7"; + sha256 = "0pvdqs6kjz0x0wqb5f1k3r25dg82wssm7wz4psm0m6bxsvf5l0i5"; }; nativeBuildInputs = [ cmake ]; From 2f583129e2d92b480dbf6d95e55652db3d496e80 Mon Sep 17 00:00:00 2001 From: Kirill Boltaev Date: Thu, 11 Jul 2019 16:06:08 +0300 Subject: [PATCH 105/112] spice-gtk: propagate gstreamer plugins Note: there is no sound without gst-plugins-good. --- pkgs/development/libraries/spice-gtk/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/spice-gtk/default.nix b/pkgs/development/libraries/spice-gtk/default.nix index 079d61ca3d58..8f92e0b64f6a 100644 --- a/pkgs/development/libraries/spice-gtk/default.nix +++ b/pkgs/development/libraries/spice-gtk/default.nix @@ -87,10 +87,13 @@ stdenv.mkDerivation rec { vala ]; + propagatedBuildInputs = [ + gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good + ]; + buildInputs = [ cyrus_sasl epoxy - gst_all_1.gst-plugins-base gtk3 json-glib libcacard From 22e2acd736a57ca4af1934918de00232b3e33d9f Mon Sep 17 00:00:00 2001 From: Kirill Boltaev Date: Fri, 12 Jul 2019 23:19:07 +0300 Subject: [PATCH 106/112] virtmanager: add missing GI dependencies --- pkgs/applications/virtualization/virt-manager/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/virtualization/virt-manager/default.nix b/pkgs/applications/virtualization/virt-manager/default.nix index 392517e3ab26..9011932a30bc 100644 --- a/pkgs/applications/virtualization/virt-manager/default.nix +++ b/pkgs/applications/virtualization/virt-manager/default.nix @@ -2,6 +2,7 @@ , wrapGAppsHook, gtk-vnc, vte, avahi, dconf , gobject-introspection, libvirt-glib, system-libvirt , gsettings-desktop-schemas, glib, libosinfo, gnome3, gtk3 +, gtksourceview4 , spiceSupport ? true, spice-gtk ? null , cpio, e2fsprogs, findutils, gzip }: @@ -25,7 +26,7 @@ python3Packages.buildPythonApplication rec { buildInputs = [ libvirt-glib vte dconf gtk-vnc gnome3.adwaita-icon-theme avahi - gsettings-desktop-schemas libosinfo gtk3 + gsettings-desktop-schemas libosinfo gtksourceview4 gobject-introspection # Temporary fix, see https://github.com/NixOS/nixpkgs/issues/56943 ] ++ optional spiceSupport spice-gtk; From cdfc0b6429ed53bd4ff228a9fd8bfdff05905b96 Mon Sep 17 00:00:00 2001 From: Kirill Boltaev Date: Fri, 12 Jul 2019 23:19:28 +0300 Subject: [PATCH 107/112] virtmanager: fix librsvg propagation from wrapGAppsHook Custom buildPhase should be removed once there is support for setupPyDistFlags (not a final name). --- .../virtualization/virt-manager/default.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/virtualization/virt-manager/default.nix b/pkgs/applications/virtualization/virt-manager/default.nix index 9011932a30bc..249f5948dbbd 100644 --- a/pkgs/applications/virtualization/virt-manager/default.nix +++ b/pkgs/applications/virtualization/virt-manager/default.nix @@ -9,6 +9,10 @@ with stdenv.lib; +# TODO: remove after there's support for setupPyDistFlags +let + setuppy = ../../../development/interpreters/python/run_setup.py; +in python3Packages.buildPythonApplication rec { name = "virt-manager-${version}"; version = "2.2.0"; @@ -20,11 +24,12 @@ python3Packages.buildPythonApplication rec { }; nativeBuildInputs = [ - wrapGAppsHook intltool file + intltool file gobject-introspection # for setup hook populating GI_TYPELIB_PATH ]; buildInputs = [ + wrapGAppsHook libvirt-glib vte dconf gtk-vnc gnome3.adwaita-icon-theme avahi gsettings-desktop-schemas libosinfo gtksourceview4 gobject-introspection # Temporary fix, see https://github.com/NixOS/nixpkgs/issues/56943 @@ -44,6 +49,14 @@ python3Packages.buildPythonApplication rec { ${python3Packages.python.interpreter} setup.py configure --prefix=$out ''; + # TODO: remove after there's support for setupPyDistFlags + buildPhase = '' + runHook preBuild + cp ${setuppy} nix_run_setup + ${python3Packages.python.pythonForBuild.interpreter} nix_run_setup --no-update-icon-cache build_ext bdist_wheel + runHook postBuild + ''; + postInstall = '' ${glib.dev}/bin/glib-compile-schemas "$out"/share/glib-2.0/schemas ''; From 5e18c7cf210803f42e526a89d834f13904f7cf9d Mon Sep 17 00:00:00 2001 From: Kirill Boltaev Date: Fri, 12 Jul 2019 23:21:52 +0300 Subject: [PATCH 108/112] virtmanager: remove redundant gsettings schema compilation Schemas are now compiled in the setup.py. --- pkgs/applications/virtualization/virt-manager/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkgs/applications/virtualization/virt-manager/default.nix b/pkgs/applications/virtualization/virt-manager/default.nix index 249f5948dbbd..86cedcfbe06c 100644 --- a/pkgs/applications/virtualization/virt-manager/default.nix +++ b/pkgs/applications/virtualization/virt-manager/default.nix @@ -57,10 +57,6 @@ python3Packages.buildPythonApplication rec { runHook postBuild ''; - postInstall = '' - ${glib.dev}/bin/glib-compile-schemas "$out"/share/glib-2.0/schemas - ''; - preFixup = '' gappsWrapperArgs+=(--set PYTHONPATH "$PYTHONPATH") # these are called from virt-install in initrdinject.py From 6b68d9b911087fcf3445ba1e43a6c521722c2b12 Mon Sep 17 00:00:00 2001 From: Kirill Boltaev Date: Fri, 12 Jul 2019 23:49:40 +0300 Subject: [PATCH 109/112] virtviewer: remove gstreamer plugins already propagated by spice-gtk --- pkgs/applications/virtualization/virt-viewer/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/applications/virtualization/virt-viewer/default.nix b/pkgs/applications/virtualization/virt-viewer/default.nix index 7c90f9b3483f..9c307d8e9ba4 100644 --- a/pkgs/applications/virtualization/virt-viewer/default.nix +++ b/pkgs/applications/virtualization/virt-viewer/default.nix @@ -30,7 +30,6 @@ stdenv.mkDerivation rec { xen ] ++ optionals spiceSupport [ spice-gtk spice-protocol libcap gdbm - gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good ]; # Required for USB redirection PolicyKit rules file From 2df33c40ffa446cc0dd00c45dc7c71f8f6cf41c8 Mon Sep 17 00:00:00 2001 From: Kirill Boltaev Date: Fri, 12 Jul 2019 23:55:37 +0300 Subject: [PATCH 110/112] virtmanager: remove redundant gtk3 dependency --- pkgs/applications/virtualization/virt-manager/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/virtualization/virt-manager/default.nix b/pkgs/applications/virtualization/virt-manager/default.nix index 86cedcfbe06c..2a76cf487b03 100644 --- a/pkgs/applications/virtualization/virt-manager/default.nix +++ b/pkgs/applications/virtualization/virt-manager/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, python3Packages, intltool, file , wrapGAppsHook, gtk-vnc, vte, avahi, dconf , gobject-introspection, libvirt-glib, system-libvirt -, gsettings-desktop-schemas, glib, libosinfo, gnome3, gtk3 +, gsettings-desktop-schemas, glib, libosinfo, gnome3 , gtksourceview4 , spiceSupport ? true, spice-gtk ? null , cpio, e2fsprogs, findutils, gzip From c249ba2f64c12bd412f379593d5001693879d35e Mon Sep 17 00:00:00 2001 From: Timo Kaufmann Date: Fri, 12 Jul 2019 23:19:12 +0200 Subject: [PATCH 111/112] python2.pkgs.scipy: fix fixed output hash (#64680) Missed in 03226aac623e5197d7910127dbf5bdea93e6aa99. --- pkgs/top-level/python-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4f10313bb50f..00e72246f098 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4406,7 +4406,7 @@ in { version = "1.2.1"; src = oldAttrs.src.override { inherit version; - sha256 = "e085d1babcb419bbe58e2e805ac61924dac4ca45a07c9fa081144739e500aa3c"; + sha256 = "0g5a03jkjiqlh6h9yz508p5c9ni43735m01fivjvn6dlpjxd31g0"; }; }); in if pythonOlder "3.5" then scipy_1_2 else scipy_; From f93c5deb47ae7da3e04abb121dfb162a82f4551c Mon Sep 17 00:00:00 2001 From: Ambroz Bizjak Date: Thu, 27 Jun 2019 13:02:53 +0200 Subject: [PATCH 112/112] nvidia-settings: Install desktop file and icon. The template has substitution variables intended to be replaced resulting in absolute paths. Because absolute paths break after the desktop file is copied by a desktop environment, make Exec and Icon be just a name. --- pkgs/os-specific/linux/nvidia-x11/settings.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/os-specific/linux/nvidia-x11/settings.nix b/pkgs/os-specific/linux/nvidia-x11/settings.nix index 5420a651c794..1867c1a133af 100644 --- a/pkgs/os-specific/linux/nvidia-x11/settings.nix +++ b/pkgs/os-specific/linux/nvidia-x11/settings.nix @@ -72,6 +72,17 @@ stdenv.mkDerivation rec { ${lib.optionalString (!withGtk3) '' rm -f $out/lib/libnvidia-gtk3.so.* ''} + + # Install the desktop file and icon. + # The template has substitution variables intended to be replaced resulting + # in absolute paths. Because absolute paths break after the desktop file is + # copied by a desktop environment, make Exec and Icon be just a name. + sed -i doc/nvidia-settings.desktop \ + -e "s|^Exec=.*$|Exec=nvidia-settings|" \ + -e "s|^Icon=.*$|Icon=nvidia-settings|" \ + -e "s|__NVIDIA_SETTINGS_DESKTOP_CATEGORIES__|Settings|g" + install doc/nvidia-settings.desktop -D -t $out/share/applications/ + install doc/nvidia-settings.png -D -t $out/share/icons/hicolor/128x128/apps/ ''; binaryName = if withGtk3 then ".nvidia-settings-wrapped" else "nvidia-settings";