mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-14 01:33:10 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
51 lines
1.5 KiB
Nix
51 lines
1.5 KiB
Nix
{ lib, stdenv, fetchzip, php, writeText, nixosTests }:
|
|
|
|
let
|
|
phpExt = php.withExtensions
|
|
({ enabled, all }: with all; [ json filter mysqlnd mysqli pdo pdo_mysql ]);
|
|
in stdenv.mkDerivation rec {
|
|
pname = "engelsystem";
|
|
version = "3.1.0";
|
|
|
|
src = fetchzip {
|
|
url =
|
|
"https://github.com/engelsystem/engelsystem/releases/download/v3.1.0/engelsystem-v3.1.0.zip";
|
|
sha256 = "01wra7li7n5kn1l6xkrmw4vlvvyqh089zs43qzn98hj0mw8gw7ai";
|
|
};
|
|
|
|
buildInputs = [ phpExt ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
# prepare
|
|
rm -r ./storage/
|
|
rm -r ./docker/
|
|
|
|
ln -sf /etc/engelsystem/config.php ./config/config.php
|
|
ln -sf /var/lib/engelsystem/storage/ ./storage
|
|
|
|
mkdir -p $out/share/engelsystem
|
|
mkdir -p $out/bin
|
|
cp -r . $out/share/engelsystem
|
|
|
|
echo $(command -v php)
|
|
# The patchShebangAuto function always used the php without extensions, so path the shebang manually
|
|
sed -i -e "1 s|.*|#\!${phpExt}/bin/php|" "$out/share/engelsystem/bin/migrate"
|
|
ln -s "$out/share/engelsystem/bin/migrate" "$out/bin/migrate"
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru.tests = nixosTests.engelsystem;
|
|
|
|
meta = with lib; {
|
|
description =
|
|
"Coordinate your volunteers in teams, assign them to work shifts or let them decide for themselves when and where they want to help with what";
|
|
license = licenses.gpl2;
|
|
homepage = "https://engelsystem.de";
|
|
maintainers = with maintainers; [ kloenk ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|