From 2c18fa585efada5e91a0cb8b6988ff15154c8be1 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Fri, 28 Jul 2023 13:57:53 +0200 Subject: package matrix.to apparently the default homeserver this uses is not configurable??? … might hack around later --- flake.nix | 2 +- pkgs/matrix-to.nix | 29 +++++++++++++++++++++++++++++ pkgs/overlay.nix | 2 ++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 pkgs/matrix-to.nix diff --git a/flake.nix b/flake.nix index ff48ac8..3d2b79f 100644 --- a/flake.nix +++ b/flake.nix @@ -139,7 +139,7 @@ inherit (nixpkgs) galmon-core galmon-full glitchtip typst almanac rustex kijetesantakaluotokieni showrt isabelle-utils isabat - travelynx crs-tracker crs-php bahnhof-name; + travelynx crs-tracker crs-php bahnhof-name matrix-to; }; nixosModules = { glitchtip = import ./modules/glitchtip.nix; }; diff --git a/pkgs/matrix-to.nix b/pkgs/matrix-to.nix new file mode 100644 index 0000000..7e9fe25 --- /dev/null +++ b/pkgs/matrix-to.nix @@ -0,0 +1,29 @@ +{ mkYarnPackage, fetchYarnDeps, fetchFromGitHub, lib }: + +mkYarnPackage rec { + pname = "matrix.to"; + version = "1.2.16"; + + src = fetchFromGitHub { + owner = "matrix-org"; + repo = "matrix.to"; + rev = version; + sha256 = "sha256-NeEtRFAjvbW8K5ysm0wMYc1MushF9YT1Nvhucd2fIyE="; + }; + + offlineCache = fetchYarnDeps { + yarnLock = "${src.outPath}/yarn.lock"; + hash = "sha256-KFNU6V9JVa3+O9HOGtHfEGj7nq9TizLiNOiWROCPUHQ="; + }; + + buildPhase = '' + yarn --offline build + ''; + + distPhase = "true"; + + installPhase = '' + mkdir -p $out + cp -r deps/matrix.to/build/* $out + ''; +} diff --git a/pkgs/overlay.nix b/pkgs/overlay.nix index 00d26d3..e3a883b 100644 --- a/pkgs/overlay.nix +++ b/pkgs/overlay.nix @@ -100,4 +100,6 @@ in }; mu = oldstable.mu; + + matrix-to = self.callPackage ./matrix-to.nix {}; } -- cgit v1.2.3