nixpkgs/pkgs/by-name/li/libnixxml/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

65 lines
1.3 KiB
Nix

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