1 { lib, stdenv, fetchurl, fetchpatch
2 , libtool, bison, groff, ghostscript, gettext
4 stdenv.mkDerivation rec {
9 url = "mirror://sourceforge/libexplain/libexplain-${version}.tar.gz";
10 hash = "sha256-KIY7ZezMdJNOI3ysQTZMs8GALDbJ4jGO0EF0YP7oP4A=";
14 debian-src = "https://sources.debian.org/data/main";
15 debian-ver = "${version}.D001-12";
16 debian-patch = fname: hash: fetchpatch {
18 url = "${debian-src}/libe/libexplain/${debian-ver}/debian/patches/${fname}";
22 (debian-patch "sanitize-bison.patch"
23 "sha256-gU6JG32j2yIOwehZTUSvIr4TSDdlg+p1U3bhfZHMEDY=")
24 (debian-patch "03_fsflags-4.5.patch"
25 "sha256-ML7Qvf85vEBp+iwm6PSosMAn/frYdEOSHRToEggmR8M=")
26 (debian-patch "linux5.11.patch"
27 "sha256-N7WwnTfwOxBfIiKntcFOqHTH9r2gd7NMEzic7szzR+Y=")
28 (debian-patch "termiox-no-more-exists-since-kernel-5.12.patch"
29 "sha256-cocgEYKoDMDnGk9VNQDtgoVxMGnnNpdae0hzgUlacOw=")
30 (debian-patch "gcc-10.patch"
31 "sha256-YNcYGyOOqPUuwpUpXGcR7zsWbepVg8SAqcVKlxENSQk=")
34 nativeBuildInputs = [ libtool bison groff ghostscript gettext ];
35 buildInputs = [ acl libcap lsof ];
37 outputs = [ "bin" "dev" "out" "man" "doc" ];
40 description = "Library and utility to explain system call errors";
41 mainProgram = "explain";
42 homepage = "https://libexplain.sourceforge.net";
43 license = licenses.lgpl3Plus;
44 maintainers = with maintainers; [ McSinyx ];
45 platforms = platforms.unix;
46 # never built on aarch64-linux since first introduction in nixpkgs
47 broken = stdenv.isLinux && stdenv.isAarch64;