forked from mirrors/nixpkgs
spotify: consolidate wrapper
This commit is contained in:
parent
c28018857a
commit
696449dedb
|
@ -2,6 +2,9 @@
|
||||||
, glib, pango, cairo, atk, gdk-pixbuf, gtk3, cups, nspr, nss, libpng, libnotify
|
, glib, pango, cairo, atk, gdk-pixbuf, gtk3, cups, nspr, nss, libpng, libnotify
|
||||||
, libgcrypt, systemd, fontconfig, dbus, expat, ffmpeg, curlWithGnuTls, zlib, gnome
|
, libgcrypt, systemd, fontconfig, dbus, expat, ffmpeg, curlWithGnuTls, zlib, gnome
|
||||||
, at-spi2-atk, at-spi2-core, libpulseaudio, libdrm, mesa, libxkbcommon
|
, 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
|
let
|
||||||
|
@ -67,7 +70,7 @@ let
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "spotify-unwrapped";
|
pname = "spotify";
|
||||||
inherit version;
|
inherit version;
|
||||||
|
|
||||||
# fetch from snapcraft instead of the debian repository most repos fetch from.
|
# fetch from snapcraft instead of the debian repository most repos fetch from.
|
||||||
|
@ -143,6 +146,9 @@ stdenv.mkDerivation {
|
||||||
librarypath="${lib.makeLibraryPath deps}:$libdir"
|
librarypath="${lib.makeLibraryPath deps}:$libdir"
|
||||||
wrapProgram $out/share/spotify/spotify \
|
wrapProgram $out/share/spotify/spotify \
|
||||||
''${gappsWrapperArgs[@]} \
|
''${gappsWrapperArgs[@]} \
|
||||||
|
${lib.optionalString (deviceScaleFactor != null) ''
|
||||||
|
--add-flags "--force-device-scale-factor=${toString deviceScaleFactor}" \
|
||||||
|
''} \
|
||||||
--prefix LD_LIBRARY_PATH : "$librarypath" \
|
--prefix LD_LIBRARY_PATH : "$librarypath" \
|
||||||
--prefix PATH : "${gnome.zenity}/bin"
|
--prefix PATH : "${gnome.zenity}/bin"
|
||||||
|
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
{ 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;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1393,6 +1393,7 @@ mapAliases ({
|
||||||
# spidermonkey is not ABI upwards-compatible, so only allow this for nix-shell
|
# spidermonkey is not ABI upwards-compatible, so only allow this for nix-shell
|
||||||
spidermonkey = spidermonkey_78; # Added 2020-10-09
|
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
|
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
|
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
|
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
|
sqliteInteractive = throw "'sqliteInteractive' has been renamed to/replaced by 'sqlite-interactive'"; # Converted to throw 2022-02-22
|
||||||
|
|
|
@ -31936,9 +31936,7 @@ with pkgs;
|
||||||
autoreconfHook = buildPackages.autoreconfHook269;
|
autoreconfHook = buildPackages.autoreconfHook269;
|
||||||
};
|
};
|
||||||
|
|
||||||
spotify-unwrapped = callPackage ../applications/audio/spotify { };
|
spotify = callPackage ../applications/audio/spotify { };
|
||||||
|
|
||||||
spotify = callPackage ../applications/audio/spotify/wrapper.nix { };
|
|
||||||
|
|
||||||
spotifywm = callPackage ../applications/audio/spotifywm { };
|
spotifywm = callPackage ../applications/audio/spotifywm { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue