nixpkgs/pkgs/servers/mautrix-whatsapp/default.nix

37 lines
1 KiB
Nix
Raw Normal View History

{ stdenv, buildGoModule, fetchFromGitHub, olm }:
buildGoModule rec {
pname = "mautrix-whatsapp";
version = "0.1.3";
src = fetchFromGitHub {
owner = "tulir";
repo = "mautrix-whatsapp";
rev = "v${version}";
sha256 = "1qagp6jnc4n368pg4h3jr9bzpwpbnva1xyl1b1k2a7q4b5fm5yww";
};
buildInputs = [ olm ];
vendorSha256 = "0ixfawfavv5r1d01d4gmj87vf5vv6p3f7kv4rkhfv48ys0j0437a";
overrideModAttrs = _: {
postBuild = ''
rm -r vendor/github.com/chai2010/webp
cp -r --reflink=auto ${fetchFromGitHub {
owner = "chai2010";
repo = "webp";
rev = "3da79ec3d682694d42bfd211db18fc1343c07cd7";
sha256 = "0gh3g52vz8na153mjmxkl80g3dvrcjw77xpjs1c02vagpj9jyw46";
}} vendor/github.com/chai2010/webp
'';
};
meta = with stdenv.lib; {
homepage = "https://github.com/tulir/mautrix-whatsapp";
description = "Matrix <-> Whatsapp hybrid puppeting/relaybot bridge";
license = licenses.agpl3;
maintainers = with maintainers; [ vskilet ma27 ];
};
}