From a5a383a389bfcaf8b0c3ac038cf8701d9e14dda9 Mon Sep 17 00:00:00 2001 From: Symphorien Gibol Date: Sat, 8 Aug 2020 12:00:00 +0000 Subject: [PATCH 01/20] nix-gitignore: filter-out .git --- pkgs/build-support/nix-gitignore/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/nix-gitignore/default.nix b/pkgs/build-support/nix-gitignore/default.nix index 28ee6bad554..5d7b945bf1b 100644 --- a/pkgs/build-support/nix-gitignore/default.nix +++ b/pkgs/build-support/nix-gitignore/default.nix @@ -148,10 +148,10 @@ in rec { ''); withGitignoreFile = patterns: root: - lib.toList patterns ++ [(root + "/.gitignore")]; + lib.toList patterns ++ [ ".git" ] ++ [(root + "/.gitignore")]; withRecursiveGitignoreFile = patterns: root: - lib.toList patterns ++ [(compileRecursiveGitignore root)]; + lib.toList patterns ++ [ ".git" ] ++ [(compileRecursiveGitignore root)]; # filterSource derivatives From 0451efc553d973de21d69053828e41f7f97934a6 Mon Sep 17 00:00:00 2001 From: Bart Bakker Date: Sun, 6 Dec 2020 14:43:09 +0100 Subject: [PATCH 02/20] minecraft: fix JAVA_HOME JAVA_HOME should point to the root directory of the JRE, not the `bin` folder. --- pkgs/games/minecraft/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/games/minecraft/default.nix b/pkgs/games/minecraft/default.nix index 03abcb151bc..82c9ecfa753 100644 --- a/pkgs/games/minecraft/default.nix +++ b/pkgs/games/minecraft/default.nix @@ -138,7 +138,7 @@ stdenv.mkDerivation rec { makeWrapper $out/opt/minecraft-launcher/minecraft-launcher $out/bin/minecraft-launcher \ --prefix LD_LIBRARY_PATH : ${envLibPath} \ --prefix PATH : ${stdenv.lib.makeBinPath [ jre ]} \ - --set JAVA_HOME ${stdenv.lib.makeBinPath [ jre ]} \ + --set JAVA_HOME ${stdenv.lib.getBin jre} \ --run "cd /tmp" \ "''${gappsWrapperArgs[@]}" ''; From 55ef9612a24d53594f97c71ff38b9e46b0980c9c Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Sun, 6 Dec 2020 17:26:13 +0100 Subject: [PATCH 03/20] nixos/nginx: improve documentation for `config` Unfortunately, I had a use-case where `services.nginx.config` was necessary quite recently. While working on that config I had to look up the module's code to understand which options can be used and which don't. To slightly improve the situation, I changed the documentation like this: * Added `types.str` as type since `config` is not mergeable on purpose. It must be a string as it's rendered verbatim into `nginx.conf` and if the type is `unspecified`, it can be confused with RFC42-like options. * Mention which config options that don't generate config in `nginx.conf` are NOT mutually exclusive. --- .../services/web-servers/nginx/default.nix | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/nixos/modules/services/web-servers/nginx/default.nix b/nixos/modules/services/web-servers/nginx/default.nix index e9630d379f3..62671e9d748 100644 --- a/nixos/modules/services/web-servers/nginx/default.nix +++ b/nixos/modules/services/web-servers/nginx/default.nix @@ -390,13 +390,24 @@ in }; config = mkOption { + type = types.str; default = ""; - description = " - Verbatim nginx.conf configuration. - This is mutually exclusive with the structured configuration - via virtualHosts and the recommendedXyzSettings configuration - options. See appendConfig for appending to the generated http block. - "; + description = '' + Verbatim nginx.conf configuration. + This is mutually exclusive to any other config option for + nginx.conf except for + + + + + + + + + + If additional verbatim config in addition to other options is needed, + should be used instead. + ''; }; appendConfig = mkOption { From 755670f5e4d5356e4a3d4864cb3173890d1b0dae Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 10 Dec 2020 12:19:14 +0000 Subject: [PATCH 04/20] emacs: fix siteVersionDir path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit siteVersionDir isn't a full path, it's just the name of the version directory entry in $out/share/emacs, e.g. "27.1", so since d1b0eef9b51 ("emacs: Don't use interpolation for version"), we've been trying to remove a non-existent directory. This would have been caught if we hadn't been giving -f to rm unnecessarily, because -f suppresses errors. As well as fixing the path, I've removed the -f from rm. Doing this to the line above as well revealed that rm-ing $out/var was no longer necessary, since nothing has been put there since ac23a7c459d8 ("emacs: 25.3 → 26.1") -- it would now only be created if we set the --with-gameuser configure option, which we don't. --- pkgs/applications/editors/emacs/generic.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/applications/editors/emacs/generic.nix b/pkgs/applications/editors/emacs/generic.nix index 0e09b0c20ee..a84cb41bf30 100644 --- a/pkgs/applications/editors/emacs/generic.nix +++ b/pkgs/applications/editors/emacs/generic.nix @@ -141,8 +141,7 @@ in stdenv.mkDerivation { siteVersionDir=`ls $out/share/emacs | grep -v site-lisp | head -n 1` - rm -rf $out/var - rm -rf $siteVersionDir + rm -r $out/share/emacs/$siteVersionDir/site-lisp '' + lib.optionalString withCsrc '' for srcdir in src lisp lwlib ; do dstdir=$out/share/emacs/$siteVersionDir/$srcdir From a7e8c7c8be7c0eee188eceadba868560175639cb Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 10 Dec 2020 14:48:24 +0000 Subject: [PATCH 05/20] draco: 1.4.0 -> 1.4.1 --- pkgs/development/libraries/draco/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/draco/default.nix b/pkgs/development/libraries/draco/default.nix index 02feba0a43e..317742f07b3 100644 --- a/pkgs/development/libraries/draco/default.nix +++ b/pkgs/development/libraries/draco/default.nix @@ -2,14 +2,14 @@ }: stdenv.mkDerivation rec { - version = "1.4.0"; + version = "1.4.1"; pname = "draco"; src = fetchFromGitHub { owner = "google"; repo = "draco"; rev = version; - sha256 = "0s65il754fpiygbg0yq2xynpbnmhiiaxghkzprjqxziyz6gi87lm"; + sha256 = "14ln4la52x38pf8syr7i5v4vd65ya4zij8zj5kgihah03cih0qcd"; }; enableParallelBuilding = true; From 3897fd61eab81ada9f5da024930de41fec1d3754 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 10 Dec 2020 16:24:46 +0100 Subject: [PATCH 06/20] bomi: remove --- pkgs/applications/video/bomi/default.nix | 118 ----------------------- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 4 - 3 files changed, 1 insertion(+), 122 deletions(-) delete mode 100644 pkgs/applications/video/bomi/default.nix diff --git a/pkgs/applications/video/bomi/default.nix b/pkgs/applications/video/bomi/default.nix deleted file mode 100644 index d812ac48874..00000000000 --- a/pkgs/applications/video/bomi/default.nix +++ /dev/null @@ -1,118 +0,0 @@ -{ mkDerivation, config, stdenv, fetchFromGitHub -, fetchpatch, pkgconfig, perl, python, which -, libX11, libxcb, libGLU, libGL -, qtbase, qtdeclarative, qtquickcontrols, qttools, qtx11extras, qmake -, libchardet -, ffmpeg - -, mpg123 -, libass -, libdvdread -, libdvdnav -, icu -, libquvi -, alsaLib -, libvdpau, libva -, libbluray -, jackSupport ? false, jack ? null -, portaudioSupport ? false, portaudio ? null -, pulseSupport ? config.pulseaudio or stdenv.isLinux, libpulseaudio ? null -, cddaSupport ? false, libcdda ? null -, youtubeSupport ? true, youtube-dl ? null -}: - -with stdenv.lib; - -assert jackSupport -> jack != null; -assert portaudioSupport -> portaudio != null; -assert pulseSupport -> libpulseaudio != null; -assert cddaSupport -> libcdda != null; -assert youtubeSupport -> youtube-dl != null; - -mkDerivation rec { - pname = "bomi"; - version = "0.9.11"; - - src = fetchFromGitHub { - owner = "xylosper"; - repo = "bomi"; - rev = "v${version}"; - sha256 = "0a7n46gn3n5098lxxvl3s29s8jlkzss6by9074jx94ncn9cayf2h"; - }; - - patches = [ - (fetchpatch rec { - name = "bomi-compilation-fix.patch"; - url = "https://svnweb.mageia.org/packages/cauldron/bomi/current/SOURCES/${name}?revision=995725&view=co&pathrev=995725"; - sha256 = "1dwryya5ljx35dbx6ag9d3rjjazni2mfn3vwirjdijdy6yz22jm6"; - }) - (fetchpatch rec { - name = "bomi-fix-expected-unqualified-id-before-numeric-constant-unix.patch"; - url = "https://svnweb.mageia.org/packages/cauldron/bomi/current/SOURCES/${name}?revision=995725&view=co&pathrev=995725"; - sha256 = "0n3xsrdrggimzw30gxlnrr088ndbdjqlqr46dzmfv8zan79lv5ri"; - }) - ]; - - buildInputs = with stdenv.lib; - [ libX11 - libxcb - libGLU libGL - qtbase - qtx11extras - qtdeclarative - qtquickcontrols - ffmpeg - libchardet - - mpg123 - libass - libdvdread - libdvdnav - icu - libquvi - alsaLib - libvdpau - libva - libbluray - ] - ++ optional jackSupport jack - ++ optional portaudioSupport portaudio - ++ optional pulseSupport libpulseaudio - ++ optional cddaSupport libcdda - ; - - preConfigure = '' - patchShebangs configure - ''; - - preBuild = '' - patchShebangs src/mpv/waf - patchShebangs build-mpv - ''; - - dontWrapQtApps = true; - postInstall = '' - wrapQtApp $out/bin/bomi \ - ${optionalString youtubeSupport "--prefix PATH ':' '${youtube-dl}/bin'"} - ''; - - dontUseQmakeConfigure = true; - - configureFlags = with stdenv.lib; - [ "--qmake=qmake" ] - ++ optional jackSupport "--enable-jack" - ++ optional portaudioSupport "--enable-portaudio" - ++ optional pulseSupport "--enable-pulseaudio" - ++ optional cddaSupport "--enable-cdda" - ; - - nativeBuildInputs = [ pkgconfig perl python which qttools qmake ]; - - meta = with stdenv.lib; { - description = "Powerful and easy-to-use multimedia player"; - homepage = "https://bomi-player.github.io/"; - license = licenses.gpl2Plus; - maintainers = [ maintainers.abbradar ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 8009208739a..67f92c83a52 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -62,6 +62,7 @@ mapAliases ({ bridge_utils = bridge-utils; # added 2015-02-20 bro = zeek; # added 2019-09-29 bootchart = throw "bootchart has been removed from nixpkgs, as it is without a maintainer"; # added 2019-12-10 + bomi = throw "bomi has been removed from nixpkgs since it was broken and abandoned upstream"; # added 2020-12-10 btrfsProgs = btrfs-progs; # added 2016-01-03 bittorrentSync = throw "bittorrentSync has been deprecated by resilio-sync."; # added 2019-06-03 bittorrentSync14 = throw "bittorrentSync14 has been deprecated by resilio-sync."; # added 2019-06-03 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index febb6b1e855..d764c18e6ee 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20503,10 +20503,6 @@ in bombono = callPackage ../applications/video/bombono {}; - bomi = libsForQt5.callPackage ../applications/video/bomi { - ffmpeg = ffmpeg_2; - }; - bonzomatic = callPackage ../applications/editors/bonzomatic { }; brackets = callPackage ../applications/editors/brackets { gconf = gnome2.GConf; }; From 9dd8d11c31c3c32e3952512012afd5f97046260c Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Thu, 10 Dec 2020 18:18:56 +0000 Subject: [PATCH 07/20] istioctl: 1.8.0 -> 1.8.1 --- pkgs/applications/networking/cluster/istioctl/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/networking/cluster/istioctl/default.nix b/pkgs/applications/networking/cluster/istioctl/default.nix index ffe79381a22..5d293df9157 100644 --- a/pkgs/applications/networking/cluster/istioctl/default.nix +++ b/pkgs/applications/networking/cluster/istioctl/default.nix @@ -2,15 +2,15 @@ buildGoModule rec { pname = "istioctl"; - version = "1.8.0"; + version = "1.8.1"; src = fetchFromGitHub { owner = "istio"; repo = "istio"; rev = version; - sha256 = "0fwc56797gmcg9pcy0jpv5lb0b6wwiqh242xn1chd4a4hp8in7h9"; + sha256 = "1m97hszmw0hfzj3jvd1is7fa3mpqkm7jbq3ik337rb9yq1f0gasv"; }; - vendorSha256 = "0ing5pih2rz974dcianlb05fpgrj3y7h32awf3cp41gh448gxd24"; + vendorSha256 = "0ividxxmil69vpvyjlgyzb2jzipmh9rpvk19kv7266d29ky3q7s6"; doCheck = false; From 4948743705ae821a4e01e48ca6a797571b87b04a Mon Sep 17 00:00:00 2001 From: Matej Urbas Date: Sat, 5 Dec 2020 23:26:59 +0000 Subject: [PATCH 08/20] nixos/prometheus-exporters/py-air-control: init --- .../monitoring/prometheus/exporters.nix | 1 + .../prometheus/exporters/py-air-control.nix | 62 +++++++++++++++++++ nixos/tests/prometheus-exporters.nix | 15 +++++ 3 files changed, 78 insertions(+) create mode 100644 nixos/modules/services/monitoring/prometheus/exporters/py-air-control.nix diff --git a/nixos/modules/services/monitoring/prometheus/exporters.nix b/nixos/modules/services/monitoring/prometheus/exporters.nix index 995afca96ff..1f8c5aeded1 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters.nix @@ -41,6 +41,7 @@ let "openvpn" "postfix" "postgres" + "py-air-control" "redis" "rspamd" "rtl_433" diff --git a/nixos/modules/services/monitoring/prometheus/exporters/py-air-control.nix b/nixos/modules/services/monitoring/prometheus/exporters/py-air-control.nix new file mode 100644 index 00000000000..d9a627ca2ea --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters/py-air-control.nix @@ -0,0 +1,62 @@ +{ config, lib, pkgs, options }: + +with lib; + +let + cfg = config.services.prometheus.exporters.py-air-control; + + py-air-control-exporter-env = pkgs.python3.withPackages (pyPkgs: [ + pyPkgs.py-air-control-exporter + ]); + + workingDir = "/var/lib/${cfg.stateDir}"; + +in +{ + port = 9896; + extraOpts = { + deviceHostname = mkOption { + type = types.str; + example = "192.168.1.123"; + description = '' + The hostname of the air purification device from which to scrape the metrics. + ''; + }; + protocol = mkOption { + type = types.str; + default = "http"; + description = '' + The protocol to use when communicating with the air purification device. + Available: [http, coap, plain_coap] + ''; + }; + stateDir = mkOption { + type = types.str; + default = "prometheus-py-air-control-exporter"; + description = '' + Directory below /var/lib to store runtime data. + This directory will be created automatically using systemd's StateDirectory mechanism. + ''; + }; + }; + serviceOpts = { + serviceConfig = { + DynamicUser = false; + StateDirectory = cfg.stateDir; + WorkingDirectory = workingDir; + ExecStart = '' + ${py-air-control-exporter-env}/bin/python -c \ + "from py_air_control_exporter import app; app.create_app().run( \ + debug=False, \ + port=${toString cfg.port}, \ + host='${cfg.listenAddress}', \ + )" + ''; + Environment = [ + "PY_AIR_CONTROL_HOST=${cfg.deviceHostname}" + "PY_AIR_CONTROL_PROTOCOL=${cfg.protocol}" + "HOME=${workingDir}" + ]; + }; + }; +} diff --git a/nixos/tests/prometheus-exporters.nix b/nixos/tests/prometheus-exporters.nix index 0b9957404f3..3eb4341e39c 100644 --- a/nixos/tests/prometheus-exporters.nix +++ b/nixos/tests/prometheus-exporters.nix @@ -530,6 +530,21 @@ let ''; }; + py-air-control = { + nodeName = "py_air_control"; + exporterConfig = { + enable = true; + deviceHostname = "127.0.0.1"; + }; + exporterTest = '' + wait_for_unit("prometheus-py-air-control-exporter.service") + wait_for_open_port(9896) + succeed( + "curl -sSf http://localhost:9896/metrics | grep -q 'py_air_control_sampling_error_total'" + ) + ''; + }; + redis = { exporterConfig = { enable = true; From 4300a94d2fd1af127f57d0439bf725ec8dd3115a Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 9 Dec 2020 22:55:11 +0000 Subject: [PATCH 09/20] emacsPackages.magit-stgit: mark broken --- pkgs/applications/editors/emacs-modes/melpa-packages.nix | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/editors/emacs-modes/melpa-packages.nix b/pkgs/applications/editors/emacs-modes/melpa-packages.nix index 03e9923f737..041ca03cdb2 100644 --- a/pkgs/applications/editors/emacs-modes/melpa-packages.nix +++ b/pkgs/applications/editors/emacs-modes/melpa-packages.nix @@ -252,12 +252,6 @@ let (attrs.nativeBuildInputs or [ ]) ++ [ external.git ]; }); - magit-stgit = super.magit-stgit.overrideAttrs (attrs: { - # searches for Git at build time - nativeBuildInputs = - (attrs.nativeBuildInputs or [ ]) ++ [ external.git ]; - }); - magit-tbdiff = super.magit-tbdiff.overrideAttrs (attrs: { # searches for Git at build time nativeBuildInputs = @@ -432,6 +426,9 @@ let # upstream issue: missing file header maxframe = markBroken super.maxframe; + # upstream issue: doesn't build + magit-stgit = markBroken super.magit-stgit; + # upstream issue: doesn't build eterm-256color = markBroken super.eterm-256color; From 183364f96f3f87f505f4c68f47b6eff4410fe343 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 9 Dec 2020 22:57:13 +0000 Subject: [PATCH 10/20] emacsPackages.melancholy-theme: mark broken --- pkgs/applications/editors/emacs-modes/melpa-packages.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/applications/editors/emacs-modes/melpa-packages.nix b/pkgs/applications/editors/emacs-modes/melpa-packages.nix index 041ca03cdb2..a3615e622bf 100644 --- a/pkgs/applications/editors/emacs-modes/melpa-packages.nix +++ b/pkgs/applications/editors/emacs-modes/melpa-packages.nix @@ -429,6 +429,9 @@ let # upstream issue: doesn't build magit-stgit = markBroken super.magit-stgit; + # upstream issue: missing file header + melancholy-theme = markBroken super.melancholy-theme; + # upstream issue: doesn't build eterm-256color = markBroken super.eterm-256color; From 75bd468468651f637c16e06386361473337cc6dd Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 9 Dec 2020 23:08:52 +0000 Subject: [PATCH 11/20] emacsPackages.instapaper: mark broken --- pkgs/applications/editors/emacs-modes/melpa-packages.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/applications/editors/emacs-modes/melpa-packages.nix b/pkgs/applications/editors/emacs-modes/melpa-packages.nix index a3615e622bf..b4210a3aa0e 100644 --- a/pkgs/applications/editors/emacs-modes/melpa-packages.nix +++ b/pkgs/applications/editors/emacs-modes/melpa-packages.nix @@ -420,6 +420,9 @@ let # upstream issue: missing file header initsplit = markBroken super.initsplit; + # upstream issue: missing file header + instapaper = markBroken super.instapaper; + # upstream issue: missing file header jsfmt = markBroken super.jsfmt; From 322ee87a104c7728cb1b65b98d45b2acf197e6f9 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 9 Dec 2020 23:13:44 +0000 Subject: [PATCH 12/20] emacsPackages.per-buffer-theme: mark broken --- pkgs/applications/editors/emacs-modes/melpa-packages.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/applications/editors/emacs-modes/melpa-packages.nix b/pkgs/applications/editors/emacs-modes/melpa-packages.nix index b4210a3aa0e..cc8ac4b81ab 100644 --- a/pkgs/applications/editors/emacs-modes/melpa-packages.nix +++ b/pkgs/applications/editors/emacs-modes/melpa-packages.nix @@ -438,6 +438,9 @@ let # upstream issue: doesn't build eterm-256color = markBroken super.eterm-256color; + # upstream issue: doesn't build + per-buffer-theme = markBroken super.per-buffer-theme; + # upstream issue: missing file header qiita = markBroken super.qiita; From 609843b47837252ff51d6e4c24113c2da7f65695 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 9 Dec 2020 23:16:59 +0000 Subject: [PATCH 13/20] emacsPackages.sql-presto: mark broken --- pkgs/applications/editors/emacs-modes/melpa-packages.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/applications/editors/emacs-modes/melpa-packages.nix b/pkgs/applications/editors/emacs-modes/melpa-packages.nix index cc8ac4b81ab..5a02c97b6d0 100644 --- a/pkgs/applications/editors/emacs-modes/melpa-packages.nix +++ b/pkgs/applications/editors/emacs-modes/melpa-packages.nix @@ -447,6 +447,9 @@ let # upstream issue: missing file header speech-tagger = markBroken super.speech-tagger; + # upstream issue: missing file header + sql-presto = markBroken super.sql-presto; + # upstream issue: missing file header textmate = markBroken super.textmate; From 095ecf7356c0b7b5c1c137897e140e565f814013 Mon Sep 17 00:00:00 2001 From: Evan Stoll Date: Thu, 10 Dec 2020 16:27:43 -0500 Subject: [PATCH 14/20] vncdo: 0.11.2 -> 0.12.0 (#106380) * Use pythonPackages instead of python2Packages * Add vncdo to top-level/python-packages so the library can be used by other Python programs * Use toPythonApplication for vnc in top-level/all-packages * run tests if using Python 3+ * move expression to development/python-modules --- .../python-modules}/vncdo/default.nix | 19 ++++++++++++------- pkgs/top-level/all-packages.nix | 2 +- pkgs/top-level/python-packages.nix | 2 ++ 3 files changed, 15 insertions(+), 8 deletions(-) rename pkgs/{tools/admin => development/python-modules}/vncdo/default.nix (63%) diff --git a/pkgs/tools/admin/vncdo/default.nix b/pkgs/development/python-modules/vncdo/default.nix similarity index 63% rename from pkgs/tools/admin/vncdo/default.nix rename to pkgs/development/python-modules/vncdo/default.nix index 5ca633a944b..ffc01906f45 100644 --- a/pkgs/tools/admin/vncdo/default.nix +++ b/pkgs/development/python-modules/vncdo/default.nix @@ -1,18 +1,23 @@ { stdenv, fetchFromGitHub -, python2Packages +, buildPythonPackage, isPy27 +, pillow +, twisted +, pexpect +, nose +, ptyprocess }: -python2Packages.buildPythonPackage { +buildPythonPackage rec { pname = "vncdo"; - version = "0.11.2"; + version = "0.12.0"; src = fetchFromGitHub { owner = "sibson"; repo = "vncdotool"; - rev = "5c03a82dcb5a3bd9e8f741f8a8d0c1ce082f2834"; - sha256 = "0k03b09ipsz8vp362x7sx7z68mxgqw9qzvkii2f8j9vx2y79rjsh"; + rev = "v${version}"; + sha256 = "0h3ccr8zi7xpgn6hz43x1045x5l4bhha7py8x00g8bv6gaqlbwxn"; }; - propagatedBuildInputs = with python2Packages; [ + propagatedBuildInputs = [ pillow twisted pexpect @@ -20,7 +25,7 @@ python2Packages.buildPythonPackage { ptyprocess ]; - doCheck = false; + doCheck = !isPy27; meta = with stdenv.lib; { homepage = "https://github.com/sibson/vncdotool"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d764c18e6ee..db335fb5a22 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8348,7 +8348,7 @@ in vmtouch = callPackage ../tools/misc/vmtouch { }; - vncdo = callPackage ../tools/admin/vncdo { }; + vncdo = with python3Packages; toPythonApplication vncdo; volumeicon = callPackage ../tools/audio/volumeicon { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 625045c1df1..777809fc455 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7700,6 +7700,8 @@ in { vmprof = callPackage ../development/python-modules/vmprof { }; + vncdo = callPackage ../development/python-modules/vncdo { }; + vobject = callPackage ../development/python-modules/vobject { }; voluptuous = callPackage ../development/python-modules/voluptuous { }; From a0aba95515a22a985857ea967035e29d80e2dd53 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Thu, 10 Dec 2020 16:35:29 -0500 Subject: [PATCH 15/20] beanstalkd: install manpage (#106544) --- pkgs/servers/beanstalkd/default.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/beanstalkd/default.nix b/pkgs/servers/beanstalkd/default.nix index aa5f79ff8f1..d81feb3b72e 100644 --- a/pkgs/servers/beanstalkd/default.nix +++ b/pkgs/servers/beanstalkd/default.nix @@ -1,10 +1,9 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, installShellFiles }: + stdenv.mkDerivation rec { version = "1.12"; pname = "beanstalkd"; - installPhase=''make install "PREFIX=$out"''; - src = fetchurl { url = "https://github.com/kr/beanstalkd/archive/v${version}.tar.gz"; sha256 = "0gw8aygysnjzzfjgfzivy5vajla9adg2zcr4h8rrdf0xyykpwfpl"; @@ -12,6 +11,14 @@ stdenv.mkDerivation rec { hardeningDisable = [ "fortify" ]; + makeFlags = [ "PREFIX=${placeholder "out"}" ]; + + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + installManPage doc/beanstalkd.1 + ''; + meta = with stdenv.lib; { homepage = "http://kr.github.io/beanstalkd/"; description = "A simple, fast work queue"; @@ -20,4 +27,3 @@ stdenv.mkDerivation rec { platforms = platforms.all; }; } - From 5016fdb2696d95adf4d9c162c5de7d92316444b8 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 10 Dec 2020 21:31:49 +0000 Subject: [PATCH 16/20] emacsPackages.elpaBuild: pass through meta Previously, meta wasn't being passed through at all, because it's removed from args without being used anywhere. This made it so that rcirc-menu wasn't being marked as broken even though it was supposed to be. This patch copies the meta handling from melpaBuild, including the default home page (adapted for ELPA). --- pkgs/build-support/emacs/elpa.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/build-support/emacs/elpa.nix b/pkgs/build-support/emacs/elpa.nix index e6f6c23e449..214aed9c3f9 100644 --- a/pkgs/build-support/emacs/elpa.nix +++ b/pkgs/build-support/emacs/elpa.nix @@ -7,9 +7,18 @@ with lib; { pname , version , src +, meta ? {} , ... }@args: +let + + defaultMeta = { + homepage = args.src.meta.homepage or "https://elpa.gnu.org/packages/${pname}.html"; + }; + +in + import ./generic.nix { inherit lib stdenv emacs texinfo; } ({ phases = "installPhase fixupPhase distPhase"; @@ -23,6 +32,8 @@ import ./generic.nix { inherit lib stdenv emacs texinfo; } ({ runHook postInstall ''; + + meta = defaultMeta // meta; } // removeAttrs args [ "files" "fileSpecs" From 00a246c5ceab58c69aeb0ffc9e608948058fd137 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 10 Dec 2020 21:36:07 +0000 Subject: [PATCH 17/20] emacsPackages.melpaPackages: HTTPS for homepages --- pkgs/build-support/emacs/melpa.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/build-support/emacs/melpa.nix b/pkgs/build-support/emacs/melpa.nix index e2ec84c75e6..d6fe3085837 100644 --- a/pkgs/build-support/emacs/melpa.nix +++ b/pkgs/build-support/emacs/melpa.nix @@ -23,7 +23,7 @@ with lib; let defaultMeta = { - homepage = args.src.meta.homepage or "http://melpa.org/#/${pname}"; + homepage = args.src.meta.homepage or "https://melpa.org/#/${pname}"; }; in From 0127013b0f2a27ee8eec886283948648ef66fbf0 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 9 Dec 2020 15:53:10 +0000 Subject: [PATCH 18/20] emacsWithPackages: mutate EMACSLOADPATH correctly An empty entry in EMACSLOADPATH gets filled with the default value. This is presumably why the wrapper inserted a colon after the entry it added for the dependencies. But this naive approach wasn't always correct. For example, if the user ran emacs with EMACSLOADPATH=foo, the wrapper would insert the default value (by adding the trailing `:') even though the user was trying to expressly opt out of it. To do this correctly, here I've replaced makeWrapper with a bespoke script that will actually parse the EMACSLOADPATH provided in the environment (if given), and insert the wrapper's load path just before the default value. If EMACSLOADPATH is given but contains no default value, we respect that and don't add the wrapped dependencies at all. If no EMACSLOADPATH is given, we insert the wrapped dependencies before the default value, just like before. In this way, the wrapped Emacs should now behave as if the wrapped dependencies were part of Emacs's default load-path value. --- pkgs/build-support/emacs/wrapper.nix | 16 ++++++++++++---- pkgs/build-support/emacs/wrapper.sh | 26 ++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 pkgs/build-support/emacs/wrapper.sh diff --git a/pkgs/build-support/emacs/wrapper.nix b/pkgs/build-support/emacs/wrapper.nix index 1f2fbd8068e..a3ab30afc63 100644 --- a/pkgs/build-support/emacs/wrapper.nix +++ b/pkgs/build-support/emacs/wrapper.nix @@ -155,8 +155,12 @@ runCommand for prog in $emacs/bin/*; do # */ local progname=$(basename "$prog") rm -f "$out/bin/$progname" - makeWrapper "$prog" "$out/bin/$progname" \ - --suffix EMACSLOADPATH ":" "$deps/share/emacs/site-lisp:" + + substitute ${./wrapper.sh} $out/bin/$progname \ + --subst-var-by bash ${emacs.stdenv.shell} \ + --subst-var-by wrapperSiteLisp "$deps/share/emacs/site-lisp" \ + --subst-var prog + chmod +x $out/bin/$progname done # Wrap MacOS app @@ -168,8 +172,12 @@ runCommand $emacs/Applications/Emacs.app/Contents/PkgInfo \ $emacs/Applications/Emacs.app/Contents/Resources \ $out/Applications/Emacs.app/Contents - makeWrapper $emacs/Applications/Emacs.app/Contents/MacOS/Emacs $out/Applications/Emacs.app/Contents/MacOS/Emacs \ - --suffix EMACSLOADPATH ":" "$deps/share/emacs/site-lisp:" + + substitute ${./wrapper.sh} $out/Applications/Emacs.app/Contents/MacOS/Emacs \ + --subst-var-by bash ${emacs.stdenv.shell} \ + --subst-var-by wrapperSiteLisp "$emacs/Applications/Emacs.app/Contents/MacOS/Emacs" \ + --subst-var prog + chmod +x $out/bin/$progname fi mkdir -p $out/share diff --git a/pkgs/build-support/emacs/wrapper.sh b/pkgs/build-support/emacs/wrapper.sh new file mode 100644 index 00000000000..85657ac5619 --- /dev/null +++ b/pkgs/build-support/emacs/wrapper.sh @@ -0,0 +1,26 @@ +#!@bash@ + +IFS=: + +newLoadPath=() +added= + +if [[ -n $EMACSLOADPATH ]] +then + while read -rd: entry + do + if [[ -z $entry && -z $added ]] + then + newLoadPath+=(@wrapperSiteLisp@) + added=1 + fi + newLoadPath+=("$entry") + done <<< "$EMACSLOADPATH:" +else + newLoadPath+=(@wrapperSiteLisp@) + newLoadPath+=("") +fi + +export EMACSLOADPATH="${newLoadPath[*]}" + +exec @prog@ "$@" From 23d4bfb6661ca57a9e331a2cf4184232d38ac38b Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Mon, 7 Dec 2020 18:53:54 +0000 Subject: [PATCH 19/20] emacsWithPackages: don't tell sub-Emacs about pkgs If I'm running an Emacs executable from emacsWithPackages as my main programming environment, and I'm hacking on Emacs, or the Emacs packaging in Nixpkgs, or whatever, I don't want the Emacs packages from the wrapper to show up in the load path of that child Emacs. It results in differing behaviour depending on whether the child Emacs is run from Emacs or from, for example, an external terminal emulator, which is very surprising. To avoid this, pass another environment variable containing the wrapper site-lisp path, and use that value to remove the corresponding entry in EMACSLOADPATH, so it won't be propagated to child Emacsen. --- pkgs/applications/editors/emacs/site-start.el | 11 +++++++++++ pkgs/build-support/emacs/wrapper.sh | 1 + 2 files changed, 12 insertions(+) diff --git a/pkgs/applications/editors/emacs/site-start.el b/pkgs/applications/editors/emacs/site-start.el index 2f02d6d1a86..86cad1132f6 100644 --- a/pkgs/applications/editors/emacs/site-start.el +++ b/pkgs/applications/editors/emacs/site-start.el @@ -22,6 +22,17 @@ least specific (the system profile)" (nix--profile-paths))))) (setq load-path (append paths load-path))) +;;; Remove wrapper site-lisp from EMACSLOADPATH so it's not propagated +;;; to any other Emacsen that might be started as subprocesses. +(let ((wrapper-site-lisp (getenv "emacsWithPackages_siteLisp")) + (env-load-path (getenv "EMACSLOADPATH"))) + (when wrapper-site-lisp + (setenv "emacsWithPackages_siteLisp" nil)) + (when (and wrapper-site-lisp env-load-path) + (let* ((env-list (split-string env-load-path ":")) + (new-env-list (delete wrapper-site-lisp env-list))) + (setenv "EMACSLOADPATH" (when new-env-list + (mapconcat 'identity new-env-list ":")))))) ;;; Make `woman' find the man pages (defvar woman-manpath) diff --git a/pkgs/build-support/emacs/wrapper.sh b/pkgs/build-support/emacs/wrapper.sh index 85657ac5619..96c9a8a60ea 100644 --- a/pkgs/build-support/emacs/wrapper.sh +++ b/pkgs/build-support/emacs/wrapper.sh @@ -22,5 +22,6 @@ else fi export EMACSLOADPATH="${newLoadPath[*]}" +export emacsWithPackages_siteLisp=@wrapperSiteLisp@ exec @prog@ "$@" From f1f9a55fb4b1d5adeebfff6c5ec58ce445bf5e84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carles=20Pag=C3=A8s?= Date: Fri, 11 Dec 2020 00:50:26 +0100 Subject: [PATCH 20/20] minecraft: 2.2.741 -> 2.2.909 --- pkgs/games/minecraft/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/games/minecraft/default.nix b/pkgs/games/minecraft/default.nix index 82c9ecfa753..292b43bec0a 100644 --- a/pkgs/games/minecraft/default.nix +++ b/pkgs/games/minecraft/default.nix @@ -88,11 +88,11 @@ in stdenv.mkDerivation rec { pname = "minecraft-launcher"; - version = "2.2.741"; + version = "2.2.909"; src = fetchurl { url = "https://launcher.mojang.com/download/linux/x86_64/minecraft-launcher_${version}.tar.gz"; - sha256 = "0bm78ybn91ihibxgmlpk7dl2zxy4a57k86qmb08cif3ifbflzkvw"; + sha256 = "15x2imr8c4m2bjfs9y1l34fpvixxdf09gqls4bqb4rdvj1vhdrh2"; }; icon = fetchurl {