33 lines
752 B
Nix
33 lines
752 B
Nix
{
|
|
fetchgit,
|
|
php,
|
|
dataDir ? "/var/lib/think-gtcm",
|
|
}:
|
|
let
|
|
repoSrc = fetchgit {
|
|
url = "https://git.b4l.co.th/newedge/think-greaterchiangmai";
|
|
rev = "7c17aa78436538241c09fc7d633904d3c063011e";
|
|
hash = "sha256-GDx0+PmuCXC+UPtsvsocCZQiTPcnOZEzJI17sxrVv7Q=";
|
|
};
|
|
src = "${repoSrc}/think.greaterchiangmai.com";
|
|
in
|
|
php.buildComposerProject2 (finalAttrs: {
|
|
pname = "think-gtcm";
|
|
version = "1.0.0";
|
|
|
|
inherit src;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
mkdir -p $out
|
|
cp -R * $out
|
|
rm -rf $out/storage
|
|
ln -s ${dataDir}/.env $out/.env
|
|
ln -s ${dataDir}/storage $out/storage
|
|
runHook postInstall
|
|
'';
|
|
|
|
composerStrictValidation = false;
|
|
vendorHash = "sha256-QV3hR3U3GwCqrCRxfkazmJwDpO1vFyMfA6YqUb4bjMI=";
|
|
})
|