about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/olm/default.nix
blob: 49daff30e7b564651e6ac0976db783a6823cf3ac (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
{ stdenv, fetchurl }:

stdenv.mkDerivation rec {
  name = "olm-${version}";
  version = "3.0.0";

  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;
  };

  src = fetchurl {
    url = "https://matrix.org/git/olm/snapshot/${name}.tar.gz";
    sha256 = "1iivxjk458v9lhqgzp0c4k5azligsh9k3rk6irf9ssj29wzgjm2c";
  };

  doCheck = true;
  checkTarget = "test";

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

  makeFlags = if stdenv.cc.isClang then [ "CC=cc" ] else null;

  installFlags = "PREFIX=$(out)";
}