depot/third_party/nixpkgs/pkgs/by-name/yo/your_spotify/client.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

43 lines
799 B
Nix

{
stdenv,
src,
version,
meta,
offlineCache,
apiEndpoint ? "http://localhost:3000",
yarnConfigHook,
yarnBuildHook,
nodejs
}:
stdenv.mkDerivation (finalAttrs: {
pname = "your_spotify_client";
inherit version src offlineCache;
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
nodejs
];
API_ENDPOINT="${apiEndpoint}";
preBuild = ''
pushd ./apps/client/
'';
postBuild = ''
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
'';
inherit meta;
})