From bda581585185b167192d10148caea21448514204 Mon Sep 17 00:00:00 2001 From: Rodney Lorrimar Date: Sat, 22 Jul 2017 21:14:52 +0100 Subject: [PATCH 01/57] hyper-haskell: init at 0.1.0.2 --- .../tools/haskell/hyper-haskell/default.nix | 50 +++++++++++++++++++ .../tools/haskell/hyper-haskell/server.nix | 21 ++++++++ pkgs/top-level/all-packages.nix | 14 ++++++ 3 files changed, 85 insertions(+) create mode 100644 pkgs/development/tools/haskell/hyper-haskell/default.nix create mode 100644 pkgs/development/tools/haskell/hyper-haskell/server.nix diff --git a/pkgs/development/tools/haskell/hyper-haskell/default.nix b/pkgs/development/tools/haskell/hyper-haskell/default.nix new file mode 100644 index 00000000000..31697750a70 --- /dev/null +++ b/pkgs/development/tools/haskell/hyper-haskell/default.nix @@ -0,0 +1,50 @@ +{ stdenv, fetchFromGitHub, writeText, jshon, electron, hyper-haskell-server, extra-packages ? [] }: + +let + binPath = stdenv.lib.makeBinPath ([ hyper-haskell-server ] ++ extra-packages); + +in stdenv.mkDerivation rec { + name = "hyper-haskell-${version}"; + version = "0.1.0.2"; + + src = fetchFromGitHub { + owner = "HeinrichApfelmus"; + repo = "hyper-haskell"; + rev = "v${version}"; + sha256 = "1k38h7qx12z7463z8466pji0nwfkp4qkg7q83kns2mzmwmw5jnmb"; + }; + + propagatedBuildInputs = extra-packages; + + buildCommand = '' + mkdir -p $out/bin $out/share/hyper-haskell/worksheets $out/share/applications $out/share/icons/hicolor/scalable/apps $out/share/mime/packages + + # Electron app + cp -R $src/app $out + + # Desktop Launcher + cp $src/resources/hyper-haskell.desktop $out/share/applications/hyper-haskell.desktop + cp $src/resources/icons/icon.svg $out/share/icons/hicolor/scalable/apps/hyper-haskell.svg + cp $src/resources/shared-mime-info.xml $out/share/mime/packages/hyper-haskell.xml + + # install example worksheets with backend set to nix + for worksheet in "$src/worksheets/"*.hhs; do + ${jshon}/bin/jshon -e settings -s nix -i packageTool -p < $worksheet > $out/share/hyper-haskell/worksheets/`basename $worksheet` + done + + # install electron wrapper script + cat > $out/bin/hyper-haskell < Date: Sat, 18 Nov 2017 13:34:15 -0500 Subject: [PATCH 02/57] melpaStablePackages.caml: don't run configure --- .../editors/emacs-modes/melpa-stable-packages.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/applications/editors/emacs-modes/melpa-stable-packages.nix b/pkgs/applications/editors/emacs-modes/melpa-stable-packages.nix index 03121edada0..97148e928e6 100644 --- a/pkgs/applications/editors/emacs-modes/melpa-stable-packages.nix +++ b/pkgs/applications/editors/emacs-modes/melpa-stable-packages.nix @@ -45,6 +45,11 @@ self: # upstream issue: missing file header bufshow = markBroken super.bufshow; + # upstream issue: comes with a broken configure file + caml = super.caml.overrideAttrs (oldAttrs: rec { + configureScript = "true"; + }); + # part of a larger package # upstream issue: missing package version cmake-mode = markBroken (dontConfigure super.cmake-mode); From 41991e09adc7dfe8d3524002f035ed2b94fec841 Mon Sep 17 00:00:00 2001 From: Jake Waksbaum Date: Mon, 20 Nov 2017 17:29:37 -0500 Subject: [PATCH 03/57] Add texmacsDarwin --- pkgs/applications/editors/texmacs/common.nix | 68 +++++++++++++++ pkgs/applications/editors/texmacs/darwin.nix | 59 +++++++++++++ .../applications/editors/texmacs/darwin.patch | 29 +++++++ pkgs/applications/editors/texmacs/default.nix | 87 ++++--------------- pkgs/top-level/all-packages.nix | 14 ++- 5 files changed, 182 insertions(+), 75 deletions(-) create mode 100644 pkgs/applications/editors/texmacs/common.nix create mode 100644 pkgs/applications/editors/texmacs/darwin.nix create mode 100644 pkgs/applications/editors/texmacs/darwin.patch diff --git a/pkgs/applications/editors/texmacs/common.nix b/pkgs/applications/editors/texmacs/common.nix new file mode 100644 index 00000000000..ec2498aa69b --- /dev/null +++ b/pkgs/applications/editors/texmacs/common.nix @@ -0,0 +1,68 @@ +{ stdenv, fetchurl, tex, extraFonts, chineseFonts, japaneseFonts, koreanFonts }: +rec { + extraFontsSrc = fetchurl { + url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-extra-fonts-1.0-noarch.tar.gz"; + sha256 = "0hylgjmd95y9yahbblmawkkw0i71vb145xxv2xqrmff81301n6k7"; + }; + + fullFontsSrc = fetchurl { + url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-windows-fonts-1.0-noarch.tar.gz"; + sha256 = "1yxzjpqpm7kvx0ly5jmfpzlfhsh41b0ibn1v84qv6xy73r2vis2f"; + }; + + chineseFontsSrc = fetchurl { + url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-chinese-fonts.tar.gz"; + sha256 = "0yprqjsx5mfsaxr525mcm3xqwcadzxp14njm38ir1325baada2fp"; + }; + + japaneseFontsSrc = fetchurl { + url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-japanese-fonts.tar.gz"; + sha256 = "1dn6zvsa7gk59d61xicwpbapab3rm6kz48rp5w1bhmihxixw21jn"; + }; + + koreanFontsSrc = fetchurl { + url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-korean-fonts.tar.gz"; + sha256 = "07axg57mqm3jbnm4lawx0h3r2h56xv9acwzjppryfklw4c27f5hh"; + }; + + postPatch = (if tex == null then '' + gunzip < ${fullFontsSrc} | (cd TeXmacs && tar xvf -) + '' else if extraFonts then '' + gunzip < ${extraFontsSrc} | (cd TeXmacs && tar xvf -) + '' else "") + + (if chineseFonts then '' + gunzip < ${chineseFontsSrc} | (cd TeXmacs && tar xvf -) + '' else "") + + (if japaneseFonts then '' + gunzip < ${japaneseFontsSrc} | (cd TeXmacs && tar xvf -) + '' else "") + + (if koreanFonts then '' + gunzip < ${koreanFontsSrc} | (cd TeXmacs && tar xvf -) + '' else ""); + + + meta = { + description = "WYSIWYW editing platform with special features for scientists"; + longDescription = + '' GNU TeXmacs is a free wysiwyw (what you see is what you want) + editing platform with special features for scientists. The software + aims to provide a unified and user friendly framework for editing + structured documents with different types of content (text, + graphics, mathematics, interactive content, etc.). The rendering + engine uses high-quality typesetting algorithms so as to produce + professionally looking documents, which can either be printed out or + presented from a laptop. + + The software includes a text editor with support for mathematical + formulas, a small technical picture editor and a tool for making + presentations from a laptop. Moreover, TeXmacs can be used as an + interface for many external systems for computer algebra, numerical + analysis, statistics, etc. New presentation styles can be written + by the user and new features can be added to the editor using the + Scheme extension language. A native spreadsheet and tools for + collaborative authoring are planned for later. + ''; + homepage = http://texmacs.org/; + license = stdenv.lib.licenses.gpl2Plus; + }; +} diff --git a/pkgs/applications/editors/texmacs/darwin.nix b/pkgs/applications/editors/texmacs/darwin.nix new file mode 100644 index 00000000000..e319ccf39b1 --- /dev/null +++ b/pkgs/applications/editors/texmacs/darwin.nix @@ -0,0 +1,59 @@ +{ stdenv, callPackage, fetchurl, makeWrapper, + guile_1_8, qt4, zlib, freetype, CoreFoundation, Cocoa, gettext, libiconv, ghostscript, + tex ? null, + aspell ? null, + netpbm ? null, + imagemagick ? null, + extraFonts ? false, + chineseFonts ? false, + japaneseFonts ? false, + koreanFonts ? false }: +let + version = "1.99.4"; + common = callPackage ./common.nix { + inherit tex extraFonts chineseFonts japaneseFonts koreanFonts; + }; +in +stdenv.mkDerivation { + name = "TeXmacs-${version}"; + + src= fetchurl { + url = "http://www.texmacs.org/Download/ftp/tmftp/source/TeXmacs-${version}-src.tar.gz"; + sha256 = "1z8sj0xd1ncbl7ipzfsib6lmc7ahgvmiw61ln5zxm2l88jf7qc1a"; + }; + + patches = [ ./darwin.patch ]; + + buildInputs = [ guile_1_8.dev qt4 freetype CoreFoundation Cocoa gettext libiconv ghostscript ]; + + GUILE_CPPFLAGS="-D_THREAD_SAFE -I${guile_1_8.dev}/include -I${guile_1_8.dev}/include/guile "; + + NIX_LDFLAGS="${zlib}/lib/libz.dylib"; + + buildPhase = '' + substituteInPlace Makefile \ + --replace 'find -d $(MACOS_PACKAGE_TEXMACS)' 'find $(MACOS_PACKAGE_TEXMACS) -depth' \ + --replace '$(MACOS_PACKAGE_SRC)/bundle-libs.sh' 'true' + make MACOS_BUNDLE + ''; + + installPhase = '' + mkdir -p $out/Applications + cp -R ../distr/TeXmacs-${version}.app $out/Applications + ''; + + inherit (common) postPatch; + + postInstall = "wrapProgram $out/Applications/TeXmacs-${version}/Contents/MacOS/TeXmacs --suffix PATH : " + + "${ghostscript}/bin:" + + (if aspell == null then "" else "${aspell}/bin:") + + (if tex == null then "" else "${tex}/bin:") + + (if netpbm == null then "" else "${netpbm}/bin:") + + (if imagemagick == null then "" else "${imagemagick}/bin:"); + + enableParallelBuilding = true; + + meta = common.meta // { + platforms = stdenv.lib.platforms.darwin; + }; +} diff --git a/pkgs/applications/editors/texmacs/darwin.patch b/pkgs/applications/editors/texmacs/darwin.patch new file mode 100644 index 00000000000..2cb33fbbef3 --- /dev/null +++ b/pkgs/applications/editors/texmacs/darwin.patch @@ -0,0 +1,29 @@ +--- a/configure ++++ b/configure +@@ -7461,7 +7461,7 @@ $as_echo "final adjustments for cygwin host" >&6; } + CONFIG_QTPIPES="yes" + CONFIG_CXXFLAGS="-I${prefix}/include" + CONFIG_BSHARED="" +- CONFIG_BFLAGS="-framework Cocoa -framework IOKit" ++ CONFIG_BFLAGS="-framework Cocoa -framework IOKit -framework CoreFoundation" + CONFIG_BPATH="" + CONFIG_SO="dylib" + CONFIG_LIB_PATH="DYLD_LIBRARY_PATH" +@@ -8281,6 +8281,7 @@ _ASEOF + if $QMAKE ${additional_qmake_flags} ; then :; else + as_fn_error $? "Calling $QMAKE failed." "$LINENO" 5 + fi ++ echo "QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.10" >> $pro_file + # Try to compile a simple Qt app. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can build a simple Qt app" >&5 + $as_echo_n "checking whether we can build a simple Qt app... " >&6; } +--- a/src/Plugins/Unix/unix_sys_utils.cpp ++++ b/src/Plugins/Unix/unix_sys_utils.cpp +@@ -17,6 +17,7 @@ + #include + #include + #include ++#include + + // for thread safe strings + #include diff --git a/pkgs/applications/editors/texmacs/default.nix b/pkgs/applications/editors/texmacs/default.nix index e51813459c6..447e729d4f9 100644 --- a/pkgs/applications/editors/texmacs/default.nix +++ b/pkgs/applications/editors/texmacs/default.nix @@ -1,41 +1,21 @@ -{stdenv, fetchurl, guile_1_8, qt4, zlib, xmodmap, which, makeWrapper, freetype, - tex ? null, - aspell ? null, - ghostscriptX ? null, - extraFonts ? false, - chineseFonts ? false, - japaneseFonts ? false, - koreanFonts ? false }: +{ stdenv, callPackage, + fetchurl, guile_1_8, qt4, zlib, xmodmap, which, makeWrapper, freetype, + tex ? null, + aspell ? null, + ghostscriptX ? null, + extraFonts ? false, + chineseFonts ? false, + japaneseFonts ? false, + koreanFonts ? false }: -let +let pname = "TeXmacs"; version = "1.99.2"; - extraFontsSrc = fetchurl { - url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-extra-fonts-1.0-noarch.tar.gz"; - sha256 = "0hylgjmd95y9yahbblmawkkw0i71vb145xxv2xqrmff81301n6k7"; - }; - - fullFontsSrc = fetchurl { - url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-windows-fonts-1.0-noarch.tar.gz"; - sha256 = "1yxzjpqpm7kvx0ly5jmfpzlfhsh41b0ibn1v84qv6xy73r2vis2f"; - }; - - chineseFontsSrc = fetchurl { - url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-chinese-fonts.tar.gz"; - sha256 = "0yprqjsx5mfsaxr525mcm3xqwcadzxp14njm38ir1325baada2fp"; - }; - - japaneseFontsSrc = fetchurl { - url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-japanese-fonts.tar.gz"; - sha256 = "1dn6zvsa7gk59d61xicwpbapab3rm6kz48rp5w1bhmihxixw21jn"; - }; - - koreanFontsSrc = fetchurl { - url = "ftp://ftp.texmacs.org/pub/TeXmacs/fonts/TeXmacs-korean-fonts.tar.gz"; - sha256 = "07axg57mqm3jbnm4lawx0h3r2h56xv9acwzjppryfklw4c27f5hh"; + common = callPackage ./common.nix { + inherit tex extraFonts chineseFonts japaneseFonts koreanFonts; }; in -stdenv.mkDerivation rec { +stdenv.mkDerivation { name = "${pname}-${version}"; src = fetchurl { @@ -45,56 +25,21 @@ stdenv.mkDerivation rec { buildInputs = [ guile_1_8 qt4 makeWrapper ghostscriptX freetype ]; - patchPhase = (if tex == null then '' - gunzip < ${fullFontsSrc} | (cd TeXmacs && tar xvf -) - '' else if extraFonts then '' - gunzip < ${extraFontsSrc} | (cd TeXmacs && tar xvf -) - '' else "") + - (if chineseFonts then '' - gunzip < ${chineseFontsSrc} | (cd TeXmacs && tar xvf -) - '' else "") + - (if japaneseFonts then '' - gunzip < ${japaneseFontsSrc} | (cd TeXmacs && tar xvf -) - '' else "") + - (if koreanFonts then '' - gunzip < ${koreanFontsSrc} | (cd TeXmacs && tar xvf -) - '' else ""); - postInstall = "wrapProgram $out/bin/texmacs --suffix PATH : " + (if ghostscriptX == null then "" else "${ghostscriptX}/bin:") + (if aspell == null then "" else "${aspell}/bin:") + (if tex == null then "" else "${tex}/bin:") + "${xmodmap}/bin:${which}/bin"; + inherit (common) postPatch; + postFixup = '' bin="$out/libexec/TeXmacs/bin/texmacs.bin" rpath=$(patchelf --print-rpath "$bin") patchelf --set-rpath "$rpath:${zlib.out}/lib" "$bin" ''; - meta = { - description = "WYSIWYW editing platform with special features for scientists"; - longDescription = - '' GNU TeXmacs is a free wysiwyw (what you see is what you want) - editing platform with special features for scientists. The software - aims to provide a unified and user friendly framework for editing - structured documents with different types of content (text, - graphics, mathematics, interactive content, etc.). The rendering - engine uses high-quality typesetting algorithms so as to produce - professionally looking documents, which can either be printed out or - presented from a laptop. - - The software includes a text editor with support for mathematical - formulas, a small technical picture editor and a tool for making - presentations from a laptop. Moreover, TeXmacs can be used as an - interface for many external systems for computer algebra, numerical - analysis, statistics, etc. New presentation styles can be written - by the user and new features can be added to the editor using the - Scheme extension language. A native spreadsheet and tools for - collaborative authoring are planned for later. - ''; - homepage = http://texmacs.org/; - license = stdenv.lib.licenses.gpl2Plus; + meta = common.meta // { maintainers = [ stdenv.lib.maintainers.roconnor ]; platforms = stdenv.lib.platforms.gnu; # arbitrary choice }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 23a9bb27fe0..2dfed3f4885 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4656,10 +4656,16 @@ with pkgs; telepresence = callPackage ../tools/networking/telepresence { }; - texmacs = callPackage ../applications/editors/texmacs { - tex = texlive.combined.scheme-small; - extraFonts = true; - }; + texmacs = if stdenv.isDarwin + then callPackage ../applications/editors/texmacs/darwin.nix { + inherit (darwin.apple_sdk.frameworks) CoreFoundation Cocoa; + tex = texlive.combined.scheme-small; + extraFonts = true; + } else callPackage ../applications/editors/texmacs/default.nix { + tex = texlive.combined.scheme-small; + extraFonts = true; + }; + texmaker = callPackage ../applications/editors/texmaker { }; From f0bafef6a129ed8ab0d2566ae18b10ee9c4bc161 Mon Sep 17 00:00:00 2001 From: Thomas Pham Date: Fri, 19 Jan 2018 13:44:14 +0100 Subject: [PATCH 04/57] add Serviio Media server package and service --- nixos/modules/module-list.nix | 1 + nixos/modules/services/misc/serviio.nix | 92 +++++++++++++++++++++++++ pkgs/servers/serviio/default.nix | 30 ++++++++ pkgs/top-level/all-packages.nix | 2 + 4 files changed, 125 insertions(+) create mode 100644 nixos/modules/services/misc/serviio.nix create mode 100644 pkgs/servers/serviio/default.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 91dd0529d3c..5c092d69abf 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -348,6 +348,7 @@ ./services/misc/rippled.nix ./services/misc/ripple-data-api.nix ./services/misc/rogue.nix + ./services/misc/serviio.nix ./services/misc/siproxd.nix ./services/misc/snapper.nix ./services/misc/sonarr.nix diff --git a/nixos/modules/services/misc/serviio.nix b/nixos/modules/services/misc/serviio.nix new file mode 100644 index 00000000000..a6612e9c6ad --- /dev/null +++ b/nixos/modules/services/misc/serviio.nix @@ -0,0 +1,92 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let + + cfg = config.services.serviio; + + serviioStart = pkgs.writeScript "serviio.sh" '' + #!${pkgs.bash}/bin/sh + + SERVIIO_HOME=${pkgs.serviio} + + # Setup the classpath + SERVIIO_CLASS_PATH="$SERVIIO_HOME/lib/*:$SERVIIO_HOME/config" + + # Setup Serviio specific properties + JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dorg.restlet.engine.loggerFacadeClass=org.restlet.ext.slf4j.Slf4jLoggerFacade + -Dderby.system.home=${cfg.dataDir}/library -Dserviio.home=${cfg.dataDir} -Dffmpeg.location=${pkgs.ffmpeg}/bin/ffmpeg -Ddcraw.location=${pkgs.dcraw}/bin/dcraw" + + # Execute the JVM in the foreground + exec ${pkgs.jre}/bin/java -Xmx512M -Xms20M -XX:+UseG1GC -XX:GCTimeRatio=1 -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 $JAVA_OPTS -classpath "$SERVIIO_CLASS_PATH" org.serviio.MediaServer "$@" + ''; + +in { + + ###### interface + options = { + services.serviio = { + + enable = mkOption { + type = types.bool; + default = false; + description = '' + Whether to enable the Serviio Media Server. + ''; + }; + + dataDir = mkOption { + type = types.path; + default = "/var/lib/serviio"; + description = '' + The directory where serviio stores its state, data, etc. + ''; + }; + + }; + }; + + ###### implementation + + config = mkIf cfg.enable { + systemd.services.serviio = { + description = "Serviio Media Server"; + after = [ "local-fs.target" "network.target" ]; + wantedBy = [ "multi-user.target" ]; + path = [ pkgs.serviio ]; + serviceConfig = { + User = "serviio"; + Group = "serviio"; + ExecStart = "${serviioStart}"; + ExecStop = "${serviioStart} -stop"; + }; + }; + + users.extraUsers = [ + { + name = "serviio"; + group = "serviio"; + home = cfg.dataDir; + description = "Serviio Media Server User"; + createHome = true; + isSystemUser = true; + } + ]; + + users.extraGroups = [ + { name = "serviio";} + ]; + + networking.firewall = { + allowedTCPPorts = [ + 8895 # serve UPnP responses + 23423 # console + 23424 # mediabrowser + ]; + allowedUDPPorts = [ + 1900 # UPnP service discovey + ]; + }; + }; +} diff --git a/pkgs/servers/serviio/default.nix b/pkgs/servers/serviio/default.nix new file mode 100644 index 00000000000..0c956a6c757 --- /dev/null +++ b/pkgs/servers/serviio/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + name = "serviio-${version}"; + version = "1.9"; + + src = fetchurl { + url = "http://download.serviio.org/releases/${name}-linux.tar.gz"; + sha256 = "0vi9dwpdrk087gpi0xib0hwpvdmaf9g99nfdfx2r3wmmdzw7wysl"; + }; + + phases = ["unpackPhase" "installPhase"]; + + installPhase = '' + mkdir -p $out + cp -R config legal lib library plugins LICENCE.txt NOTICE.txt README.txt RELEASE_NOTES.txt $out + ''; + + meta = with stdenv.lib; { + homepage = http://serviio.org; + description = "UPnP Media Streaming Server"; + longDescription = '' + Serviio is a free media server. It allows you to stream your media files (music, video or images) + to any DLNA-certified renderer device (e.g. a TV set, Bluray player, games console) on your home network. + ''; + license = licenses.free; + maintainers = [ maintainers.thpham ]; + 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 22ce05089f8..aa5f67316ab 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20066,6 +20066,8 @@ with pkgs; seafile-shared = callPackage ../misc/seafile-shared { }; + serviio = callPackage ../servers/serviio {}; + slock = callPackage ../misc/screensavers/slock { conf = config.slock.conf or null; }; From 53682b90943e2b5387fcc92c1b7545ea52dbd527 Mon Sep 17 00:00:00 2001 From: Thomas Pham Date: Fri, 19 Jan 2018 19:11:03 +0100 Subject: [PATCH 05/57] Update license to unfree --- pkgs/servers/serviio/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/serviio/default.nix b/pkgs/servers/serviio/default.nix index 0c956a6c757..876cc01592e 100644 --- a/pkgs/servers/serviio/default.nix +++ b/pkgs/servers/serviio/default.nix @@ -23,7 +23,7 @@ stdenv.mkDerivation rec { Serviio is a free media server. It allows you to stream your media files (music, video or images) to any DLNA-certified renderer device (e.g. a TV set, Bluray player, games console) on your home network. ''; - license = licenses.free; + license = licenses.unfree; maintainers = [ maintainers.thpham ]; platforms = platforms.linux; }; From 56c88781ee7484a725699d140d8ff0edbc36e697 Mon Sep 17 00:00:00 2001 From: Stijn DW Date: Sat, 17 Feb 2018 20:10:17 +0100 Subject: [PATCH 06/57] brlaser: init from latest git --- pkgs/misc/cups/drivers/brlaser/default.nix | 42 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 44 insertions(+) create mode 100644 pkgs/misc/cups/drivers/brlaser/default.nix diff --git a/pkgs/misc/cups/drivers/brlaser/default.nix b/pkgs/misc/cups/drivers/brlaser/default.nix new file mode 100644 index 00000000000..7a6d6c3861d --- /dev/null +++ b/pkgs/misc/cups/drivers/brlaser/default.nix @@ -0,0 +1,42 @@ +{ stdenv, fetchFromGitHub, cmake, zlib, cups, ghostscript }: + +stdenv.mkDerivation rec { + + name = "brlaser"; + + src = fetchFromGitHub { + owner = "pdewacht"; + repo = "brlaser"; + rev = "a52149823373e11f918d9e6a56eda7242935c99b"; + sha256 = "12d8g0aispdj2virf6vrvb0vx6d6ardjg3qyav75shsm1f94ids6"; + }; + + buildInputs = [ cmake zlib cups ]; + + preConfigure = '' + cmakeFlags="$cmakeFlags -DCUPS_SERVER_BIN=$out/lib/cups/ -DCUPS_DATA_DIR=$out/share/cups/" + ''; + + meta = with stdenv.lib; { + description = "A CUPS driver for Brother laser printers"; + longDescription = + '' + Although most Brother printers support a standard printer language such as PCL or PostScript, not all do. If you have a monochrome Brother laser printer (or multi-function device) and the other open source drivers don't work, this one might help. + + This driver is known to work with these printers: + + Brother DCP-1510 + Brother DCP-7030 + Brother DCP-7040 + Brother DCP-7055 + Brother DCP-7055W + Brother DCP-7065DN + Brother HL-L2300D + Brother MFC-7360N + ''; + homepage = https://github.com/pdewacht/brlaser; + license = licenses.gpl2; + platforms = platforms.unix; + maintainers = with maintainers; [ StijnDW ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6a10ba606cd..d8139e9f718 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20185,6 +20185,8 @@ with pkgs; snapscanFirmware = config.sane.snapscanFirmware or null; }; + brlaser = callPackage ../misc/cups/drivers/brlaser { }; + brscan4 = callPackage ../applications/graphics/sane/backends/brscan4 { }; mkSaneConfig = callPackage ../applications/graphics/sane/config.nix { }; From 0c74665bad3699cb3b2f4c0121101b94aa6fed49 Mon Sep 17 00:00:00 2001 From: Florian Jacob Date: Fri, 22 Dec 2017 01:14:47 +0100 Subject: [PATCH 07/57] luaevent: 0.4.3 -> 0.4.4 --- pkgs/top-level/lua-packages.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/top-level/lua-packages.nix b/pkgs/top-level/lua-packages.nix index 75f2ab9e582..6731c02568f 100644 --- a/pkgs/top-level/lua-packages.nix +++ b/pkgs/top-level/lua-packages.nix @@ -167,15 +167,14 @@ let }; luaevent = buildLuaPackage rec { - version = "0.4.3"; + version = "0.4.4"; name = "luaevent-${version}"; - disabled = isLua52; src = fetchFromGitHub { owner = "harningt"; repo = "luaevent"; rev = "v${version}"; - sha256 = "1c1n2zqx5rwfwkqaq1jj8gvx1vswvbihj2sy445w28icz1xfhpik"; + sha256 = "1krzxr0jkv3gmhpckp02byhdd9s5dd0hpyqc8irc8i79dd8x0p53"; }; preBuild = '' From 226965da67c25bbad0c6c0cc6d21b64a647beed8 Mon Sep 17 00:00:00 2001 From: Florian Jacob Date: Fri, 22 Dec 2017 01:17:48 +0100 Subject: [PATCH 08/57] prosody: 0.9.12 -> 0.10.0 updating config options, removing luazlib as mod_compression was removed for security reasons. --- nixos/doc/manual/release-notes/rl-1803.xml | 27 +++ nixos/modules/services/networking/prosody.nix | 212 ++++++++++++++++-- pkgs/servers/xmpp/prosody/default.nix | 9 +- pkgs/top-level/all-packages.nix | 5 +- 4 files changed, 221 insertions(+), 32 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-1803.xml b/nixos/doc/manual/release-notes/rl-1803.xml index b755245a69f..20f23261b60 100644 --- a/nixos/doc/manual/release-notes/rl-1803.xml +++ b/nixos/doc/manual/release-notes/rl-1803.xml @@ -322,6 +322,33 @@ following incompatible changes: external module. + + + The Prosody XMPP server has received a major update. The following modules were renamed: + + + + is now + + + + + is now + + + + + + + Many new modules are now core modules, most notably + and . + + + + The better-performing libevent backend is now enabled by default. + + + diff --git a/nixos/modules/services/networking/prosody.nix b/nixos/modules/services/networking/prosody.nix index 9d7e6d6018a..a7b43fb78a9 100644 --- a/nixos/modules/services/networking/prosody.nix +++ b/nixos/modules/services/networking/prosody.nix @@ -15,6 +15,7 @@ let description = "Path to the key file."; }; + # TODO: rename to certificate to match the prosody config cert = mkOption { type = types.path; description = "Path to the certificate file."; @@ -30,7 +31,7 @@ let }; moduleOpts = { - + # Generally required roster = mkOption { type = types.bool; default = true; @@ -61,12 +62,38 @@ let description = "Service discovery"; }; - legacyauth = mkOption { + # Not essential, but recommended + carbons = mkOption { type = types.bool; default = true; - description = "Legacy authentication. Only used by some old clients and bots"; + description = "Keep multiple clients in sync"; }; + pep = mkOption { + type = types.bool; + default = true; + description = "Enables users to publish their mood, activity, playing music and more"; + }; + + private = mkOption { + type = types.bool; + default = true; + description = "Private XML storage (for room bookmarks, etc.)"; + }; + + blocklist = mkOption { + type = types.bool; + default = true; + description = "Allow users to block communications with other users"; + }; + + vcard = mkOption { + type = types.bool; + default = true; + description = "Allow users to set vCards"; + }; + + # Nice to have version = mkOption { type = types.bool; default = true; @@ -91,36 +118,112 @@ let description = "Replies to XMPP pings with pongs"; }; - console = mkOption { + register = mkOption { type = types.bool; - default = false; - description = "telnet to port 5582"; + default = true; + description = "Allow users to register on this server using a client and change passwords"; }; + mam = mkOption { + type = types.bool; + default = false; + description = "Store messages in an archive and allow users to access it"; + }; + + # Admin interfaces + admin_adhoc = mkOption { + type = types.bool; + default = true; + description = "Allows administration via an XMPP client that supports ad-hoc commands"; + }; + + admin_telnet = mkOption { + type = types.bool; + default = false; + description = "Opens telnet console interface on localhost port 5582"; + }; + + # HTTP modules bosh = mkOption { type = types.bool; default = false; description = "Enable BOSH clients, aka 'Jabber over HTTP'"; }; - httpserver = mkOption { - type = types.bool; - default = false; - description = "Serve static files from a directory over HTTP"; - }; - websocket = mkOption { type = types.bool; default = false; description = "Enable WebSocket support"; }; + http_files = mkOption { + type = types.bool; + default = false; + description = "Serve static files from a directory over HTTP"; + }; + + # Other specific functionality + limits = mkOption { + type = types.bool; + default = false; + description = "Enable bandwidth limiting for XMPP connections"; + }; + + groups = mkOption { + type = types.bool; + default = false; + description = "Shared roster support"; + }; + + server_contact_info = mkOption { + type = types.bool; + default = false; + description = "Publish contact information for this service"; + }; + + announce = mkOption { + type = types.bool; + default = false; + description = "Send announcement to all online users"; + }; + + welcome = mkOption { + type = types.bool; + default = false; + description = "Welcome users who register accounts"; + }; + + watchregistrations = mkOption { + type = types.bool; + default = false; + description = "Alert admins of registrations"; + }; + + motd = mkOption { + type = types.bool; + default = false; + description = "Send a message to users when they log in"; + }; + + legacyauth = mkOption { + type = types.bool; + default = false; + description = "Legacy authentication. Only used by some old clients and bots"; + }; + + proxy65 = mkOption { + type = types.bool; + default = false; + description = "Enables a file transfer proxy service which clients behind NAT can use"; + }; + }; toLua = x: if builtins.isString x then ''"${x}"'' - else if builtins.isBool x then toString x + else if builtins.isBool x then (if x == true then "true" else "false") else if builtins.isInt x then toString x + else if builtins.isList x then ''{ ${lib.concatStringsSep ", " (map (n: toLua n) x) } }'' else throw "Invalid Lua value"; createSSLOptsStr = o: '' @@ -198,6 +301,59 @@ in description = "Allow account creation"; }; + c2sRequireEncryption = mkOption { + type = types.bool; + default = true; + description = '' + Force clients to use encrypted connections? This option will + prevent clients from authenticating unless they are using encryption. + ''; + }; + + s2sRequireEncryption = mkOption { + type = types.bool; + default = true; + description = '' + Force servers to use encrypted connections? This option will + prevent servers from authenticating unless they are using encryption. + Note that this is different from authentication. + ''; + }; + + s2sSecureAuth = mkOption { + type = types.bool; + default = false; + description = '' + Force certificate authentication for server-to-server connections? + This provides ideal security, but requires servers you communicate + with to support encryption AND present valid, trusted certificates. + For more information see https://prosody.im/doc/s2s#security + ''; + }; + + s2sInsecureDomains = mkOption { + type = types.listOf types.str; + default = []; + example = [ "insecure.example.com" ]; + description = '' + Some servers have invalid or self-signed certificates. You can list + remote domains here that will not be required to authenticate using + certificates. They will be authenticated using DNS instead, even + when s2s_secure_auth is enabled. + ''; + }; + + s2sSecureDomains = mkOption { + type = types.listOf types.str; + default = []; + example = [ "jabber.org" ]; + description = '' + Even if you leave s2s_secure_auth disabled, you can still require valid + certificates for some domains by specifying a list here. + ''; + }; + + modules = moduleOpts; extraModules = mkOption { @@ -266,27 +422,35 @@ in data_path = "/var/lib/prosody" - allow_registration = ${boolToString cfg.allowRegistration}; - - ${ optionalString cfg.modules.console "console_enabled = true;" } - ${ optionalString (cfg.ssl != null) (createSSLOptsStr cfg.ssl) } - admins = { ${lib.concatStringsSep ", " (map (n: "\"${n}\"") cfg.admins) } }; + admins = ${toLua cfg.admins} + + -- we already build with libevent, so we can just enable it for a more performant server + use_libevent = true modules_enabled = { ${ lib.concatStringsSep "\n\ \ " (lib.mapAttrsToList - (name: val: optionalString val ''"${name}";'') + (name: val: optionalString val "${toLua name};") cfg.modules) } - ${ optionalString cfg.allowRegistration "\"register\"\;" } - - ${ lib.concatStringsSep "\n" (map (x: "\"${x}\";") cfg.extraModules)} - - "posix"; + ${ lib.concatStringsSep "\n" (map (x: "${toLua x};") cfg.extraModules)} }; + allow_registration = ${toLua cfg.allowRegistration} + + c2s_require_encryption = ${toLua cfg.c2sRequireEncryption} + + s2s_require_encryption = ${toLua cfg.s2sRequireEncryption} + + s2s_secure_auth = ${toLua cfg.s2sSecureAuth} + + s2s_insecure_domains = ${toLua cfg.s2sInsecureDomains} + + s2s_secure_domains = ${toLua cfg.s2sSecureDomains} + + ${ cfg.extraConfig } ${ lib.concatStringsSep "\n" (lib.mapAttrsToList (n: v: '' diff --git a/pkgs/servers/xmpp/prosody/default.nix b/pkgs/servers/xmpp/prosody/default.nix index b0e3492c0da..eb3e858ac4d 100644 --- a/pkgs/servers/xmpp/prosody/default.nix +++ b/pkgs/servers/xmpp/prosody/default.nix @@ -1,14 +1,12 @@ { stdenv, fetchurl, libidn, openssl, makeWrapper, fetchhg , lua5, luasocket, luasec, luaexpat, luafilesystem, luabitop , withLibevent ? true, luaevent ? null -, withZlib ? true, luazlib ? null , withDBI ? true, luadbi ? null # use withExtraLibs to add additional dependencies of community modules , withExtraLibs ? [ ] , withCommunityModules ? [ ] }: assert withLibevent -> luaevent != null; -assert withZlib -> luazlib != null; assert withDBI -> luadbi != null; with stdenv.lib; @@ -16,7 +14,6 @@ with stdenv.lib; let libs = [ luasocket luasec luaexpat luafilesystem luabitop ] ++ optional withLibevent luaevent - ++ optional withZlib luazlib ++ optional withDBI luadbi ++ withExtraLibs; getPath = lib : type : "${lib}/lib/lua/${lua5.luaversion}/?.${type};${lib}/share/lua/${lua5.luaversion}/?.${type}"; @@ -27,12 +24,12 @@ let in stdenv.mkDerivation rec { - version = "0.9.12"; + version = "0.10.0"; name = "prosody-${version}"; src = fetchurl { url = "http://prosody.im/downloads/source/${name}.tar.gz"; - sha256 = "139yxqpinajl32ryrybvilh54ddb1q6s0ajjhlcs4a0rnwia6n8s"; + sha256 = "1644jy5dk46vahmh6nna36s79k8k668sbi3qamjb4q3c4m3y853l"; }; communityModules = fetchhg { @@ -65,7 +62,7 @@ stdenv.mkDerivation rec { meta = { description = "Open-source XMPP application server written in Lua"; license = licenses.mit; - homepage = http://www.prosody.im; + homepage = https://prosody.im; platforms = platforms.linux; maintainers = [ ]; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e267a460d0d..924058cc091 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12225,8 +12225,9 @@ with pkgs; hyp = callPackage ../servers/http/hyp/default.nix { }; prosody = callPackage ../servers/xmpp/prosody { - lua5 = lua5_1; - inherit (lua51Packages) luasocket luasec luaexpat luafilesystem luabitop luaevent luazlib luadbi; + # _compat can probably be removed on next minor version after 0.10.0 + lua5 = lua5_2_compat; + inherit (lua52Packages) luasocket luasec luaexpat luafilesystem luabitop luaevent luadbi; }; biboumi = callPackage ../servers/xmpp/biboumi { }; From 2c0b230330b3292e31f1de2392a293db6bede69e Mon Sep 17 00:00:00 2001 From: Florian Jacob Date: Fri, 22 Dec 2017 01:20:01 +0100 Subject: [PATCH 09/57] prosody: update community modules --- pkgs/servers/xmpp/prosody/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/xmpp/prosody/default.nix b/pkgs/servers/xmpp/prosody/default.nix index eb3e858ac4d..1567a4a6b30 100644 --- a/pkgs/servers/xmpp/prosody/default.nix +++ b/pkgs/servers/xmpp/prosody/default.nix @@ -34,8 +34,8 @@ stdenv.mkDerivation rec { communityModules = fetchhg { url = "https://hg.prosody.im/prosody-modules"; - rev = "9a3e51f348fe"; - sha256 = "09g4vi52rv0r3jzcm0bsgp4ngqq6iapfbxfh0l7qj36qnajp4vm6"; + rev = "150a7bd59043"; + sha256 = "0nfx3lngcy88nd81gb7v4kh3nz1bzsm67bxgpd2lprk54diqcrz1"; }; buildInputs = [ lua5 makeWrapper libidn openssl ]; From eb7b4ce2568322892800683b10aa64dac84fd7a8 Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Sat, 17 Mar 2018 12:32:55 -0700 Subject: [PATCH 10/57] bind: 9.12.0 -> 9.12.1 Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done: - built on NixOS - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/delv help` got 0 exit code - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/delv -v` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/named-rrchecker -h` got 0 exit code - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/named-rrchecker --help` got 0 exit code - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/named-rrchecker -V` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/named-rrchecker -v` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/named-rrchecker --version` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/named-rrchecker --help` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/mdig -h` got 0 exit code - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/mdig -v` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/ddns-confgen -h` got 0 exit code - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/dnssec-cds -V` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/dnssec-dsfromkey -V` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/dnssec-importkey -V` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/dnssec-keyfromlabel -V` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/dnssec-keygen -V` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/dnssec-revoke -V` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/dnssec-settime -V` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/dnssec-signzone -h` got 0 exit code - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/dnssec-signzone --help` got 0 exit code - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/dnssec-signzone -V` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/dnssec-signzone -v` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/dnssec-signzone --version` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/dnssec-signzone -h` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/dnssec-signzone --help` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/dnssec-verify -h` got 0 exit code - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/dnssec-verify --help` got 0 exit code - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/dnssec-verify -V` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/dnssec-verify -v` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/dnssec-verify --version` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/dnssec-verify -h` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/dnssec-verify --help` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/named -V` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/named -v` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/named-checkconf -v` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/named-checkzone -v` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/rndc -h` got 0 exit code - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/rndc -h` and found version 9.12.1 - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/rndc-confgen -h` got 0 exit code - ran `/nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1/bin/rndc-confgen -h` and found version 9.12.1 - found 9.12.1 with grep in /nix/store/9i6c9yx3p0gvhphd4ahj8pfcm0n78han-bind-9.12.1 - directory tree listing: https://gist.github.com/e9daefd05b7c96cd83a144018a3b6aaf --- pkgs/servers/dns/bind/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/dns/bind/default.nix b/pkgs/servers/dns/bind/default.nix index 55368ac9a4d..86e756a0db3 100644 --- a/pkgs/servers/dns/bind/default.nix +++ b/pkgs/servers/dns/bind/default.nix @@ -4,14 +4,14 @@ assert enableSeccomp -> libseccomp != null; -let version = "9.12.0"; in +let version = "9.12.1"; in stdenv.mkDerivation rec { name = "bind-${version}"; src = fetchurl { url = "http://ftp.isc.org/isc/bind9/${version}/${name}.tar.gz"; - sha256 = "10iwkghl5g50b7wc17bsb9wa0dh2gd57bjlk6ynixhywz6dhx1r9"; + sha256 = "043mjcw405qa0ghm5dkhfsq35gsy279724fz3mjqpr1mbi14dr0n"; }; outputs = [ "out" "lib" "dev" "man" "dnsutils" "host" ]; From 7770e378a1fe98a7f57682ccd8f86298713c5650 Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Mon, 19 Mar 2018 21:03:33 -0700 Subject: [PATCH 11/57] AgdaStdlib: 0.14 -> 0.15 Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done: - built on NixOS - Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.) - found 0.15 with grep in /nix/store/6787gs55hpa46z4507ji4jz5za51lyqy-agda-stdlib-0.15 - directory tree listing: https://gist.github.com/386f03ce4900379ef75d5d01bcc2cebb --- pkgs/development/libraries/agda/agda-stdlib/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/agda/agda-stdlib/default.nix b/pkgs/development/libraries/agda/agda-stdlib/default.nix index 815e0f20b54..c72572139c6 100644 --- a/pkgs/development/libraries/agda/agda-stdlib/default.nix +++ b/pkgs/development/libraries/agda/agda-stdlib/default.nix @@ -1,14 +1,14 @@ { stdenv, agda, fetchFromGitHub, ghcWithPackages }: agda.mkDerivation (self: rec { - version = "0.14"; + version = "0.15"; name = "agda-stdlib-${version}"; src = fetchFromGitHub { repo = "agda-stdlib"; owner = "agda"; rev = "v${version}"; - sha256 = "0qx72w6lwskp18q608f95j5dcxb9xr4q4mzdkxp01sgib8v2v56l"; + sha256 = "0c2vfib4fmljy98c3s3s7jmpjlqxvsbv7wf6qxr38kamwzbryrjj"; }; nativeBuildInputs = [ (ghcWithPackages (self : [ self.filemanip ])) ]; From 2b8406f873d6703b86ab416b83016795144ddff3 Mon Sep 17 00:00:00 2001 From: Daniel Fullmer Date: Tue, 20 Mar 2018 21:15:15 -0400 Subject: [PATCH 12/57] rclone: 1.39 -> 1.40 --- pkgs/applications/networking/sync/rclone/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/sync/rclone/default.nix b/pkgs/applications/networking/sync/rclone/default.nix index 71df7a0fb1e..aa2a971b15f 100644 --- a/pkgs/applications/networking/sync/rclone/default.nix +++ b/pkgs/applications/networking/sync/rclone/default.nix @@ -2,7 +2,7 @@ buildGoPackage rec { name = "rclone-${version}"; - version = "1.39"; + version = "1.40"; goPackagePath = "github.com/ncw/rclone"; @@ -10,7 +10,7 @@ buildGoPackage rec { owner = "ncw"; repo = "rclone"; rev = "v${version}"; - sha256 = "1x9qxhqkbyd7kd52ai9p996ppslh73xarn5w4ljaa97wwm5vwwsg"; + sha256 = "01q9g5g4va1s91xzvxpq8lj9jcrbl66cik383cpxwmcv04qcqgw9"; }; outputs = [ "bin" "out" "man" ]; From 88f06c5ce9800d661fa85c019838fe67635aa64f Mon Sep 17 00:00:00 2001 From: Florian Jacob Date: Wed, 21 Mar 2018 14:27:20 +0100 Subject: [PATCH 13/57] nixos/prosody: add a basic test --- nixos/tests/prosody.nix | 75 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 nixos/tests/prosody.nix diff --git a/nixos/tests/prosody.nix b/nixos/tests/prosody.nix new file mode 100644 index 00000000000..fcebfaf74e1 --- /dev/null +++ b/nixos/tests/prosody.nix @@ -0,0 +1,75 @@ +import ./make-test.nix { + name = "prosody"; + + machine = { config, pkgs, ... }: { + services.prosody = { + enable = true; + # TODO: use a self-signed certificate + c2sRequireEncryption = false; + }; + environment.systemPackages = let + sendMessage = pkgs.writeScriptBin "send-message" '' + #!/usr/bin/env python3 + # Based on the sleekxmpp send_client example, look there for more details: + # https://github.com/fritzy/SleekXMPP/blob/develop/examples/send_client.py + import sleekxmpp + + class SendMsgBot(sleekxmpp.ClientXMPP): + """ + A basic SleekXMPP bot that will log in, send a message, + and then log out. + """ + def __init__(self, jid, password, recipient, message): + sleekxmpp.ClientXMPP.__init__(self, jid, password) + + self.recipient = recipient + self.msg = message + + self.add_event_handler("session_start", self.start, threaded=True) + + def start(self, event): + self.send_presence() + self.get_roster() + + self.send_message(mto=self.recipient, + mbody=self.msg, + mtype='chat') + + self.disconnect(wait=True) + + + if __name__ == '__main__': + xmpp = SendMsgBot("test1@localhost", "test1", "test2@localhost", "Hello World!") + xmpp.register_plugin('xep_0030') # Service Discovery + xmpp.register_plugin('xep_0199') # XMPP Ping + + # TODO: verify certificate + # If you want to verify the SSL certificates offered by a server: + # xmpp.ca_certs = "path/to/ca/cert" + + if xmpp.connect(('localhost', 5222)): + xmpp.process(block=True) + else: + print("Unable to connect.") + sys.exit(1) + ''; + in [ (pkgs.python3.withPackages (ps: [ ps.sleekxmpp ])) sendMessage ]; + }; + + testScript = '' + $machine->waitForUnit('prosody.service'); + $machine->succeed('prosodyctl status') =~ /Prosody is running/; + + # set password to 'test' (it's asked twice) + $machine->succeed('yes test1 | prosodyctl adduser test1@localhost'); + # set password to 'y' + $machine->succeed('yes | prosodyctl adduser test2@localhost'); + # correct password to 'test2' + $machine->succeed('yes test2 | prosodyctl passwd test2@localhost'); + + $machine->succeed("send-message"); + + $machine->succeed('prosodyctl deluser test1@localhost'); + $machine->succeed('prosodyctl deluser test2@localhost'); + ''; +} From 654ebf823290b8374b68780497e7a563d0287ceb Mon Sep 17 00:00:00 2001 From: Fedor Logachev Date: Wed, 21 Mar 2018 20:07:30 +0300 Subject: [PATCH 14/57] tdesktop: fixed GLib-GIO-ERROR --- .../networking/instant-messengers/telegram/tdesktop/generic.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix index a165e90c3bd..f489179a099 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix @@ -125,6 +125,7 @@ mkDerivation rec { # This is necessary to run Telegram in a pure environment. wrapProgram $out/bin/telegram-desktop \ --prefix QT_PLUGIN_PATH : "${qtbase}/${qtbase.qtPluginPrefix}" \ + --suffix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \ --set XDG_RUNTIME_DIR "XDG-RUNTIME-DIR" sed -i $out/bin/telegram-desktop \ -e "s,'XDG-RUNTIME-DIR',\"\''${XDG_RUNTIME_DIR:-/run/user/\$(id --user)}\"," From 0d6fdac8e2f9ad0327bbf4203ebdc2e0c929253f Mon Sep 17 00:00:00 2001 From: Michael Brantley Date: Wed, 21 Mar 2018 13:42:37 -0400 Subject: [PATCH 15/57] perlPackages.GSSAPI: depend on krb5Full, fix misspelling --- pkgs/top-level/perl-packages.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 688af3e28e7..85a3d4b8b1a 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -6350,19 +6350,19 @@ let self = _self // overrides; _self = with self; { }; GSSAPI = buildPerlPackage rec { - name = "GSSAPPI-0.28"; + name = "GSSAPI-0.28"; src = fetchurl { - url = "http://search.cpan.org/CPAN/authors/id/A/AG/AGROLMS/GSSAPI-0.28.tar.gz"; + url = "mirror://cpan/authors/id/A/AG/AGROLMS/${name}.tar.gz"; sha256 = "1mkhwxjjlhr58pd770i9gnf7zy7jj092iv6jfbnb8bvnc5xjr3vx"; }; buildInputs = [ TestPod ]; - propagatedBuildInputs = [ pkgs.heimdalFull ]; + propagatedBuildInputs = [ pkgs.krb5Full.dev ]; meta = { maintainers = [ maintainers.limeytexan ]; description = "Perl extension providing access to the GSSAPIv2 library"; license = with stdenv.lib.licenses; [ artistic1 gpl1Plus ]; }; - makeMakerFlags = "--gssapiimpl ${pkgs.heimdalFull.out}"; + makeMakerFlags = "--gssapiimpl ${pkgs.krb5Full.dev}"; }; Gtk2 = buildPerlPackage rec { From 0a80f2c0f4284428235b0f54e228f6e76f1673a7 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 22 Mar 2018 03:40:46 +0100 Subject: [PATCH 16/57] prosody: improve module handling --- nixos/doc/manual/release-notes/rl-1803.xml | 5 +++++ nixos/modules/services/networking/prosody.nix | 14 +++++++++++--- pkgs/servers/xmpp/prosody/default.nix | 10 +++++++--- 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/nixos/doc/manual/release-notes/rl-1803.xml b/nixos/doc/manual/release-notes/rl-1803.xml index 20f23261b60..e67f1448466 100644 --- a/nixos/doc/manual/release-notes/rl-1803.xml +++ b/nixos/doc/manual/release-notes/rl-1803.xml @@ -347,6 +347,11 @@ following incompatible changes: The better-performing libevent backend is now enabled by default. + + + withCommunityModules now passes through the modules to . + Use withOnlyInstalledCommunityModules for modules that should not be enabled directly, e.g lib_ldap. + diff --git a/nixos/modules/services/networking/prosody.nix b/nixos/modules/services/networking/prosody.nix index a7b43fb78a9..d57ebb61f63 100644 --- a/nixos/modules/services/networking/prosody.nix +++ b/nixos/modules/services/networking/prosody.nix @@ -362,6 +362,12 @@ in description = "Enable custom modules"; }; + extraPluginPaths = mkOption { + type = types.listOf types.path; + default = []; + description = "Addtional path in which to look find plugins/modules"; + }; + virtualHosts = mkOption { description = "Define the virtual hosts"; @@ -411,16 +417,18 @@ in config = mkIf cfg.enable { - environment.systemPackages = [ pkgs.prosody ]; + environment.systemPackages = [ cfg.package ]; environment.etc."prosody/prosody.cfg.lua".text = '' pidfile = "/var/lib/prosody/prosody.pid" - log = "*syslog" data_path = "/var/lib/prosody" + plugin_paths = { + ${lib.concatStringsSep ", " (map (n: "\"${n}\"") cfg.extraPluginPaths) } + } ${ optionalString (cfg.ssl != null) (createSSLOptsStr cfg.ssl) } @@ -434,7 +442,7 @@ in ${ lib.concatStringsSep "\n\ \ " (lib.mapAttrsToList (name: val: optionalString val "${toLua name};") cfg.modules) } - + ${ lib.concatStringsSep "\n" (map (x: "${toLua x};") cfg.package.communityModules)} ${ lib.concatStringsSep "\n" (map (x: "${toLua x};") cfg.extraModules)} }; diff --git a/pkgs/servers/xmpp/prosody/default.nix b/pkgs/servers/xmpp/prosody/default.nix index 1567a4a6b30..2d0e1a529da 100644 --- a/pkgs/servers/xmpp/prosody/default.nix +++ b/pkgs/servers/xmpp/prosody/default.nix @@ -4,6 +4,7 @@ , withDBI ? true, luadbi ? null # use withExtraLibs to add additional dependencies of community modules , withExtraLibs ? [ ] +, withOnlyInstalledCommunityModules ? [ ] , withCommunityModules ? [ ] }: assert withLibevent -> luaevent != null; @@ -38,7 +39,8 @@ stdenv.mkDerivation rec { sha256 = "0nfx3lngcy88nd81gb7v4kh3nz1bzsm67bxgpd2lprk54diqcrz1"; }; - buildInputs = [ lua5 makeWrapper libidn openssl ]; + buildInputs = [ lua5 makeWrapper libidn openssl ] + ++ optional withDBI luadbi; configureFlags = [ "--ostype=linux" @@ -49,7 +51,7 @@ stdenv.mkDerivation rec { postInstall = '' ${concatMapStringsSep "\n" (module: '' cp -r $communityModules/mod_${module} $out/lib/prosody/modules/ - '') withCommunityModules} + '') (withCommunityModules ++ withOnlyInstalledCommunityModules)} wrapProgram $out/bin/prosody \ --set LUA_PATH '${luaPath};' \ --set LUA_CPATH '${luaCPath};' @@ -59,11 +61,13 @@ stdenv.mkDerivation rec { --set LUA_CPATH '${luaCPath};' ''; + passthru.communityModules = withCommunityModules; + meta = { description = "Open-source XMPP application server written in Lua"; license = licenses.mit; homepage = https://prosody.im; platforms = platforms.linux; - maintainers = [ ]; + maintainers = with maintainers; [ fpletz globin ]; }; } From faaf32a0ee3ed3693e87def1fabd6b8a89e29a41 Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 22 Mar 2018 03:46:02 +0100 Subject: [PATCH 17/57] prosody: add test to release.nix --- nixos/release.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/release.nix b/nixos/release.nix index a1310a409a1..e3fdf749f27 100644 --- a/nixos/release.nix +++ b/nixos/release.nix @@ -344,6 +344,7 @@ in rec { tests.predictable-interface-names = callSubTests tests/predictable-interface-names.nix {}; tests.printing = callTest tests/printing.nix {}; tests.prometheus = callTest tests/prometheus.nix {}; + tests.prosody = callTest tests/prosody.nix {}; tests.proxy = callTest tests/proxy.nix {}; # tests.quagga = callTest tests/quagga.nix {}; tests.quake3 = callTest tests/quake3.nix {}; From 765211451deaea1c09e24fa2f6fd2ab6dbbc04d6 Mon Sep 17 00:00:00 2001 From: Vaibhav Sagar Date: Thu, 22 Mar 2018 11:40:54 +0800 Subject: [PATCH 18/57] pythonPackages.notebook: 5.4.0 -> 5.4.1 --- pkgs/development/python-modules/notebook/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/notebook/default.nix b/pkgs/development/python-modules/notebook/default.nix index d4e7de2872d..443cfa7ccb9 100644 --- a/pkgs/development/python-modules/notebook/default.nix +++ b/pkgs/development/python-modules/notebook/default.nix @@ -24,11 +24,11 @@ buildPythonPackage rec { pname = "notebook"; - version = "5.4.0"; + version = "5.4.1"; src = fetchPypi { inherit pname version; - sha256 = "dd431fad9bdd25aa9ff8265da096ef770475e21bf1d327982611a7de5cd904ca"; + sha256 = "01l6yp78sp27vns4cxh8ybr7x0pixxn97cp0i3w6s0lv1v8l6qbx"; }; LC_ALL = "en_US.utf8"; From d0893dc1548302a6dc37ccc75836b09cbc54ab5b Mon Sep 17 00:00:00 2001 From: volth Date: Thu, 22 Mar 2018 07:19:12 +0000 Subject: [PATCH 19/57] libguestfs: doInstallCheck only with appliance --- pkgs/development/libraries/libguestfs/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libguestfs/default.nix b/pkgs/development/libraries/libguestfs/default.nix index 258157c1178..106de68d367 100644 --- a/pkgs/development/libraries/libguestfs/default.nix +++ b/pkgs/development/libraries/libguestfs/default.nix @@ -62,7 +62,7 @@ stdenv.mkDerivation rec { ln -s ${appliance} $out/lib/guestfs ''; - doInstallCheck = true; + doInstallCheck = appliance != null; installCheckPhase = '' export HOME=$(mktemp -d) # avoid access to /homeless-shelter/.guestfish From dd556b02baf86e80f1c0a18fbd41366814d82ec3 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 22 Mar 2018 08:46:06 +0100 Subject: [PATCH 20/57] deja-dup: clean up --- pkgs/applications/backup/deja-dup/default.nix | 22 ++++++++----------- .../backup/deja-dup/fix-paths.patch | 21 +++++++++--------- 2 files changed, 19 insertions(+), 24 deletions(-) diff --git a/pkgs/applications/backup/deja-dup/default.nix b/pkgs/applications/backup/deja-dup/default.nix index b0d8ae8d3cf..1ea4b4d2750 100644 --- a/pkgs/applications/backup/deja-dup/default.nix +++ b/pkgs/applications/backup/deja-dup/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchurl, meson, ninja, pkgconfig, vala_0_38, gettext -, gnome3, libnotify, intltool, itstool, glib, gtk3, libxml2 +{ stdenv, fetchurl, substituteAll, meson, ninja, pkgconfig, vala_0_40, gettext +, gnome3, libnotify, itstool, glib, gtk3, libxml2 , coreutils, libsecret, pcre, libxkbcommon, wrapGAppsHook , libpthreadstubs, libXdmcp, epoxy, at-spi2-core, dbus, libgpgerror , appstream-glib, desktop-file-utils, duplicity @@ -15,20 +15,14 @@ stdenv.mkDerivation rec { }; patches = [ - ./fix-paths.patch + (substituteAll { + src = ./fix-paths.patch; + inherit coreutils; + }) ]; - postPatch = '' - substituteInPlace libdeja/tools/duplicity/DuplicityInstance.vala --replace \ - "/bin/rm" \ - "${coreutils}/bin/rm" - ''; - - # couldn't find gio/gdesktopappinfo.h - NIX_CFLAGS_COMPILE = "-I${glib.dev}/include/gio-unix-2.0"; - nativeBuildInputs = [ - meson ninja pkgconfig vala_0_38 gettext intltool itstool + meson ninja pkgconfig vala_0_40 gettext itstool appstream-glib desktop-file-utils libxml2 wrapGAppsHook ]; @@ -40,6 +34,8 @@ stdenv.mkDerivation rec { propagatedUserEnvPkgs = [ duplicity ]; + PKG_CONFIG_LIBNAUTILUS_EXTENSION_EXTENSIONDIR = "${placeholder "out"}/lib/nautilus/extensions-3.0"; + postInstall = '' glib-compile-schemas $out/share/glib-2.0/schemas ''; diff --git a/pkgs/applications/backup/deja-dup/fix-paths.patch b/pkgs/applications/backup/deja-dup/fix-paths.patch index 1cc57e6a54a..26126fdc9d5 100644 --- a/pkgs/applications/backup/deja-dup/fix-paths.patch +++ b/pkgs/applications/backup/deja-dup/fix-paths.patch @@ -1,12 +1,11 @@ -diff --git a/deja-dup/nautilus/meson.build b/deja-dup/nautilus/meson.build -index 04b136f3..ed8f7cba 100644 ---- a/deja-dup/nautilus/meson.build -+++ b/deja-dup/nautilus/meson.build -@@ -31,6 +31,6 @@ shared_module('deja-dup', ['NautilusExtension.c'], - link_with: [dirhandling], - dependencies: [nautilus_dep], - install: true, -- install_dir: nautilus_dep.get_pkgconfig_variable('extensiondir')) -+ install_dir: join_paths(get_option('libdir'), 'nautilus', 'extensions-3.0')) +--- a/libdeja/tools/duplicity/DuplicityInstance.vala ++++ b/libdeja/tools/duplicity/DuplicityInstance.vala +@@ -159,7 +159,7 @@ + // We already are pretty sure we don't have other duplicities in our + // archive directories, because we use our own and we ensure we only have + // one deja-dup running at a time via DBus. +- Posix.system("/bin/rm -f " + Shell.quote(cache_dir) + "/*/lockfile.lock"); ++ Posix.system("@coreutils@/bin/rm -f " + Shell.quote(cache_dir) + "/*/lockfile.lock"); - endif + Process.spawn_async_with_pipes(null, real_argv, real_envp, + SpawnFlags.SEARCH_PATH | From d04ab628c515910c709c5bac03a7b53506bf0325 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 22 Mar 2018 08:47:40 +0100 Subject: [PATCH 21/57] dbus-broker: clean up --- pkgs/os-specific/linux/dbus-broker/default.nix | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pkgs/os-specific/linux/dbus-broker/default.nix b/pkgs/os-specific/linux/dbus-broker/default.nix index c97f1b54622..5d0728b7e24 100644 --- a/pkgs/os-specific/linux/dbus-broker/default.nix +++ b/pkgs/os-specific/linux/dbus-broker/default.nix @@ -17,13 +17,8 @@ stdenv.mkDerivation rec { buildInputs = [ dbus glib linuxHeaders systemd ]; - enableParallelBuilding = true; - - prePatch = '' - substituteInPlace meson.build \ - --replace "dep_systemd.get_pkgconfig_variable('systemdsystemunitdir')" "'$out/lib/systemd/system'" \ - --replace "dep_systemd.get_pkgconfig_variable('systemduserunitdir')" "'$out/lib/systemd/user'" - ''; + PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system"; + PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user"; postInstall = '' install -Dm644 ../README $out/share/doc/dbus-broker/README @@ -32,8 +27,6 @@ stdenv.mkDerivation rec { -e 's,^ExecReload.*busctl,ExecReload=${systemd}/bin/busctl,' ''; - checkPhase = "ninja test"; - doCheck = true; meta = with stdenv.lib; { From 0bf6fb76f5ec8e218b5d93bbb3ef50ee22cb0827 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 22 Mar 2018 08:49:58 +0100 Subject: [PATCH 22/57] pipewire: clean up --- pkgs/development/libraries/pipewire/default.nix | 6 ++---- pkgs/development/libraries/pipewire/fix-paths.patch | 8 -------- 2 files changed, 2 insertions(+), 12 deletions(-) delete mode 100644 pkgs/development/libraries/pipewire/fix-paths.patch diff --git a/pkgs/development/libraries/pipewire/default.nix b/pkgs/development/libraries/pipewire/default.nix index 90174bf749a..57580de2401 100644 --- a/pkgs/development/libraries/pipewire/default.nix +++ b/pkgs/development/libraries/pipewire/default.nix @@ -29,15 +29,13 @@ in stdenv.mkDerivation rec { alsaLib ffmpeg libjack2 libudev libva xorg.libX11 sbc SDL2 ]; - patches = [ - ./fix-paths.patch - ]; - mesonFlags = [ "-Denable_docs=true" "-Denable_gstreamer=true" ]; + PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user"; + FONTCONFIG_FILE = fontsConf; # Fontconfig error: Cannot load default config file doCheck = true; diff --git a/pkgs/development/libraries/pipewire/fix-paths.patch b/pkgs/development/libraries/pipewire/fix-paths.patch deleted file mode 100644 index 5a07c6271e1..00000000000 --- a/pkgs/development/libraries/pipewire/fix-paths.patch +++ /dev/null @@ -1,8 +0,0 @@ ---- a/src/daemon/systemd/user/meson.build -+++ b/src/daemon/systemd/user/meson.build -@@ -1,4 +1,4 @@ --systemd_user_services_dir = systemd.get_pkgconfig_variable('systemduserunitdir') -+systemd_user_services_dir = join_paths(get_option('prefix'), 'etc', 'systemd', 'user') - - install_data(sources : 'pipewire.socket', install_dir : systemd_user_services_dir) - From 2abac54c033778104533a269aaa08a1e75f677ad Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 22 Mar 2018 09:37:24 +0100 Subject: [PATCH 23/57] =?UTF-8?q?colord:=201.4.1=20=E2=86=92=201.4.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/tools/misc/colord/default.nix | 23 +++--- pkgs/tools/misc/colord/fix-build-paths.patch | 74 -------------------- 2 files changed, 11 insertions(+), 86 deletions(-) delete mode 100644 pkgs/tools/misc/colord/fix-build-paths.patch diff --git a/pkgs/tools/misc/colord/default.nix b/pkgs/tools/misc/colord/default.nix index 9af7de8b35e..043ea44bb8c 100644 --- a/pkgs/tools/misc/colord/default.nix +++ b/pkgs/tools/misc/colord/default.nix @@ -1,18 +1,16 @@ { stdenv, fetchurl, bash-completion , glib, polkit, pkgconfig, gettext, gusb, lcms2, sqlite, systemd, dbus -, gobjectIntrospection, argyllcms, meson, ninja, libxml2, vala_0_38 +, gobjectIntrospection, argyllcms, meson, ninja, libxml2, vala_0_40 , libgudev, sane-backends, udev, gnome3, makeWrapper }: stdenv.mkDerivation rec { - name = "colord-1.4.1"; + name = "colord-1.4.2"; src = fetchurl { url = "http://www.freedesktop.org/software/colord/releases/${name}.tar.xz"; - sha256 = "0m854clp8szvq38z16jpazzlqfb3lb3icxcfnsisfrc25748y1ib"; + sha256 = "19zc9gldz469jshl16av7na459kwr5nhvs2pz98xm5lw582xaw2c"; }; - enableParallelBuilding = true; - mesonFlags = [ "-Denable-sane=true" "-Denable-vala=true" @@ -23,19 +21,20 @@ stdenv.mkDerivation rec { "-Denable-docs=false" ]; - patches = [ - ./fix-build-paths.patch - ]; + nativeBuildInputs = [ meson pkgconfig vala_0_40 ninja gettext libxml2 gobjectIntrospection makeWrapper ]; - nativeBuildInputs = [ meson pkgconfig vala_0_38 ninja gettext libxml2 gobjectIntrospection makeWrapper ]; - - buildInputs = [ glib polkit gusb lcms2 sqlite systemd dbus - bash-completion argyllcms libgudev sane-backends ]; + buildInputs = [ glib polkit gusb lcms2 sqlite systemd dbus bash-completion argyllcms libgudev sane-backends ]; postInstall = '' glib-compile-schemas $out/share/glib-2.0/schemas ''; + PKG_CONFIG_SYSTEMD_SYSTEMDSYSTEMUNITDIR = "${placeholder "out"}/lib/systemd/system"; + PKG_CONFIG_SYSTEMD_SYSTEMDUSERUNITDIR = "${placeholder "out"}/lib/systemd/user"; + PKG_CONFIG_SYSTEMD_TMPFILESDIR = "${placeholder "out"}/lib/tmpfiles.d"; + PKG_CONFIG_BASH_COMPLETION_COMPLETIONSDIR= "${placeholder "out"}/share/bash-completion/completions"; + PKG_CONFIG_UDEV_UDEVDIR = "${placeholder "out"}/lib/udev"; + postFixup = '' wrapProgram "$out/libexec/colord-session" \ --prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share" \ diff --git a/pkgs/tools/misc/colord/fix-build-paths.patch b/pkgs/tools/misc/colord/fix-build-paths.patch deleted file mode 100644 index d4bf0f36ad7..00000000000 --- a/pkgs/tools/misc/colord/fix-build-paths.patch +++ /dev/null @@ -1,74 +0,0 @@ ---- a/contrib/session-helper/meson.build -+++ b/contrib/session-helper/meson.build -@@ -21,7 +21,7 @@ - output : 'colord-session.service', - configuration : con2, - install: true, -- install_dir: systemd.get_pkgconfig_variable('systemduserunitdir'), -+ install_dir: join_paths(get_option('prefix'), 'etc', 'systemd', 'user'), - ) - endif - ---- a/data/meson.build -+++ b/data/meson.build -@@ -8,13 +8,13 @@ - - if get_option('enable-systemd') - install_data('colord.conf', -- install_dir: systemd.get_pkgconfig_variable('tmpfilesdir') -+ install_dir: join_paths(get_option('prefix'), 'lib', 'tmpfiles.d') - ) - endif - - if get_option('enable-bash-completion') - install_data('colormgr', -- install_dir: bash_completion.get_pkgconfig_variable('completionsdir') -+ install_dir: join_paths(get_option('prefix'), 'etc', 'bash_completion.d') - ) - endif - -@@ -31,7 +31,7 @@ - output : 'colord.service', - configuration : con2, - install: true, -- install_dir: systemd.get_pkgconfig_variable('systemdsystemunitdir'), -+ install_dir: join_paths(get_option('prefix'), 'etc', 'systemd', 'system'), - ) - endif - -@@ -50,5 +50,5 @@ - output : 'org.freedesktop.ColorManager.conf', - configuration : con2, - install: true, -- install_dir: join_paths(get_option('datadir'), 'dbus-1', 'system.d') , -+ install_dir: join_paths(get_option('prefix'), 'etc', 'dbus-1', 'system.d') , - ) ---- a/meson.build -+++ b/meson.build -@@ -258,6 +258,3 @@ - subdir('policy') - subdir('rules') - subdir('src') -- --meson.add_install_script('meson_post_install.sh', -- localstatedir, get_option('with-daemon-user')) ---- a/rules/meson.build -+++ b/rules/meson.build -@@ -9,5 +9,5 @@ - sensor_rules_in, - '95-cd-devices.rules', - ], -- install_dir : join_paths(udev.get_pkgconfig_variable('udevdir'), 'rules.d') -+ install_dir : join_paths(get_option('prefix'), 'lib', 'udev', 'rules.d') - ) ---- a/src/plugins/meson.build -+++ b/src/plugins/meson.build -@@ -66,7 +66,7 @@ - install_dir: join_paths(get_option('libdir'), 'colord-plugins'), - c_args : [ - cargs, -- '-DCOLORD_SANE_BINARY="' + join_paths(get_option('libexecdir'), 'colord-sane' + '"'), -+ '-DCOLORD_SANE_BINARY="' + join_paths(get_option('prefix'), get_option('libexecdir'), 'colord-sane' + '"'), - ], - dependencies : [ - gio, From 319495164ca24744feb18b66e3b4e251d2c29077 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 22 Mar 2018 09:43:51 +0100 Subject: [PATCH 24/57] gnome3.libgee: clean up --- pkgs/desktops/gnome-3/core/libgee/default.nix | 7 +++++-- .../core/libgee/fix_introspection_paths.patch | 13 ------------- 2 files changed, 5 insertions(+), 15 deletions(-) delete mode 100644 pkgs/desktops/gnome-3/core/libgee/fix_introspection_paths.patch diff --git a/pkgs/desktops/gnome-3/core/libgee/default.nix b/pkgs/desktops/gnome-3/core/libgee/default.nix index a5ce9ee5e10..a65d0f401f0 100644 --- a/pkgs/desktops/gnome-3/core/libgee/default.nix +++ b/pkgs/desktops/gnome-3/core/libgee/default.nix @@ -6,6 +6,8 @@ in stdenv.mkDerivation rec { name = "${pname}-${version}"; + outputs = [ "out" "dev" ]; + src = fetchurl { url = "mirror://gnome/sources/${pname}/${gnome3.versionBranch version}/${name}.tar.xz"; sha256 = "0c26x8gi3ivmhlbqcmiag4jwrkvcy28ld24j55nqr3jikb904a5v"; @@ -13,11 +15,12 @@ stdenv.mkDerivation rec { doCheck = true; - patches = [ ./fix_introspection_paths.patch ]; - nativeBuildInputs = [ pkgconfig autoconf vala gobjectIntrospection ]; buildInputs = [ glib ]; + PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_GIRDIR = "${placeholder "dev"}/share/gir-1.0"; + PKG_CONFIG_GOBJECT_INTROSPECTION_1_0_TYPELIBDIR = "${placeholder "out"}/lib/girepository-1.0"; + passthru = { updateScript = gnome3.updateScript { packageName = pname; diff --git a/pkgs/desktops/gnome-3/core/libgee/fix_introspection_paths.patch b/pkgs/desktops/gnome-3/core/libgee/fix_introspection_paths.patch deleted file mode 100644 index 67003f45164..00000000000 --- a/pkgs/desktops/gnome-3/core/libgee/fix_introspection_paths.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- fix_introspection_paths.patch/configure 2014-01-07 17:43:53.521339338 +0000 -+++ fix_introspection_paths.patch/configure-fix 2014-01-07 17:45:11.068635069 +0000 -@@ -12085,8 +12085,8 @@ - INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0` - INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0` - INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0` -- INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0` -- INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)" -+ INTROSPECTION_GIRDIR="${datadir}/gir-1.0" -+ INTROSPECTION_TYPELIBDIR="${libdir}/girepository-1.0" - INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0` - INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0` - INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection From 80ce3389405a0876edd1543eb44b30c402723a92 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 22 Mar 2018 09:54:22 +0100 Subject: [PATCH 25/57] spice-gtk: clean up --- pkgs/development/libraries/spice-gtk/default.nix | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/pkgs/development/libraries/spice-gtk/default.nix b/pkgs/development/libraries/spice-gtk/default.nix index a626abc6577..f9b3de36b2c 100644 --- a/pkgs/development/libraries/spice-gtk/default.nix +++ b/pkgs/development/libraries/spice-gtk/default.nix @@ -19,23 +19,18 @@ in stdenv.mkDerivation rec { }; buildInputs = [ - spice-protocol celt_0_5_1 openssl libpulseaudio pixman gobjectIntrospection + spice-protocol celt_0_5_1 openssl libpulseaudio pixman libjpeg_turbo zlib cyrus_sasl python pygtk usbredir gtk3 epoxy polkit acl usbutils ]; - nativeBuildInputs = [ pkgconfig gettext libsoup autoreconfHook vala ]; + nativeBuildInputs = [ pkgconfig gettext libsoup autoreconfHook vala gobjectIntrospection ]; - NIX_CFLAGS_COMPILE = "-fno-stack-protector"; - - # put polkit action in the $out/share/polkit-1/actions - preAutoreconf = '' - substituteInPlace configure.ac \ - --replace 'POLICYDIR=`''${PKG_CONFIG} polkit-gobject-1 --variable=policydir`' "POLICYDIR=$out/share/polkit-1/actions" - ''; + PKG_CONFIG_POLKIT_GOBJECT_1_POLICYDIR = "${placeholder "out"}/share/polkit-1/actions"; configureFlags = [ "--with-gtk3" + "--enable-introspection" "--enable-vala" ]; From 01f29bb0c077a9efa3c09e80d6f9dadea3fa364e Mon Sep 17 00:00:00 2001 From: Vaibhav Sagar Date: Thu, 22 Mar 2018 17:41:10 +0800 Subject: [PATCH 26/57] pythonPackages.notebook: cleanup As discussed in https://github.com/NixOS/nixpkgs/pull/37607#issuecomment-375226186. --- pkgs/development/python-modules/notebook/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/notebook/default.nix b/pkgs/development/python-modules/notebook/default.nix index 443cfa7ccb9..12e2d15dcc6 100644 --- a/pkgs/development/python-modules/notebook/default.nix +++ b/pkgs/development/python-modules/notebook/default.nix @@ -33,7 +33,7 @@ buildPythonPackage rec { LC_ALL = "en_US.utf8"; - buildInputs = [ nose glibcLocales ] + checkInputs = [ nose glibcLocales ] ++ (if isPy3k then [ nose_warnings_filters ] else [ mock ]); propagatedBuildInputs = [ @@ -43,9 +43,9 @@ buildPythonPackage rec { # disable warning_filters preCheck = lib.optionalString (!isPy3k) '' - echo "" > setup.cfg - cat setup.cfg + touch setup.cfg ''; + checkPhase = '' runHook preCheck mkdir tmp From 31914502cb4b6657f1509abd7dfdfd503f4645d3 Mon Sep 17 00:00:00 2001 From: geistesk Date: Tue, 20 Mar 2018 22:08:16 +0100 Subject: [PATCH 27/57] st: add dmenu dependency --- pkgs/applications/misc/st/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/st/default.nix b/pkgs/applications/misc/st/default.nix index 825a37faf1e..c7512a8ac27 100644 --- a/pkgs/applications/misc/st/default.nix +++ b/pkgs/applications/misc/st/default.nix @@ -1,5 +1,5 @@ -{ stdenv, fetchurl, pkgconfig, writeText, libX11, ncurses, libXext, libXft -, fontconfig, conf ? null, patches ? [], extraLibs ? []}: +{ stdenv, fetchurl, pkgconfig, writeText, makeWrapper, libX11, ncurses, libXext +, libXft, fontconfig, dmenu, conf ? null, patches ? [], extraLibs ? []}: with stdenv.lib; @@ -17,11 +17,12 @@ in stdenv.mkDerivation rec { configFile = optionalString (conf!=null) (writeText "config.def.h" conf); preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h"; - nativeBuildInputs = [ pkgconfig ]; + nativeBuildInputs = [ pkgconfig makeWrapper ]; buildInputs = [ libX11 ncurses libXext libXft fontconfig ] ++ extraLibs; installPhase = '' TERMINFO=$out/share/terminfo make install PREFIX=$out + wrapProgram "$out/bin/st" --prefix PATH : "${dmenu}/bin" ''; meta = { From f68871764daf282c537297adf296aa204b023e25 Mon Sep 17 00:00:00 2001 From: volth Date: Thu, 22 Mar 2018 10:13:21 +0000 Subject: [PATCH 28/57] treewide: replace depecated alias s/mssys/ms-sys/g --- nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix | 2 +- nixos/modules/profiles/base.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix b/nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix index ba84cd51098..6d4ba96dba0 100644 --- a/nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix +++ b/nixos/modules/installer/cd-dvd/system-tarball-fuloong2f.nix @@ -54,7 +54,7 @@ in environment.systemPackages = [ pkgs.w3m # needed for the manual anyway pkgs.testdisk # useful for repairing boot problems - pkgs.mssys # for writing Microsoft boot sectors / MBRs + pkgs.ms-sys # for writing Microsoft boot sectors / MBRs pkgs.parted pkgs.ddrescue pkgs.ccrypt diff --git a/nixos/modules/profiles/base.nix b/nixos/modules/profiles/base.nix index 39b8553976e..3bf06a95119 100644 --- a/nixos/modules/profiles/base.nix +++ b/nixos/modules/profiles/base.nix @@ -9,7 +9,7 @@ environment.systemPackages = [ pkgs.w3m-nox # needed for the manual anyway pkgs.testdisk # useful for repairing boot problems - pkgs.mssys # for writing Microsoft boot sectors / MBRs + pkgs.ms-sys # for writing Microsoft boot sectors / MBRs pkgs.efibootmgr pkgs.efivar pkgs.parted From dfba22e28a4a5f886a9eb6e5d7e9716170efbe0e Mon Sep 17 00:00:00 2001 From: volth Date: Thu, 22 Mar 2018 11:25:23 +0000 Subject: [PATCH 29/57] mucommander: init at 0.9.2 (#37610) --- .../applications/misc/mucommander/default.nix | 82 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 84 insertions(+) create mode 100644 pkgs/applications/misc/mucommander/default.nix diff --git a/pkgs/applications/misc/mucommander/default.nix b/pkgs/applications/misc/mucommander/default.nix new file mode 100644 index 00000000000..fdb236194f9 --- /dev/null +++ b/pkgs/applications/misc/mucommander/default.nix @@ -0,0 +1,82 @@ +{ stdenv, fetchFromGitHub, gradle_3_5, perl, makeWrapper, jre }: + +let + version = "0.9.2"; + name = "mucommander-${version}"; + + src = fetchFromGitHub { + owner = "mucommander"; + repo = "mucommander"; + rev = version; + sha256 = "1fvij0yjjz56hsyddznx7mdgq1zm25fkng3axl03iyrij976z7b8"; + }; + + postPatch = '' + # there is no .git anyway + substituteInPlace build.gradle \ + --replace "git = org.ajoberstar.grgit.Grgit.open(file('.'))" "" \ + --replace "revision = git.head().id" "revision = 'abcdefgh'" + + # disable gradle plugins with native code and their targets + perl -i.bak1 -pe "s#(^\s*id '.+' version '.+'$)#// \1#" build.gradle + perl -i.bak2 -pe "s#(.*)#// \1# if /^(buildscript|task portable|task nsis|task proguard|task tgz|task\(afterEclipseImport\)|launch4j|macAppBundle|buildRpm|buildDeb|shadowJar)/ ... /^}/" build.gradle + + # fix source encoding + find . -type f -name build.gradle \ + -exec perl -i.bak3 -pe "s#(repositories\.jcenter\(\))# + \1 + compileJava.options.encoding = 'UTF-8' + compileTestJava.options.encoding = 'UTF-8' + #" {} \; + ''; + + # fake build to pre-download deps into fixed-output derivation + deps = stdenv.mkDerivation { + name = "${name}-deps"; + inherit src postPatch; + nativeBuildInputs = [ gradle_3_5 perl ]; + buildPhase = '' + export GRADLE_USER_HOME=$(mktemp -d) + gradle --no-daemon build + ''; + # perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar) + installPhase = '' + find $GRADLE_USER_HOME/caches/modules-2 -type f -regex '.*\.\(jar\|pom\)' \ + | perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/\s]+))$# ($x = $2) =~ tr|\.|/|; "install -Dm444 $1 \$out/$x/$3/$4/$5" #e' \ + | sh + ''; + outputHashAlgo = "sha256"; + outputHashMode = "recursive"; + outputHash = "199a9rc1pp9jjwpy83743qhjczfz0d1mkbic6si9bh8l62nw8qc7"; + }; + +in stdenv.mkDerivation { + inherit name src postPatch; + nativeBuildInputs = [ gradle_3_5 perl makeWrapper ]; + + buildPhase = '' + export GRADLE_USER_HOME=$(mktemp -d) + + # point to offline repo + find . -type f -name build.gradle \ + -exec perl -i.bak3 -pe "s#repositories\.jcenter\(\)# + repositories { mavenLocal(); maven { url '${deps}' } } + #" {} \; + + gradle --offline --no-daemon build + ''; + + installPhase = '' + mkdir $out + tar xvf build/distributions/mucommander-${version}.tar --directory=$out --strip=1 + wrapProgram $out/bin/mucommander --set JAVA_HOME ${jre} + ''; + + meta = with stdenv.lib; { + homepage = http://www.mucommander.com/; + description = "Cross-platform file manager"; + license = licenses.gpl3; + maintainers = with maintainers; [ volth ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index c352ed0f6e7..ae0d11474b6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16761,6 +16761,8 @@ with pkgs; mtpaint = callPackage ../applications/graphics/mtpaint { }; + mucommander = callPackage ../applications/misc/mucommander { }; + multimarkdown = callPackage ../tools/typesetting/multimarkdown { }; multimon-ng = callPackage ../applications/misc/multimon-ng { }; From b9b08f8a093e8981121697fbdf61bfd714acd6cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 22 Mar 2018 11:27:02 +0000 Subject: [PATCH 30/57] webstorm: fix incorrect jre usuage it tried to use its own jre, which is not patched fixes #36943 #37328 --- pkgs/applications/editors/jetbrains/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/jetbrains/default.nix b/pkgs/applications/editors/jetbrains/default.nix index a4a71c12820..3c557438823 100644 --- a/pkgs/applications/editors/jetbrains/default.nix +++ b/pkgs/applications/editors/jetbrains/default.nix @@ -211,7 +211,7 @@ let }); buildWebStorm = { name, version, src, license, description, wmClass, update-channel }: - (mkJetBrainsProduct { + lib.overrideDerivation (mkJetBrainsProduct { inherit name version src wmClass jdk; product = "WebStorm"; meta = with stdenv.lib; { @@ -225,8 +225,13 @@ let maintainers = with maintainers; [ abaldeau ]; platforms = platforms.linux; }; + }) (attrs: { + patchPhase = (attrs.patchPhase or "") + optionalString (stdenv.isLinux) '' + # Webstorm tries to use bundled jre if available. + # Lets prevent this for the moment + rm -r jre64 + ''; }); - in { From 05eafd27b15ff3d5848226061b4f8bbd96de1137 Mon Sep 17 00:00:00 2001 From: gspia Date: Thu, 22 Mar 2018 14:12:27 +0200 Subject: [PATCH 31/57] kakoune: 2018-02-15 -> 2018-03-22 (#37617) --- pkgs/applications/editors/kakoune/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/editors/kakoune/default.nix b/pkgs/applications/editors/kakoune/default.nix index 404160668b4..868dfaf3d12 100644 --- a/pkgs/applications/editors/kakoune/default.nix +++ b/pkgs/applications/editors/kakoune/default.nix @@ -4,12 +4,12 @@ with stdenv.lib; stdenv.mkDerivation rec { name = "kakoune-unstable-${version}"; - version = "2018-02-15"; + version = "2018-03-22"; src = fetchFromGitHub { repo = "kakoune"; owner = "mawww"; - rev = "f5e39972eb525166dc5b1d963067f79990991a75"; - sha256 = "160a302xg6nfzx49dkis6ij20kyzr63kxvcv8ld3l07l8k69g80r"; + rev = "f8e297acef1be0657b779fea5256f606a6c6a3a3"; + sha256 = "14xmw3lkwzppm9bns55nmyb1lfihzhdyisf6xjqlszdj4mcf94jl"; }; nativeBuildInputs = [ pkgconfig ]; buildInputs = [ ncurses asciidoc docbook_xsl libxslt ]; From 43580b680048ca2882f28c806262f803341f5c94 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Thu, 22 Mar 2018 13:27:31 +0100 Subject: [PATCH 32/57] libmypaint: fix build with automake 1.16 --- pkgs/development/libraries/libmypaint/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/libraries/libmypaint/default.nix b/pkgs/development/libraries/libmypaint/default.nix index 0583d94ef7f..8719f19acc1 100644 --- a/pkgs/development/libraries/libmypaint/default.nix +++ b/pkgs/development/libraries/libmypaint/default.nix @@ -1,4 +1,4 @@ -{stdenv, autoconf, automake, fetchFromGitHub, glib, intltool, json_c, libtool, pkgconfig}: +{stdenv, autoconf, automake, fetchFromGitHub, fetchpatch, glib, intltool, json_c, libtool, pkgconfig}: let version = "1.3.0"; @@ -12,6 +12,14 @@ in stdenv.mkDerivation rec { sha256 = "0b7aynr6ggigwhjkfzi8x3dwz15blj4grkg9hysbgjh6lvzpy9jc"; }; + patches = [ + # build with automake 1.16 + (fetchpatch { + url = https://github.com/mypaint/libmypaint/commit/40d9077a80be13942476f164bddfabe842ab2a45.patch; + sha256 = "1dclh7apgvr2bvzy9z3rgas3hk9pf2hpf5h52q94kmx8s4a47qpi"; + }) + ]; + nativeBuildInputs = [ autoconf automake intltool libtool pkgconfig ]; buildInputs = [ glib ]; From cafd433e8c1108f2dd6f196a07218e5782661e4f Mon Sep 17 00:00:00 2001 From: Vaibhav Sagar Date: Thu, 22 Mar 2018 20:48:09 +0800 Subject: [PATCH 33/57] python2Packages.notebook: fix tests These were accidentally broken by #37615. --- pkgs/development/python-modules/notebook/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/notebook/default.nix b/pkgs/development/python-modules/notebook/default.nix index 12e2d15dcc6..37c5774bba2 100644 --- a/pkgs/development/python-modules/notebook/default.nix +++ b/pkgs/development/python-modules/notebook/default.nix @@ -43,7 +43,7 @@ buildPythonPackage rec { # disable warning_filters preCheck = lib.optionalString (!isPy3k) '' - touch setup.cfg + echo "" > setup.cfg ''; checkPhase = '' From 7b539c06297f1ca84e475fb1018fe50114f2447e Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 22 Mar 2018 13:57:41 +0100 Subject: [PATCH 34/57] Fix typo --- pkgs/build-support/vm/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/build-support/vm/default.nix b/pkgs/build-support/vm/default.nix index 8ab1fbc8873..49588a58993 100644 --- a/pkgs/build-support/vm/default.nix +++ b/pkgs/build-support/vm/default.nix @@ -941,8 +941,8 @@ rec { }; ubuntu1710i386 = { - name = "ubuntu-17.10-xenial-i386"; - fullName = "Ubuntu 17.10 Xenial (i386)"; + name = "ubuntu-17.10-artful-i386"; + fullName = "Ubuntu 17.10 Artful (i386)"; packagesLists = [ (fetchurl { url = mirror://ubuntu/dists/artful/main/binary-i386/Packages.xz; From ac885e078ef305e05cc08e1c0028000f7a0c934d Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Thu, 22 Mar 2018 09:16:01 -0400 Subject: [PATCH 35/57] linux-copperhead: 4.15.11.a -> 4.15.12.a --- pkgs/os-specific/linux/kernel/linux-copperhead-hardened.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-copperhead-hardened.nix b/pkgs/os-specific/linux/kernel/linux-copperhead-hardened.nix index cb0b9b10be1..94885efef90 100644 --- a/pkgs/os-specific/linux/kernel/linux-copperhead-hardened.nix +++ b/pkgs/os-specific/linux/kernel/linux-copperhead-hardened.nix @@ -3,9 +3,9 @@ with stdenv.lib; let - version = "4.15.11"; + version = "4.15.12"; revision = "a"; - sha256 = "09xyg3i2m5cv9cpl3pry579p40iphzsn1pif7046rvc7zfrjzl8d"; + sha256 = "1n0sqhqvm9p6w1yh7si8rw84qxf9c5kch7pvjyrp51ir1xh7grfr"; # modVersion needs to be x.y.z, will automatically add .0 if needed modVersion = concatStrings (intersperse "." (take 3 (splitString "." "${version}.0"))); From 5b7f7a28d5fc1cba7cc8ce419ca0fcd51d230fe4 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Thu, 22 Mar 2018 09:16:26 -0400 Subject: [PATCH 36/57] linux: 4.4.122 -> 4.4.123 --- pkgs/os-specific/linux/kernel/linux-4.4.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-4.4.nix b/pkgs/os-specific/linux/kernel/linux-4.4.nix index 5994a081600..58abf35e92b 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.4.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.4.nix @@ -1,11 +1,11 @@ { stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: buildLinux (args // rec { - version = "4.4.122"; + version = "4.4.123"; extraMeta.branch = "4.4"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "1hxph2bn2wdamk1p5sxl2szgsk4aybb0245x1rvf85a6skhjqc7g"; + sha256 = "115mvgwcx2syjrn943k4qqyvqkysdm6rgq97dhf1gcxf671qb204"; }; } // (args.argsOverride or {})) From dfdf9f77b0a9881c16d15b32e99d75a86e2cd822 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Thu, 22 Mar 2018 09:16:39 -0400 Subject: [PATCH 37/57] linux: 4.9.88 -> 4.9.89 --- pkgs/os-specific/linux/kernel/linux-4.9.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/kernel/linux-4.9.nix b/pkgs/os-specific/linux/kernel/linux-4.9.nix index 3bcfa3912aa..0b18a624167 100644 --- a/pkgs/os-specific/linux/kernel/linux-4.9.nix +++ b/pkgs/os-specific/linux/kernel/linux-4.9.nix @@ -1,11 +1,11 @@ { stdenv, buildPackages, hostPlatform, fetchurl, perl, buildLinux, ... } @ args: buildLinux (args // rec { - version = "4.9.88"; + version = "4.9.89"; extraMeta.branch = "4.9"; src = fetchurl { url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - sha256 = "094cxc86ajnsai1vwy76mmg7l3b9lvhk6mw6746lsr3fnzv1fkq7"; + sha256 = "0a9l2gkyr1nhaak6vyjwgjn01ywpxwa8zp5fhw8rjnfk44bf2hql"; }; } // (args.argsOverride or {})) From f2bd9d4745041fe0c0a49803094dd625ebd27342 Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Thu, 22 Mar 2018 14:33:15 +0100 Subject: [PATCH 38/57] xcodeenv: replace deprecated package application procedure by the new export archive operation --- .../development/mobile/xcodeenv/build-app.nix | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/pkgs/development/mobile/xcodeenv/build-app.nix b/pkgs/development/mobile/xcodeenv/build-app.nix index d208f26ab67..436b55631b6 100644 --- a/pkgs/development/mobile/xcodeenv/build-app.nix +++ b/pkgs/development/mobile/xcodeenv/build-app.nix @@ -12,6 +12,7 @@ , certificateFile ? null , certificatePassword ? null , provisioningProfile ? null +, signMethod ? null , generateIPA ? false , generateXCArchive ? false , enableWirelessDistribution ? false @@ -21,7 +22,7 @@ , title ? null }: -assert release -> codeSignIdentity != null && certificateFile != null && certificatePassword != null && provisioningProfile != null; +assert release -> codeSignIdentity != null && certificateFile != null && certificatePassword != null && provisioningProfile != null && signMethod != null; assert enableWirelessDistribution -> installURL != null && bundleId != null && version != null && title != null; let @@ -82,13 +83,34 @@ stdenv.mkDerivation { # Do the building export LD=clang # To avoid problem with -isysroot parameter that is unrecognized by the stock ld. Comparison with an impure build shows that it uses clang instead. Ugly, but it works - xcodebuild -target ${_target} -configuration ${_configuration} ${stdenv.lib.optionalString (scheme != null) "-scheme ${scheme}"} -sdk ${_sdk} TARGETED_DEVICE_FAMILY="1, 2" ONLY_ACTIVE_ARCH=NO CONFIGURATION_TEMP_DIR=$TMPDIR CONFIGURATION_BUILD_DIR=$out ${if generateXCArchive then "archive" else ""} ${xcodeFlags} ${if release then ''"CODE_SIGN_IDENTITY=${codeSignIdentity}" PROVISIONING_PROFILE=$PROVISIONING_PROFILE OTHER_CODE_SIGN_FLAGS="--keychain $HOME/Library/Keychains/$keychainName-db"'' else ""} + xcodebuild -target ${_target} -configuration ${_configuration} ${stdenv.lib.optionalString (scheme != null) "-scheme ${scheme}"} -sdk ${_sdk} TARGETED_DEVICE_FAMILY="1, 2" ONLY_ACTIVE_ARCH=NO CONFIGURATION_TEMP_DIR=$TMPDIR CONFIGURATION_BUILD_DIR=$out ${if generateIPA || generateXCArchive then "-archivePath \"${name}.xcarchive\" archive" else ""} ${if release then ''PROVISIONING_PROFILE=$PROVISIONING_PROFILE OTHER_CODE_SIGN_FLAGS="--keychain $HOME/Library/Keychains/$keychainName-db"'' else ""} ${xcodeFlags} ${stdenv.lib.optionalString release '' ${stdenv.lib.optionalString generateIPA '' + # Create export plist file + cat > "${name}.plist" < + + + + provisioningProfiles + + ${bundleId} + $PROVISIONING_PROFILE + + method + ${signMethod} + ${stdenv.lib.optionalString (signMethod == "enterprise" || signMethod == "ad-hoc") '' + compileBitcode + + ''} + + + EOF + # Produce an IPA file - xcrun -sdk iphoneos PackageApplication -v $out/*.app -o "$out/${name}.ipa" - + xcodebuild -exportArchive -archivePath "${name}.xcarchive" -exportOptionsPlist "${name}.plist" -exportPath $out + # Add IPA to Hydra build products mkdir -p $out/nix-support echo "file binary-dist \"$(echo $out/*.ipa)\"" > $out/nix-support/hydra-build-products From f4d03b5c9cf2b694792dec88e3ca805cf7b43e3c Mon Sep 17 00:00:00 2001 From: WilliButz Date: Fri, 9 Mar 2018 21:33:09 +0100 Subject: [PATCH 39/57] nixos/prometheus-exporters: rewrite and restructure - prometheus exporters are now configured with `services.prometheus.exporters.` - the exporters are now defined by attribute sets from which the options for each exporter are generated - most of the exporter definitions are used unchanged, except for some changes that should't have any impact on the functionality. --- nixos/modules/module-list.nix | 11 +- nixos/modules/rename.nix | 8 +- .../prometheus/blackbox-exporter.nix | 68 ------- .../prometheus/collectd-exporter.nix | 128 ------------- .../monitoring/prometheus/exporters.nix | 169 ++++++++++++++++++ .../prometheus/exporters/blackbox.nix | 31 ++++ .../prometheus/exporters/collectd.nix | 78 ++++++++ .../prometheus/exporters/fritzbox.nix | 39 ++++ .../monitoring/prometheus/exporters/json.nix | 36 ++++ .../monitoring/prometheus/exporters/minio.nix | 65 +++++++ .../monitoring/prometheus/exporters/nginx.nix | 31 ++++ .../monitoring/prometheus/exporters/node.nix | 39 ++++ .../monitoring/prometheus/exporters/snmp.nix | 71 ++++++++ .../monitoring/prometheus/exporters/unifi.nix | 67 +++++++ .../prometheus/exporters/varnish.nix | 21 +++ .../prometheus/fritzbox-exporter.nix | 76 -------- .../monitoring/prometheus/json-exporter.nix | 74 -------- .../monitoring/prometheus/minio-exporter.nix | 117 ------------ .../monitoring/prometheus/nginx-exporter.nix | 78 -------- .../monitoring/prometheus/node-exporter.nix | 87 --------- .../monitoring/prometheus/snmp-exporter.nix | 127 ------------- .../monitoring/prometheus/unifi-exporter.nix | 105 ----------- .../prometheus/varnish-exporter.nix | 61 ------- 23 files changed, 655 insertions(+), 932 deletions(-) delete mode 100644 nixos/modules/services/monitoring/prometheus/blackbox-exporter.nix delete mode 100644 nixos/modules/services/monitoring/prometheus/collectd-exporter.nix create mode 100644 nixos/modules/services/monitoring/prometheus/exporters.nix create mode 100644 nixos/modules/services/monitoring/prometheus/exporters/blackbox.nix create mode 100644 nixos/modules/services/monitoring/prometheus/exporters/collectd.nix create mode 100644 nixos/modules/services/monitoring/prometheus/exporters/fritzbox.nix create mode 100644 nixos/modules/services/monitoring/prometheus/exporters/json.nix create mode 100644 nixos/modules/services/monitoring/prometheus/exporters/minio.nix create mode 100644 nixos/modules/services/monitoring/prometheus/exporters/nginx.nix create mode 100644 nixos/modules/services/monitoring/prometheus/exporters/node.nix create mode 100644 nixos/modules/services/monitoring/prometheus/exporters/snmp.nix create mode 100644 nixos/modules/services/monitoring/prometheus/exporters/unifi.nix create mode 100644 nixos/modules/services/monitoring/prometheus/exporters/varnish.nix delete mode 100644 nixos/modules/services/monitoring/prometheus/fritzbox-exporter.nix delete mode 100644 nixos/modules/services/monitoring/prometheus/json-exporter.nix delete mode 100644 nixos/modules/services/monitoring/prometheus/minio-exporter.nix delete mode 100644 nixos/modules/services/monitoring/prometheus/nginx-exporter.nix delete mode 100644 nixos/modules/services/monitoring/prometheus/node-exporter.nix delete mode 100644 nixos/modules/services/monitoring/prometheus/snmp-exporter.nix delete mode 100644 nixos/modules/services/monitoring/prometheus/unifi-exporter.nix delete mode 100644 nixos/modules/services/monitoring/prometheus/varnish-exporter.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index e0c0ec2711b..0e5409bc9de 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -398,16 +398,7 @@ ./services/monitoring/osquery.nix ./services/monitoring/prometheus/default.nix ./services/monitoring/prometheus/alertmanager.nix - ./services/monitoring/prometheus/blackbox-exporter.nix - ./services/monitoring/prometheus/collectd-exporter.nix - ./services/monitoring/prometheus/fritzbox-exporter.nix - ./services/monitoring/prometheus/json-exporter.nix - ./services/monitoring/prometheus/minio-exporter.nix - ./services/monitoring/prometheus/nginx-exporter.nix - ./services/monitoring/prometheus/node-exporter.nix - ./services/monitoring/prometheus/snmp-exporter.nix - ./services/monitoring/prometheus/unifi-exporter.nix - ./services/monitoring/prometheus/varnish-exporter.nix + ./services/monitoring/prometheus/exporters.nix ./services/monitoring/riemann.nix ./services/monitoring/riemann-dash.nix ./services/monitoring/riemann-tools.nix diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 489d7d8b9b5..b0ca274b939 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -240,5 +240,11 @@ with lib; # Xen (mkRenamedOptionModule [ "virtualisation" "xen" "qemu-package" ] [ "virtualisation" "xen" "package-qemu" ]) - ]; + ] ++ (flip map [ "blackboxExporter" "collectdExporter" "fritzboxExporter" + "jsonExporter" "minioExporter" "nginxExporter" "nodeExporter" + "snmpExporter" "unifiExporter" "varnishExporter" ] + (opt: mkRemovedOptionModule [ "services" "prometheus" "${opt}" ] '' + The prometheus exporters are now configured using `services.prometheus.exporters'. + See the 18.03 release notes for more information. + '' )); } diff --git a/nixos/modules/services/monitoring/prometheus/blackbox-exporter.nix b/nixos/modules/services/monitoring/prometheus/blackbox-exporter.nix deleted file mode 100644 index ce2e1cf2d74..00000000000 --- a/nixos/modules/services/monitoring/prometheus/blackbox-exporter.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ config, pkgs, lib, ... }: - -with lib; - -let - cfg = config.services.prometheus.blackboxExporter; -in { - options = { - services.prometheus.blackboxExporter = { - enable = mkEnableOption "prometheus blackbox exporter"; - - configFile = mkOption { - type = types.path; - description = '' - Path to configuration file. - ''; - }; - - port = mkOption { - type = types.int; - default = 9115; - description = '' - Port to listen on. - ''; - }; - - extraFlags = mkOption { - type = types.listOf types.str; - default = []; - description = '' - Extra commandline options when launching the blackbox exporter. - ''; - }; - - openFirewall = mkOption { - type = types.bool; - default = false; - description = '' - Open port in firewall for incoming connections. - ''; - }; - }; - }; - - config = mkIf cfg.enable { - networking.firewall.allowedTCPPorts = optional cfg.openFirewall cfg.port; - - systemd.services.prometheus-blackbox-exporter = { - description = "Prometheus exporter for blackbox probes"; - unitConfig.Documentation = "https://github.com/prometheus/blackbox_exporter"; - wantedBy = [ "multi-user.target" ]; - serviceConfig = { - User = "nobody"; - Restart = "always"; - PrivateTmp = true; - WorkingDirectory = /tmp; - AmbientCapabilities = [ "CAP_NET_RAW" ]; # for ping probes - ExecStart = '' - ${pkgs.prometheus-blackbox-exporter}/bin/blackbox_exporter \ - --web.listen-address :${toString cfg.port} \ - --config.file ${cfg.configFile} \ - ${concatStringsSep " \\\n " cfg.extraFlags} - ''; - ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; - }; - }; - }; -} diff --git a/nixos/modules/services/monitoring/prometheus/collectd-exporter.nix b/nixos/modules/services/monitoring/prometheus/collectd-exporter.nix deleted file mode 100644 index f8a5b9576a1..00000000000 --- a/nixos/modules/services/monitoring/prometheus/collectd-exporter.nix +++ /dev/null @@ -1,128 +0,0 @@ -{ config, pkgs, lib, ... }: - -with lib; - -let - cfg = config.services.prometheus.collectdExporter; - - collectSettingsArgs = if (cfg.collectdBinary.enable) then '' - -collectd.listen-address ${optionalString (cfg.collectdBinary.listenAddress != null) cfg.collectdBinary.listenAddress}:${toString cfg.collectdBinary.port} \ - -collectd.security-level ${cfg.collectdBinary.securityLevel} \ - '' else ""; - -in { - options = { - services.prometheus.collectdExporter = { - enable = mkEnableOption "prometheus collectd exporter"; - - port = mkOption { - type = types.int; - default = 9103; - description = '' - Port to listen on. - This is used for scraping as well as the to receive collectd data via the write_http plugin. - ''; - }; - - listenAddress = mkOption { - type = types.nullOr types.str; - default = null; - example = "0.0.0.0"; - description = '' - Address to listen on for web interface, telemetry and collectd JSON data. - ''; - }; - - collectdBinary = { - enable = mkEnableOption "collectd binary protocol receiver"; - - authFile = mkOption { - default = null; - type = types.nullOr types.path; - description = "File mapping user names to pre-shared keys (passwords)."; - }; - - port = mkOption { - type = types.int; - default = 25826; - description = ''Network address on which to accept collectd binary network packets.''; - }; - - listenAddress = mkOption { - type = types.nullOr types.str; - default = null; - example = "0.0.0.0"; - description = '' - Address to listen on for binary network packets. - ''; - }; - - securityLevel = mkOption { - type = types.enum ["None" "Sign" "Encrypt"]; - default = "None"; - description = '' - Minimum required security level for accepted packets. - ''; - }; - }; - - extraFlags = mkOption { - type = types.listOf types.str; - default = []; - description = '' - Extra commandline options when launching the collectd exporter. - ''; - }; - - logFormat = mkOption { - type = types.str; - default = "logger:stderr"; - example = "logger:syslog?appname=bob&local=7 or logger:stdout?json=true"; - description = '' - Set the log target and format. - ''; - }; - - logLevel = mkOption { - type = types.enum ["debug" "info" "warn" "error" "fatal"]; - default = "info"; - description = '' - Only log messages with the given severity or above. - ''; - }; - - openFirewall = mkOption { - type = types.bool; - default = false; - description = '' - Open port in firewall for incoming connections. - ''; - }; - }; - }; - - config = mkIf cfg.enable { - networking.firewall.allowedTCPPorts = (optional cfg.openFirewall cfg.port) ++ - (optional (cfg.openFirewall && cfg.collectdBinary.enable) cfg.collectdBinary.port); - - systemd.services.prometheus-collectd-exporter = { - description = "Prometheus exporter for Collectd metrics"; - unitConfig.Documentation = "https://github.com/prometheus/collectd_exporter"; - wantedBy = [ "multi-user.target" ]; - serviceConfig = { - DynamicUser = true; - Restart = "always"; - PrivateTmp = true; - WorkingDirectory = /tmp; - ExecStart = '' - ${pkgs.prometheus-collectd-exporter}/bin/collectd_exporter \ - -log.format ${cfg.logFormat} \ - -log.level ${cfg.logLevel} \ - -web.listen-address ${optionalString (cfg.listenAddress != null) cfg.listenAddress}:${toString cfg.port} \ - ${collectSettingsArgs} \ - ${concatStringsSep " " cfg.extraFlags} - ''; - }; - }; - }; -} diff --git a/nixos/modules/services/monitoring/prometheus/exporters.nix b/nixos/modules/services/monitoring/prometheus/exporters.nix new file mode 100644 index 00000000000..4315194ed32 --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters.nix @@ -0,0 +1,169 @@ +{ config, pkgs, lib, ... }: + +with lib; + +let + cfg = config.services.prometheus.exporters; + + # each attribute in `exporterOpts` is expected to have specified: + # - port (types.int): port on which the exporter listens + # - serviceOpts (types.attrs): config that is merged with the + # default definition of the exporter's + # systemd service + # - extraOpts (types.attrs): extra configuration options to + # configure the exporter with, which + # are appended to the default options + # + # Note that `extraOpts` is optional, but a script for the exporter's + # systemd service must be provided by specifying either + # `serviceOpts.script` or `serviceOpts.serviceConfig.ExecStart` + exporterOpts = { + blackbox = import ./exporters/blackbox.nix { inherit config lib pkgs; }; + collectd = import ./exporters/collectd.nix { inherit config lib pkgs; }; + fritzbox = import ./exporters/fritzbox.nix { inherit config lib pkgs; }; + json = import ./exporters/json.nix { inherit config lib pkgs; }; + minio = import ./exporters/minio.nix { inherit config lib pkgs; }; + nginx = import ./exporters/nginx.nix { inherit config lib pkgs; }; + node = import ./exporters/node.nix { inherit config lib pkgs; }; + snmp = import ./exporters/snmp.nix { inherit config lib pkgs; }; + unifi = import ./exporters/unifi.nix { inherit config lib pkgs; }; + varnish = import ./exporters/varnish.nix { inherit config lib pkgs; }; + }; + + mkExporterOpts = ({ name, port }: { + enable = mkEnableOption "the prometheus ${name} exporter"; + port = mkOption { + type = types.int; + default = port; + description = '' + Port to listen on. + ''; + }; + listenAddress = mkOption { + type = types.str; + default = "0.0.0.0"; + description = '' + Address to listen on. + ''; + }; + extraFlags = mkOption { + type = types.listOf types.str; + default = []; + description = '' + Extra commandline options to pass to the ${name} exporter. + ''; + }; + openFirewall = mkOption { + type = types.bool; + default = false; + description = '' + Open port in firewall for incoming connections. + ''; + }; + firewallFilter = mkOption { + type = types.str; + default = "-p tcp -m tcp --dport ${toString port}"; + example = literalExample '' + "-i eth0 -p tcp -m tcp --dport ${toString port}" + ''; + description = '' + Specify a filter for iptables to use when + + is true. It is used as `ip46tables -I INPUT -j ACCEPT`. + ''; + }; + user = mkOption { + type = types.str; + default = "nobody"; + description = '' + User name under which the ${name} exporter shall be run. + Has no effect when is true. + ''; + }; + group = mkOption { + type = types.str; + default = "nobody"; + description = '' + Group under which the ${name} exporter shall be run. + Has no effect when is true. + ''; + }; + }); + + mkSubModule = { name, port, extraOpts, serviceOpts }: { + ${name} = mkOption { + type = types.submodule { + options = (mkExporterOpts { + inherit name port; + } // extraOpts); + }; + internal = true; + default = {}; + }; + }; + + mkSubModules = (foldl' (a: b: a//b) {} + (mapAttrsToList (name: opts: mkSubModule { + inherit name; + inherit (opts) port serviceOpts; + extraOpts = opts.extraOpts or {}; + }) exporterOpts) + ); + + mkExporterConf = { name, conf, serviceOpts }: + mkIf conf.enable { + networking.firewall.extraCommands = mkIf conf.openFirewall '' + ip46tables -I INPUT ${conf.firewallFilter} -j ACCEPT + ''; + systemd.services."prometheus-${name}-exporter" = mkMerge ([{ + wantedBy = [ "multi-user.target" ]; + after = [ "network.target" ]; + serviceConfig = { + Restart = mkDefault "always"; + PrivateTmp = mkDefault true; + WorkingDirectory = mkDefault /tmp; + } // mkIf (!(serviceOpts.serviceConfig.DynamicUser or false)) { + User = conf.user; + Group = conf.group; + }; + } serviceOpts ]); + }; +in +{ + options.services.prometheus.exporters = mkOption { + type = types.submodule { + options = (mkSubModules); + }; + description = "Prometheus exporter configuration"; + default = {}; + example = literalExample '' + { + node = { + enable = true; + enabledCollectors = [ "systemd" ]; + }; + varnish.enable = true; + } + ''; + }; + + config = mkMerge ([{ + assertions = [{ + assertion = (cfg.snmp.configurationPath == null) != (cfg.snmp.configuration == null); + message = '' + Please ensure you have either `services.prometheus.exporters.snmp.configuration' + or `services.prometheus.exporters.snmp.configurationPath' set! + ''; + }]; + }] ++ [(mkIf config.services.minio.enable { + services.prometheus.exporters.minio.minioAddress = mkDefault "http://localhost:9000"; + services.prometheus.exporters.minio.minioAccessKey = mkDefault config.services.minio.accessKey; + services.prometheus.exporters.minio.minioAccessSecret = mkDefault config.services.minio.secretKey; + })] ++ (mapAttrsToList (name: conf: + mkExporterConf { + inherit name; + inherit (conf) serviceOpts; + conf = cfg.${name}; + }) exporterOpts) + ); +} diff --git a/nixos/modules/services/monitoring/prometheus/exporters/blackbox.nix b/nixos/modules/services/monitoring/prometheus/exporters/blackbox.nix new file mode 100644 index 00000000000..d09d1c4f366 --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters/blackbox.nix @@ -0,0 +1,31 @@ +{ config, lib, pkgs }: + +with lib; + +let + cfg = config.services.prometheus.exporters.blackbox; +in +{ + port = 9115; + extraOpts = { + configFile = mkOption { + type = types.path; + description = '' + Path to configuration file. + ''; + }; + }; + serviceOpts = { + serviceConfig = { + AmbientCapabilities = [ "CAP_NET_RAW" ]; # for ping probes + DynamicUser = true; + ExecStart = '' + ${pkgs.prometheus-blackbox-exporter}/bin/blackbox_exporter \ + --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \ + --config.file ${cfg.configFile} \ + ${concatStringsSep " \\\n " cfg.extraFlags} + ''; + ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; + }; + }; +} diff --git a/nixos/modules/services/monitoring/prometheus/exporters/collectd.nix b/nixos/modules/services/monitoring/prometheus/exporters/collectd.nix new file mode 100644 index 00000000000..0eba3527162 --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters/collectd.nix @@ -0,0 +1,78 @@ +{ config, lib, pkgs }: + +with lib; + +let + cfg = config.services.prometheus.exporters.collectd; +in +{ + port = 9103; + extraOpts = { + collectdBinary = { + enable = mkEnableOption "collectd binary protocol receiver"; + + authFile = mkOption { + default = null; + type = types.nullOr types.path; + description = "File mapping user names to pre-shared keys (passwords)."; + }; + + port = mkOption { + type = types.int; + default = 25826; + description = ''Network address on which to accept collectd binary network packets.''; + }; + + listenAddress = mkOption { + type = types.str; + default = "0.0.0.0"; + description = '' + Address to listen on for binary network packets. + ''; + }; + + securityLevel = mkOption { + type = types.enum ["None" "Sign" "Encrypt"]; + default = "None"; + description = '' + Minimum required security level for accepted packets. + ''; + }; + }; + + logFormat = mkOption { + type = types.str; + default = "logger:stderr"; + example = "logger:syslog?appname=bob&local=7 or logger:stdout?json=true"; + description = '' + Set the log target and format. + ''; + }; + + logLevel = mkOption { + type = types.enum ["debug" "info" "warn" "error" "fatal"]; + default = "info"; + description = '' + Only log messages with the given severity or above. + ''; + }; + }; + serviceOpts = let + collectSettingsArgs = if (cfg.collectdBinary.enable) then '' + -collectd.listen-address ${cfg.collectdBinary.listenAddress}:${toString cfg.collectdBinary.port} \ + -collectd.security-level ${cfg.collectdBinary.securityLevel} \ + '' else ""; + in { + serviceConfig = { + DynamicUser = true; + ExecStart = '' + ${pkgs.prometheus-collectd-exporter}/bin/collectd_exporter \ + -log.format ${cfg.logFormat} \ + -log.level ${cfg.logLevel} \ + -web.listen-address ${cfg.listenAddress}:${toString cfg.port} \ + ${collectSettingsArgs} \ + ${concatStringsSep " \\\n " cfg.extraFlags} + ''; + }; + }; +} diff --git a/nixos/modules/services/monitoring/prometheus/exporters/fritzbox.nix b/nixos/modules/services/monitoring/prometheus/exporters/fritzbox.nix new file mode 100644 index 00000000000..a3f1d9d3132 --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters/fritzbox.nix @@ -0,0 +1,39 @@ +{ config, lib, pkgs }: + +with lib; + +let + cfg = config.services.prometheus.exporters.fritzbox; +in +{ + port = 9133; + extraOpts = { + gatewayAddress = mkOption { + type = types.str; + default = "fritz.box"; + description = '' + The hostname or IP of the FRITZ!Box. + ''; + }; + + gatewayPort = mkOption { + type = types.int; + default = 49000; + description = '' + The port of the FRITZ!Box UPnP service. + ''; + }; + }; + serviceOpts = { + serviceConfig = { + DynamicUser = true; + ExecStart = '' + ${pkgs.prometheus-fritzbox-exporter}/bin/fritzbox_exporter \ + -listen-address ${cfg.listenAddress}:${toString cfg.port} \ + -gateway-address ${cfg.gatewayAddress} \ + -gateway-port ${toString cfg.gatewayPort} \ + ${concatStringsSep " \\\n " cfg.extraFlags} + ''; + }; + }; +} diff --git a/nixos/modules/services/monitoring/prometheus/exporters/json.nix b/nixos/modules/services/monitoring/prometheus/exporters/json.nix new file mode 100644 index 00000000000..a5494e85e01 --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters/json.nix @@ -0,0 +1,36 @@ +{ config, lib, pkgs }: + +with lib; + +let + cfg = config.services.prometheus.exporters.json; +in +{ + port = 7979; + extraOpts = { + url = mkOption { + type = types.str; + description = '' + URL to scrape JSON from. + ''; + }; + configFile = mkOption { + type = types.path; + description = '' + Path to configuration file. + ''; + }; + listenAddress = {}; # not used + }; + serviceOpts = { + serviceConfig = { + DynamicUser = true; + ExecStart = '' + ${pkgs.prometheus-json-exporter}/bin/prometheus-json-exporter \ + --port ${toString cfg.port} \ + ${cfg.url} ${cfg.configFile} \ + ${concatStringsSep " \\\n " cfg.extraFlags} + ''; + }; + }; +} diff --git a/nixos/modules/services/monitoring/prometheus/exporters/minio.nix b/nixos/modules/services/monitoring/prometheus/exporters/minio.nix new file mode 100644 index 00000000000..3cc4ffdbc8f --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters/minio.nix @@ -0,0 +1,65 @@ +{ config, lib, pkgs }: + +with lib; + +let + cfg = config.services.prometheus.exporters.minio; +in +{ + port = 9290; + extraOpts = { + minioAddress = mkOption { + type = types.str; + example = "https://10.0.0.1:9000"; + description = '' + The URL of the minio server. + Use HTTPS if Minio accepts secure connections only. + By default this connects to the local minio server if enabled. + ''; + }; + + minioAccessKey = mkOption { + type = types.str; + example = "yourMinioAccessKey"; + description = '' + The value of the Minio access key. + It is required in order to connect to the server. + By default this uses the one from the local minio server if enabled + and config.services.minio.accessKey. + ''; + }; + + minioAccessSecret = mkOption { + type = types.str; + description = '' + The value of the Minio access secret. + It is required in order to connect to the server. + By default this uses the one from the local minio server if enabled + and config.services.minio.secretKey. + ''; + }; + + minioBucketStats = mkOption { + type = types.bool; + default = false; + description = '' + Collect statistics about the buckets and files in buckets. + It requires more computation, use it carefully in case of large buckets.. + ''; + }; + }; + serviceOpts = { + serviceConfig = { + DynamicUser = true; + ExecStart = '' + ${pkgs.prometheus-minio-exporter}/bin/minio-exporter \ + -web.listen-address ${cfg.listenAddress}:${toString cfg.port} \ + -minio.server ${cfg.minioAddress} \ + -minio.access-key ${cfg.minioAccessKey} \ + -minio.access-secret ${cfg.minioAccessSecret} \ + ${optionalString cfg.minioBucketStats "-minio.bucket-stats"} \ + ${concatStringsSep " \\\n " cfg.extraFlags} + ''; + }; + }; +} diff --git a/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix b/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix new file mode 100644 index 00000000000..6a3ba2d0457 --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters/nginx.nix @@ -0,0 +1,31 @@ +{ config, lib, pkgs }: + +with lib; + +let + cfg = config.services.prometheus.exporters.nginx; +in +{ + port = 9113; + extraOpts = { + scrapeUri = mkOption { + type = types.string; + default = "http://localhost/nginx_status"; + description = '' + Address to access the nginx status page. + Can be enabled with services.nginx.statusPage = true. + ''; + }; + }; + serviceOpts = { + serviceConfig = { + DynamicUser = true; + ExecStart = '' + ${pkgs.prometheus-nginx-exporter}/bin/nginx_exporter \ + -nginx.scrape_uri '${cfg.scrapeUri}' \ + -telemetry.address ${cfg.listenAddress}:${toString cfg.port} \ + ${concatStringsSep " \\\n " cfg.extraFlags} + ''; + }; + }; +} diff --git a/nixos/modules/services/monitoring/prometheus/exporters/node.nix b/nixos/modules/services/monitoring/prometheus/exporters/node.nix new file mode 100644 index 00000000000..c85f5f9cfb2 --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters/node.nix @@ -0,0 +1,39 @@ +{ config, lib, pkgs }: + +with lib; + +let + cfg = config.services.prometheus.exporters.node; +in +{ + port = 9100; + extraOpts = { + enabledCollectors = mkOption { + type = types.listOf types.string; + default = []; + example = ''[ "systemd" ]''; + description = '' + Collectors to enable. The collectors listed here are enabled in addition to the default ones. + ''; + }; + disabledCollectors = mkOption { + type = types.listOf types.str; + default = []; + example = ''[ "timex" ]''; + description = '' + Collectors to disable which are enabled by default. + ''; + }; + }; + serviceOpts = { + serviceConfig = { + ExecStart = '' + ${pkgs.prometheus-node-exporter}/bin/node_exporter \ + ${concatMapStringsSep " " (x: "--collector." + x) cfg.enabledCollectors} \ + ${concatMapStringsSep " " (x: "--no-collector." + x) cfg.disabledCollectors} \ + --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \ + ${concatStringsSep " \\\n " cfg.extraFlags} + ''; + }; + }; +} diff --git a/nixos/modules/services/monitoring/prometheus/exporters/snmp.nix b/nixos/modules/services/monitoring/prometheus/exporters/snmp.nix new file mode 100644 index 00000000000..404cd0a1896 --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters/snmp.nix @@ -0,0 +1,71 @@ +{ config, lib, pkgs }: + +with lib; + +let + cfg = config.services.prometheus.exporters.snmp; +in +{ + port = 9116; + extraOpts = { + configurationPath = mkOption { + type = types.nullOr types.path; + default = null; + description = '' + Path to a snmp exporter configuration file. Mutually exclusive with 'configuration' option. + ''; + example = "./snmp.yml"; + }; + + configuration = mkOption { + type = types.nullOr types.attrs; + default = {}; + description = '' + Snmp exporter configuration as nix attribute set. Mutually exclusive with 'configurationPath' option. + ''; + example = '' + { + "default" = { + "version" = 2; + "auth" = { + "community" = "public"; + }; + }; + }; + ''; + }; + + logFormat = mkOption { + type = types.str; + default = "logger:stderr"; + description = '' + Set the log target and format. + ''; + }; + + logLevel = mkOption { + type = types.enum ["debug" "info" "warn" "error" "fatal"]; + default = "info"; + description = '' + Only log messages with the given severity or above. + ''; + }; + }; + serviceOpts = let + configFile = if cfg.configurationPath != null + then cfg.configurationPath + else "${pkgs.writeText "snmp-eporter-conf.yml" (builtins.toJSON cfg.configuration)}"; + in { + serviceConfig = { + DynamicUser = true; + ExecStart = '' + ${pkgs.prometheus-snmp-exporter.bin}/bin/snmp_exporter \ + -config.file ${configFile} \ + -log.format ${cfg.logFormat} \ + -log.level ${cfg.logLevel} \ + -web.listen-address ${cfg.listenAddress}:${toString cfg.port} \ + ${concatStringsSep " \\\n " cfg.extraFlags} + ''; + }; + }; +} diff --git a/nixos/modules/services/monitoring/prometheus/exporters/unifi.nix b/nixos/modules/services/monitoring/prometheus/exporters/unifi.nix new file mode 100644 index 00000000000..011dcbe208e --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters/unifi.nix @@ -0,0 +1,67 @@ +{ config, lib, pkgs }: + +with lib; + +let + cfg = config.services.prometheus.exporters.unifi; +in +{ + port = 9130; + extraOpts = { + unifiAddress = mkOption { + type = types.str; + example = "https://10.0.0.1:8443"; + description = '' + URL of the UniFi Controller API. + ''; + }; + + unifiInsecure = mkOption { + type = types.bool; + default = false; + description = '' + If enabled skip the verification of the TLS certificate of the UniFi Controller API. + Use with caution. + ''; + }; + + unifiUsername = mkOption { + type = types.str; + example = "ReadOnlyUser"; + description = '' + username for authentication against UniFi Controller API. + ''; + }; + + unifiPassword = mkOption { + type = types.str; + description = '' + Password for authentication against UniFi Controller API. + ''; + }; + + unifiTimeout = mkOption { + type = types.str; + default = "5s"; + example = "2m"; + description = '' + Timeout including unit for UniFi Controller API requests. + ''; + }; + }; + serviceOpts = { + serviceConfig = { + DynamicUser = true; + ExecStart = '' + ${pkgs.prometheus-unifi-exporter}/bin/unifi_exporter \ + -telemetry.addr ${cfg.listenAddress}:${toString cfg.port} \ + -unifi.addr ${cfg.unifiAddress} \ + -unifi.username ${cfg.unifiUsername} \ + -unifi.password ${cfg.unifiPassword} \ + -unifi.timeout ${cfg.unifiTimeout} \ + ${optionalString cfg.unifiInsecure "-unifi.insecure" } \ + ${concatStringsSep " \\\n " cfg.extraFlags} + ''; + }; + }; +} diff --git a/nixos/modules/services/monitoring/prometheus/exporters/varnish.nix b/nixos/modules/services/monitoring/prometheus/exporters/varnish.nix new file mode 100644 index 00000000000..b439a83e7aa --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters/varnish.nix @@ -0,0 +1,21 @@ +{ config, lib, pkgs }: + +with lib; + +let + cfg = config.services.prometheus.exporters.varnish; +in +{ + port = 9131; + serviceOpts = { + path = [ pkgs.varnish ]; + serviceConfig = { + DynamicUser = true; + ExecStart = '' + ${pkgs.prometheus-varnish-exporter}/bin/prometheus_varnish_exporter \ + -web.listen-address ${cfg.listenAddress}:${toString cfg.port} \ + ${concatStringsSep " \\\n " cfg.extraFlags} + ''; + }; + }; +} diff --git a/nixos/modules/services/monitoring/prometheus/fritzbox-exporter.nix b/nixos/modules/services/monitoring/prometheus/fritzbox-exporter.nix deleted file mode 100644 index 6da39b6519c..00000000000 --- a/nixos/modules/services/monitoring/prometheus/fritzbox-exporter.nix +++ /dev/null @@ -1,76 +0,0 @@ -{ config, pkgs, lib, ... }: - -with lib; - -let - cfg = config.services.prometheus.fritzboxExporter; -in { - options = { - services.prometheus.fritzboxExporter = { - enable = mkEnableOption "prometheus fritzbox exporter"; - - port = mkOption { - type = types.int; - default = 9133; - description = '' - Port to listen on. - ''; - }; - - gatewayAddress = mkOption { - type = types.str; - default = "fritz.box"; - description = '' - The hostname or IP of the FRITZ!Box. - ''; - }; - - gatewayPort = mkOption { - type = types.int; - default = 49000; - description = '' - The port of the FRITZ!Box UPnP service. - ''; - }; - - extraFlags = mkOption { - type = types.listOf types.str; - default = []; - description = '' - Extra commandline options when launching the fritzbox exporter. - ''; - }; - - openFirewall = mkOption { - type = types.bool; - default = false; - description = '' - Open port in firewall for incoming connections. - ''; - }; - }; - }; - - config = mkIf cfg.enable { - networking.firewall.allowedTCPPorts = optional cfg.openFirewall cfg.port; - - systemd.services.prometheus-fritzbox-exporter = { - description = "Prometheus exporter for FRITZ!Box via UPnP"; - unitConfig.Documentation = "https://github.com/ndecker/fritzbox_exporter"; - wantedBy = [ "multi-user.target" ]; - serviceConfig = { - User = "nobody"; - Restart = "always"; - PrivateTmp = true; - WorkingDirectory = /tmp; - ExecStart = '' - ${pkgs.prometheus-fritzbox-exporter}/bin/fritzbox_exporter \ - -listen-address :${toString cfg.port} \ - -gateway-address ${cfg.gatewayAddress} \ - -gateway-port ${toString cfg.gatewayPort} \ - ${concatStringsSep " \\\n " cfg.extraFlags} - ''; - }; - }; - }; -} diff --git a/nixos/modules/services/monitoring/prometheus/json-exporter.nix b/nixos/modules/services/monitoring/prometheus/json-exporter.nix deleted file mode 100644 index 6bc56df9834..00000000000 --- a/nixos/modules/services/monitoring/prometheus/json-exporter.nix +++ /dev/null @@ -1,74 +0,0 @@ -{ config, pkgs, lib, ... }: - -with lib; - -let - cfg = config.services.prometheus.jsonExporter; -in { - options = { - services.prometheus.jsonExporter = { - enable = mkEnableOption "prometheus JSON exporter"; - - url = mkOption { - type = types.str; - description = '' - URL to scrape JSON from. - ''; - }; - - configFile = mkOption { - type = types.path; - description = '' - Path to configuration file. - ''; - }; - - port = mkOption { - type = types.int; - default = 7979; - description = '' - Port to listen on. - ''; - }; - - extraFlags = mkOption { - type = types.listOf types.str; - default = []; - description = '' - Extra commandline options when launching the JSON exporter. - ''; - }; - - openFirewall = mkOption { - type = types.bool; - default = false; - description = '' - Open port in firewall for incoming connections. - ''; - }; - }; - }; - - config = mkIf cfg.enable { - networking.firewall.allowedTCPPorts = optional cfg.openFirewall cfg.port; - - systemd.services.prometheus-json-exporter = { - description = "Prometheus exporter for JSON over HTTP"; - unitConfig.Documentation = "https://github.com/kawamuray/prometheus-json-exporter"; - wantedBy = [ "multi-user.target" ]; - serviceConfig = { - User = "nobody"; - Restart = "always"; - PrivateTmp = true; - WorkingDirectory = /tmp; - ExecStart = '' - ${pkgs.prometheus-json-exporter}/bin/prometheus-json-exporter \ - --port ${toString cfg.port} \ - ${cfg.url} ${cfg.configFile} \ - ${concatStringsSep " \\\n " cfg.extraFlags} - ''; - ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; - }; - }; - }; -} diff --git a/nixos/modules/services/monitoring/prometheus/minio-exporter.nix b/nixos/modules/services/monitoring/prometheus/minio-exporter.nix deleted file mode 100644 index 4314671523c..00000000000 --- a/nixos/modules/services/monitoring/prometheus/minio-exporter.nix +++ /dev/null @@ -1,117 +0,0 @@ -{ config, pkgs, lib, ... }: - -with lib; - -let - cfg = config.services.prometheus.minioExporter; -in { - options = { - services.prometheus.minioExporter = { - enable = mkEnableOption "prometheus minio exporter"; - - port = mkOption { - type = types.int; - default = 9290; - description = '' - Port to listen on. - ''; - }; - - listenAddress = mkOption { - type = types.nullOr types.str; - default = null; - example = "0.0.0.0"; - description = '' - Address to listen on for web interface and telemetry. - ''; - }; - - minioAddress = mkOption { - type = types.str; - example = "https://10.0.0.1:9000"; - default = if config.services.minio.enable then "http://localhost:9000" else null; - description = '' - The URL of the minio server. - Use HTTPS if Minio accepts secure connections only. - By default this connects to the local minio server if enabled. - ''; - }; - - minioAccessKey = mkOption ({ - type = types.str; - example = "BKIKJAA5BMMU2RHO6IBB"; - description = '' - The value of the Minio access key. - It is required in order to connect to the server. - By default this uses the one from the local minio server if enabled - and config.services.minio.accessKey. - ''; - } // optionalAttrs (config.services.minio.enable && config.services.minio.accessKey != "") { - default = config.services.minio.accessKey; - }); - - minioAccessSecret = mkOption ({ - type = types.str; - description = '' - The calue of the Minio access secret. - It is required in order to connect to the server. - By default this uses the one from the local minio server if enabled - and config.services.minio.secretKey. - ''; - } // optionalAttrs (config.services.minio.enable && config.services.minio.secretKey != "") { - default = config.services.minio.secretKey; - }); - - minioBucketStats = mkOption { - type = types.bool; - default = false; - description = '' - Collect statistics about the buckets and files in buckets. - It requires more computation, use it carefully in case of large buckets.. - ''; - }; - - extraFlags = mkOption { - type = types.listOf types.str; - default = []; - description = '' - Extra commandline options when launching the minio exporter. - ''; - }; - - openFirewall = mkOption { - type = types.bool; - default = false; - description = '' - Open port in firewall for incoming connections. - ''; - }; - }; - }; - - config = mkIf cfg.enable { - networking.firewall.allowedTCPPorts = optional cfg.openFirewall cfg.port; - - systemd.services.prometheus-minio-exporter = { - description = "Prometheus exporter for Minio server metrics"; - unitConfig.Documentation = "https://github.com/joe-pll/minio-exporter"; - wantedBy = [ "multi-user.target" ]; - after = optional config.services.minio.enable "minio.service"; - serviceConfig = { - DynamicUser = true; - Restart = "always"; - PrivateTmp = true; - WorkingDirectory = /tmp; - ExecStart = '' - ${pkgs.prometheus-minio-exporter}/bin/minio-exporter \ - -web.listen-address ${optionalString (cfg.listenAddress != null) cfg.listenAddress}:${toString cfg.port} \ - -minio.server ${cfg.minioAddress} \ - -minio.access-key ${cfg.minioAccessKey} \ - -minio.access-secret ${cfg.minioAccessSecret} \ - ${optionalString cfg.minioBucketStats "-minio.bucket-stats"} \ - ${concatStringsSep " \\\n " cfg.extraFlags} - ''; - }; - }; - }; -} diff --git a/nixos/modules/services/monitoring/prometheus/nginx-exporter.nix b/nixos/modules/services/monitoring/prometheus/nginx-exporter.nix deleted file mode 100644 index 1ccafee3b18..00000000000 --- a/nixos/modules/services/monitoring/prometheus/nginx-exporter.nix +++ /dev/null @@ -1,78 +0,0 @@ -{ config, pkgs, lib, ... }: - -with lib; - -let - cfg = config.services.prometheus.nginxExporter; -in { - options = { - services.prometheus.nginxExporter = { - enable = mkEnableOption "prometheus nginx exporter"; - - port = mkOption { - type = types.int; - default = 9113; - description = '' - Port to listen on. - ''; - }; - - listenAddress = mkOption { - type = types.string; - default = "0.0.0.0"; - description = '' - Address to listen on. - ''; - }; - - scrapeUri = mkOption { - type = types.string; - default = "http://localhost/nginx_status"; - description = '' - Address to access the nginx status page. - Can be enabled with services.nginx.statusPage = true. - ''; - }; - - extraFlags = mkOption { - type = types.listOf types.str; - default = []; - description = '' - Extra commandline options when launching the nginx exporter. - ''; - }; - - openFirewall = mkOption { - type = types.bool; - default = false; - description = '' - Open port in firewall for incoming connections. - ''; - }; - }; - }; - - config = mkIf cfg.enable { - networking.firewall.allowedTCPPorts = optional cfg.openFirewall cfg.port; - - systemd.services.prometheus-nginx-exporter = { - after = [ "network.target" "nginx.service" ]; - description = "Prometheus exporter for nginx metrics"; - unitConfig.Documentation = "https://github.com/discordianfish/nginx_exporter"; - wantedBy = [ "multi-user.target" ]; - serviceConfig = { - User = "nobody"; - Restart = "always"; - PrivateTmp = true; - WorkingDirectory = /tmp; - ExecStart = '' - ${pkgs.prometheus-nginx-exporter}/bin/nginx_exporter \ - -nginx.scrape_uri '${cfg.scrapeUri}' \ - -telemetry.address ${cfg.listenAddress}:${toString cfg.port} \ - ${concatStringsSep " \\\n " cfg.extraFlags} - ''; - ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; - }; - }; - }; -} diff --git a/nixos/modules/services/monitoring/prometheus/node-exporter.nix b/nixos/modules/services/monitoring/prometheus/node-exporter.nix deleted file mode 100644 index bad4389ce79..00000000000 --- a/nixos/modules/services/monitoring/prometheus/node-exporter.nix +++ /dev/null @@ -1,87 +0,0 @@ -{ config, pkgs, lib, ... }: - -with lib; - -let - cfg = config.services.prometheus.nodeExporter; -in { - options = { - services.prometheus.nodeExporter = { - enable = mkEnableOption "prometheus node exporter"; - - port = mkOption { - type = types.int; - default = 9100; - description = '' - Port to listen on. - ''; - }; - - listenAddress = mkOption { - type = types.string; - default = "0.0.0.0"; - description = '' - Address to listen on. - ''; - }; - - enabledCollectors = mkOption { - type = types.listOf types.string; - default = []; - example = ''[ "systemd" ]''; - description = '' - Collectors to enable. The collectors listed here are enabled in addition to the default ones. - ''; - }; - - disabledCollectors = mkOption { - type = types.listOf types.str; - default = []; - example = ''[ "timex" ]''; - description = '' - Collectors to disable which are enabled by default. - ''; - }; - - extraFlags = mkOption { - type = types.listOf types.str; - default = []; - description = '' - Extra commandline options when launching the node exporter. - ''; - }; - - openFirewall = mkOption { - type = types.bool; - default = false; - description = '' - Open port in firewall for incoming connections. - ''; - }; - }; - }; - - config = mkIf cfg.enable { - networking.firewall.allowedTCPPorts = optional cfg.openFirewall cfg.port; - - systemd.services.prometheus-node-exporter = { - description = "Prometheus exporter for machine metrics"; - unitConfig.Documentation = "https://github.com/prometheus/node_exporter"; - wantedBy = [ "multi-user.target" ]; - script = '' - exec ${pkgs.prometheus-node-exporter}/bin/node_exporter \ - ${concatMapStringsSep " " (x: "--collector." + x) cfg.enabledCollectors} \ - ${concatMapStringsSep " " (x: "--no-collector." + x) cfg.disabledCollectors} \ - --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \ - ${concatStringsSep " \\\n " cfg.extraFlags} - ''; - serviceConfig = { - User = "nobody"; - Restart = "always"; - PrivateTmp = true; - WorkingDirectory = /tmp; - ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; - }; - }; - }; -} diff --git a/nixos/modules/services/monitoring/prometheus/snmp-exporter.nix b/nixos/modules/services/monitoring/prometheus/snmp-exporter.nix deleted file mode 100644 index fe33f8c1f04..00000000000 --- a/nixos/modules/services/monitoring/prometheus/snmp-exporter.nix +++ /dev/null @@ -1,127 +0,0 @@ -{ config, pkgs, lib, ... }: - -with lib; - -let - cfg = config.services.prometheus.snmpExporter; - mkConfigFile = pkgs.writeText "snmp.yml" (if cfg.configurationPath == null then builtins.toJSON cfg.configuration else builtins.readFile cfg.configurationPath); -in { - options = { - services.prometheus.snmpExporter = { - enable = mkEnableOption "Prometheus snmp exporter"; - - user = mkOption { - type = types.str; - default = "nobody"; - description = '' - User name under which snmp exporter shall be run. - ''; - }; - - group = mkOption { - type = types.str; - default = "nogroup"; - description = '' - Group under which snmp exporter shall be run. - ''; - }; - - port = mkOption { - type = types.int; - default = 9116; - description = '' - Port to listen on. - ''; - }; - - listenAddress = mkOption { - type = types.nullOr types.str; - default = null; - description = '' - Address to listen on for web interface and telemetry. - ''; - }; - - configurationPath = mkOption { - type = types.nullOr types.path; - default = null; - description = '' - Path to a snmp exporter configuration file. Mutually exclusive with 'configuration' option. - ''; - example = "./snmp.yml"; - }; - - configuration = mkOption { - type = types.nullOr types.attrs; - default = {}; - description = '' - Snmp exporter configuration as nix attribute set. Mutually exclusive with 'configurationPath' option. - ''; - example = '' - { - "default" = { - "version" = 2; - "auth" = { - "community" = "public"; - }; - }; - }; - ''; - }; - - logFormat = mkOption { - type = types.str; - default = "logger:stderr"; - description = '' - Set the log target and format. - ''; - }; - - logLevel = mkOption { - type = types.enum ["debug" "info" "warn" "error" "fatal"]; - default = "info"; - description = '' - Only log messages with the given severity or above. - ''; - }; - - openFirewall = mkOption { - type = types.bool; - default = false; - description = '' - Open port in firewall for incoming connections. - ''; - }; - }; - }; - - config = mkIf cfg.enable { - networking.firewall.allowedTCPPorts = optional cfg.openFirewall cfg.port; - - assertions = singleton - { - assertion = (cfg.configurationPath == null) != (cfg.configuration == null); - message = "Please ensure you have either 'configuration' or 'configurationPath' set!"; - }; - - systemd.services.prometheus-snmp-exporter = { - wantedBy = [ "multi-user.target" ]; - after = [ "network.target" ]; - script = '' - ${pkgs.prometheus-snmp-exporter.bin}/bin/snmp_exporter \ - -config.file ${mkConfigFile} \ - -log.format ${cfg.logFormat} \ - -log.level ${cfg.logLevel} \ - -web.listen-address ${optionalString (cfg.listenAddress != null) cfg.listenAddress}:${toString cfg.port} - ''; - - serviceConfig = { - User = cfg.user; - Group = cfg.group; - Restart = "always"; - PrivateTmp = true; - WorkingDirectory = "/tmp"; - }; - }; - }; -} diff --git a/nixos/modules/services/monitoring/prometheus/unifi-exporter.nix b/nixos/modules/services/monitoring/prometheus/unifi-exporter.nix deleted file mode 100644 index 0a56d6ae95a..00000000000 --- a/nixos/modules/services/monitoring/prometheus/unifi-exporter.nix +++ /dev/null @@ -1,105 +0,0 @@ -{ config, pkgs, lib, ... }: - -with lib; - -let - cfg = config.services.prometheus.unifiExporter; -in { - options = { - services.prometheus.unifiExporter = { - enable = mkEnableOption "prometheus unifi exporter"; - - port = mkOption { - type = types.int; - default = 9130; - description = '' - Port to listen on. - ''; - }; - - unifiAddress = mkOption { - type = types.str; - example = "https://10.0.0.1:8443"; - description = '' - URL of the UniFi Controller API. - ''; - }; - - unifiInsecure = mkOption { - type = types.bool; - default = false; - description = '' - If enabled skip the verification of the TLS certificate of the UniFi Controller API. - Use with caution. - ''; - }; - - unifiUsername = mkOption { - type = types.str; - example = "ReadOnlyUser"; - description = '' - username for authentication against UniFi Controller API. - ''; - }; - - unifiPassword = mkOption { - type = types.str; - description = '' - Password for authentication against UniFi Controller API. - ''; - }; - - unifiTimeout = mkOption { - type = types.str; - default = "5s"; - example = "2m"; - description = '' - Timeout including unit for UniFi Controller API requests. - ''; - }; - - extraFlags = mkOption { - type = types.listOf types.str; - default = []; - description = '' - Extra commandline options when launching the unifi exporter. - ''; - }; - - openFirewall = mkOption { - type = types.bool; - default = false; - description = '' - Open port in firewall for incoming connections. - ''; - }; - }; - }; - - config = mkIf cfg.enable { - networking.firewall.allowedTCPPorts = optional cfg.openFirewall cfg.port; - - systemd.services.prometheus-unifi-exporter = { - description = "Prometheus exporter for UniFi Controller metrics"; - unitConfig.Documentation = "https://github.com/mdlayher/unifi_exporter"; - wantedBy = [ "multi-user.target" ]; - after = optional config.services.unifi.enable "unifi.service"; - serviceConfig = { - User = "nobody"; - Restart = "always"; - PrivateTmp = true; - WorkingDirectory = /tmp; - ExecStart = '' - ${pkgs.prometheus-unifi-exporter}/bin/unifi_exporter \ - -telemetry.addr :${toString cfg.port} \ - -unifi.addr ${cfg.unifiAddress} \ - -unifi.username ${cfg.unifiUsername} \ - -unifi.password ${cfg.unifiPassword} \ - -unifi.timeout ${cfg.unifiTimeout} \ - ${optionalString cfg.unifiInsecure "-unifi.insecure" } \ - ${concatStringsSep " \\\n " cfg.extraFlags} - ''; - }; - }; - }; -} diff --git a/nixos/modules/services/monitoring/prometheus/varnish-exporter.nix b/nixos/modules/services/monitoring/prometheus/varnish-exporter.nix deleted file mode 100644 index 143ebb62aea..00000000000 --- a/nixos/modules/services/monitoring/prometheus/varnish-exporter.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ config, pkgs, lib, ... }: - -# Shamelessly cribbed from nginx-exporter.nix. ~ C. -with lib; - -let - cfg = config.services.prometheus.varnishExporter; -in { - options = { - services.prometheus.varnishExporter = { - enable = mkEnableOption "prometheus Varnish exporter"; - - port = mkOption { - type = types.int; - default = 9131; - description = '' - Port to listen on. - ''; - }; - - extraFlags = mkOption { - type = types.listOf types.str; - default = []; - description = '' - Extra commandline options when launching the Varnish exporter. - ''; - }; - - openFirewall = mkOption { - type = types.bool; - default = false; - description = '' - Open port in firewall for incoming connections. - ''; - }; - }; - }; - - config = mkIf cfg.enable { - networking.firewall.allowedTCPPorts = optional cfg.openFirewall cfg.port; - - systemd.services.prometheus-varnish-exporter = { - description = "Prometheus exporter for Varnish metrics"; - unitConfig.Documentation = "https://github.com/jonnenauha/prometheus_varnish_exporter"; - wantedBy = [ "multi-user.target" ]; - path = [ pkgs.varnish ]; - script = '' - exec ${pkgs.prometheus-varnish-exporter}/bin/prometheus_varnish_exporter \ - -web.listen-address :${toString cfg.port} \ - ${concatStringsSep " \\\n " cfg.extraFlags} - ''; - serviceConfig = { - User = "nobody"; - Restart = "always"; - PrivateTmp = true; - WorkingDirectory = /tmp; - ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; - }; - }; - }; -} From 8a1310122679b1d646a2c753e869f448f6b99796 Mon Sep 17 00:00:00 2001 From: WilliButz Date: Mon, 12 Mar 2018 18:40:37 +0100 Subject: [PATCH 40/57] release notes: add information about prometheus exporters --- nixos/doc/manual/release-notes/rl-1803.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nixos/doc/manual/release-notes/rl-1803.xml b/nixos/doc/manual/release-notes/rl-1803.xml index e67f1448466..60c17c60413 100644 --- a/nixos/doc/manual/release-notes/rl-1803.xml +++ b/nixos/doc/manual/release-notes/rl-1803.xml @@ -353,7 +353,12 @@ following incompatible changes: Use withOnlyInstalledCommunityModules for modules that should not be enabled directly, e.g lib_ldap. - + + + All prometheus exporter modules are now defined as submodules. + The exporters are configured using services.prometheus.exporters. + + From c54aa1f2939afeb5d8e32a6f1bba387f6b79ffc2 Mon Sep 17 00:00:00 2001 From: WilliButz Date: Wed, 14 Mar 2018 15:59:28 +0100 Subject: [PATCH 41/57] nixos/prometheus-exporters: add postfix exporter & documentation --- .../monitoring/prometheus/exporters.nix | 3 + .../monitoring/prometheus/exporters.xml | 135 ++++++++++++++++++ .../prometheus/exporters/postfix.nix | 46 ++++++ 3 files changed, 184 insertions(+) create mode 100644 nixos/modules/services/monitoring/prometheus/exporters.xml create mode 100644 nixos/modules/services/monitoring/prometheus/exporters/postfix.nix diff --git a/nixos/modules/services/monitoring/prometheus/exporters.nix b/nixos/modules/services/monitoring/prometheus/exporters.nix index 4315194ed32..8d6ca1e40a1 100644 --- a/nixos/modules/services/monitoring/prometheus/exporters.nix +++ b/nixos/modules/services/monitoring/prometheus/exporters.nix @@ -25,6 +25,7 @@ let minio = import ./exporters/minio.nix { inherit config lib pkgs; }; nginx = import ./exporters/nginx.nix { inherit config lib pkgs; }; node = import ./exporters/node.nix { inherit config lib pkgs; }; + postfix = import ./exporters/postfix.nix { inherit config lib pkgs; }; snmp = import ./exporters/snmp.nix { inherit config lib pkgs; }; unifi = import ./exporters/unifi.nix { inherit config lib pkgs; }; varnish = import ./exporters/varnish.nix { inherit config lib pkgs; }; @@ -166,4 +167,6 @@ in conf = cfg.${name}; }) exporterOpts) ); + + meta.doc = ./exporters.xml; } diff --git a/nixos/modules/services/monitoring/prometheus/exporters.xml b/nixos/modules/services/monitoring/prometheus/exporters.xml new file mode 100644 index 00000000000..4f0bcb29810 --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters.xml @@ -0,0 +1,135 @@ + + +Prometheus exporters + +Prometheus exporters provide metrics for the prometheus monitoring system. + +
Configuration + One of the most common exporters is the node exporter, it provides hardware and OS metrics from the host it's running on. The exporter could be configured as follows: + + services.promtheus.exporters.node = { + enable = true; + enabledCollectors = [ + "logind" + "systemd" + ]; + disabledCollectors = [ + "textfile" + ]; + openFirewall = true; + firewallFilter = "-i br0 -p tcp -m tcp --dport 9100"; + }; + +It should now serve all metrics from the collectors +that are explicitly enabled and the ones that are +enabled by default, via http under /metrics. In this example the firewall should just +allow incoming connections to the exporter's port on the bridge interface br0 +(this would have to be configured seperately of course). +For more information about configuration see man configuration.nix or +search through the available options. + +
+
Adding a new exporter + To add a new exporter, it has to be packaged first (see nixpkgs/pkgs/servers/monitoring/prometheus/ for examples), then a module can be added. The postfix exporter is used in this example: + + + + Some default options for all exporters are provided by + nixpkgs/nixos/modules/services/monitoring/prometheus/exporters.nix: + + + + + enable + port + listenAddress + extraFlags + openFirewall + firewallFilter + user + group + + + + As there is already a package available, the module can now be added. + This is accomplished by adding a new file to the + nixos/modules/services/monitoring/prometheus/exporters/ directory, + which will be called postfix.nix and contains all exporter specific options + and configuration: + + # nixpgs/nixos/modules/services/prometheus/exporters/postfix.nix + { config, lib, pkgs }: + + with lib; + + let + # for convenience we define cfg here + cfg = config.services.prometheus.exporters.postfix; + in + { + port = 9154; # The postfix exporter listens on this port by default + + # `extraOpts` is an attribute set which contains additional options + # (and optional overrides for default options). + # Note that this attribute is optional. + extraOpts = { + telemetryPath = mkOption { + type = types.str; + default = "/metrics"; + description = '' + Path under which to expose metrics. + ''; + }; + logfilePath = mkOption { + type = types.path; + default = /var/log/postfix_exporter_input.log; + example = /var/log/mail.log; + description = '' + Path where Postfix writes log entries. + This file will be truncated by this exporter! + ''; + }; + showqPath = mkOption { + type = types.path; + default = /var/spool/postfix/public/showq; + example = /var/lib/postfix/queue/public/showq; + description = '' + Path at which Postfix places its showq socket. + ''; + }; + }; + + # `serviceOpts` is an attribute set which contains configuration + # for the exporter's systemd service. One of + # `serviceOpts.script` and `serviceOpts.serviceConfig.ExecStart` + # has to be specified here. This will be merged with the default + # service confiuration. + serviceOpts = { + serviceConfig = { + ExecStart = '' + ${pkgs.prometheus-postfix-exporter}/bin/postfix_exporter \ + --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \ + --web.telemetry-path ${cfg.telemetryPath} \ + ${concatStringsSep " \\\n " cfg.extraFlags} + ''; + }; + }; + } + + + + + + This should already be enough for the postfix exporter. Additionally one could + now add assertions and conditional default values. This can be done in the + 'meta-module' that combines all exporter definitions and generates the submodules: + nixpkgs/nixos/modules/services/prometheus/exporters.nix + + + +
+
diff --git a/nixos/modules/services/monitoring/prometheus/exporters/postfix.nix b/nixos/modules/services/monitoring/prometheus/exporters/postfix.nix new file mode 100644 index 00000000000..1e909aa27d8 --- /dev/null +++ b/nixos/modules/services/monitoring/prometheus/exporters/postfix.nix @@ -0,0 +1,46 @@ +{ config, lib, pkgs }: + +with lib; + +let + cfg = config.services.prometheus.exporters.postfix; +in +{ + port = 9154; + extraOpts = { + telemetryPath = mkOption { + type = types.str; + default = "/metrics"; + description = '' + Path under which to expose metrics. + ''; + }; + logfilePath = mkOption { + type = types.path; + default = "/var/log/postfix_exporter_input.log"; + example = "/var/log/mail.log"; + description = '' + Path where Postfix writes log entries. + This file will be truncated by this exporter! + ''; + }; + showqPath = mkOption { + type = types.path; + default = "/var/spool/postfix/public/showq"; + example = "/var/lib/postfix/queue/public/showq"; + description = '' + Path where Postfix places it's showq socket. + ''; + }; + }; + serviceOpts = { + serviceConfig = { + ExecStart = '' + ${pkgs.prometheus-postfix-exporter}/bin/postfix_exporter \ + --web.listen-address ${cfg.listenAddress}:${toString cfg.port} \ + --web.telemetry-path ${cfg.telemetryPath} \ + ${concatStringsSep " \\\n " cfg.extraFlags} + ''; + }; + }; +} From 112ebed491c7f805cd10eb443dee85d2a02581c0 Mon Sep 17 00:00:00 2001 From: Sander van der Burg Date: Thu, 22 Mar 2018 15:02:09 +0100 Subject: [PATCH 42/57] xcodeenv: publish xcarchive directory in the output store path if requested --- pkgs/development/mobile/xcodeenv/build-app.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/mobile/xcodeenv/build-app.nix b/pkgs/development/mobile/xcodeenv/build-app.nix index 436b55631b6..a94f2745894 100644 --- a/pkgs/development/mobile/xcodeenv/build-app.nix +++ b/pkgs/development/mobile/xcodeenv/build-app.nix @@ -121,6 +121,10 @@ stdenv.mkDerivation { echo "doc install \"$out/$appname.html\"" >> $out/nix-support/hydra-build-products ''} ''} + ${stdenv.lib.optionalString generateXCArchive '' + mkdir -p $out + mv "${name}.xcarchive" $out + ''} # Delete our temp keychain ${deleteKeychain} From fda705527ddf608b4d84d3197615ad9081ba357d Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 22 Mar 2018 16:16:27 +0100 Subject: [PATCH 43/57] nixbot: remove obsoleted mostly by ofborg --- nixos/modules/module-list.nix | 1 - nixos/modules/services/web-apps/nixbot.nix | 149 --------------------- pkgs/tools/misc/nixbot/default.nix | 25 ---- pkgs/top-level/all-packages.nix | 2 - 4 files changed, 177 deletions(-) delete mode 100644 nixos/modules/services/web-apps/nixbot.nix delete mode 100644 pkgs/tools/misc/nixbot/default.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 0e5409bc9de..c7c99d0cd83 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -631,7 +631,6 @@ ./services/web-apps/atlassian/jira.nix ./services/web-apps/frab.nix ./services/web-apps/mattermost.nix - ./services/web-apps/nixbot.nix ./services/web-apps/nexus.nix ./services/web-apps/pgpkeyserver-lite.nix ./services/web-apps/matomo.nix diff --git a/nixos/modules/services/web-apps/nixbot.nix b/nixos/modules/services/web-apps/nixbot.nix deleted file mode 100644 index 0592d01bf36..00000000000 --- a/nixos/modules/services/web-apps/nixbot.nix +++ /dev/null @@ -1,149 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let - cfg = config.services.nixbot; - pyramidIni = '' - ### - # app configuration - # http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/environment.html - ### - - [app:main] - use = egg:nixbot - - nixbot.github_token = ${cfg.githubToken} - nixbot.bot_name = ${cfg.botName} - nixbot.repo = ${cfg.repo} - nixbot.pr_repo = ${cfg.prRepo} - nixbot.hydra_jobsets_repo = ${cfg.hydraJobsetsRepo} - nixbot.github_secret = justnotsorandom - nixbot.public_url = ${cfg.publicUrl} - nixbot.repo_dir = ${cfg.repoDir} - - pyramid.reload_templates = false - pyramid.debug_authorization = false - pyramid.debug_notfound = false - pyramid.debug_routematch = false - pyramid.default_locale_name = en - - # By default, the toolbar only appears for clients from IP addresses - # '127.0.0.1' and '::1'. - # debugtoolbar.hosts = 127.0.0.1 ::1 - - ### - # wsgi server configuration - ### - - [server:main] - use = egg:waitress#main - host = 0.0.0.0 - port = 6543 - - ### - # logging configuration - # http://docs.pylonsproject.org/projects/pyramid/en/1.7-branch/narr/logging.html - ### - - [loggers] - keys = root, nixbot - - [handlers] - keys = console - - [formatters] - keys = generic - - [logger_root] - level = INFO - handlers = console - - [logger_nixbot] - level = INFO - handlers = - qualname = nixbot - - [handler_console] - class = StreamHandler - args = (sys.stderr,) - level = NOTSET - formatter = generic - - [formatter_generic] - format = %(asctime)s %(levelname)-5.5s [%(name)s:%(lineno)s][%(threadName)s] %(message)s - ''; -in { - options = { - services.nixbot = { - enable = mkEnableOption "nixbot"; - - botName = mkOption { - type = types.str; - description = "The bot's github user account name."; - default = "nixbot"; - }; - - githubToken = mkOption { - type = types.str; - description = "The bot's github user account token."; - example = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; - }; - - repo = mkOption { - type = types.str; - description = "The github repository to check for PRs."; - example = "nixos/nixpkgs"; - }; - - prRepo = mkOption { - type = types.str; - description = "The github repository to push the testing branches to."; - example = "nixos/nixpkgs-pr"; - }; - - hydraJobsetsRepo = mkOption { - type = types.str; - description = "The github repository to push the hydra jobset definitions to."; - example = "nixos/hydra-jobsets"; - }; - - publicUrl = mkOption { - type = types.str; - description = "The public URL the bot is reachable at (Github hook endpoint)."; - example = "https://nixbot.nixos.org"; - }; - - repoDir = mkOption { - type = types.path; - description = "The directory the repositories are stored in."; - default = "/var/lib/nixbot"; - }; - }; - }; - - config = mkIf cfg.enable { - users.extraUsers.nixbot = { - createHome = true; - home = cfg.repoDir; - }; - - systemd.services.nixbot = let - env = pkgs.python3.buildEnv.override { - extraLibs = [ pkgs.nixbot ]; - }; - in { - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; - script = '' - ${env}/bin/pserve ${pkgs.writeText "production.ini" pyramidIni} - ''; - - serviceConfig = { - User = "nixbot"; - Group = "nogroup"; - PermissionsStartOnly = true; - }; - }; - }; -} diff --git a/pkgs/tools/misc/nixbot/default.nix b/pkgs/tools/misc/nixbot/default.nix deleted file mode 100644 index 554aa0bccee..00000000000 --- a/pkgs/tools/misc/nixbot/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ stdenv, python3Packages, fetchFromGitHub }: - -python3Packages.buildPythonApplication rec { - name = "nixbot-unstable-2016-10-09"; - - src = fetchFromGitHub { - owner = "domenkozar"; - repo = "nixbot"; - rev = "dc490e4954cb08f0eff97f74ad39dedb54670aa9"; - sha256 = "1l8rlhd2b7x5m79vb2vgszachygasv0pk8drnwgxyvsn0k88xcan"; - }; - - propagatedBuildInputs = with python3Packages; [ - pygit2 pyramid waitress github3_py - ]; - - doCheck = false; - - meta = with stdenv.lib; { - description = "Github bot for reviewing/testing pull requests with the help of Hydra"; - maintainers = with maintainers; [ domenkozar fpletz globin ]; - license = licenses.asl20; - homepage = https://github.com/domenkozar/nixbot; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1936a57dded..7670add775f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3904,8 +3904,6 @@ with pkgs; nitrogen = callPackage ../tools/X11/nitrogen {}; - nixbot = callPackage ../tools/misc/nixbot {}; - notify-desktop = callPackage ../tools/misc/notify-desktop {}; nkf = callPackage ../tools/text/nkf {}; From 214630f43c8fe155466d37d25540b58b6c5d2710 Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Thu, 22 Mar 2018 08:31:23 -0700 Subject: [PATCH 44/57] fflas-ffpack: 2.2.2 -> 2.3.2 Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done: - built on NixOS - ran `/nix/store/10g4cklvbc5d7hkymlzbgnn7yw7mgdkp-fflas-ffpack-2.3.2/bin/fflas-ffpack-config -h` got 0 exit code - ran `/nix/store/10g4cklvbc5d7hkymlzbgnn7yw7mgdkp-fflas-ffpack-2.3.2/bin/fflas-ffpack-config --help` got 0 exit code - ran `/nix/store/10g4cklvbc5d7hkymlzbgnn7yw7mgdkp-fflas-ffpack-2.3.2/bin/fflas-ffpack-config help` got 0 exit code - ran `/nix/store/10g4cklvbc5d7hkymlzbgnn7yw7mgdkp-fflas-ffpack-2.3.2/bin/fflas-ffpack-config -V` and found version 2.3.2 - ran `/nix/store/10g4cklvbc5d7hkymlzbgnn7yw7mgdkp-fflas-ffpack-2.3.2/bin/fflas-ffpack-config -v` and found version 2.3.2 - ran `/nix/store/10g4cklvbc5d7hkymlzbgnn7yw7mgdkp-fflas-ffpack-2.3.2/bin/fflas-ffpack-config --version` and found version 2.3.2 - ran `/nix/store/10g4cklvbc5d7hkymlzbgnn7yw7mgdkp-fflas-ffpack-2.3.2/bin/fflas-ffpack-config version` and found version 2.3.2 - ran `/nix/store/10g4cklvbc5d7hkymlzbgnn7yw7mgdkp-fflas-ffpack-2.3.2/bin/fflas-ffpack-config -h` and found version 2.3.2 - ran `/nix/store/10g4cklvbc5d7hkymlzbgnn7yw7mgdkp-fflas-ffpack-2.3.2/bin/fflas-ffpack-config --help` and found version 2.3.2 - ran `/nix/store/10g4cklvbc5d7hkymlzbgnn7yw7mgdkp-fflas-ffpack-2.3.2/bin/fflas-ffpack-config help` and found version 2.3.2 - found 2.3.2 with grep in /nix/store/10g4cklvbc5d7hkymlzbgnn7yw7mgdkp-fflas-ffpack-2.3.2 - directory tree listing: https://gist.github.com/e66f5e5926034e2f224c064aba1c3613 --- pkgs/development/libraries/fflas-ffpack/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/fflas-ffpack/default.nix b/pkgs/development/libraries/fflas-ffpack/default.nix index 0e4e897e27a..edea352ae2d 100644 --- a/pkgs/development/libraries/fflas-ffpack/default.nix +++ b/pkgs/development/libraries/fflas-ffpack/default.nix @@ -2,12 +2,12 @@ stdenv.mkDerivation rec { name = "${pname}-${version}"; pname = "fflas-ffpack"; - version = "2.2.2"; + version = "2.3.2"; src = fetchFromGitHub { owner = "linbox-team"; repo = "${pname}"; rev = "v${version}"; - sha256 = "0k1f4pb7azrm6ajncvg7vni7ixfmn6fssd5ld4xddbi6jqbsf9rd"; + sha256 = "1cqhassj2dny3gx0iywvmnpq8ca0d6m82xl5rz4mb8gaxr2kwddl"; }; nativeBuildInputs = [ autoreconfHook pkgconfig ]; buildInputs = [ givaro (liblapack.override {shared = true;}) openblas]; From 7ec4573f4c9e4ad5e05319b13adef1a804d52db0 Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Thu, 22 Mar 2018 08:11:32 -0700 Subject: [PATCH 45/57] dlib: 19.9 -> 19.10 Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done: - built on NixOS - Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.) - found 19.10 with grep in /nix/store/3h9m66pcyc428v616z3ls200aidd12wz-dlib-19.10 - directory tree listing: https://gist.github.com/7c3e568146e46ccdaed28be2916bd0a9 --- pkgs/development/libraries/dlib/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/dlib/default.nix b/pkgs/development/libraries/dlib/default.nix index 53ec9949f17..d3e2f6c9c98 100644 --- a/pkgs/development/libraries/dlib/default.nix +++ b/pkgs/development/libraries/dlib/default.nix @@ -3,14 +3,14 @@ }: stdenv.mkDerivation rec { - version = "19.9"; + version = "19.10"; name = "dlib-${version}"; src = fetchFromGitHub { owner = "davisking"; repo = "dlib"; rev ="v${version}"; - sha256 = "0lc54r928j9dg7f2wn25m887z24d31wrc14v2hn6aknp1z084lrc"; + sha256 = "0sgxblf4n33b8wgblyblmrkwydvy1yh7fzll1b6c4zgkz675w0m5"; }; postPatch = '' From 27fcb342c44099d846a9e13d4435725ed0c66f91 Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Sat, 17 Mar 2018 22:25:05 -0700 Subject: [PATCH 46/57] fwup: 0.18.1 -> 1.0.0 Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done: - built on NixOS - ran `/nix/store/1w5mk97wzbp6xdwj0phwmdr0z7rfc1nf-fwup-1.0.0/bin/fwup -h` got 0 exit code - ran `/nix/store/1w5mk97wzbp6xdwj0phwmdr0z7rfc1nf-fwup-1.0.0/bin/fwup --help` got 0 exit code - ran `/nix/store/1w5mk97wzbp6xdwj0phwmdr0z7rfc1nf-fwup-1.0.0/bin/fwup --version` and found version 1.0.0 - found 1.0.0 with grep in /nix/store/1w5mk97wzbp6xdwj0phwmdr0z7rfc1nf-fwup-1.0.0 - directory tree listing: https://gist.github.com/9b3eafd6e201b20c76f1f8f4d8ed13f8 --- pkgs/tools/misc/fwup/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/tools/misc/fwup/default.nix b/pkgs/tools/misc/fwup/default.nix index 592707be20a..e7e40bc851e 100644 --- a/pkgs/tools/misc/fwup/default.nix +++ b/pkgs/tools/misc/fwup/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { name = "fwup-${version}"; - version = "0.18.1"; + version = "1.0.0"; src = fetchFromGitHub { owner = "fhunleth"; repo = "fwup"; rev = "v${version}"; - sha256 = "0qdld8jy1rkpfzbfhnssr58q1gciln3pw9m6fj0jarfgja4gj31l"; + sha256 = "1v79q5s4lm8scrz9nmqcszyh40is6k7hkr15r4aljyfbp1gamsfs"; }; doCheck = true; From a7046d5ecf08da2588ae3228173a8281b10b3099 Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Sat, 17 Mar 2018 01:09:23 -0700 Subject: [PATCH 47/57] nextcloud-news-updater: 10.0.0 -> 10.0.1 Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done: - built on NixOS - ran `/nix/store/58kz8y29n2habv056d7iz20484rq87mr-nextcloud-news-updater-10.0.1/bin/.nextcloud-news-updater-wrapped -h` got 0 exit code - ran `/nix/store/58kz8y29n2habv056d7iz20484rq87mr-nextcloud-news-updater-10.0.1/bin/.nextcloud-news-updater-wrapped --help` got 0 exit code - ran `/nix/store/58kz8y29n2habv056d7iz20484rq87mr-nextcloud-news-updater-10.0.1/bin/.nextcloud-news-updater-wrapped -v` and found version 10.0.1 - ran `/nix/store/58kz8y29n2habv056d7iz20484rq87mr-nextcloud-news-updater-10.0.1/bin/.nextcloud-news-updater-wrapped --version` and found version 10.0.1 - ran `/nix/store/58kz8y29n2habv056d7iz20484rq87mr-nextcloud-news-updater-10.0.1/bin/nextcloud-news-updater -h` got 0 exit code - ran `/nix/store/58kz8y29n2habv056d7iz20484rq87mr-nextcloud-news-updater-10.0.1/bin/nextcloud-news-updater --help` got 0 exit code - ran `/nix/store/58kz8y29n2habv056d7iz20484rq87mr-nextcloud-news-updater-10.0.1/bin/nextcloud-news-updater -v` and found version 10.0.1 - ran `/nix/store/58kz8y29n2habv056d7iz20484rq87mr-nextcloud-news-updater-10.0.1/bin/nextcloud-news-updater --version` and found version 10.0.1 - found 10.0.1 with grep in /nix/store/58kz8y29n2habv056d7iz20484rq87mr-nextcloud-news-updater-10.0.1 - directory tree listing: https://gist.github.com/ef3eb260a3fd46598a3b70c142c2ef2c --- pkgs/servers/nextcloud/news-updater.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/servers/nextcloud/news-updater.nix b/pkgs/servers/nextcloud/news-updater.nix index a78b3d59095..0fcb5047549 100644 --- a/pkgs/servers/nextcloud/news-updater.nix +++ b/pkgs/servers/nextcloud/news-updater.nix @@ -2,11 +2,11 @@ python3Packages.buildPythonApplication rec { name = "nextcloud-news-updater-${version}"; - version = "10.0.0"; + version = "10.0.1"; src = fetchurl { url = "mirror://pypi/n/nextcloud_news_updater/nextcloud_news_updater-${version}.tar.gz"; - sha256 = "00pscz0p4s10y1ymb6sm0gx4a5wdbhimn30582x8i28n58nnl8j0"; + sha256 = "14jj3w417wfsm1ki34d980b0s6vfn8i29g4c66qb2fizdq1d0z6q"; }; doCheck = false; From 61381699334cea9a74060b09a2828e05a967fc1e Mon Sep 17 00:00:00 2001 From: Matthew Justin Bauer Date: Thu, 22 Mar 2018 10:57:38 -0500 Subject: [PATCH 48/57] .gitattributes: merge=union for all-packages.nix also module-list.nix --- .gitattributes | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitattributes b/.gitattributes index a636295ebd6..14bee08e381 100644 --- a/.gitattributes +++ b/.gitattributes @@ -11,3 +11,6 @@ doc/default.nix linguist-documentation=false nixos/doc/** linguist-documentation nixos/doc/default.nix linguist-documentation=false + +nixos/modules/module-list.nix merge=union +pkgs/top-level/all-packages.nix merge=union From a75fcce8e8356f4580716ff396f7c434ae710de7 Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Sat, 17 Mar 2018 09:16:31 -0700 Subject: [PATCH 49/57] adapta-gtk-theme: 3.93.0.1 -> 3.93.0.174 Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done: - built on NixOS - Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.) - directory tree listing: https://gist.github.com/06cdb7bbde8b5a7b86126b7c6f169357 --- pkgs/misc/themes/adapta/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/misc/themes/adapta/default.nix b/pkgs/misc/themes/adapta/default.nix index 7eee7ca3121..c38d9b03a6e 100644 --- a/pkgs/misc/themes/adapta/default.nix +++ b/pkgs/misc/themes/adapta/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { name = "adapta-gtk-theme-${version}"; - version = "3.93.0.1"; + version = "3.93.0.174"; src = fetchFromGitHub { owner = "adapta-project"; repo = "adapta-gtk-theme"; rev = version; - sha256 = "0l662l66ja8dsakcgwg6ab69lkl0va0r5h74dr6yjdsy0q4h2m7h"; + sha256 = "0fkvcpx2vhyr3z74r5mcpjh293w3cfm07axj8dj84nl2hi6im8b6"; }; preferLocalBuild = true; From 4270c5c7be22576b37b6a6411e0f294ebfdbcb82 Mon Sep 17 00:00:00 2001 From: Gabriel Ebner Date: Thu, 22 Mar 2018 16:58:56 +0100 Subject: [PATCH 50/57] perlPackages.YAMLLibYAML: 0.59 -> 0.69, fix build --- pkgs/top-level/perl-packages.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index 85a3d4b8b1a..13554ff6ee6 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -16529,11 +16529,14 @@ let self = _self // overrides; _self = with self; { }; YAMLLibYAML = buildPerlPackage rec { - name = "YAML-LibYAML-0.59"; + name = "YAML-LibYAML-0.69"; src = fetchurl { - url = "mirror://cpan/authors/id/I/IN/INGY/${name}.tar.gz"; - sha256 = "0m4zr6gm5rzwvxwd2x7rklr659jl8gsa5bxc5h25904nbvpj9x4x"; + url = "mirror://cpan/authors/id/T/TI/TINITA/${name}.tar.gz"; + sha256 = "06msvj3vmjszl5zj1k7g47ll0kkds9gdb5sky0q27lh4zw1vlj33"; }; + preBuild = '' + sed -i 's/FULLPERL *= "/FULLPERL = /' LibYAML/Makefile + ''; }; WebServiceLinode = buildPerlModule rec { From 0a86a06b7eca63a60100ba75abdb46a22d6803cf Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Sat, 17 Mar 2018 11:31:08 -0700 Subject: [PATCH 51/57] asio: 1.10.8 -> 1.12.0 Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done: - built on NixOS - Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.) - found 1.12.0 with grep in /nix/store/1js10q8jgqmpk6ashz63am7f9xl37kvs-asio-1.12.0 - directory tree listing: https://gist.github.com/834ad2743ce2f56612f8ba9ff9a4e5b5 --- pkgs/development/libraries/asio/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/asio/default.nix b/pkgs/development/libraries/asio/default.nix index dae8657388f..ad601359019 100644 --- a/pkgs/development/libraries/asio/default.nix +++ b/pkgs/development/libraries/asio/default.nix @@ -1,11 +1,11 @@ {stdenv, fetchurl, boost, openssl}: stdenv.mkDerivation rec { - name = "asio-1.10.8"; + name = "asio-1.12.0"; src = fetchurl { url = "mirror://sourceforge/asio/${name}.tar.bz2"; - sha256 = "0jgdl4fxw0hwy768rl3lhdc0czz7ak7czf3dg10j21pdpfpfvpi6"; + sha256 = "1bfk746kcs3cmvfvxjp3w9y6zpybjj8s002jjd3snrp2syd0nd9c"; }; propagatedBuildInputs = [ boost ]; From abb357c23e1cf7cc9733600f2b5c22e6392a6478 Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Tue, 20 Mar 2018 00:21:45 -0700 Subject: [PATCH 52/57] digikam: 5.8.0 -> 5.9.0 Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done: - built on NixOS - Warning: no binary found that responded to help or version flags. (This warning appears even if the package isn't expected to have binaries.) - found 5.9.0 with grep in /nix/store/a0lvk4dyi87si7gdyblvh3zs16s0kp76-digikam-5.9.0 - found 5.9.0 in filename of file in /nix/store/a0lvk4dyi87si7gdyblvh3zs16s0kp76-digikam-5.9.0 - directory tree listing: https://gist.github.com/5e9b0273318688eb36b670f51aa482ec --- pkgs/applications/graphics/digikam/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/graphics/digikam/default.nix b/pkgs/applications/graphics/digikam/default.nix index 9dd0722541f..633a1d9bd6e 100644 --- a/pkgs/applications/graphics/digikam/default.nix +++ b/pkgs/applications/graphics/digikam/default.nix @@ -50,13 +50,13 @@ mkDerivation rec { name = "digikam-${version}"; - version = "5.8.0"; + version = "5.9.0"; src = fetchFromGitHub { owner = "KDE"; repo = "digikam"; rev = "v${version}"; - sha256 = "1bvidg0fn92xvw5brhb34lm7m4iy4jb5xpvnhbgh8vik2m4n41w1"; + sha256 = "09diw273h9i7rss89ba82yrfy6jb2njv3k0dknrrg7bb998vrw2d"; }; nativeBuildInputs = [ cmake doxygen extra-cmake-modules kdoctools wrapGAppsHook ]; From 2fdec94fbfddceceb9d3e95a39ff1ae9dbc5e937 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Thu, 22 Mar 2018 17:11:12 +0100 Subject: [PATCH 53/57] tdesktop: 1.2.6 -> 1.2.14 tdesktopPackages.preview: 1.2.12 -> 1.2.14 --- .../telegram/tdesktop/default.nix | 25 ++++++++----------- .../telegram/tdesktop/generic.nix | 5 ++-- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix index adf718a70ea..afba9ab022a 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix @@ -1,21 +1,18 @@ { qt5, stdenv }: -let mkTelegram = args: qt5.callPackage (import ./generic.nix args) { }; -in { - stable = mkTelegram { +let + mkTelegram = args: qt5.callPackage (import ./generic.nix args) { }; + stableVersion = { stable = true; - version = "1.2.6"; - sha256Hash = "15g0m2wwqfp13wd7j31p8cx1kpylx5m8ljaksnsqdkgyr9l1ar8w"; + version = "1.2.14"; + sha256Hash = "1412bls4qmfsa4nlqrxrc1j1jslhj6rhg8k69blhks9grrz36s1l"; # svn log svn://svn.archlinux.org/community/telegram-desktop/trunk - archPatchesRevision = "283641"; - archPatchesHash = "0v4213vrabfa2dmwnqgb8n6hl54938mw9glaim3amyslxphmdrfb"; + archPatchesRevision = "310557"; + archPatchesHash = "1v134dal3xiapgh3akfr61vh62j24m9vkb62kckwvap44iqb0hlk"; }; - preview = mkTelegram { +in { + stable = mkTelegram stableVersion; + preview = mkTelegram (stableVersion // { stable = false; - version = "1.2.12"; - sha256Hash = "1b9qc4a14jqjl30z4bjh1zbqsmgl25kdp0hj8p7xbj34zlkzfw5m"; - # svn ls -v --depth empty svn://svn.archlinux.org/community/telegram-desktop/trunk - archPatchesRevision = "308775"; - archPatchesHash = "0ggx64kdadrbd4bw5z0wi0fdg6hni7n9nxz9dp56p8hlw1wgpsls"; - }; + }); } diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix index 89bc3da56b8..a49ef87f540 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/generic.nix @@ -123,10 +123,11 @@ mkDerivation rec { ''; meta = { - description = "Telegram Desktop messaging app"; + description = "Telegram Desktop messaging app " + + (if stable then "(stable version)" else "(pre-release)"); license = licenses.gpl3; platforms = [ "x86_64-linux" "i686-linux" ]; homepage = https://desktop.telegram.org/; - maintainers = with maintainers; [ abbradar garbas primeos ]; + maintainers = with maintainers; [ primeos abbradar garbas ]; }; } From 678211bb37821597a8c4426664cbe3bc821ac70e Mon Sep 17 00:00:00 2001 From: Robin Gloster Date: Thu, 22 Mar 2018 17:14:34 +0100 Subject: [PATCH 54/57] openpts: remove Broken, dead prject that only was a PoC implementation. --- pkgs/servers/openpts/bugs.patch | 12 ------- pkgs/servers/openpts/default.nix | 54 -------------------------------- pkgs/servers/openpts/ptsc.patch | 28 ----------------- pkgs/servers/openpts/tboot.patch | 21 ------------- pkgs/servers/openpts/zlib.patch | 12 ------- pkgs/top-level/all-packages.nix | 1 - 6 files changed, 128 deletions(-) delete mode 100644 pkgs/servers/openpts/bugs.patch delete mode 100644 pkgs/servers/openpts/default.nix delete mode 100644 pkgs/servers/openpts/ptsc.patch delete mode 100644 pkgs/servers/openpts/tboot.patch delete mode 100644 pkgs/servers/openpts/zlib.patch diff --git a/pkgs/servers/openpts/bugs.patch b/pkgs/servers/openpts/bugs.patch deleted file mode 100644 index d818bafbc9f..00000000000 --- a/pkgs/servers/openpts/bugs.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urNp openpts-0.2.6-cvs-patched/src/fsm.c openpts-0.2.6-current/src/fsm.c ---- openpts-0.2.6-cvs-patched/src/fsm.c 2012-01-05 03:49:15.000000000 -0500 -+++ openpts-0.2.6-current/src/fsm.c 2012-01-09 12:11:17.338706205 -0500 -@@ -934,7 +934,7 @@ char *getEventString(OPENPTS_PCR_EVENT_W - /* event */ - event = eventWrapper->event; - if (event != NULL) { -- // len = snprintf(buf, size, "PCR[%d],TYPE=%d", (int)event->ulPcrIndex, event->eventType); -+ snprintf(buf, size, "PCR[%d],TYPE=%d", (int)event->ulPcrIndex, event->eventType); - } else { - LOG(LOG_ERR, "NULL event\n"); // TODO(munetoh) - xfree(buf); diff --git a/pkgs/servers/openpts/default.nix b/pkgs/servers/openpts/default.nix deleted file mode 100644 index 27731af3803..00000000000 --- a/pkgs/servers/openpts/default.nix +++ /dev/null @@ -1,54 +0,0 @@ -{ stdenv, fetchurl, autoconf, automake, pkgconfig, libtool, trousers, openssl, libxml2, libuuid, gettext, perl }: - -stdenv.mkDerivation rec { - name = "openpts-${version}"; - version = "0.2.6"; - - src = fetchurl { - url = "http://jaist.dl.osdn.jp/openpts/54410/openpts-${version}.tar.gz"; - sha256 = "1b5phshl49fxr5y3g5zz75gm0n4cw8i7n29x5f1a95xkwrjpazi0"; - }; - - # patches from https://apps.fedoraproject.org/packages/openpts/sources/patches/ - patches = [ ./bugs.patch ./zlib.patch ./tboot.patch ./ptsc.patch ]; - - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ autoconf automake libtool trousers openssl libxml2 libuuid gettext ]; - - preConfigure = '' - substituteInPlace include/Makefile.am --replace "./cvs2msg.pl" "${perl}/bin/perl cvs2msg.pl"; - $SHELL bootstrap.sh - ''; - - configureFlags = [ "--with-tss" "--with-aru" "--with-tboot" "--enable-tnc" "--with-aide" ]; - - NIX_CFLAGS_COMPILE = "-I${trousers}/include/trousers -I${trousers}/include/tss -Wno-deprecated-declarations"; - - preInstall = '' - mkdir -p $out - mkdir -p $out/etc - cp -p dist/ptsc.conf.in $out/etc/ptsc.conf - cp -p dist/ptsv.conf.in $out/etc/ptsv.conf - mkdir -p $out/share/openpts/models - cp -p models/*.uml $out/share/openpts/models/ - - mkdir -p $out/share/openpts/tpm_emulator - cp dist/tpm_emulator/README.rhel $out/share/openpts/tpm_emulator/README - cp dist/tpm_emulator/binary_bios_measurements $out/share/openpts/tpm_emulator/ - cp dist/tpm_emulator/tcsd $out/share/openpts/tpm_emulator/ - - mkdir -p $out/share/openpts/tboot - cp dist/tboot/README.fedora15 $out/share/openpts/tboot/README - cp dist/tboot/ptsc.conf.fedora15 $out/share/openpts/tboot/ptsc.conf - cp dist/tboot/tcsd.conf.fedora15 $out/share/openpts/tboot/tcsd.conf - cp dist/tboot/tcsd.fedora15 $out/share/openpts/tboot/tcsd - ''; - - meta = { - description = "TCG Platform Trust Service (PTS)"; - homepage = http://sourceforge.jp/projects/openpts; - license = stdenv.lib.licenses.cpl10; - platforms = stdenv.lib.platforms.linux; - maintainers = with stdenv.lib.maintainers; [ tstrobel ]; - }; -} diff --git a/pkgs/servers/openpts/ptsc.patch b/pkgs/servers/openpts/ptsc.patch deleted file mode 100644 index b6fcde74074..00000000000 --- a/pkgs/servers/openpts/ptsc.patch +++ /dev/null @@ -1,28 +0,0 @@ -diff -urNp openpts-0.2.6-patched/src/ptsc.c openpts-0.2.6-current/src/ptsc.c ---- openpts-0.2.6-patched/src/ptsc.c 2012-08-21 15:57:07.733841433 -0400 -+++ openpts-0.2.6-current/src/ptsc.c 2012-08-21 16:13:26.479732504 -0400 -@@ -457,7 +457,10 @@ void ptsc_lock(void) { - exit(1); - } - oldgrp = getegid(); -- setegid(grp.gr_gid); -+ if(setegid(grp.gr_gid) != 0){ -+ LOG(LOG_ERR, "setegid fail"); -+ exit(1); -+ } - } - - oldmask = umask(0); -@@ -467,7 +470,10 @@ void ptsc_lock(void) { - } - if (grpent) { - chmod(LOCK_DIR, 02775); -- setegid(oldgrp); -+ if(setegid(oldgrp) != 0){ -+ LOG(LOG_ERR, "setegid fail"); -+ exit(1); -+ } - } - fd = open(LOCK_FILE, O_RDWR | O_CREAT | O_TRUNC, 0660); - if (fd < 0) { - diff --git a/pkgs/servers/openpts/tboot.patch b/pkgs/servers/openpts/tboot.patch deleted file mode 100644 index 6ecee583920..00000000000 --- a/pkgs/servers/openpts/tboot.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -urNp openpts-0.2.6-patched/src/tboot2iml.c openpts-0.2.6-current/src/tboot2iml.c ---- openpts-0.2.6-patched/src/tboot2iml.c 2012-07-23 16:30:12.381361421 -0400 -+++ openpts-0.2.6-current/src/tboot2iml.c 2012-07-23 17:25:59.053945778 -0400 -@@ -531,7 +531,7 @@ int sinit_acm_hash(char *filename, int s - - - int sha1sum_unzip(char *filename, int *filesize, BYTE *digest) { -- FILE *fp; -+ gzFile fp; - char buf[2048]; - SHA_CTX sha_ctx; - int len; -@@ -541,7 +541,7 @@ int sha1sum_unzip(char *filename, int *f - - /* open */ - fp = gzopen(filename, "rb"); -- if (fp == NULL) { -+ if (fp == Z_NULL) { - LOG(LOG_ERR, "File %s does not exist\n", filename); - return 0; - } diff --git a/pkgs/servers/openpts/zlib.patch b/pkgs/servers/openpts/zlib.patch deleted file mode 100644 index 7fa3fce10fe..00000000000 --- a/pkgs/servers/openpts/zlib.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urNp openpts-0.2.6-cvs-patched/src/Makefile.am openpts-0.2.6-current/src/Makefile.am ---- openpts-0.2.6-cvs-patched/src/Makefile.am 2012-01-05 03:49:15.000000000 -0500 -+++ openpts-0.2.6-current/src/Makefile.am 2012-01-09 14:12:02.507361732 -0500 -@@ -30,7 +30,7 @@ localedir = $(datadir)/locale - - - AM_CPPFLAGS = -I$(top_srcdir)/include $(LIBXML2_CFLAGS) $(TSS_CFLAGS) -I../include -DLOCALEDIR=\"$(localedir)\" --AM_LDFLAGS = $(LIBXML2_LIBS) $(LIBCRYPTO_LIBS) $(TSS_LIBS) -lopenpts -+AM_LDFLAGS = $(LIBXML2_LIBS) $(LIBCRYPTO_LIBS) $(TSS_LIBS) -lz -lopenpts - # $(LIBINTL) -lopenpts - - if HAVE_LIBUUID diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1542203c23d..c4d153bd8b9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12438,7 +12438,6 @@ with pkgs; oauth2_proxy = callPackage ../servers/oauth2_proxy { }; openafs = callPackage ../servers/openafs { tsmbac = null; ncurses = null; }; - openpts = callPackage ../servers/openpts { }; openresty = callPackage ../servers/http/openresty { }; From 6ff61bb5f93277a4f3878497e63947c14c1187d5 Mon Sep 17 00:00:00 2001 From: Matthew Justin Bauer Date: Thu, 22 Mar 2018 11:32:47 -0500 Subject: [PATCH 55/57] Revert "melpaStablePackages.caml: don't run configure" --- .../editors/emacs-modes/melpa-stable-packages.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/applications/editors/emacs-modes/melpa-stable-packages.nix b/pkgs/applications/editors/emacs-modes/melpa-stable-packages.nix index 7104feaf25e..a2ba794933e 100644 --- a/pkgs/applications/editors/emacs-modes/melpa-stable-packages.nix +++ b/pkgs/applications/editors/emacs-modes/melpa-stable-packages.nix @@ -48,11 +48,6 @@ self: # upstream issue: missing file header bufshow = markBroken super.bufshow; - # upstream issue: comes with a broken configure file - caml = super.caml.overrideAttrs (oldAttrs: rec { - configureScript = "true"; - }); - # part of a larger package caml = dontConfigure super.caml; From 2119041dbf4323ff3e92e605b70b75fc2c252741 Mon Sep 17 00:00:00 2001 From: Michael Alan Dorman Date: Wed, 21 Mar 2018 14:20:04 -0400 Subject: [PATCH 56/57] guile-1.8: Fix and clean up `libtool` propagation fixes Fixes #37548 --- pkgs/development/interpreters/guile/1.8.nix | 36 +++++++++++++++------ 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/pkgs/development/interpreters/guile/1.8.nix b/pkgs/development/interpreters/guile/1.8.nix index 6a2fdbdea43..cf42c9a7b68 100644 --- a/pkgs/development/interpreters/guile/1.8.nix +++ b/pkgs/development/interpreters/guile/1.8.nix @@ -24,19 +24,19 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper gawk pkgconfig ]; buildInputs = [ readline libtool ]; - propagatedBuildInputs = [ gmp ]; + propagatedBuildInputs = [ + gmp + + # XXX: These ones aren't normally needed here, but `libguile*.la' has '-l' + # flags for them without corresponding '-L' flags. Adding them here will add + # the needed `-L' flags. As for why the `.la' file lacks the `-L' flags, + # see below. + libtool + ]; + patches = [ ./cpp-4.5.patch ]; - - postInstall = '' - wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin" - ''; - - preBuild = '' - sed -e '/lt_dlinit/a lt_dladdsearchdir("'$out/lib'");' -i libguile/dynl.c - ''; - # Guile needs patching to preset results for the configure tests # about pthreads, which work only in native builds. preConfigure = '' @@ -45,6 +45,22 @@ stdenv.mkDerivation rec { fi ''; + preBuild = '' + sed -e '/lt_dlinit/a lt_dladdsearchdir("'$out/lib'");' -i libguile/dynl.c + ''; + + + postInstall = '' + wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin" + '' + # XXX: See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/18903 for + # why `--with-libunistring-prefix' and similar options coming from + # `AC_LIB_LINKFLAGS_BODY' don't work on NixOS/x86_64. + + '' + sed -i "$out/lib/pkgconfig/guile"-*.pc \ + -e "s|-lltdl|-L${libtool.lib}/lib -lltdl|g" + ''; + # One test fails. # ERROR: file: "libtest-asmobs", message: "file not found" # This is fixed here: From 4a18b4222a1772018c8e85f64f496e391bcd5a53 Mon Sep 17 00:00:00 2001 From: Ryan Mulligan Date: Tue, 20 Mar 2018 05:16:32 -0700 Subject: [PATCH 57/57] hdparm: 9.54 -> 9.55 Semi-automatic update generated by https://github.com/ryantm/nix-update tools. These checks were done: - built on NixOS - ran `/nix/store/9abla9hl91wvxvcbrif9xjhsb164lgxc-hdparm-9.55/bin/hdparm -h` got 0 exit code - ran `/nix/store/9abla9hl91wvxvcbrif9xjhsb164lgxc-hdparm-9.55/bin/hdparm -V` and found version 9.55 - ran `/nix/store/9abla9hl91wvxvcbrif9xjhsb164lgxc-hdparm-9.55/bin/hdparm -h` and found version 9.55 - found 9.55 with grep in /nix/store/9abla9hl91wvxvcbrif9xjhsb164lgxc-hdparm-9.55 - directory tree listing: https://gist.github.com/ded98c9055722d9f66f8346ae792663c --- pkgs/os-specific/linux/hdparm/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/hdparm/default.nix b/pkgs/os-specific/linux/hdparm/default.nix index 87cb17329e8..2c5fd70ac95 100644 --- a/pkgs/os-specific/linux/hdparm/default.nix +++ b/pkgs/os-specific/linux/hdparm/default.nix @@ -1,11 +1,11 @@ { stdenv, fetchurl }: stdenv.mkDerivation rec { - name = "hdparm-9.54"; + name = "hdparm-9.55"; src = fetchurl { url = "mirror://sourceforge/hdparm/${name}.tar.gz"; - sha256 = "0ghnhdj7wfw6acfyhdawpfa5n9kvkvzgi1fw6i7sghgbjx5nhyjd"; + sha256 = "1ivdvrzimaayiq03by8mcq0mhmdljndj06h012zkdpw34irnpixm"; };