37 lines
890 B
Nix
37 lines
890 B
Nix
{
|
|
fetchgit,
|
|
php,
|
|
dataDir ? "/var/lib/think-backend-gtcm",
|
|
}:
|
|
let
|
|
repoSrc = fetchgit {
|
|
url = "https://git.b4l.co.th/newedge/think-greaterchiangmai";
|
|
rev = "895092dea1da99ca1fa3c5c6d805384e579d417e";
|
|
hash = "sha256-ffbwQVQ1lL8XpubsGX6FTbJOjz1mbqCn+AKvR7xJhRw=";
|
|
};
|
|
src = "${repoSrc}/think-backend.greaterchiangmai.com";
|
|
in
|
|
php.buildComposerProject2 (finalAttrs: {
|
|
pname = "think-backend-gtcm";
|
|
version = "1.1.2";
|
|
|
|
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
|
|
ln -s ${dataDir}/public/storage $out/public/storage
|
|
ln -s ${dataDir}/public/uploads $out/public/uploads
|
|
runHook postInstall
|
|
'';
|
|
|
|
composerStrictValidation = false;
|
|
vendorHash = "sha256-1cY33xOF0f1qWkZKtJSjOYReb9vLQRnLZuF+GdVA7xU=";
|
|
})
|