summary refs log tree commit diff
path: root/pkgs/development/libraries/libuchardet
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/libuchardet')
-rw-r--r--pkgs/development/libraries/libuchardet/default.nix28
1 files changed, 17 insertions, 11 deletions
diff --git a/pkgs/development/libraries/libuchardet/default.nix b/pkgs/development/libraries/libuchardet/default.nix
index 52bc0ac5cfd..5aa26a749e4 100644
--- a/pkgs/development/libraries/libuchardet/default.nix
+++ b/pkgs/development/libraries/libuchardet/default.nix
@@ -1,25 +1,31 @@
-{ stdenv, fetchFromGitHub, cmake }:
+{ stdenv, fetchurl, cmake }:
 
 stdenv.mkDerivation rec {
-  name = "libuchardet-${version}";
+  pname = "uchardet";
+  version = "0.0.6";
 
-  version = "0.0.5";
+  outputs = [ "bin" "out" "man" "dev" ];
 
-  src = fetchFromGitHub {
-    owner  = "BYVoid";
-    repo   = "uchardet";
-    rev    = "v${version}";
-    sha256 = "0rkym5bhq3hn7623fy0fggw0qaghha71k8bi41ywqd2lchpahrrm";
+  src = fetchurl {
+    url = "https://www.freedesktop.org/software/${pname}/releases/${pname}-${version}.tar.xz";
+    sha256 = "0q9c02b6nmw41yfsiqsnphgc3f0yg3fj31wkccp47cmwvy634lc3";
   };
 
   buildInputs = [ cmake ];
 
-  doCheck = false; # fails all the tests (ctest)
+  cmakeFlags = [
+    "-DCMAKE_SKIP_BUILD_RPATH=OFF" # for tests
+    # TODO: move the following to CMake setup hook
+    "-DCMAKE_INSTALL_BINDIR=${placeholder "bin"}/bin"
+    "-DCMAKE_INSTALL_MANDIR=${placeholder "man"}/share/man"
+  ];
+
+  doCheck = true;
 
   meta = with stdenv.lib; {
     description = "Mozilla's Universal Charset Detector C/C++ API";
-    homepage    = https://www.byvoid.com/zht/project/uchardet;
-    license     = licenses.mpl11;
+    homepage = https://www.freedesktop.org/wiki/Software/uchardet/;
+    license = licenses.mpl11;
     maintainers = with maintainers; [ cstrahan ];
     platforms = with platforms; unix;
   };