about summary refs log tree commit diff
path: root/pkgs/tools/networking/ip2unix
diff options
context:
space:
mode:
authoraszlig <aszlig@nix.build>2018-11-12 15:40:41 +0100
committeraszlig <aszlig@nix.build>2018-11-12 15:45:23 +0100
commit2ea5e68b2418b2b4938ec59b1d536d0b44cdc61a (patch)
tree48266817cc129f76a891972ff25b317974f22384 /pkgs/tools/networking/ip2unix
parent362ac95d6400cc52e406c2a3a730ab1a37ae63df (diff)
downloadnixlib-2ea5e68b2418b2b4938ec59b1d536d0b44cdc61a.tar
nixlib-2ea5e68b2418b2b4938ec59b1d536d0b44cdc61a.tar.gz
nixlib-2ea5e68b2418b2b4938ec59b1d536d0b44cdc61a.tar.bz2
nixlib-2ea5e68b2418b2b4938ec59b1d536d0b44cdc61a.tar.lz
nixlib-2ea5e68b2418b2b4938ec59b1d536d0b44cdc61a.tar.xz
nixlib-2ea5e68b2418b2b4938ec59b1d536d0b44cdc61a.tar.zst
nixlib-2ea5e68b2418b2b4938ec59b1d536d0b44cdc61a.zip
ip2unix: 1.1.1 -> 1.2.0
Upstream changes:

  - Fixed: Don't fail when building the manual with AsciiDoc and xmllint.
  - Fixed: Some long options (--rule, --rules-file and --rules-data) were
           ignored.
  - Fixed: Manpage formatting is now more consistent.
  - Added: A new --version command line argument for showing version
           information.

With the new upstream release recommending to use AsciiDoc to generate
the manpage, I also switched to AsciiDoc instead of Asciidoctor. The
resulting manpage looks better in some ways (for example when definition
lists are used).

I also added an installCheckPhase to ensure that the manpage exists in
the resulting store path.

Signed-off-by: aszlig <aszlig@nix.build>
Diffstat (limited to 'pkgs/tools/networking/ip2unix')
-rw-r--r--pkgs/tools/networking/ip2unix/default.nix23
1 files changed, 18 insertions, 5 deletions
diff --git a/pkgs/tools/networking/ip2unix/default.nix b/pkgs/tools/networking/ip2unix/default.nix
index 18a53d02b1ec..1fa1531d1837 100644
--- a/pkgs/tools/networking/ip2unix/default.nix
+++ b/pkgs/tools/networking/ip2unix/default.nix
@@ -1,27 +1,40 @@
 { stdenv, fetchFromGitHub, meson, ninja, pkgconfig, libyamlcpp, systemd
-, asciidoctor, python3Packages
+, python3Packages, asciidoc, libxslt, docbook_xml_dtd_45, docbook_xsl
+, libxml2, docbook5
 }:
 
 stdenv.mkDerivation rec {
   name = "ip2unix-${version}";
-  version = "1.1.1";
+  version = "1.2.0";
 
   src = fetchFromGitHub {
     owner = "nixcloud";
     repo = "ip2unix";
     rev = "v${version}";
-    sha256 = "0lw4f1p1frfpf5l7faqdd80d6pi9g5sx7g3wpmig9sa50k6pmc0v";
+    sha256 = "0blrhcmska06ydkl15jjgblygkwrimdnbaq3hhifgmffymfk2652";
   };
 
   nativeBuildInputs = [
-    meson ninja pkgconfig asciidoctor
-    python3Packages.pytest python3Packages.pytest-timeout
+    meson ninja pkgconfig asciidoc libxslt.bin docbook_xml_dtd_45 docbook_xsl
+    libxml2.bin docbook5 python3Packages.pytest python3Packages.pytest-timeout
   ];
 
   buildInputs = [ libyamlcpp systemd ];
 
   doCheck = true;
 
+  doInstallCheck = true;
+  installCheckPhase = ''
+    found=0
+    for man in "$out/share/man/man1"/ip2unix.1*; do
+      test -s "$man" && found=1
+    done
+    if [ $found -ne 1 ]; then
+      echo "ERROR: Manual page hasn't been generated." >&2
+      exit 1
+    fi
+  '';
+
   meta = {
     homepage = https://github.com/nixcloud/ip2unix;
     description = "Turn IP sockets into Unix domain sockets";