2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, writeText, nixosTests }:
|
2015-02-07 21:20:53 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-03-06 13:40:22 +01:00
|
|
|
pname = "limesurvey";
|
2020-10-12 20:39:03 +02:00
|
|
|
version = "3.23.7+201006";
|
2015-02-07 21:20:53 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "LimeSurvey";
|
|
|
|
repo = "LimeSurvey";
|
|
|
|
rev = version;
|
2020-10-12 20:39:03 +02:00
|
|
|
sha256 = "19p978p0flknsg3iqlrrbr76qsk5ha2a84nxywqsvjrjvqrh5jrc";
|
2015-02-07 21:20:53 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
phpConfig = writeText "config.php" ''
|
|
|
|
<?php
|
|
|
|
return require(getenv('LIMESURVEY_CONFIG'));
|
|
|
|
?>
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2019-08-24 14:15:13 +02:00
|
|
|
runHook preInstall
|
|
|
|
|
2019-03-14 02:43:50 +01:00
|
|
|
mkdir -p $out/share/limesurvey
|
|
|
|
cp -r . $out/share/limesurvey
|
2015-02-07 21:20:53 +01:00
|
|
|
cp ${phpConfig} $out/share/limesurvey/application/config/config.php
|
2019-08-24 14:15:13 +02:00
|
|
|
|
|
|
|
runHook postInstall
|
2015-02-07 21:20:53 +01:00
|
|
|
'';
|
|
|
|
|
2020-09-01 22:47:38 +02:00
|
|
|
passthru.tests = {
|
|
|
|
smoke-test = nixosTests.limesurvey;
|
|
|
|
};
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2015-02-07 21:20:53 +01:00
|
|
|
description = "Open source survey application";
|
|
|
|
license = licenses.gpl2;
|
2019-03-14 02:43:50 +01:00
|
|
|
homepage = "https://www.limesurvey.org";
|
2015-02-07 21:20:53 +01:00
|
|
|
maintainers = with maintainers; [offline];
|
2016-08-02 19:50:55 +02:00
|
|
|
platforms = with platforms; unix;
|
2021-01-29 23:42:04 +01:00
|
|
|
knownVulnerabilities = [
|
|
|
|
# https://github.com/LimeSurvey/LimeSurvey/blob/3.x-LTS/docs/release_notes.txt
|
|
|
|
"Unauthorized access to statistics of a survey with certain permission configurations"
|
|
|
|
"Persistent XSS in browse response"
|
|
|
|
];
|
2015-02-07 21:20:53 +01:00
|
|
|
};
|
|
|
|
}
|