From 0603d0e9c24e71e0e3e653d7d8573ec2d3ce1cc9 Mon Sep 17 00:00:00 2001 From: Thomas Strobel <4ZKTUB6TEP74PYJOPWIR013S2AV29YUBW5F9ZH2F4D5UMJUJ6S@hash.domains> Date: Wed, 22 Nov 2017 12:11:21 +0100 Subject: [PATCH] init: restya-board at 0.6 --- .../servers/web-apps/restya-board/default.nix | 50 +++++++++++++++++++ .../restya-board/fix_request-uri.patch | 12 +++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 64 insertions(+) create mode 100644 pkgs/servers/web-apps/restya-board/default.nix create mode 100644 pkgs/servers/web-apps/restya-board/fix_request-uri.patch diff --git a/pkgs/servers/web-apps/restya-board/default.nix b/pkgs/servers/web-apps/restya-board/default.nix new file mode 100644 index 00000000000..11aa8755320 --- /dev/null +++ b/pkgs/servers/web-apps/restya-board/default.nix @@ -0,0 +1,50 @@ +{ stdenv, fetchurl, unzip }: + +let + + hide-card-id = fetchurl { + url = "https://github.com/RestyaPlatform/board-apps/releases/download/v2/r_hide_card_id-v0.1.2.zip"; + sha256 = "1scm696rs8wx0z2y0g6r9vf01b0yay79azw8n785c6zdvrbqw7dp"; + }; + + togetherjs = fetchurl { + url = "https://github.com/RestyaPlatform/board-apps/releases/download/v2/r_togetherjs-v0.1.2.zip"; + sha256 = "1kms7z0ci15plwbs6nxvz15w0ym3in39msbncaj3cn0p72kvx5cm"; + }; + +in + +stdenv.mkDerivation rec { + name = "rstya-board-${version}"; + version = "0.6"; + + src = fetchurl { + url = "https://github.com/RestyaPlatform/board/releases/download/v${version}/board-v${version}.zip"; + sha256 = "1js8c69qmga7bikp66fqhch3n2vw49918z32q88lz3havqzai8gd"; + }; + + nativeBuildInputs = [ unzip ]; + + buildCommand = '' + mkdir $out + unzip -d $out $src + + cd $out + patch -p1 < ${./fix_request-uri.patch} + + chmod +x $out/server/php/shell/*.sh + + mkdir $out/client/apps + unzip -d $out/client/apps ${hide-card-id} + unzip -d $out/client/apps ${togetherjs} + ''; + + meta = with stdenv.lib; { + description = "Web-based kanban board"; + license = licenses.osl; + homepage = http://restya.com; + maintainers = with maintainers; [ tstrobel ]; + platforms = platforms.linux; + }; +} + diff --git a/pkgs/servers/web-apps/restya-board/fix_request-uri.patch b/pkgs/servers/web-apps/restya-board/fix_request-uri.patch new file mode 100644 index 00000000000..9b96756e829 --- /dev/null +++ b/pkgs/servers/web-apps/restya-board/fix_request-uri.patch @@ -0,0 +1,12 @@ +diff --git a/server/php/R/r.php b/server/php/R/r.php +--- a/server/php/R/r.php ++++ b/server/php/R/r.php +@@ -18,7 +18,7 @@ $r_debug = ''; + $authUser = $client = $form = array(); + $_server_protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off') ? 'https' : 'http'; + $_server_domain_url = $_server_protocol . '://' . $_SERVER['HTTP_HOST']; // http://localhost +-header('x-response-url:' . $_SERVER[REQUEST_URI]); ++header('x-response-url:' . $_SERVER['REQUEST_URI']); + header('Access-Control-Allow-Origin: *'); + header('Access-Control-Allow-Methods: *'); + require_once '../config.inc.php'; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 793f3889c7f..97555a800bb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -11936,6 +11936,8 @@ with pkgs; restic = callPackage ../tools/backup/restic { }; + restya-board = callPackage ../servers/web-apps/restya-board { }; + rethinkdb = callPackage ../servers/nosql/rethinkdb { libtool = darwin.cctools; };