14 stdenv.mkDerivation (finalAttrs: {
15 pname = "your_spotify_server";
18 src = fetchFromGitHub {
20 repo = "your_spotify";
21 rev = "refs/tags/${finalAttrs.version}";
22 hash = "sha256-e82j2blGxQLWAlBNuAnFvlD9vwMk4/mRI0Vf7vuaPA0=";
25 offlineCache = fetchYarnDeps {
26 yarnLock = finalAttrs.src + "/yarn.lock";
27 hash = "sha256-5SgknaRVzgO2Dzc8MhAaM8UERWMv+PrItzevoWHbWnA=";
43 export NODE_ENV="production"
44 yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
45 patchShebangs node_modules/
51 mkdir -p $out/share/your_spotify
52 cp -r node_modules $out/share/your_spotify/node_modules
53 cp -r ./apps/server/{lib,package.json} $out
55 makeWrapper ${lib.escapeShellArg (lib.getExe nodejs)} "$out/bin/your_spotify_migrate" \
56 --add-flags "$out/lib/migrations.js" --set NODE_PATH "$out/share/your_spotify/node_modules"
57 makeWrapper ${lib.escapeShellArg (lib.getExe nodejs)} "$out/bin/your_spotify_server" \
58 --add-flags "$out/lib/index.js" --set NODE_PATH "$out/share/your_spotify/node_modules"
64 client = callPackage ./client.nix {
65 inherit (finalAttrs) src version offlineCache meta;
68 inherit (nixosTests) your_spotify;
73 homepage = "https://github.com/Yooooomi/your_spotify";
74 changelog = "https://github.com/Yooooomi/your_spotify/releases/tag/${finalAttrs.version}";
75 description = "Self-hosted application that tracks what you listen and offers you a dashboard to explore statistics about it";
76 license = lib.licenses.gpl3Only;
77 maintainers = with lib.maintainers; [ patrickdag ];
78 mainProgram = "your_spotify_server";