mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-19 02:44:17 +03:00
Add libplist
svn path=/nixpkgs/trunk/; revision=23946
This commit is contained in:
parent
e04cdd1204
commit
1f20ccb9e6
22
pkgs/development/libraries/libplist/default.nix
Normal file
22
pkgs/development/libraries/libplist/default.nix
Normal file
@ -0,0 +1,22 @@
|
||||
{ stdenv, fetchurl, cmake, libxml2, glib, swig, python }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libplist-1.3";
|
||||
|
||||
buildInputs = [ cmake swig ];
|
||||
|
||||
patches = [ ./swig.patch ];
|
||||
|
||||
propagatedBuildInputs = [ libxml2 glib python ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://github.com/downloads/JonathanBeck/libplist/${name}.tar.bz2";
|
||||
sha256 = "1c5nwp9jbsp5kx8avmmsr5g7qdngnqlplh2sjbygmhydb6n8lb4q";
|
||||
};
|
||||
|
||||
meta = {
|
||||
homepage = http://github.com/JonathanBeck/libplist;
|
||||
platforms = stdenv.lib.platforms.all;
|
||||
maintainers = [ stdenv.lib.maintainers.urkud ];
|
||||
};
|
||||
}
|
37
pkgs/development/libraries/libplist/swig.patch
Normal file
37
pkgs/development/libraries/libplist/swig.patch
Normal file
@ -0,0 +1,37 @@
|
||||
commit ca6096bc29873d5a3c03d782b134253ac2e61beb
|
||||
Author: Yury G. Kudryashov <urkud.urkud@gmail.com>
|
||||
Date: Fri Sep 24 17:16:40 2010 +0400
|
||||
|
||||
Install python bindings to libplist prefix, not to system directory.
|
||||
|
||||
This allows one to install libplist to $HOME/prefix and adjust
|
||||
PYTHONPATH.
|
||||
|
||||
diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt
|
||||
index 379cb95..fcacde0 100644
|
||||
--- a/swig/CMakeLists.txt
|
||||
+++ b/swig/CMakeLists.txt
|
||||
@@ -9,16 +9,18 @@ SWIG_ADD_MODULE( plist python plist.i )
|
||||
SWIG_LINK_LIBRARIES( plist plist plist++ ${PYTHON_LIBRARIES} )
|
||||
|
||||
EXEC_PROGRAM("${PYTHON_EXECUTABLE}"
|
||||
- ARGS "-c 'try:\n import distutils.sysconfig; print distutils.sysconfig.get_python_lib(plat_specific=1)\nexcept: pass\n'"
|
||||
- OUTPUT_VARIABLE DISTUTILS_PYTHON_ILIBRARY_PATH
|
||||
+ ARGS "-c 'import sys; print sys.version[:3];'"
|
||||
+ OUTPUT_VARIABLE PYTHON_SHORT_VERSION
|
||||
)
|
||||
|
||||
+SET(PYTHON_SITE_PACKAGES_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_SHORT_VERSION}/site-packages CACHE PATH "The directory where python modules will be installed to.")
|
||||
+
|
||||
INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/_plist${CMAKE_SHARED_MODULE_SUFFIX}
|
||||
- DESTINATION ${DISTUTILS_PYTHON_ILIBRARY_PATH}/plist/ )
|
||||
+ DESTINATION ${PYTHON_SITE_PACKAGES_INSTALL_DIR}/plist/ )
|
||||
INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/plist.py
|
||||
- DESTINATION ${DISTUTILS_PYTHON_ILIBRARY_PATH}/plist/ )
|
||||
+ DESTINATION ${PYTHON_SITE_PACKAGES_INSTALL_DIR}/plist/ )
|
||||
INSTALL( FILES ${CMAKE_CURRENT_SOURCE_DIR}/__init__.py
|
||||
- DESTINATION ${DISTUTILS_PYTHON_ILIBRARY_PATH}/plist/ )
|
||||
+ DESTINATION ${PYTHON_SITE_PACKAGES_INSTALL_DIR}/plist/ )
|
||||
INSTALL( FILES ${CMAKE_CURRENT_SOURCE_DIR}/plist.i
|
||||
DESTINATION include/plist/swig COMPONENT dev)
|
||||
|
@ -3254,6 +3254,8 @@ let
|
||||
inherit (gnome) glib;
|
||||
};
|
||||
|
||||
libplist = callPackage ../development/libraries/libplist { stdenv = stdenv2; };
|
||||
|
||||
libQGLViewer = callPackage ../development/libraries/libqglviewer { };
|
||||
|
||||
libsamplerate = callPackage ../development/libraries/libsamplerate { };
|
||||
|
Loading…
Reference in New Issue
Block a user