Merge pull request #57752 from aanderse/limesurvey

limesurvey: 2.05_plus_141210 -> 3.17.1+190408, init module
This commit is contained in:
Matthew Bauer
2019-06-01 17:31:15 -04:00
committed by GitHub
7 changed files with 342 additions and 213 deletions

View File

@@ -1,41 +1,32 @@
{ stdenv, lib, fetchFromGitHub, writeText, makeWrapper, php }:
{ stdenv, fetchFromGitHub, writeText }:
stdenv.mkDerivation rec {
name = "limesurvey-${version}";
version = "2.05_plus_141210";
pname = "limesurvey";
version = "3.17.1+190408";
src = fetchFromGitHub {
owner = "LimeSurvey";
repo = "LimeSurvey";
rev = version;
sha256 = "1b5yixrlrjm055ag07c7phk84mk1892v20nsss1y0xzvgn6s14gq";
sha256 = "0d6dgw9af492vn5yg2hq82ipq4p80c19lhky0dpwrm5kv67kxbhv";
};
buildInputs = [ makeWrapper ];
phpConfig = writeText "config.php" ''
<?php
return require(getenv('LIMESURVEY_CONFIG'));
?>
'';
patchPhase = ''
substituteInPlace application/core/LSYii_Application.php \
--replace "'basePath" "//'basePath"
'';
installPhase = ''
mkdir -p $out/{bin,share/limesurvey}
cp -R . $out/share/limesurvey
mkdir -p $out/share/limesurvey
cp -r . $out/share/limesurvey
cp ${phpConfig} $out/share/limesurvey/application/config/config.php
makeWrapper ${php}/bin/php $out/bin/limesurvey-console \
--add-flags "$out/share/limesurvey/application/commands/console.php"
'';
meta = with lib; {
meta = with stdenv.lib; {
description = "Open source survey application";
license = licenses.gpl2;
homepage = https://www.limesurvey.org;
homepage = "https://www.limesurvey.org";
maintainers = with maintainers; [offline];
platforms = with platforms; unix;
};