diff --git a/pkgs/development/libraries/indilib/default.nix b/pkgs/development/libraries/indilib/default.nix index 31cbe772916d..dd8207ffa2b0 100644 --- a/pkgs/development/libraries/indilib/default.nix +++ b/pkgs/development/libraries/indilib/default.nix @@ -1,13 +1,15 @@ { stdenv, fetchurl, cmake, cfitsio, libusb, zlib, boost }: stdenv.mkDerivation { - name = "indilib-0.8"; + name = "indilib-0.9.6"; src = fetchurl { - url = mirror://sourceforge/indi/libindi_0.8.tar.gz; - sha256 = "d5ed14a5de6fd6e5db15463ada96c2b15b53e84a1ffe199b76f70128493f2a65"; + url = mirror://sourceforge/indi/libindi_0.9.6.tar.gz; + sha256 = "1cyhsrsl68iczc4gcdnrrdh0r1dxjac6prxjfkw15wz97ya0mvs4"; }; + patches = [ ./link-zlib.patch ./udev-dir.patch ]; + propagatedBuildInputs = [ cmake cfitsio libusb zlib boost ]; meta = { diff --git a/pkgs/development/libraries/indilib/link-zlib.patch b/pkgs/development/libraries/indilib/link-zlib.patch new file mode 100644 index 000000000000..c051194a1b8a --- /dev/null +++ b/pkgs/development/libraries/indilib/link-zlib.patch @@ -0,0 +1,12 @@ +diff -Naur libindi-0.9.6-upstream/CMakeLists.txt libindi-0.9.6/CMakeLists.txt +--- libindi-0.9.6-upstream/CMakeLists.txt 2012-11-19 16:09:14.000000000 -0430 ++++ libindi-0.9.6/CMakeLists.txt 2013-05-02 16:50:25.666624174 -0430 +@@ -169,7 +169,7 @@ + # To link with main() and indibase classes ###### + ################################################## + add_library(indidriver SHARED ${libindicom_SRCS} ${liblilxml_SRCS} ${indimain_SRCS} ${indidriver_SRCS}) +-target_link_libraries(indidriver ${LIBUSB_LIBRARIES}) ++target_link_libraries(indidriver z ${LIBUSB_LIBRARIES}) + if (NOVA_FOUND) + target_link_libraries(indidriver ${NOVA_LIBRARIES}) + endif(NOVA_FOUND) diff --git a/pkgs/development/libraries/indilib/udev-dir.patch b/pkgs/development/libraries/indilib/udev-dir.patch new file mode 100644 index 000000000000..2f6d03d6070c --- /dev/null +++ b/pkgs/development/libraries/indilib/udev-dir.patch @@ -0,0 +1,12 @@ +diff -Naur libindi-0.9.6-upstream/CMakeLists.txt libindi-0.9.6/CMakeLists.txt +--- libindi-0.9.6-upstream/CMakeLists.txt 2012-11-19 16:09:14.000000000 -0430 ++++ libindi-0.9.6/CMakeLists.txt 2013-05-02 17:02:55.455944987 -0430 +@@ -13,7 +13,7 @@ + set(DATA_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/indi/") + set(BIN_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/bin") + set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include") +-set(UDEVRULES_INSTALL_DIR "/etc/udev/rules.d") ++set(UDEVRULES_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/etc/udev/rules.d") + + IF(APPLE) + set(CMAKE_SHARED_LINKER_FLAGS "-undefined dynamic_lookup")