nixpkgs/pkgs/development/libraries/libplist/default.nix

42 lines
1.1 KiB
Nix
Raw Normal View History

2021-03-26 09:52:33 +00:00
{ lib, stdenv, autoreconfHook, fetchFromGitHub, pkg-config, enablePython ? false, python ? null, glib }:
2018-08-13 05:45:46 +01:00
stdenv.mkDerivation rec {
pname = "libplist";
2020-12-05 17:45:57 +00:00
version = "2.2.0";
2018-08-13 05:45:46 +01:00
src = fetchFromGitHub {
owner = "libimobiledevice";
repo = pname;
2020-12-05 17:45:57 +00:00
rev = version;
sha256 = "1vxhpjxniybqsg5wcygmdmr5dv7p2zb34dqnd3bi813rnnzsdjm6";
2018-08-13 05:45:46 +01:00
};
outputs = ["bin" "dev" "out" ] ++ lib.optional enablePython "py";
2018-08-13 05:45:46 +01:00
nativeBuildInputs = [
pkg-config
2018-08-13 05:45:46 +01:00
autoreconfHook
] ++ lib.optionals enablePython [
python
python.pkgs.cython
];
configureFlags = lib.optionals (!enablePython) [
"--without-cython"
2018-08-13 05:45:46 +01:00
];
2018-08-13 05:45:46 +01:00
propagatedBuildInputs = [ glib ];
postFixup = lib.optionalString enablePython ''
moveToOutput "lib/${python.libPrefix}" "$py"
'';
meta = with lib; {
2018-08-13 05:45:46 +01:00
description = "A library to handle Apple Property List format in binary or XML";
homepage = "https://github.com/libimobiledevice/libplist";
2018-08-13 05:45:46 +01:00
license = licenses.lgpl21Plus;
2019-04-16 12:45:31 +01:00
maintainers = with maintainers; [ infinisil ];
2020-12-02 20:15:53 +00:00
platforms = platforms.linux ++ platforms.darwin;
};
}