restya-board: switch to fetchFromGitHub

This commit is contained in:
nek0 2019-12-04 20:07:27 +01:00 committed by Aaron Andersen
parent 94e5deab05
commit e511b63579
1 changed files with 17 additions and 16 deletions

View File

@ -1,15 +1,12 @@
{ stdenv, fetchurl, unzip }:
{ stdenv, fetchurl, fetchFromGitHub, unzip }:
let
hide-card-additional-information = fetchurl {
url = "https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_hide_card_additional_informations-v0.1.3.zip";
sha256 = "1cp92av7b4nzdgybbqnh9jpkqkjv1rvm98ca96ib4qfsyi9gjrp7";
};
togetherjs = fetchurl {
url = "https://github.com/RestyaPlatform/board-apps/releases/download/v1/r_togetherjs-v0.1.3.zip";
sha256 = "1p765kbx4wzf6grgy4x3kvczm6jkm1ipl0cvkvyg4dsim07ab0zy";
board-apps = fetchFromGitHub {
owner = "RestyaPlatform";
repo = "board-apps";
rev = "v1";
sha256 = "038qq0x547xzr9v1sa6cd3pagi2z4sfy80lcjn3qqgp5h39mb02x";
};
in
@ -18,24 +15,28 @@ stdenv.mkDerivation rec {
pname = "restya-board";
version = "0.6.7";
src = fetchurl {
url = "https://github.com/RestyaPlatform/board/releases/download/v${version}/board-v${version}.zip";
sha256 = "07xiakk8fljc79qi80n5945hy2rqrc8kn2i7d49rri2f440wv51i";
src = fetchFromGitHub {
owner = "RestyaPlatform";
repo = "board";
rev = "v${version}";
sha256 = "0vba8qrg28a5g2ax7xzdp5j2wgl4v7cgasbzhhdji29qjfrldgbf";
};
nativeBuildInputs = [ unzip ];
outputs = [ "out" ];
buildCommand = ''
mkdir $out
unzip -d $out $src
mkdir -p $out/client/apps
cp -r $src/* $out
cd $out
chmod +x $out/server/php/shell/*.sh
mkdir $out/client/apps
unzip -d $out/client/apps ${hide-card-additional-information}
unzip -d $out/client/apps ${togetherjs}
cp -r ${board-apps}/r_hide_card_id $out/client/apps
cp -r ${board-apps}/r_togetherjs $out/client/apps
'';
meta = with stdenv.lib; {