Unverified Commit 54425578 authored by Weijia Wang's avatar Weijia Wang Committed by GitHub
Browse files

birdfont: fix build failure; birdfont,xmlbird: adopt, modernize, move to by-name (#508450)

parents c6993065 d7b13db5
Loading
Loading
Loading
Loading
+27 −23
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchFromGitHub,
  pkg-config,
  python3,
  xmlbird,
  autoPatchelfHook,
  cairo,
  fetchFromGitHub,
  gdk-pixbuf,
  libgee,
  glib,
  gobject-introspection,
  gsettings-desktop-schemas,
  gtk3,
  webkitgtk_4_1,
  lib,
  libgee,
  libnotify,
  nix-update-script,
  pkg-config,
  python3,
  sqlite,
  stdenv,
  vala,
  gobject-introspection,
  gsettings-desktop-schemas,
  webkitgtk_4_1,
  wrapGAppsHook3,
  autoPatchelfHook,
  nix-update-script,
  xmlbird,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -29,37 +29,40 @@ stdenv.mkDerivation (finalAttrs: {
    owner = "johanmattssonm";
    repo = "birdfont";
    tag = "v${finalAttrs.version}";
    sha256 = "sha256-7xVjY/yH7pMlUBpQc5Gb4t4My24Mx5KkARVp2KSr+Iw=";
    hash = "sha256-7xVjY/yH7pMlUBpQc5Gb4t4My24Mx5KkARVp2KSr+Iw=";
  };

  nativeBuildInputs = [
    python3
    autoPatchelfHook
    gobject-introspection
    pkg-config
    python3
    vala
    gobject-introspection
    wrapGAppsHook3
    autoPatchelfHook
  ];
  buildInputs = [
    xmlbird
    libgee
    cairo
    gdk-pixbuf
    glib
    gsettings-desktop-schemas
    gtk3
    webkitgtk_4_1
    libgee
    libnotify
    sqlite
    gsettings-desktop-schemas
    webkitgtk_4_1
    xmlbird
  ];

  postPatch = ''
    substituteInPlace install.py \
      --replace 'platform.version()' '"Nix"'
      --replace-fail 'platform.version()' '"Nix"'

    patchShebangs .
  '';

  # workaround gcc >= 14 incompatibilities
  env.NIX_CFLAGS_COMPILE = "-std=gnu17 -Wno-error=incompatible-pointer-types";

  buildPhase = "./build.py";

  installPhase = "./install.py";
@@ -69,7 +72,8 @@ stdenv.mkDerivation (finalAttrs: {
  meta = {
    description = "Font editor which can generate fonts in TTF, EOT, SVG and BIRDFONT format";
    homepage = "https://birdfont.org";
    license = lib.licenses.gpl3;
    maintainers = [ ];
    license = lib.licenses.gpl3Plus;
    mainProgram = "birdfont";
    maintainers = with lib.maintainers; [ drawbu ];
  };
})
+16 −14
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  fetchurl,
  python3,
  pkg-config,
  vala,
  glib,
  gobject-introspection,
  lib,
  pkg-config,
  python3,
  stdenv,
  vala,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "xmlbird";
  version = "1.2.15";

  src = fetchurl {
    url = "https://birdfont.org/${pname}-releases/lib${pname}-${version}.tar.xz";
    sha256 = "sha256-8GX4ijF+AxaGGFlSxRPOAoUezRG6592jOrifz/mWTRM=";
    url = "https://birdfont.org/xmlbird-releases/libxmlbird-${finalAttrs.version}.tar.xz";
    hash = "sha256-8GX4ijF+AxaGGFlSxRPOAoUezRG6592jOrifz/mWTRM=";
  };

  nativeBuildInputs = [
    python3
    gobject-introspection
    pkg-config
    python3
    vala
    gobject-introspection
  ];

  buildInputs = [ glib ];

  postPatch = ''
    substituteInPlace configure \
      --replace 'platform.dist()[0]' '"nix"'
      --replace-fail 'platform.version()' '"Nix"'
    patchShebangs .
  '';

  configureFlags = [ "--cc=${stdenv.cc.targetPrefix}cc" ];

  buildPhase = "./build.py";

  installPhase = "./install.py";
@@ -40,7 +42,7 @@ stdenv.mkDerivation rec {
  meta = {
    description = "XML parser for Vala and C programs";
    homepage = "https://birdfont.org/xmlbird.php";
    license = lib.licenses.lgpl3;
    maintainers = [ ];
    license = lib.licenses.lgpl3Plus;
    maintainers = with lib.maintainers; [ drawbu ];
  };
}
})
+0 −3
Original line number Diff line number Diff line
@@ -1950,9 +1950,6 @@ with pkgs;

  binlore = callPackage ../development/tools/analysis/binlore { };

  birdfont = callPackage ../tools/misc/birdfont { };
  xmlbird = callPackage ../tools/misc/birdfont/xmlbird.nix { stdenv = gccStdenv; };

  bmrsa = callPackage ../tools/security/bmrsa/11.nix { };

  anystyle-cli = callPackage ../tools/misc/anystyle-cli { };