2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, writeText, nixosTests }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "limesurvey";
|
2020-10-16 20:44:37 +00:00
|
|
|
version = "3.23.7+201006";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "LimeSurvey";
|
|
|
|
repo = "LimeSurvey";
|
|
|
|
rev = version;
|
2020-10-16 20:44:37 +00:00
|
|
|
sha256 = "19p978p0flknsg3iqlrrbr76qsk5ha2a84nxywqsvjrjvqrh5jrc";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
phpConfig = writeText "config.php" ''
|
|
|
|
<?php
|
|
|
|
return require(getenv('LIMESURVEY_CONFIG'));
|
|
|
|
?>
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
|
|
|
|
mkdir -p $out/share/limesurvey
|
|
|
|
cp -r . $out/share/limesurvey
|
|
|
|
cp ${phpConfig} $out/share/limesurvey/application/config/config.php
|
|
|
|
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
passthru.tests = {
|
|
|
|
smoke-test = nixosTests.limesurvey;
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Open source survey application";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
homepage = "https://www.limesurvey.org";
|
|
|
|
maintainers = with maintainers; [offline];
|
|
|
|
platforms = with platforms; unix;
|
2021-02-05 17:12:51 +00: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"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|