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