2024-03-06 15:49:40 +00:00
|
|
|
{
|
2024-06-13 10:45:47 +00:00
|
|
|
stdenv,
|
2024-03-06 15:49:40 +00:00
|
|
|
src,
|
|
|
|
version,
|
2024-06-13 10:45:47 +00:00
|
|
|
meta,
|
|
|
|
offlineCache,
|
|
|
|
apiEndpoint ? "http://localhost:3000",
|
|
|
|
yarnConfigHook,
|
|
|
|
yarnBuildHook,
|
|
|
|
nodejs
|
2024-03-06 15:49:40 +00:00
|
|
|
}:
|
2024-06-13 10:45:47 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2024-03-06 15:49:40 +00:00
|
|
|
pname = "your_spotify_client";
|
2024-06-13 10:45:47 +00:00
|
|
|
inherit version src offlineCache;
|
2024-03-06 15:49:40 +00:00
|
|
|
|
2024-06-13 10:45:47 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
yarnConfigHook
|
|
|
|
yarnBuildHook
|
|
|
|
nodejs
|
|
|
|
];
|
2024-03-06 15:49:40 +00:00
|
|
|
|
2024-06-13 10:45:47 +00:00
|
|
|
API_ENDPOINT="${apiEndpoint}";
|
|
|
|
preBuild = ''
|
2024-03-06 15:49:40 +00:00
|
|
|
pushd ./apps/client/
|
2024-06-13 10:45:47 +00:00
|
|
|
'';
|
|
|
|
postBuild = ''
|
2024-03-06 15:49:40 +00:00
|
|
|
substituteInPlace scripts/run/variables.sh --replace-quiet '/app/apps/client/' "./"
|
|
|
|
chmod +x ./scripts/run/variables.sh
|
|
|
|
patchShebangs --build ./scripts/run/variables.sh
|
|
|
|
./scripts/run/variables.sh
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
|
|
|
mkdir -p $out
|
|
|
|
cp -r ./apps/client/build/* $out
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
2024-06-13 10:45:47 +00:00
|
|
|
|
|
|
|
inherit meta;
|
|
|
|
})
|