2021-05-04 18:30:16 +01:00
|
|
|
{ fetchFromGitHub, lib, stdenv, autoreconfHook, pkg-config, libxml2, gd, glib, getopt, libxslt, nix, bash}:
|
2020-11-25 15:27:28 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
2021-03-03 00:56:27 +00:00
|
|
|
pname = "libnixxml";
|
|
|
|
version = "unstable-2020-06-25";
|
|
|
|
|
2020-11-25 15:27:28 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "svanderburg";
|
|
|
|
repo = "libnixxml";
|
|
|
|
rev = "54c04a5fdbc8661b2445a7527f499e0a77753a1a";
|
|
|
|
sha256 = "sha256-HKQnCkO1TDs1e0MDil0Roq4YRembqRHQvb7lK3GAftQ=";
|
|
|
|
};
|
2021-03-03 00:56:27 +00:00
|
|
|
|
2021-05-04 18:30:16 +01:00
|
|
|
prePatch = ''
|
2021-05-02 21:04:10 +01:00
|
|
|
# Remove broken test
|
|
|
|
substituteInPlace tests/draw/Makefile.am \
|
|
|
|
--replace "draw-wrong.sh" ""
|
|
|
|
rm tests/draw/draw-wrong.sh
|
2021-05-04 18:30:16 +01:00
|
|
|
|
|
|
|
# Fix bash path
|
|
|
|
substituteInPlace scripts/nixexpr2xml.in \
|
|
|
|
--replace "/bin/bash" "${bash}/bin/bash"
|
2021-05-02 21:04:10 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
preAutoreconf = ''
|
|
|
|
# Copied from bootstrap script
|
|
|
|
ln -s README.md README
|
|
|
|
mkdir -p config
|
2021-03-03 00:56:27 +00:00
|
|
|
'';
|
|
|
|
|
2020-11-25 15:27:28 +00:00
|
|
|
configureFlags = [ "--with-gd" "--with-glib" ];
|
|
|
|
CFLAGS = "-Wall";
|
2021-03-03 00:56:27 +00:00
|
|
|
|
2021-05-02 21:04:10 +01:00
|
|
|
strictDeps = true;
|
|
|
|
nativeBuildInputs = [
|
|
|
|
autoreconfHook
|
|
|
|
pkg-config
|
|
|
|
getopt
|
|
|
|
libxslt
|
|
|
|
];
|
|
|
|
buildInputs = [
|
2021-05-04 18:30:16 +01:00
|
|
|
bash
|
2021-05-02 21:04:10 +01:00
|
|
|
libxml2
|
|
|
|
gd.dev
|
|
|
|
glib
|
|
|
|
nix
|
|
|
|
];
|
|
|
|
checkInputs = [
|
|
|
|
nix
|
|
|
|
];
|
2021-03-03 00:56:27 +00:00
|
|
|
|
2021-05-02 21:04:10 +01:00
|
|
|
doCheck = true;
|
2020-11-25 15:27:28 +00:00
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2020-11-25 15:27:28 +00:00
|
|
|
description = "XML-based Nix-friendly data integration library";
|
2021-03-03 00:56:27 +00:00
|
|
|
homepage = "https://github.com/svanderburg/libnixxml";
|
2020-11-25 15:27:28 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ tomberek ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|