summary refs log tree commit diff
path: root/pkgs/applications/misc/kiwix/default.nix
diff options
context:
space:
mode:
authorRobin Gloster <mail@glob.in>2017-03-07 14:03:08 +0100
committerRobin Gloster <mail@glob.in>2017-03-07 14:09:33 +0100
commit09d7f7dfbda2c4ce1ea51e345d8dbf8803f8c62a (patch)
treeefb34e28ec1e4a0f41a57b09c0e86619fb671816 /pkgs/applications/misc/kiwix/default.nix
parent4c1be22272d4abcbe255df7ce79303a08bd504f2 (diff)
downloadnixpkgs-09d7f7dfbda2c4ce1ea51e345d8dbf8803f8c62a.tar
nixpkgs-09d7f7dfbda2c4ce1ea51e345d8dbf8803f8c62a.tar.gz
nixpkgs-09d7f7dfbda2c4ce1ea51e345d8dbf8803f8c62a.tar.bz2
nixpkgs-09d7f7dfbda2c4ce1ea51e345d8dbf8803f8c62a.tar.lz
nixpkgs-09d7f7dfbda2c4ce1ea51e345d8dbf8803f8c62a.tar.xz
nixpkgs-09d7f7dfbda2c4ce1ea51e345d8dbf8803f8c62a.tar.zst
nixpkgs-09d7f7dfbda2c4ce1ea51e345d8dbf8803f8c62a.zip
kiwix: fix eval and build
Diffstat (limited to 'pkgs/applications/misc/kiwix/default.nix')
-rw-r--r--pkgs/applications/misc/kiwix/default.nix35
1 files changed, 8 insertions, 27 deletions
diff --git a/pkgs/applications/misc/kiwix/default.nix b/pkgs/applications/misc/kiwix/default.nix
index ef8f61fddca..c6d5d3056c8 100644
--- a/pkgs/applications/misc/kiwix/default.nix
+++ b/pkgs/applications/misc/kiwix/default.nix
@@ -1,7 +1,8 @@
-{ stdenv, callPackage, overrideCC, fetchurl, makeWrapper, pkgconfig
+{ stdenv, callPackage, fetchurl, makeWrapper, pkgconfig
 , zip, python, zlib, which, icu, libmicrohttpd, lzma, aria2, wget, bc
 , libuuid, glibc, libX11, libXext, libXt, libXrender, glib, dbus, dbus_glib
 , gtk2, gdk_pixbuf, pango, cairo, freetype, fontconfig, alsaLib, atk, cmake
+, xapian, ctpp2, zimlib
 }:
 
 with stdenv.lib;
@@ -28,10 +29,9 @@ let
               then { tar = xulrunner64_tar; sdk = xulrunnersdk64_tar; }
               else { tar = xulrunner32_tar; sdk = xulrunnersdk32_tar; };
 
-  ctpp2 = callPackage ../../../development/libraries/ctpp2 { inherit stdenv; };
-  xapian = callPackage ../../../development/libraries/xapian { inherit stdenv; };
-  zimlib = callPackage ../../../development/libraries/zimlib { inherit stdenv; };
-
+  ctpp2_ = ctpp2.override { inherit stdenv; };
+  xapian_ = xapian.override { inherit stdenv; };
+  zimlib_ = zimlib.override { inherit stdenv; };
 
   pugixml = stdenv.mkDerivation rec {
     version = "1.2";
@@ -53,9 +53,6 @@ let
       # and the build scripts are in there :'(
       cd scripts
     '';
-
-    NIX_CFLAGS_COMPILE = "-fPIC";
-
   };
 
 in
@@ -70,23 +67,8 @@ stdenv.mkDerivation rec {
   };
 
   buildInputs = [
-    zip
-    pkgconfig
-    python
-    zlib
-    xapian
-    which
-    icu
-    libmicrohttpd
-    lzma
-    zimlib
-    ctpp2
-    aria2
-    wget
-    bc
-    libuuid
-    makeWrapper
-    pugixml
+    zip pkgconfig python zlib xapian_ which icu libmicrohttpd
+    lzma zimlib_ ctpp2_ aria2 wget bc libuuid makeWrapper pugixml
   ];
 
   postUnpack = ''
@@ -107,8 +89,7 @@ stdenv.mkDerivation rec {
     "--disable-staticbins"
   ];
 
-  installPhase = ''
-    make install
+  postInstall = ''
     cp -r src/dependencies/xulrunner $out/lib/kiwix
 
     patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/lib/kiwix/xulrunner/xulrunner