matrix presents

This commit is contained in:
Daniel Olsen 2020-08-14 15:42:11 +02:00
parent 3992fba6b9
commit 2e99f366c0
2 changed files with 39 additions and 0 deletions

View File

@ -21,6 +21,7 @@ in
eplot = pkgs.callPackage ./pkgs/eplot { };
synapse-admin = pkgs.callPackage ./pkgs/synapse-admin { };
# matrix-presents = pkgs.callPackage ./pkgs/matrix-presents { };
matrix-wug = pkgs.callPackage ./pkgs/matrix-wug { };
rust-synapse-compress-state = pkgs.callPackage ./pkgs/rust-synapse-compress-state { };

View File

@ -0,0 +1,38 @@
{ lib, writeText, mkYarnPackage, fetchFromGitHub, nodejs-12_x, jq, conf ? {} }:
let
defaultConfig = {
guest_homeserver = "https://reckless.half-shot.uk";
base_url = "https://presents.half-shot.uk";
};
configOverrideFile = writeText "matri-presents-config-overrides.json" (builtins.toJSON (defaultConfig // conf));
in
mkYarnPackage {
pname = "matrix-presents";
version = "unstable-2020-03-04";
#src = fetchFromGitHub {
# owner = "Half-Shot";
# repo = "matrix-presents";
# rev = "7643fc47b7eca0db5e265513c2ecb4ceb58cda78";
# sha256 = "1ci0dgbyaghgyxm9wvl77aydj937vg9kajldi8nskx7sd42dv9wj";
#};
src = ~/Documents/matrix-presents;
buildPhase = ''
cp ${configOverrideFile} deps/matrix-presents/config.json
ls -alh deps/matrix-presents/node_modules/
#mkdir -p deps/matrix-presents/node_modules/animate.css
#cp node_modules/animate.css/animate.css deps/matrix-presents/node_modules/animate.css/animate.css
yarn build
'';
installPhase = ''
mkdir $out
cp -r deps/synapse-admin/build/* $out
'';
distPhase = "true";
}