summary refs log tree commit diff
path: root/pkgs/development/libraries/olm/default.nix
blob: 8fbdf28965bf3cf2a0feac0c459cc811fcdcbc2e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{ stdenv, fetchurl }:

stdenv.mkDerivation rec {
  pname = "olm";
  version = "3.1.4";

  src = fetchurl {
    url = "https://matrix.org/git/olm/-/archive/${version}/${pname}-${version}.tar.gz";
    sha256 = "0f7azjxc77n4ib9nj3cwyk3vhk8r2dsyf7id6nvqyxqxwxn95a8w";
  };

  doCheck = true;
  checkTarget = "test";

  # requires optimisation but memory operations are compiled with -O0
  hardeningDisable = ["fortify"];

  makeFlags = stdenv.lib.optional stdenv.cc.isClang "CC=cc";

  installFlags = [
    "PREFIX=${placeholder ''out''}"
  ];

  meta = {
    description = "Implements double cryptographic ratchet and Megolm ratchet";
    license = stdenv.lib.licenses.asl20;
    homepage = https://matrix.org/git/olm/about;
    platforms = with stdenv.lib.platforms; darwin ++ linux;
  };
}