mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-22 13:43:22 +00:00
21f17d69f6
Build-tested on x86_64 Linux & Mac.
43 lines
1.1 KiB
Nix
43 lines
1.1 KiB
Nix
{ stdenv, lib, fetchFromGitHub, writeText, makeWrapper, php }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "limesurvey-${version}";
|
|
version = "2.05_plus_141210";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "LimeSurvey";
|
|
repo = "LimeSurvey";
|
|
rev = version;
|
|
sha256 = "1b5yixrlrjm055ag07c7phk84mk1892v20nsss1y0xzvgn6s14gq";
|
|
};
|
|
|
|
buildInputs = [ makeWrapper ];
|
|
|
|
phpConfig = writeText "config.php" ''
|
|
<?php
|
|
return require(getenv('LIMESURVEY_CONFIG'));
|
|
?>
|
|
'';
|
|
|
|
patchPhase = ''
|
|
substituteInPlace application/core/LSYii_Application.php \
|
|
--replace "'basePath" "//'basePath"
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/{bin,share/limesurvey}
|
|
cp -R . $out/share/limesurvey
|
|
cp ${phpConfig} $out/share/limesurvey/application/config/config.php
|
|
makeWrapper ${php}/bin/php $out/bin/limesurvey-console \
|
|
--add-flags "$out/share/limesurvey/application/commands/console.php"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Open source survey application";
|
|
license = licenses.gpl2;
|
|
homepage = https://www.limesurvey.org;
|
|
maintainers = with maintainers; [offline];
|
|
platforms = with platforms; unix;
|
|
};
|
|
}
|