nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 src,
4 version,
5 meta,
6 offlineCache,
7 apiEndpoint ? "http://localhost:3000",
8 yarnConfigHook,
9 yarnBuildHook,
10 nodejs,
11}:
12
13stdenv.mkDerivation (finalAttrs: {
14 pname = "your_spotify_client";
15 inherit version src offlineCache;
16
17 nativeBuildInputs = [
18 yarnConfigHook
19 yarnBuildHook
20 nodejs
21 ];
22
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 '';
34
35 installPhase = ''
36 runHook preInstall
37 mkdir -p $out
38 cp -r ./apps/client/build/* $out
39 runHook postInstall
40 '';
41
42 inherit meta;
43})