Compare commits

...

2 Commits

Author SHA1 Message Date
Andreas Wiese 6d2274218d xmm7680-pci: adopt fix.patch to 5.15
put_tty_driver() has been dropped as it is only an alias for
tty_driver_kref_put().
2021-11-18 13:51:40 +01:00
Andreas Wiese 81f8f4a66a vivaldi: remove 2021-11-09 22:09:15 +01:00
4 changed files with 10 additions and 107 deletions

View File

@ -22,8 +22,6 @@ in rec {
ryzen_smu = callPackage ./pkgs/ryzen_smu { kernel = pkgs.linux; };
vivaldi = callPackage ./pkgs/vivaldi { };
} // optionalAttrs (builtins.elem pkgs.system pkgs.lib.platforms.linux) rec {
xmm7360-pci = callPackage ./pkgs/xmm7360-pci { kernel = pkgs.linux; };

View File

@ -42,7 +42,6 @@
navidrome-bin
ryzenadj
ryzen_smu
vivaldi
;
} // prev.lib.optionalAttrs (builtins.elem prev.system prev.lib.platforms.linux) rec {
inherit (localPkgs)

View File

@ -1,103 +0,0 @@
{ lib, stdenv, fetchurl, zlib, libX11, libXext, libSM, libICE, libxkbcommon, libxshmfence
, libXfixes, libXt, libXi, libXcursor, libXScrnSaver, libXcomposite, libXdamage, libXtst, libXrandr
, alsaLib, dbus, cups, libexif, ffmpeg, systemd
, freetype, fontconfig, libXft, libXrender, libxcb, expat
, libuuid
, libxml2
, glib, gtk3, pango, gdk-pixbuf, cairo, atk, at-spi2-atk, at-spi2-core, gnome2
, libdrm, mesa
, nss, nspr
, patchelf, makeWrapper
, isSnapshot ? false
, proprietaryCodecs ? false, vivaldi-ffmpeg-codecs ? null
, enableWidevine ? false, vivaldi-widevine ? null
}:
let
branch = if isSnapshot then "snapshot" else "stable";
vivaldiName = if isSnapshot then "vivaldi-snapshot" else "vivaldi";
in stdenv.mkDerivation rec {
pname = "vivaldi";
version = "4.1.2369.21-1";
src = fetchurl {
url = "https://downloads.vivaldi.com/${branch}/vivaldi-${branch}_${version}_amd64.deb";
sha256 = "03062mik6paqp219jz420jsg762jjrfxmj1daq129z2zgzq0qr8l";
};
unpackPhase = ''
ar vx $src
tar -xvf data.tar.xz
'';
nativeBuildInputs = [ patchelf makeWrapper ];
buildInputs = [
stdenv.cc.cc stdenv.cc.libc zlib libX11 libXt libXext libSM libICE libxcb libxkbcommon libxshmfence
libXi libXft libXcursor libXfixes libXScrnSaver libXcomposite libXdamage libXtst libXrandr
atk at-spi2-atk at-spi2-core alsaLib dbus cups gtk3 gdk-pixbuf libexif ffmpeg systemd
freetype fontconfig libXrender libuuid expat glib nss nspr
libxml2 pango cairo gnome2.GConf
libdrm mesa
] ++ lib.optional proprietaryCodecs vivaldi-ffmpeg-codecs;
libPath = lib.makeLibraryPath buildInputs
+ lib.optionalString (stdenv.is64bit)
(":" + lib.makeSearchPathOutput "lib" "lib64" buildInputs)
+ ":$out/opt/${vivaldiName}/lib";
buildPhase = ''
runHook preBuild
echo "Patching Vivaldi binaries"
for f in crashpad_handler vivaldi-bin vivaldi-sandbox ; do
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${libPath}" \
opt/${vivaldiName}/$f
done
'' + lib.optionalString proprietaryCodecs ''
ln -s ${vivaldi-ffmpeg-codecs}/lib/libffmpeg.so opt/${vivaldiName}/libffmpeg.so.''${version%\.*\.*}
'' + ''
echo "Finished patching Vivaldi binaries"
runHook postBuild
'';
dontPatchELF = true;
dontStrip = true;
installPhase = ''
runHook preInstall
mkdir -p "$out"
cp -r opt "$out"
mkdir "$out/bin"
ln -s "$out/opt/${vivaldiName}/${vivaldiName}" "$out/bin/vivaldi"
mkdir -p "$out/share"
cp -r usr/share/{applications,xfce4} "$out"/share
substituteInPlace "$out"/share/applications/*.desktop \
--replace /usr/bin/${vivaldiName} "$out"/bin/vivaldi
substituteInPlace "$out"/share/applications/*.desktop \
--replace vivaldi-stable vivaldi
local d
for d in 16 22 24 32 48 64 128 256; do
mkdir -p "$out"/share/icons/hicolor/''${d}x''${d}/apps
ln -s \
"$out"/opt/${vivaldiName}/product_logo_''${d}.png \
"$out"/share/icons/hicolor/''${d}x''${d}/apps/vivaldi.png
done
wrapProgram "$out/bin/vivaldi" \
--suffix XDG_DATA_DIRS : ${gtk3}/share/gsettings-schemas/${gtk3.name}/ \
${lib.optionalString enableWidevine "--suffix LD_LIBRARY_PATH : ${libPath}"}
'' + lib.optionalString enableWidevine ''
ln -sf ${vivaldi-widevine}/share/google/chrome/WidevineCdm $out/opt/${vivaldiName}/WidevineCdm
'' + ''
runHook postInstall
'';
meta = with lib; {
description = "A Browser for our Friends, powerful and personal";
homepage = "https://vivaldi.com";
license = licenses.unfree;
maintainers = with maintainers; [ otwieracz badmutex ];
platforms = [ "x86_64-linux" ];
};
}

View File

@ -1,5 +1,5 @@
diff --git a/xmm7360.c b/xmm7360.c
index ccd149d..acc7fea 100644
index ccd149d..5a4dc74 100644
--- a/xmm7360.c
+++ b/xmm7360.c
@@ -1272,7 +1272,7 @@ static int xmm7360_tty_write(struct tty_struct *tty,
@ -11,3 +11,12 @@ index ccd149d..acc7fea 100644
{
struct queue_pair *qp = tty->driver_data;
if (!xmm7360_qp_can_write(qp))
@@ -1555,7 +1555,7 @@ static void xmm7360_exit(void)
pci_unregister_driver(&xmm7360_driver);
unregister_chrdev_region(xmm_base, 8);
tty_unregister_driver(xmm7360_tty_driver);
- put_tty_driver(xmm7360_tty_driver);
+ tty_driver_kref_put(xmm7360_tty_driver);
}
module_init(xmm7360_init);