diff options
author | Jaka Hudoklin <jakahudoklin@gmail.com> | 2015-02-07 21:20:53 +0100 |
---|---|---|
committer | Jaka Hudoklin <jakahudoklin@gmail.com> | 2015-02-07 23:18:51 +0100 |
commit | 41ae4d1af9a2273a1925cfe755989ee7f76e8adb (patch) | |
tree | ccf112c14a8e68974b27d11eb0b9599115ace985 /pkgs/servers/limesurvey | |
parent | a6a9d8137f5e08c33c270a7fb38a0ed55860fedf (diff) | |
download | nixpkgs-41ae4d1af9a2273a1925cfe755989ee7f76e8adb.tar nixpkgs-41ae4d1af9a2273a1925cfe755989ee7f76e8adb.tar.gz nixpkgs-41ae4d1af9a2273a1925cfe755989ee7f76e8adb.tar.bz2 nixpkgs-41ae4d1af9a2273a1925cfe755989ee7f76e8adb.tar.lz nixpkgs-41ae4d1af9a2273a1925cfe755989ee7f76e8adb.tar.xz nixpkgs-41ae4d1af9a2273a1925cfe755989ee7f76e8adb.tar.zst nixpkgs-41ae4d1af9a2273a1925cfe755989ee7f76e8adb.zip |
add limesurvey package and nixos module
Diffstat (limited to 'pkgs/servers/limesurvey')
-rw-r--r-- | pkgs/servers/limesurvey/default.nix | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/pkgs/servers/limesurvey/default.nix b/pkgs/servers/limesurvey/default.nix new file mode 100644 index 00000000000..89ce5a644d8 --- /dev/null +++ b/pkgs/servers/limesurvey/default.nix @@ -0,0 +1,41 @@ +{ 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]; + }; +} |