mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-20 04:33:57 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
54 lines
1.4 KiB
Nix
54 lines
1.4 KiB
Nix
{ lib
|
|
, fetchzip
|
|
, nixosTests
|
|
, php
|
|
, stdenv
|
|
, writeText
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "engelsystem";
|
|
version = "3.5.0";
|
|
|
|
src = fetchzip {
|
|
url = "https://github.com/engelsystem/engelsystem/releases/download/v${version}/engelsystem-v${version}.zip";
|
|
hash = "sha256-RbzAHBZN02u14WaLtq5EOh4XwIdHKvzX7NhDBhn/CaU=";
|
|
};
|
|
|
|
buildInputs = [ php ];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
# prepare
|
|
rm -r ./storage/
|
|
|
|
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|.*|#\!${lib.getExe 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; {
|
|
changelog = "https://github.com/engelsystem/engelsystem/releases/tag/v${version}";
|
|
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";
|
|
homepage = "https://engelsystem.de";
|
|
license = licenses.gpl2Only;
|
|
mainProgram = "migrate";
|
|
maintainers = [ ];
|
|
platforms = platforms.all;
|
|
};
|
|
}
|