Unverified Commit e1645b6c authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

xbill: fix build (#422103)

parents 67e38442 dbcd3fce
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -12330,6 +12330,13 @@
    githubId = 31407988;
    name = "Jon Bosque";
  };
  jonhermansen = {
    name = "Jon Hermansen";
    email = "jon@jh86.org";
    matrix = "@jonhermansen:matrix.org";
    github = "jonhermansen";
    githubId = 660911;
  };
  jonnybolton = {
    email = "jonnybolton@gmail.com";
    github = "jonnynightingale";
+22 −5
Original line number Diff line number Diff line
{
  stdenv,
  lib,
  autoreconfHook,
  makeDesktopItem,
  copyDesktopItems,
  fetchpatch,
  fetchurl,
  libX11,
  libXpm,
  libXt,
  motif,
  ...
}:

stdenv.mkDerivation rec {
  pname = "xbill";
  version = "2.1";

  nativeBuildInputs = [ copyDesktopItems ];
  nativeBuildInputs = [
    autoreconfHook # Fix configure script that fails basic compilation check
    copyDesktopItems
  ];

  buildInputs = [
    libX11
    libXpm
@@ -32,9 +37,17 @@ stdenv.mkDerivation rec {

  src = fetchurl {
    url = "http://www.xbill.org/download/${pname}-${version}.tar.gz";
    sha256 = "13b08lli2gvppmvyhy0xs8cbjbkvrn4b87302mx0pxrdrvqzzz8f";
    hash = "sha256-Dv3/8c4t9wt6FWActIjNey65GNIdeOh3vXc/ESlFYI0=";
  };

  # xbill requires strcasecmp and strncasecmp but is missing proper includes
  patches = [
    (fetchpatch {
      url = "https://raw.githubusercontent.com/gentoo/gentoo/7c2c329a5a80781a9aaca24221675a0db66fd244/games-arcade/xbill/files/xbill-2.1-clang16.patch";
      hash = "sha256-Eg8qbSOdUoENcYruH6hSVIHcORkJeP8FXvp09cj/IXA=";
    })
  ];

  desktopItems = [
    (makeDesktopItem {
      name = "xbill";
@@ -53,11 +66,14 @@ stdenv.mkDerivation rec {
    install -Dm644 pixmaps/icon.xpm $out/share/pixmaps/xbill.xpm
  '';

  meta = with stdenv; {
  meta = {
    description = "Protect a computer network from getting infected";
    homepage = "http://www.xbill.org/";
    license = lib.licenses.gpl1Only;
    maintainers = with lib.maintainers; [ aw ];
    maintainers = with lib.maintainers; [
      aw
      jonhermansen
    ];
    longDescription = ''
      Ever get the feeling that nothing is going right? You're a sysadmin,
      and someone's trying to destroy your computers. The little people
@@ -66,5 +82,6 @@ stdenv.mkDerivation rec {
      operating system.
    '';
    mainProgram = "xbill";
    platforms = lib.platforms.unix;
  };
}