mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-05 11:44:02 +00:00
571c71e6f7
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.
42 lines
1.1 KiB
Nix
42 lines
1.1 KiB
Nix
{ lib, stdenv, fetchurl, pkg-config, libxml2 }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "xml2";
|
|
version = "0.5";
|
|
|
|
src = fetchurl {
|
|
url = "https://web.archive.org/web/20160427221603/http://download.ofb.net/gale/xml2-${version}.tar.gz";
|
|
sha256 = "01cps980m99y99cnmvydihga9zh3pvdsqag2fi1n6k2x7rfkl873";
|
|
};
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
buildInputs = [ libxml2 ];
|
|
|
|
doInstallCheck = true;
|
|
installCheckPhase = ''
|
|
runHook preInstallCheck
|
|
|
|
echo -n 'checking csv2 and 2csv...'
|
|
$out/bin/csv2 -f <<< $'a,b\n1,2' \
|
|
| $out/bin/2csv record a b \
|
|
| grep -qF '1,2'
|
|
echo ' ok'
|
|
|
|
echo -n 'checking xml2 and 2xml...'
|
|
$out/bin/xml2 <<< $'<a>abc</a>' \
|
|
| $out/bin/2xml \
|
|
| grep -qF '<a>abc</a>'
|
|
echo ' ok'
|
|
|
|
runHook postInstallCheck
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://web.archive.org/web/20160515005047/http://dan.egnor.name:80/xml2";
|
|
description = "Tools for command line processing of XML, HTML, and CSV";
|
|
license = licenses.gpl2Plus;
|
|
platforms = platforms.all;
|
|
maintainers = [ maintainers.rycee ];
|
|
};
|
|
}
|