blob: 835329fef295907b19586d31564dc92b59a04b2e (
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
{ lib
, stdenv
, fetchFromGitHub
, fetchYarnDeps
, yarnConfigHook
, yarnBuildHook
, nodejs
, npmHooks
}:
let
inherit (stdenv.hostPlatform) system;
throwSystem = throw "Unsupported system: ${system}";
offlineCacheHash = {
x86_64-linux = "sha256-mZCnvX6hzkdi/zjPiefcmbyC2kGemjS4w7WTVkyq8W0=";
aarch64-linux = "sha256-mZCnvX6hzkdi/zjPiefcmbyC2kGemjS4w7WTVkyq8W0=";
x86_64-darwin = "sha256-G4doEnZORJqcl3bWaKZPuQmBeXNXud06nLO12Afr9kM=";
aarch64-darwin = "sha256-G4doEnZORJqcl3bWaKZPuQmBeXNXud06nLO12Afr9kM=";
}.${system} or throwSystem;
in
stdenv.mkDerivation (finalAttrs: {
pname = "element-call";
version = "0.5.16";
src = fetchFromGitHub {
owner = "element-hq";
repo = "element-call";
rev = "v${finalAttrs.version}";
hash = "sha256-GTHM27i716RZk+kDELMg/lYy355/SZoQLXGPQ90M4xg=";
};
patches = [ ./name.patch ];
offlineCache = fetchYarnDeps {
yarnLock = "${finalAttrs.src}/yarn.lock";
hash = offlineCacheHash;
};
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
nodejs
npmHooks.npmInstallHook
];
# From some reason causes the build to fail due to dependencies not available
# offline
dontNpmPrune = true;
meta = with lib; {
homepage = "https://github.com/element-hq/element-call";
description = "Group calls powered by Matrix";
license = licenses.asl20;
maintainers = with maintainers; [ kilimnik ];
mainProgram = "element-call";
};
})
|