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";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "3.27.33+220125";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "LimeSurvey";
|
|
|
|
repo = "LimeSurvey";
|
|
|
|
rev = version;
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "sha256-iwTsn+glh8fwt1IaH9iDKDhEAnx1s1zvv1dmsdzUk8g=";
|
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;
|
|
|
|
};
|
|
|
|
}
|