nixpkgs/pkgs/servers/limesurvey/default.nix
davidak de1c05439d limesurvey: 3.17.12+190823 -> 3.23.0+200813
fixes at least 17 CVEs
also adds test to package
2020-09-02 02:32:47 +02:00

42 lines
943 B
Nix

{ stdenv, fetchFromGitHub, writeText, nixosTests }:
stdenv.mkDerivation rec {
pname = "limesurvey";
version = "3.23.0+200813";
src = fetchFromGitHub {
owner = "LimeSurvey";
repo = "LimeSurvey";
rev = version;
sha256 = "0r260z40g6b2bsfzxgfwdffbs17bl784xsc67n7q8222rs601hxf";
};
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 stdenv.lib; {
description = "Open source survey application";
license = licenses.gpl2;
homepage = "https://www.limesurvey.org";
maintainers = with maintainers; [offline];
platforms = with platforms; unix;
};
}