From a6a6de159f01bbfd7c53124c772a22b6066dd12c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 2 Aug 2021 16:13:30 +0200 Subject: [PATCH 1/3] rabbitmq-server: format --- pkgs/servers/amqp/rabbitmq-server/default.nix | 55 +++++++++++++------ 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/pkgs/servers/amqp/rabbitmq-server/default.nix b/pkgs/servers/amqp/rabbitmq-server/default.nix index 3f2e595b31fb..bfee20310705 100644 --- a/pkgs/servers/amqp/rabbitmq-server/default.nix +++ b/pkgs/servers/amqp/rabbitmq-server/default.nix @@ -1,13 +1,32 @@ -{ lib, stdenv, fetchurl, erlang, elixir, python, libxml2, libxslt, xmlto -, docbook_xml_dtd_45, docbook_xsl, zip, unzip, rsync, getconf, socat -, procps, coreutils, gnused, systemd, glibcLocales -, AppKit, Carbon, Cocoa +{ lib +, stdenv +, fetchurl +, erlang +, elixir +, python +, libxml2 +, libxslt +, xmlto +, docbook_xml_dtd_45 +, docbook_xsl +, zip +, unzip +, rsync +, getconf +, socat +, procps +, coreutils +, gnused +, systemd +, glibcLocales +, AppKit +, Carbon +, Cocoa , nixosTests }: stdenv.mkDerivation rec { pname = "rabbitmq-server"; - version = "3.9.1"; # when updating, consider bumping elixir version in all-packages.nix @@ -17,8 +36,7 @@ stdenv.mkDerivation rec { }; nativeBuildInputs = [ unzip xmlto docbook_xml_dtd_45 docbook_xsl zip rsync ]; - buildInputs = - [ erlang elixir python libxml2 libxslt glibcLocales ] + buildInputs = [ erlang elixir python libxml2 libxslt glibcLocales ] ++ lib.optionals stdenv.isDarwin [ AppKit Carbon Cocoa ]; outputs = [ "out" "man" "doc" ]; @@ -33,9 +51,12 @@ stdenv.mkDerivation rec { runtimePath = lib.makeBinPath ([ erlang getconf # for getting memory limits - socat procps - gnused coreutils # used by helper scripts + socat + procps + gnused + coreutils # used by helper scripts ] ++ lib.optionals stdenv.isLinux [ systemd ]); # for systemd unit activation check + postInstall = '' # rabbitmq-env calls to sed/coreutils, so provide everything early sed -i $out/sbin/rabbitmq-env -e '2s|^|PATH=${runtimePath}\''${PATH:+:}\$PATH/\n|' @@ -53,15 +74,15 @@ stdenv.mkDerivation rec { rm $out/INSTALL ''; - meta = { - homepage = "https://www.rabbitmq.com/"; - description = "An implementation of the AMQP messaging protocol"; - license = lib.licenses.mpl20; - platforms = lib.platforms.unix; - maintainers = with lib.maintainers; [ Profpatsch ]; - }; - passthru.tests = { vm-test = nixosTests.rabbitmq; }; + + meta = with lib; { + homepage = "https://www.rabbitmq.com/"; + description = "An implementation of the AMQP messaging protocol"; + license = licenses.mpl20; + platforms = platforms.unix; + maintainers = with maintainers; [ Profpatsch ]; + }; } From 503f72bfa6cb3426a6646e554142a624ff4c26ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 2 Aug 2021 16:24:42 +0200 Subject: [PATCH 2/3] pythonPackages: sphinxcontrib_plantuml -> sphinxcontrib-plantuml --- .../default.nix | 2 +- pkgs/top-level/python-aliases.nix | 1 + pkgs/top-level/python-packages.nix | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) rename pkgs/development/python-modules/{sphinxcontrib_plantuml => sphinxcontrib-plantuml}/default.nix (93%) diff --git a/pkgs/development/python-modules/sphinxcontrib_plantuml/default.nix b/pkgs/development/python-modules/sphinxcontrib-plantuml/default.nix similarity index 93% rename from pkgs/development/python-modules/sphinxcontrib_plantuml/default.nix rename to pkgs/development/python-modules/sphinxcontrib-plantuml/default.nix index 473a625ae63e..490b2d25a229 100644 --- a/pkgs/development/python-modules/sphinxcontrib_plantuml/default.nix +++ b/pkgs/development/python-modules/sphinxcontrib-plantuml/default.nix @@ -22,7 +22,7 @@ buildPythonPackage rec { meta = with lib; { description = "Provides a Sphinx domain for embedding UML diagram with PlantUML"; homepage = "https://github.com/sphinx-contrib/plantuml/"; + maintainers = with maintainers; [ ]; license = with licenses; [ bsd2 ]; }; - } diff --git a/pkgs/top-level/python-aliases.nix b/pkgs/top-level/python-aliases.nix index 828410800701..ba92d25afc7f 100644 --- a/pkgs/top-level/python-aliases.nix +++ b/pkgs/top-level/python-aliases.nix @@ -73,6 +73,7 @@ mapAliases ({ setuptools_scm = setuptools-scm; # added 2021-06-03 smart_open = smart-open; # added 2021-03-14 smmap2 = throw "smmap2 has been deprecated, use smmap instead."; # added 2020-03-14 + sphinxcontrib_plantuml = sphinxcontrib-plantuml; topydo = throw "python3Packages.topydo was moved to topydo"; # 2017-09-22 tvnamer = throw "python3Packages.tvnamer was moved to tvnamer"; # 2021-07-05 websocket_client = websocket-client; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2a0a9fe14601..ff292debd202 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8256,7 +8256,7 @@ in { sphinxcontrib-openapi = callPackage ../development/python-modules/sphinxcontrib-openapi { }; - sphinxcontrib_plantuml = callPackage ../development/python-modules/sphinxcontrib_plantuml { + sphinxcontrib-plantuml = callPackage ../development/python-modules/sphinxcontrib-plantuml { inherit (pkgs) plantuml; }; From 342f2d390b9ba56749d9161376d081e14199e172 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 3 Aug 2021 12:03:29 +0200 Subject: [PATCH 3/3] ikiwiki: format, cleanup --- pkgs/applications/misc/ikiwiki/default.nix | 45 ++++++++-------------- 1 file changed, 17 insertions(+), 28 deletions(-) diff --git a/pkgs/applications/misc/ikiwiki/default.nix b/pkgs/applications/misc/ikiwiki/default.nix index 2a6302f5bcee..135132bd4316 100644 --- a/pkgs/applications/misc/ikiwiki/default.nix +++ b/pkgs/applications/misc/ikiwiki/default.nix @@ -1,39 +1,28 @@ { lib, stdenv, fetchurl, perlPackages, gettext, makeWrapper, ImageMagick, which, highlight -, gitSupport ? false, git ? null -, docutilsSupport ? false, python ? null, docutils ? null -, monotoneSupport ? false, monotone ? null -, bazaarSupport ? false, breezy ? null -, cvsSupport ? false, cvs ? null, cvsps ? null -, subversionSupport ? false, subversion ? null -, mercurialSupport ? false, mercurial ? null +, gitSupport ? false, git +, docutilsSupport ? false, python, docutils +, monotoneSupport ? false, monotone +, bazaarSupport ? false, breezy +, cvsSupport ? false, cvs, cvsps +, subversionSupport ? false, subversion +, mercurialSupport ? false, mercurial , extraUtils ? [] }: -assert docutilsSupport -> (python != null && docutils != null); -assert gitSupport -> (git != null); -assert monotoneSupport -> (monotone != null); -assert bazaarSupport -> (breezy != null); -assert cvsSupport -> (cvs != null && cvsps != null && perlPackages.Filechdir != null); -assert subversionSupport -> (subversion != null); -assert mercurialSupport -> (mercurial != null); - -let - name = "ikiwiki"; +stdenv.mkDerivation rec { + pname = "ikiwiki"; version = "3.20200202.3"; -in -stdenv.mkDerivation { - name = "${name}-${version}"; src = fetchurl { - url = "mirror://debian/pool/main/i/ikiwiki/${name}_${version}.orig.tar.xz"; + url = "mirror://debian/pool/main/i/ikiwiki/ikiwiki_${version}.orig.tar.xz"; sha256 = "0skrc8r4wh4mjfgw1c94awr5sacfb9nfsbm4frikanc9xsy16ksr"; }; buildInputs = [ which highlight ] ++ (with perlPackages; [ perl TextMarkdown URI HTMLParser HTMLScrubber HTMLTemplate - TimeDate gettext makeWrapper DBFile CGISession CGIFormBuilder LocaleGettext - RpcXML XMLSimple ImageMagick YAML YAMLLibYAML HTMLTree AuthenPassphrase - NetOpenIDConsumer LWPxParanoidAgent CryptSSLeay ]) + TimeDate gettext makeWrapper DBFile CGISession CGIFormBuilder LocaleGettext + RpcXML XMLSimple ImageMagick YAML YAMLLibYAML HTMLTree AuthenPassphrase + NetOpenIDConsumer LWPxParanoidAgent CryptSSLeay ]) ++ lib.optionals docutilsSupport [python docutils] ++ lib.optionals gitSupport [git] ++ lib.optionals monotoneSupport [monotone] @@ -80,11 +69,11 @@ stdenv.mkDerivation { checkTarget = "test"; doCheck = true; - meta = { + meta = with lib; { description = "Wiki compiler, storing pages and history in a RCS"; homepage = "http://ikiwiki.info/"; - license = lib.licenses.gpl2Plus; - platforms = lib.platforms.linux; - maintainers = [ lib.maintainers.peti ]; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = [ maintainers.peti ]; }; }