depot/third_party/nixpkgs/pkgs/servers/limesurvey/default.nix
Default email ae91cbe6cc Project import generated by Copybara.
GitOrigin-RevId: 536fe36e23ab0fc8b7f35c24603422eee9fc17a2
2021-02-05 18:12:51 +01:00

46 lines
1.2 KiB
Nix

{ lib, stdenv, fetchFromGitHub, writeText, nixosTests }:
stdenv.mkDerivation rec {
pname = "limesurvey";
version = "3.23.7+201006";
src = fetchFromGitHub {
owner = "LimeSurvey";
repo = "LimeSurvey";
rev = version;
sha256 = "19p978p0flknsg3iqlrrbr76qsk5ha2a84nxywqsvjrjvqrh5jrc";
};
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
'';
passthru.tests = {
smoke-test = nixosTests.limesurvey;
};
meta = with lib; {
description = "Open source survey application";
license = licenses.gpl2;
homepage = "https://www.limesurvey.org";
maintainers = with maintainers; [offline];
platforms = with platforms; unix;
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"
];
};
}