tuicam: init at 0.0.2 (#377825)
[NixPkgs.git] / pkgs / by-name / li / limesurvey / package.nix
blobd8b44edb8470bfcd50ddc29e7e7fd94b040df538
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   writeText,
6   nixosTests,
7 }:
9 stdenv.mkDerivation rec {
10   pname = "limesurvey";
11   version = "6.10.2+250127";
13   src = fetchFromGitHub {
14     owner = "LimeSurvey";
15     repo = "LimeSurvey";
16     rev = version;
17     hash = "sha256-2ZRN2zbrrGWTXgsPeRWsQbg1qw2vVIAwzUI0LWgCL9g=";
18   };
20   phpConfig = writeText "config.php" ''
21     <?php
22       return require(getenv('LIMESURVEY_CONFIG'));
23     ?>
24   '';
26   installPhase = ''
27     runHook preInstall
29     mkdir -p $out/share/limesurvey
30     cp -r . $out/share/limesurvey
31     cp ${phpConfig} $out/share/limesurvey/application/config/config.php
33     runHook postInstall
34   '';
36   passthru.tests = {
37     smoke-test = nixosTests.limesurvey;
38   };
40   meta = with lib; {
41     description = "Open source survey application";
42     license = licenses.gpl2Plus;
43     homepage = "https://www.limesurvey.org";
44     maintainers = with maintainers; [ offline ];
45     platforms = with platforms; unix;
46   };