Unverified Commit ef98abf6 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

Merge pull request #199779 from SuperSandro2000/spotify

parents ed63dc36 696449de
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -2,6 +2,9 @@
, glib, pango, cairo, atk, gdk-pixbuf, gtk3, cups, nspr, nss, libpng, libnotify
, libgcrypt, systemd, fontconfig, dbus, expat, ffmpeg, curlWithGnuTls, zlib, gnome
, at-spi2-atk, at-spi2-core, libpulseaudio, libdrm, mesa, libxkbcommon
  # High-DPI support: Spotify's --force-device-scale-factor argument
  # not added if `null`, otherwise, should be a number.
, deviceScaleFactor ? null
}:

let
@@ -67,7 +70,7 @@ let
in

stdenv.mkDerivation {
  pname = "spotify-unwrapped";
  pname = "spotify";
  inherit version;

  # fetch from snapcraft instead of the debian repository most repos fetch from.
@@ -143,6 +146,9 @@ stdenv.mkDerivation {
      librarypath="${lib.makeLibraryPath deps}:$libdir"
      wrapProgram $out/share/spotify/spotify \
        ''${gappsWrapperArgs[@]} \
        ${lib.optionalString (deviceScaleFactor != null) ''
          --add-flags "--force-device-scale-factor=${toString deviceScaleFactor}" \
        ''} \
        --prefix LD_LIBRARY_PATH : "$librarypath" \
        --prefix PATH : "${gnome.zenity}/bin"

+0 −31
Original line number Diff line number Diff line
{ symlinkJoin
, lib
, spotify-unwrapped
, makeWrapper

  # High-DPI support: Spotify's --force-device-scale-factor argument; not added
  # if `null`, otherwise, should be a number.
, deviceScaleFactor ? null
}:

symlinkJoin {
  name = "spotify-${spotify-unwrapped.version}";

  paths = [ spotify-unwrapped.out ];

  nativeBuildInputs = [ makeWrapper ];
  preferLocalBuild = true;
  passthru.unwrapped = spotify-unwrapped;
  postBuild = ''
    wrapProgram $out/bin/spotify \
        ${lib.optionalString (deviceScaleFactor != null) ''
            --add-flags ${lib.escapeShellArg "--force-device-scale-factor=${
                builtins.toString deviceScaleFactor
              }"}
        ''}
  '';

  meta = spotify-unwrapped.meta // {
    priority = (spotify-unwrapped.meta.priority or 0) - 1;
  };
}
+1 −0
Original line number Diff line number Diff line
@@ -1393,6 +1393,7 @@ mapAliases ({
  # spidermonkey is not ABI upwards-compatible, so only allow this for nix-shell
  spidermonkey = spidermonkey_78; # Added 2020-10-09
  split2flac = throw "split2flac has been removed. Consider using the shnsplit command from shntool package or help packaging unflac."; # added 2022-01-13
  spotify-unwrapped = spotify; # added 2022-11-06
  spring-boot = spring-boot-cli; # added 2020-04-24
  sqlite3_analyzer = throw "'sqlite3_analyzer' has been renamed to/replaced by 'sqlite-analyzer'"; # Converted to throw 2022-02-22
  sqliteInteractive = throw "'sqliteInteractive' has been renamed to/replaced by 'sqlite-interactive'"; # Converted to throw 2022-02-22
+1 −3
Original line number Diff line number Diff line
@@ -31935,9 +31935,7 @@ with pkgs;
    autoreconfHook = buildPackages.autoreconfHook269;
  };
  spotify-unwrapped = callPackage ../applications/audio/spotify { };
  spotify = callPackage ../applications/audio/spotify/wrapper.nix { };
  spotify = callPackage ../applications/audio/spotify { };
  spotifywm = callPackage ../applications/audio/spotifywm { };