libplist: 2.2.0 -> 2.2.0+date=2022-04-05, cleanup, use Python 3
This commit is contained in:
parent
f758d33d27
commit
742dc5ea13
|
@ -1,34 +1,46 @@
|
||||||
{ lib, stdenv, autoreconfHook, fetchFromGitHub, pkg-config, enablePython ? false, python ? null, glib }:
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, autoreconfHook
|
||||||
|
, pkg-config
|
||||||
|
|
||||||
|
, enablePython ? false
|
||||||
|
, python3
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "libplist";
|
pname = "libplist";
|
||||||
version = "2.2.0";
|
version = "2.2.0+date=2022-04-05";
|
||||||
|
|
||||||
|
outputs = [ "bin" "dev" "out" ] ++ lib.optional enablePython "py";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "libimobiledevice";
|
owner = "libimobiledevice";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = "db93bae96d64140230ad050061632531644c46ad";
|
||||||
sha256 = "1vxhpjxniybqsg5wcygmdmr5dv7p2zb34dqnd3bi813rnnzsdjm6";
|
hash = "sha256-8e/PFDhsyrOgmI3vLT1YhcROmbJgArDAJSe8Z2bZafo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = ["bin" "dev" "out" ] ++ lib.optional enablePython "py";
|
postPatch = ''
|
||||||
|
echo '${version}' > .tarball-version
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
pkg-config
|
|
||||||
autoreconfHook
|
autoreconfHook
|
||||||
] ++ lib.optionals enablePython [
|
pkg-config
|
||||||
python
|
];
|
||||||
python.pkgs.cython
|
|
||||||
|
buildInputs = lib.optionals enablePython [
|
||||||
|
python3
|
||||||
|
python3.pkgs.cython
|
||||||
];
|
];
|
||||||
|
|
||||||
configureFlags = lib.optionals (!enablePython) [
|
configureFlags = lib.optionals (!enablePython) [
|
||||||
"--without-cython"
|
"--without-cython"
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [ glib ];
|
|
||||||
|
|
||||||
postFixup = lib.optionalString enablePython ''
|
postFixup = lib.optionalString enablePython ''
|
||||||
moveToOutput "lib/${python.libPrefix}" "$py"
|
moveToOutput "lib/${python3.libPrefix}" "$py"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -36,6 +48,6 @@ stdenv.mkDerivation rec {
|
||||||
homepage = "https://github.com/libimobiledevice/libplist";
|
homepage = "https://github.com/libimobiledevice/libplist";
|
||||||
license = licenses.lgpl21Plus;
|
license = licenses.lgpl21Plus;
|
||||||
maintainers = with maintainers; [ infinisil ];
|
maintainers = with maintainers; [ infinisil ];
|
||||||
platforms = platforms.linux ++ platforms.darwin;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue