about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/audio/spotify/darwin.nix
blob: 69c260a7bdb1c5dec948b1af27e9ac1171468341 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{ stdenv
, pname
, meta
, fetchurl
, undmg
, lib
}:

stdenv.mkDerivation {
  inherit pname;

  version = "1.2.15.828.g79f41970";

  src = if stdenv.isAarch64 then (
    fetchurl {
      url = "https://web.archive.org/web/20230710021420/https://download.scdn.co/SpotifyARM64.dmg";
      sha256 = "sha256-1X0Mln47uYs5l1t+5BFBk5lLnXZgnSqZLX41yA91I0s=";
    })
  else (
    fetchurl {
      url = "https://web.archive.org/web/20230710021726/https://download.scdn.co/Spotify.dmg";
      sha256 = "sha256-CmKZx8Ad0w6STBN0O4Sc4XqidOM6fCl74u2sI8w+Swk=";
    });

  nativeBuildInputs = [ undmg ];

  sourceRoot = ".";

  installPhase = ''
    mkdir -p $out/Applications
    cp -r *.app $out/Applications
  '';

  meta = meta // {
    maintainers = with lib.maintainers; [ Enzime ];
  };
}