treewide: use `addBinToPathHook`, minor cleanups (#379187)
[NixPkgs.git] / pkgs / by-name / xm / xmlcopyeditor / package.nix
blob6e614460b8b6c5c6c425978b5e956310557ee88f
2   lib,
3   stdenv,
4   fetchurl,
5   aspell,
6   boost,
7   expat,
8   intltool,
9   pkg-config,
10   libxml2,
11   libxslt,
12   pcre2,
13   wxGTK32,
14   xercesc,
17 stdenv.mkDerivation (finalAttrs: {
18   pname = "xmlcopyeditor";
19   version = "1.3.1.0";
21   src = fetchurl {
22     url = "mirror://sourceforge/xml-copy-editor/xmlcopyeditor-${finalAttrs.version}.tar.gz";
23     hash = "sha256-6HHKl7hqyvF3gJ9vmjLjTT49prJ8KhEEV0qPsJfQfJE=";
24   };
26   patches = [ ./xmlcopyeditor.patch ];
28   # error: cannot initialize a variable of type 'xmlErrorPtr' (aka '_xmlError *')
29   #        with an rvalue of type 'const xmlError *' (aka 'const _xmlError *')
30   postPatch = ''
31     substituteInPlace src/wraplibxml.cpp \
32       --replace-fail "xmlErrorPtr err" "const xmlError *err"
33   '';
35   nativeBuildInputs = [
36     intltool
37     pkg-config
38   ];
40   buildInputs = [
41     aspell
42     boost
43     expat
44     libxml2
45     libxslt
46     pcre2
47     wxGTK32
48     xercesc
49   ];
51   env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-liconv";
53   enableParallelBuilding = true;
55   meta = {
56     description = "Fast, free, validating XML editor";
57     homepage = "https://xml-copy-editor.sourceforge.io/";
58     license = lib.licenses.gpl2Plus;
59     platforms = lib.platforms.unix;
60     maintainers = with lib.maintainers; [
61       candeira
62       wegank
63     ];
64     mainProgram = "xmlcopyeditor";
65   };