nixpkgs/pkgs/development/libraries/libplist/default.nix
Silvan Mosberger ea5dfeab93 treewide: Drop infinisil as maintainer from most packages
I'm not going anywhere, I'm focusing my energy on other issues, and
getting pinged as a maintainer for packages is a bit distracting (also
I'm not using most of these packages anyways!)
2024-04-09 21:43:39 +02:00

59 lines
1.1 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, autoreconfHook
, pkg-config
, enablePython ? false
, python3
}:
stdenv.mkDerivation rec {
pname = "libplist";
version = "2.3.0";
outputs = [ "bin" "dev" "out" ] ++ lib.optional enablePython "py";
src = fetchFromGitHub {
owner = "libimobiledevice";
repo = pname;
rev = version;
hash = "sha256-fZfDSWVRg73dN+WF6LbgRSj8vtyeKeyjC8pWXFxUmBg=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = lib.optionals enablePython [
python3
python3.pkgs.cython
];
preAutoreconf = ''
export RELEASE_VERSION=${version}
'';
configureFlags = [
"--enable-debug"
] ++ lib.optionals (!enablePython) [
"--without-cython"
];
doCheck = true;
postFixup = lib.optionalString enablePython ''
moveToOutput "lib/${python3.libPrefix}" "$py"
'';
meta = with lib; {
description = "A library to handle Apple Property List format in binary or XML";
homepage = "https://github.com/libimobiledevice/libplist";
license = licenses.lgpl21Plus;
maintainers = [ ];
platforms = platforms.unix;
mainProgram = "plistutil";
};
}