about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Hoeg <peter@hoeg.com>2017-11-26 23:31:44 +0800
committerPeter Hoeg <peter@hoeg.com>2017-11-26 23:35:00 +0800
commit50ad43bd395465d5d2b5a96862efc4fd1ed29cd8 (patch)
treee673adaac3583965c0342ec708e33453f69c51bc
parent471dc983cd7ade881331646ff58017063dc7b467 (diff)
libqmatrixclient: init at 0.1
-rw-r--r--pkgs/development/libraries/libqmatrixclient/default.nix40
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 42 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libqmatrixclient/default.nix b/pkgs/development/libraries/libqmatrixclient/default.nix
new file mode 100644
index 0000000000000..dc4981798bce0
--- /dev/null
+++ b/pkgs/development/libraries/libqmatrixclient/default.nix
@@ -0,0 +1,40 @@
+{ stdenv, fetchFromGitHub, cmake
+, qtbase }:
+
+# This doesn't actually do anything really yet as it doesn't support dynamic building
+# When it does, quaternion and tensor should use it
+
+stdenv.mkDerivation rec {
+  name = "libqmatrixclient-${version}";
+  version = "0.1";
+
+  src = fetchFromGitHub {
+    owner  = "QMatrixClient";
+    repo   = "libqmatrixclient";
+    rev    = "v${version}";
+    sha256 = "1dlanf0y65zf6n1b1f4jzw04w07sl85wiw01c3yyn2ivp3clr13l";
+  };
+
+  buildInputs = [ qtbase ];
+
+  nativeBuildInputs = [ cmake ];
+
+  enableParallelBuilding = true;
+
+  installPhase = ''
+    runHook preInstall
+
+    install -Dm644 -t $out/lib *.a
+
+    runHook postInstall
+  '';
+
+  meta = with stdenv.lib; {
+    description= "A Qt5 library to write cross-platfrom clients for Matrix";
+    homepage = https://matrix.org/docs/projects/sdk/libqmatrixclient.html;
+    license = licenses.lgpl21;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ peterhoeg ];
+    hydraPlatforms = [ ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index a457769ff3e77..640a5596d9b87 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -745,6 +745,8 @@ with pkgs;
 
   blink = callPackage ../applications/networking/instant-messengers/blink { };
 
+  libqmatrixclient = libsForQt5.callPackage ../development/libraries/libqmatrixclient { };
+
   quaternion = libsForQt5.callPackage ../applications/networking/instant-messengers/quaternion { };
 
   tensor = libsForQt5.callPackage ../applications/networking/instant-messengers/tensor { };