From 67b548ba14b21caf01d1e18c40b5213214622cbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C2=B7=F0=90=91=91=F0=90=91=B4=F0=90=91=95=F0=90=91=91?= =?UTF-8?q?=F0=90=91=A9=F0=90=91=A4?= Date: Thu, 4 Dec 2025 15:50:09 +0700 Subject: [PATCH] flyspray: init at 1.0-rc11 --- pkgs/by-name/fl/flyspray/package.nix | 65 ++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 pkgs/by-name/fl/flyspray/package.nix diff --git a/pkgs/by-name/fl/flyspray/package.nix b/pkgs/by-name/fl/flyspray/package.nix new file mode 100644 index 000000000000..73e0c07faa08 --- /dev/null +++ b/pkgs/by-name/fl/flyspray/package.nix @@ -0,0 +1,65 @@ +{ + lib, + fetchzip, + stdenv, + php, + phpCfg ? null, + withMariaDB ? false, + withPostgreSQL ? true, +}: + +assert lib.assertMsg ( + withPostgreSQL || withMariaDB +) "At least one Flyspray database driver required"; + +# The src tarball has the dependencies vendored. Considering that there is +# no composer.lock, the easier option is using stdenv.mkDerivation over +# php.buildComposerProject2 + building from source. +stdenv.mkDerivation (finalAttrs: { + pname = "flyspray"; + version = "1.0-rc11"; + + src = fetchzip { + url = "https://github.com/flyspray/flyspray/releases/download/v${finalAttrs.version}/flyspray-${finalAttrs.version}.tgz"; + hash = "sha256-VNukYtHqf1OqWoyR+GXxgoX2GjTD4RfJ0SaGoDyHLJ4="; + }; + + php = + php.buildEnv { + # https://www.flyspray.org/docs/requirements/ + extensions = ( + { all, enabled }: + enabled + ++ [ + all.gd + all.pdo + all.xml + ] + ++ lib.optionals withPostgreSQL [ + all.pdo_pgsql + all.pgsql + ] + ++ lib.optionals withMariaDB [ + all.mysqli + all.mysqlnd + all.pdo_mysql + ] + ); + } + // lib.optionalAttrs (phpCfg != null) { + extraConfig = phpCfg; + }; + + postInstall = '' + DIR="$out/share/php/flyspray" + mkdir -p "$DIR" + cp -Tr "$src" "$DIR" + ''; + + meta = { + description = "Lightweight, web-based bug tracking system written in PHP for assisting with software development and project managements"; + homepage = "https://www.flyspray.org"; + license = lib.licenses.lgpl21; + maintainers = with lib.maintainers; [ toastal ]; + }; +})