python313Packages.traits: fix build (#373698)
[NixPkgs.git] / pkgs / by-name / yo / your_spotify / client.nix
blobafdad50b7409c276b543782ffff94e2b16ae741c
2   stdenv,
3   src,
4   version,
5   meta,
6   offlineCache,
7   apiEndpoint ? "http://localhost:3000",
8   yarnConfigHook,
9   yarnBuildHook,
10   nodejs,
13 stdenv.mkDerivation (finalAttrs: {
14   pname = "your_spotify_client";
15   inherit version src offlineCache;
17   nativeBuildInputs = [
18     yarnConfigHook
19     yarnBuildHook
20     nodejs
21   ];
23   API_ENDPOINT = "${apiEndpoint}";
24   preBuild = ''
25     pushd ./apps/client/
26   '';
27   postBuild = ''
28     substituteInPlace scripts/run/variables.sh --replace-quiet '/app/apps/client/' "./"
29     chmod +x ./scripts/run/variables.sh
30     patchShebangs --build ./scripts/run/variables.sh
31     ./scripts/run/variables.sh
32     popd
33   '';
35   installPhase = ''
36     runHook preInstall
37     mkdir -p $out
38     cp -r ./apps/client/build/* $out
39     runHook postInstall
40   '';
42   inherit meta;