commit
5e3a16c8af
@ -1,82 +0,0 @@ |
||||
{ lib, stdenv, alsa-lib, atk, at-spi2-atk, cairo, cups, dbus, dpkg, expat, fontconfig, freetype |
||||
, fetchurl, GConf, gdk-pixbuf, glib, gtk2, gtk3, libpulseaudio, makeWrapper, nspr |
||||
, nss, pango, udev, xorg |
||||
}: |
||||
|
||||
let |
||||
version = "4.7.1"; |
||||
|
||||
deps = [ |
||||
alsa-lib |
||||
atk |
||||
at-spi2-atk |
||||
cairo |
||||
cups |
||||
dbus |
||||
expat |
||||
fontconfig |
||||
freetype |
||||
GConf |
||||
gdk-pixbuf |
||||
glib |
||||
gtk2 |
||||
gtk3 |
||||
libpulseaudio |
||||
nspr |
||||
nss |
||||
pango |
||||
stdenv.cc.cc |
||||
udev |
||||
xorg.libX11 |
||||
xorg.libxcb |
||||
xorg.libXcomposite |
||||
xorg.libXcursor |
||||
xorg.libXdamage |
||||
xorg.libXext |
||||
xorg.libXfixes |
||||
xorg.libXi |
||||
xorg.libXrandr |
||||
xorg.libXrender |
||||
xorg.libXScrnSaver |
||||
xorg.libXtst |
||||
]; |
||||
|
||||
in |
||||
|
||||
stdenv.mkDerivation { |
||||
pname = "google-play-music-desktop-player"; |
||||
inherit version; |
||||
|
||||
src = fetchurl { |
||||
url = "https://github.com/MarshallOfSound/Google-Play-Music-Desktop-Player-UNOFFICIAL-/releases/download/v${version}/google-play-music-desktop-player_${version}_amd64.deb"; |
||||
sha256 = "1ljm9c5sv6wa7pa483yq03wq9j1h1jdh8363z5m2imz407yzgm5r"; |
||||
}; |
||||
|
||||
dontBuild = true; |
||||
nativeBuildInputs = [ dpkg makeWrapper ]; |
||||
|
||||
unpackPhase = '' |
||||
dpkg -x $src . |
||||
''; |
||||
|
||||
installPhase = '' |
||||
mkdir -p $out |
||||
cp -r ./usr/share $out |
||||
cp -r ./usr/bin $out |
||||
|
||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ |
||||
"$out/share/google-play-music-desktop-player/Google Play Music Desktop Player" |
||||
|
||||
wrapProgram $out/bin/google-play-music-desktop-player \ |
||||
--prefix LD_LIBRARY_PATH : "$out/share/google-play-music-desktop-player" \ |
||||
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath deps}" |
||||
''; |
||||
|
||||
meta = { |
||||
homepage = "https://www.googleplaymusicdesktopplayer.com/"; |
||||
description = "A beautiful cross platform Desktop Player for Google Play Music and YouTube Music"; |
||||
license = lib.licenses.mit; |
||||
platforms = [ "x86_64-linux" ]; |
||||
maintainers = with lib.maintainers; [ anna328p SuprDewd ]; |
||||
}; |
||||
} |
@ -1,33 +0,0 @@ |
||||
--- a/audio/hufftable.cpp
|
||||
+++ b/audio/hufftable.cpp
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
+#include <climits>
|
||||
#include "MPEGaudio.h"
|
||||
|
||||
static const unsigned int
|
||||
@@ -550,11 +551,11 @@ htd33[ 31][2]={{ 16, 1},{ 8, 1},{ 4,
|
||||
|
||||
const HUFFMANCODETABLE MPEGaudio::ht[HTN]=
|
||||
{
|
||||
- { 0, 0-1, 0-1, 0, 0, htd33},
|
||||
+ { 0, UINT_MAX, UINT_MAX, 0, 0, htd33},
|
||||
{ 1, 2-1, 2-1, 0, 7,htd01},
|
||||
{ 2, 3-1, 3-1, 0, 17,htd02},
|
||||
{ 3, 3-1, 3-1, 0, 17,htd03},
|
||||
- { 4, 0-1, 0-1, 0, 0, htd33},
|
||||
+ { 4, UINT_MAX, UINT_MAX, 0, 0, htd33},
|
||||
{ 5, 4-1, 4-1, 0, 31,htd05},
|
||||
{ 6, 4-1, 4-1, 0, 31,htd06},
|
||||
{ 7, 6-1, 6-1, 0, 71,htd07},
|
||||
@@ -564,7 +565,7 @@ const HUFFMANCODETABLE MPEGaudio::ht[HTN
|
||||
{11, 8-1, 8-1, 0,127,htd11},
|
||||
{12, 8-1, 8-1, 0,127,htd12},
|
||||
{13,16-1,16-1, 0,511,htd13},
|
||||
- {14, 0-1, 0-1, 0, 0, htd33},
|
||||
+ {14, UINT_MAX, UINT_MAX, 0, 0, htd33},
|
||||
{15,16-1,16-1, 0,511,htd15},
|
||||
{16,16-1,16-1, 1,511,htd16},
|
||||
{17,16-1,16-1, 2,511,htd16},
|
@ -0,0 +1,30 @@ |
||||
{ lib |
||||
, buildPythonPackage |
||||
, fetchPypi |
||||
}: |
||||
|
||||
buildPythonPackage rec { |
||||
pname = "types-pyyaml"; |
||||
version = "6.0.8"; |
||||
format = "setuptools"; |
||||
|
||||
src = fetchPypi { |
||||
pname = "types-PyYAML"; |
||||
inherit version; |
||||
sha256 = "0f349hmw597f2gcja445fsrlnfzb0dj7fy62g8wcbydlgcvmsjfr"; |
||||
}; |
||||
|
||||
# Module doesn't have tests |
||||
doCheck = false; |
||||
|
||||
pythonImportsCheck = [ |
||||
"yaml-stubs" |
||||
]; |
||||
|
||||
meta = with lib; { |
||||
description = "Typing stubs for PyYAML"; |
||||
homepage = "https://github.com/python/typeshed"; |
||||
license = licenses.asl20; |
||||
maintainers = with maintainers; [ dnr ]; |
||||
}; |
||||
} |
@ -1,54 +1,80 @@ |
||||
{ lib |
||||
, fetchFromGitHub |
||||
, python3Packages |
||||
, fetchpatch |
||||
, python3 |
||||
, ffmpeg |
||||
}: |
||||
|
||||
python3Packages.buildPythonApplication rec { |
||||
let |
||||
py = python3.override { |
||||
packageOverrides = self: super: { |
||||
google-auth-oauthlib = super.google-auth-oauthlib.overridePythonAttrs (oldAttrs: rec { |
||||
version = "0.5.2b1"; |
||||
src = fetchFromGitHub { |
||||
owner = "gilesknap"; |
||||
repo = "google-auth-library-python-oauthlib"; |
||||
rev = "v${version}"; |
||||
hash = "sha256-o4Jakm/JgLszumrSoTTnU+nc79Ei70abjpmn614qGyc="; |
||||
}; |
||||
}); |
||||
}; |
||||
}; |
||||
in |
||||
py.pkgs.buildPythonApplication rec { |
||||
pname = "gphotos-sync"; |
||||
version = "2.14.2"; |
||||
version = "3.04"; |
||||
format = "pyproject"; |
||||
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION = version; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "gilesknap"; |
||||
repo = "gphotos-sync"; |
||||
rev = version; |
||||
sha256 = "0cfmbrdy6w18hb623rjn0a4hnn3n63jw2jlmgn4a2k1sjqhpx3bf"; |
||||
sha256 = "0mnlnqmlh3n1b6fjwpx2byl1z41vgghjb95598kz5gvdi95iirrs"; |
||||
}; |
||||
|
||||
propagatedBuildInputs = with python3Packages; [ |
||||
patches = [ |
||||
./skip-network-tests.patch |
||||
]; |
||||
|
||||
propagatedBuildInputs = with py.pkgs; [ |
||||
appdirs |
||||
attrs |
||||
exif |
||||
google-auth-oauthlib |
||||
psutil |
||||
pyyaml |
||||
requests-oauthlib |
||||
types-pyyaml |
||||
types-requests |
||||
]; |
||||
|
||||
postPatch = '' |
||||
# this is a patched release that we include via packageOverrides above |
||||
substituteInPlace setup.cfg \ |
||||
--replace " @ https://github.com/gilesknap/google-auth-library-python-oauthlib/archive/refs/tags/v0.5.2b1.zip" "" |
||||
''; |
||||
|
||||
buildInputs = [ |
||||
ffmpeg |
||||
]; |
||||
|
||||
checkInputs = with python3Packages; [ |
||||
pytestCheckHook |
||||
checkInputs = with py.pkgs; [ |
||||
mock |
||||
pytestCheckHook |
||||
setuptools-scm |
||||
]; |
||||
|
||||
checkPhase = '' |
||||
preCheck = '' |
||||
export HOME=$(mktemp -d) |
||||
|
||||
# patch to skip all tests that do network access |
||||
cat >>test/test_setup.py <<EOF |
||||
import pytest, requests |
||||
requests.Session.__init__ = lambda *args, **kwargs: pytest.skip("no network access") |
||||
EOF |
||||
|
||||
pytestCheckPhase |
||||
substituteInPlace setup.cfg \ |
||||
--replace "--cov=gphotos_sync --cov-report term --cov-report xml:cov.xml" "" |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
description = "Google Photos and Albums backup with Google Photos Library API"; |
||||
homepage = "https://github.com/gilesknap/gphotos-sync"; |
||||
license = licenses.mit; |
||||
license = licenses.asl20; |
||||
maintainers = with maintainers; [ dnr ]; |
||||
}; |
||||
} |
||||
|
@ -0,0 +1,21 @@ |
||||
diff --git a/tests/test_setup.py b/tests/test_setup.py
|
||||
index 085b110..ea4a7d2 100644
|
||||
--- a/tests/test_setup.py
|
||||
+++ b/tests/test_setup.py
|
||||
@@ -45,7 +45,8 @@ class SetupDbAndCredentials:
|
||||
return self
|
||||
|
||||
def __exit__(self, exc_type=None, exc_value=None, traceback=None):
|
||||
- self.gp.google_photos_down.close()
|
||||
+ if hasattr(self.gp, 'google_photos_down'):
|
||||
+ self.gp.google_photos_down.close()
|
||||
|
||||
def test_setup(self, test_name, args=None, trash_db=False, trash_files=False):
|
||||
self.root = Path("/tmp/gpTests/{}".format(test_name))
|
||||
@@ -76,3 +77,6 @@ class SetupDbAndCredentials:
|
||||
|
||||
def test_done(self):
|
||||
self.gp.data_store.store()
|
||||
+
|
||||
+import pytest, requests
|
||||
+requests.Session.__init__ = lambda *args, **kwargs: pytest.skip("no network access")
|
@ -0,0 +1,26 @@ |
||||
diff --git a/src/windows/pluginloader/pluginloader.c b/src/windows/pluginloader/pluginloader.c
|
||||
index 751e072..7a4589d 100644
|
||||
--- a/src/windows/pluginloader/pluginloader.c
|
||||
+++ b/src/windows/pluginloader/pluginloader.c
|
||||
@@ -190,7 +190,7 @@ static inline WPARAM wParamFromX11State(uint32_t state){
|
||||
if (state & Button3Mask) wParam |= MK_RBUTTON;
|
||||
if (state & Button2Mask) wParam |= MK_MBUTTON;
|
||||
if (state & ShiftMask) wParam |= MK_SHIFT;
|
||||
- if (state & ControlMask) wParam |= MK_CONTROL;
|
||||
+ if (state & ControlMask_) wParam |= MK_CONTROL;
|
||||
return wParam;
|
||||
}
|
||||
|
||||
diff --git a/src/windows/pluginloader/pluginloader.h b/src/windows/pluginloader/pluginloader.h
|
||||
index ffe89a7..a1ebabc 100644
|
||||
--- a/src/windows/pluginloader/pluginloader.h
|
||||
+++ b/src/windows/pluginloader/pluginloader.h
|
||||
@@ -149,7 +149,7 @@ typedef unsigned long int XID;
|
||||
|
||||
#define ShiftMask (1<<0)
|
||||
#define LockMask (1<<1)
|
||||
-#define ControlMask (1<<2)
|
||||
+#define ControlMask_ (1<<2)
|
||||
#define Button1Mask (1<<8)
|
||||
#define Button2Mask (1<<9)
|
||||
#define Button3Mask (1<<10)
|
Loading…
Reference in new issue