anvil-editor: init at 0.4
[NixPkgs.git] / pkgs / applications / networking / instant-messengers / hydrogen-web / unwrapped.nix
blobf0e9a267e950b23194388936a056df16c5c3ed29
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   fetchYarnDeps,
6   yarn,
7   fixup-yarn-lock,
8   nodejs,
9   olm,
12 stdenv.mkDerivation (finalAttrs: {
13   pname = "hydrogen-web";
14   version = "0.5.0";
16   src = fetchFromGitHub {
17     owner = "element-hq";
18     repo = "hydrogen-web";
19     rev = "v${finalAttrs.version}";
20     hash = "sha256-pXrmWPp4/MYIS1FHEGzAxGbh4OnTaiPudg+NauvA6Vc=";
21   };
23   offlineCache = fetchYarnDeps {
24     yarnLock = finalAttrs.src + "/yarn.lock";
25     hash = "sha256-j+BwlmL0ncaccy9qQbzb9GpDRC4KB9MwOR2ISx+vbLE=";
26   };
28   nativeBuildInputs = [
29     yarn
30     fixup-yarn-lock
31     nodejs
32   ];
34   configurePhase = ''
35     runHook preConfigure
37     export HOME=$PWD/tmp
38     mkdir -p $HOME
40     fixup-yarn-lock yarn.lock
41     yarn config --offline set yarn-offline-mirror $offlineCache
42     yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
43     patchShebangs node_modules
45     runHook postConfigure
46   '';
48   buildPhase = ''
49     runHook preBuild
51     yarn build --offline
53     runHook postBuild
54   '';
56   installPhase = ''
57     runHook preInstall
59     cp -R target $out
61     runHook postInstall
62   '';
64   meta = {
65     description = "Lightweight matrix client with legacy and mobile browser support";
66     homepage = "https://github.com/element-hq/hydrogen-web";
67     maintainers = lib.teams.matrix.members;
68     license = lib.licenses.asl20;
69     platforms = lib.platforms.all;
70     inherit (olm.meta) knownVulnerabilities;
71   };