push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,93 @@
{
lib,
stdenv,
fetchurl,
bash,
cabextract,
curl,
gnupg,
libX11,
libGLU,
libGL,
wine-staging,
}:
let
wine_custom = wine-staging;
mozillaPluginPath = "/lib/mozilla/plugins";
in
stdenv.mkDerivation rec {
version = "0.2.8.2";
pname = "pipelight";
src = fetchurl {
url = "https://bitbucket.org/mmueller2012/pipelight/get/v${version}.tar.gz";
sha256 = "1kyy6knkr42k34rs661r0f5sf6l1s2jdbphdg89n73ynijqmzjhk";
};
buildInputs = [
wine_custom
libX11
libGLU
libGL
curl
];
env.NIX_CFLAGS_COMPILE = toString [ "-fpermissive" ];
patches = [
./pipelight.patch
./wine-6.13-new-args.patch
# https://source.winehq.org/git/wine.git/commit/cf4a781e987a98a8d48610362a20a320c4a1016d
# adds ControlMask as a static variable.
./wine-7.10-ControlMask.patch
];
configurePhase = ''
patchShebangs .
./configure \
--prefix=$out \
--moz-plugin-path=$out/${mozillaPluginPath} \
--wine-path=${wine_custom} \
--gpg-exec=${gnupg}/bin/gpg \
--bash-interp=${bash}/bin/bash \
--downloader=${curl.bin}/bin/curl
$configureFlags
'';
passthru = {
mozillaPlugin = mozillaPluginPath;
wine = wine_custom;
};
postInstall = ''
$out/bin/pipelight-plugin --create-mozilla-plugins
'';
preFixup = ''
substituteInPlace $out/share/pipelight/install-dependency \
--replace cabextract ${cabextract}/bin/cabextract
'';
enableParallelBuilding = true;
meta = {
homepage = "http://pipelight.net/";
license = with lib.licenses; [
mpl11
gpl2Only
lgpl21
];
description = "Wrapper for using Windows plugins in Linux browsers";
maintainers = [ ];
platforms = [
"x86_64-linux"
"i686-linux"
];
mainProgram = "pipelight-plugin";
};
}

View File

@@ -0,0 +1,122 @@
diff -urN pipelight.old/bin/pipelight-plugin.in pipelight.new/bin/pipelight-plugin.in
--- pipelight.old/bin/pipelight-plugin.in 2014-07-19 22:53:02.000000000 +0200
+++ pipelight.new/bin/pipelight-plugin.in 2014-07-27 00:02:39.275834030 +0200
@@ -92,7 +92,7 @@
PLUGIN_PATH=$(realpath "$PLUGIN_PATH")
# Global installation
- if [ $(/usr/bin/id -u) -eq 0 ]; then
+ if [ $(id -u) -eq 0 ]; then
INSTALLDIR="$PLUGIN_PATH"
# Use environment variable (only if it doesn't point to the global directory)
@@ -594,7 +594,7 @@
fi
# Ensure the signature is valid, extract the content
- if ! @@GPG@@ --batch --no-default-keyring --keyring "$PIPELIGHT_SHARE_PATH/sig-install-dependency.gpg" --decrypt "$tmpfile" > "$decfile"; then
+ if ! @@GPG@@ --homedir /tmp --batch --no-default-keyring --keyring "$PIPELIGHT_SHARE_PATH/sig-install-dependency.gpg" --decrypt "$tmpfile" > "$decfile"; then
rm "$tmpfile"
rm "$decfile"
echo ""
@@ -630,24 +630,10 @@
return 0
}
-# Use fetch on FreeBSD if wget is not available
-if command -v wget >/dev/null 2>&1; then
- download_file()
- {
- wget -O "$1" "$2"
- }
-elif command -v fetch >/dev/null 2>&1; then
- download_file()
- {
- fetch -o "$1" "$2"
- }
-else
- download_file()
- {
- echo "ERROR: Could neither find wget nor fetch. Unable to download file!" >&2
- return 1
- }
-fi
+download_file()
+{
+ curl --cacert /etc/ssl/certs/ca-certificates.crt -o "$1" "$2"
+}
# Use shasum instead of sha256sum on MacOS / *BSD
if ! command -v sha256sum >/dev/null 2>&1 && command -v shasum >/dev/null 2>&1; then
diff -urN pipelight.old/configure pipelight.new/configure
--- pipelight.old/configure 2014-07-19 22:53:02.000000000 +0200
+++ pipelight.new/configure 2014-07-26 23:52:13.690881447 +0200
@@ -66,12 +66,8 @@
datadir=""
libdir=""
mandir=""
-bash_interp="$(which bash)"
-if which gpg &> /dev/null; then
- gpg_exec="$(which gpg)"
-else
- gpg_exec="/usr/bin/gpg"
-fi
+bash_interp=bash
+gpg_exec=gpg
moz_plugin_path=""
gcc_runtime_dlls=""
so_mode="0644"
diff -urN pipelight.old/share/install-dependency pipelight.new/share/install-dependency
--- pipelight.old/share/install-dependency 2014-07-19 22:53:02.000000000 +0200
+++ pipelight.new/share/install-dependency 2014-07-26 23:26:18.431938546 +0200
@@ -734,42 +734,14 @@
return 0
}
-# Use fetch on FreeBSD if wget is not available
-if command -v wget >/dev/null 2>&1; then
- download_file()
- {
- wget -O "$1" "$2"
- }
- get_download_size()
- {
- local filesize="$(wget -O- "$1" --spider --server-response 2>&1 | sed -ne '/Content-Length/{s/.*: //;p}')"
- local re='^[0-9]+$'
- if [[ "$filesize" -ne "0" ]] && [[ "$filesize" =~ $re ]]; then
- echo "$(($filesize/(1024*1024)))"
- else
- echo "N/A"
- fi
- }
-elif command -v fetch >/dev/null 2>&1; then
- download_file()
- {
- fetch -o "$1" "$2"
- }
- get_download_size()
- {
- echo "N/A"
- }
-else
- download_file()
- {
- echo "ERROR: Could neither find wget nor fetch. Unable to download file!" >&2
- return 1
- }
- get_download_size()
- {
- echo "N/A"
- }
-fi
+download_file()
+{
+ curl --cacert /etc/ssl/certs/ca-certificates.crt -o "$1" "$2"
+}
+get_download_size()
+{
+ echo "N/A"
+}
# Use shasum instead of sha256sum on MacOS / *BSD
if ! command -v sha256sum >/dev/null 2>&1 && command -v shasum >/dev/null 2>&1; then

View File

@@ -0,0 +1,42 @@
diff --git a/src/windows/pluginloader/apihook.c b/src/windows/pluginloader/apihook.c
index 80bf726..6b80f70 100644
--- a/src/windows/pluginloader/apihook.c
+++ b/src/windows/pluginloader/apihook.c
@@ -42,7 +42,9 @@
#include "common/common.h"
#include "pluginloader.h"
+#define new cnew
#include <windows.h> // for PVOID and other types
+#undef new
#include <string.h> // for memset
void* patchDLLExport(PVOID ModuleBase, const char* functionName, void* newFunctionPtr){
diff --git a/src/windows/pluginloader/npnfunctions.c b/src/windows/pluginloader/npnfunctions.c
index e4e38aa..19f29d5 100644
--- a/src/windows/pluginloader/npnfunctions.c
+++ b/src/windows/pluginloader/npnfunctions.c
@@ -41,7 +41,9 @@
#include "common/common.h"
#include "pluginloader.h"
+#define new cnew
#include <windows.h>
+#undef new
/* Shockwave sometimes calls the function with a wrong instance? Is this a wine bug? */
NPP shockwaveInstanceBug = NULL;
diff --git a/src/windows/pluginloader/pluginloader.c b/src/windows/pluginloader/pluginloader.c
index 8f1170a..99dbceb 100644
--- a/src/windows/pluginloader/pluginloader.c
+++ b/src/windows/pluginloader/pluginloader.c
@@ -50,7 +50,9 @@
#include "pluginloader.h"
#include "apihook.h"
+#define new cnew
#include <windows.h>
+#undef new
#include <objbase.h> // for CoInitializeEx
#include <GL/gl.h>

View File

@@ -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)