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";
|
2023-03-24 00:07:29 +00:00
|
|
|
version = "5.6.9+230306";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "LimeSurvey";
|
|
|
|
repo = "LimeSurvey";
|
|
|
|
rev = version;
|
2023-03-24 00:07:29 +00:00
|
|
|
hash = "sha256-FBcpP9Zb4flr1AZlocRW8xx9UCXJAU9aaGXcWQE6iWc=";
|
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;
|
|
|
|
};
|
|
|
|
}
|