diff --git a/default.nix b/default.nix index ba1facd..adbf5ea 100644 --- a/default.nix +++ b/default.nix @@ -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 { }; diff --git a/pkgs/matrix-presents/default.nix b/pkgs/matrix-presents/default.nix new file mode 100644 index 0000000..72dfe2d --- /dev/null +++ b/pkgs/matrix-presents/default.nix @@ -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"; +} +