15 stdenv.mkDerivation (finalAttrs: {
16 pname = "your_spotify_server";
19 src = fetchFromGitHub {
21 repo = "your_spotify";
22 rev = "refs/tags/${finalAttrs.version}";
23 hash = "sha256-BytHkvm0gfMnsKe2gDTARWYIHBpfAfIisf2p4bmrpMA=";
26 offlineCache = fetchYarnDeps {
27 yarnLock = finalAttrs.src + "/yarn.lock";
28 hash = "sha256-D7rL3hxidLaChCwn5umQAnWr4cTVQ1iwDs5+gIDgBGI=";
44 export NODE_ENV="production"
45 yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
46 patchShebangs node_modules/
52 mkdir -p $out/share/your_spotify
53 cp -r node_modules $out/share/your_spotify/node_modules
54 cp -r ./apps/server/{lib,package.json} $out
56 makeWrapper ${lib.escapeShellArg (lib.getExe nodejs)} "$out/bin/your_spotify_migrate" \
57 --add-flags "$out/lib/migrations.js" --set NODE_PATH "$out/share/your_spotify/node_modules"
58 makeWrapper ${lib.escapeShellArg (lib.getExe nodejs)} "$out/bin/your_spotify_server" \
59 --add-flags "$out/lib/index.js" --set NODE_PATH "$out/share/your_spotify/node_modules"
65 client = callPackage ./client.nix {
74 inherit (nixosTests) your_spotify;
76 updateScript = nix-update-script { };
80 homepage = "https://github.com/Yooooomi/your_spotify";
81 changelog = "https://github.com/Yooooomi/your_spotify/releases/tag/${finalAttrs.version}";
82 description = "Self-hosted application that tracks what you listen and offers you a dashboard to explore statistics about it";
83 license = lib.licenses.gpl3Only;
84 maintainers = with lib.maintainers; [ patrickdag ];
85 mainProgram = "your_spotify_server";