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,84 @@
{
lib,
stdenv,
fetchFromGitHub,
cargo-tauri,
jq,
libsoup_3,
moreutils,
nodejs,
openssl,
pkg-config,
pnpm_9,
rustPlatform,
webkitgtk_4_1,
wrapGAppsHook3,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "wealthfolio";
version = "1.2.3";
src = fetchFromGitHub {
owner = "afadil";
repo = "wealthfolio";
rev = "v${finalAttrs.version}";
hash = "sha256-bp8BxJp/Ga9Frqyvl76Fh9AfSEKv3W+P1ND9zqeMXhg=";
};
pnpmDeps = pnpm_9.fetchDeps {
inherit (finalAttrs) src pname version;
fetcherVersion = 1;
hash = "sha256-imExQiPl6sjYD//p788dGYEn+DRs9H8l9sGmCdl5Cic=";
};
cargoRoot = "src-tauri";
buildAndTestSubdir = finalAttrs.cargoRoot;
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (finalAttrs)
pname
version
src
cargoRoot
;
hash = "sha256-CiEtxZn+kqYqS0sx9SLPvIkOTq2La48gQp+xx9z5BJs=";
};
nativeBuildInputs = [
cargo-tauri.hook
jq
moreutils
nodejs
pkg-config
pnpm_9.configHook
rustPlatform.cargoSetupHook
wrapGAppsHook3
];
buildInputs = [
libsoup_3
openssl
webkitgtk_4_1
];
postPatch = ''
jq \
'.plugins.updater.endpoints = [ ]
| .bundle.createUpdaterArtifacts = false' \
src-tauri/tauri.conf.json \
| sponge src-tauri/tauri.conf.json
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Beautiful Private and Secure Desktop Investment Tracking Application";
homepage = "https://wealthfolio.app/";
license = lib.licenses.agpl3Only;
mainProgram = "wealthfolio";
maintainers = with lib.maintainers; [ kilianar ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,97 @@
{
lib,
stdenv,
fetchzip,
jdk25,
unzip,
copyDesktopItems,
makeDesktopItem,
}:
let
selectSystem =
attrs:
attrs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
platform = selectSystem {
"x86_64-linux" = "linux-x86-64";
"aarch64-linux" = "linux-aarch64";
"x86_64-darwin" = "macosx-x86-64";
"aarch64-darwin" = "macosx-aarch64";
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "weasis";
version = "4.6.3";
# Their build instructions indicate to use the packaging script
src = fetchzip {
url = "https://github.com/nroduit/Weasis/releases/download/v${finalAttrs.version}/weasis-native.zip";
hash = "sha256-1dvBKxInuk8FpZjo59+LkIuEBTr57wkLaHfvvvT6bOg=";
stripRoot = false;
};
nativeBuildInputs = [
copyDesktopItems
]
++ lib.optional stdenv.isDarwin unzip;
desktopItems = [
(makeDesktopItem {
name = "DICOMizer";
exec = "Dicomizer";
icon = "Dicomizer";
desktopName = "DICOMizer";
comment = "Convert standard images into DICOM";
})
(makeDesktopItem {
name = "Weasis";
exec = "Weasis";
icon = "Weasis";
desktopName = "Weasis";
comment = finalAttrs.meta.description;
})
];
postPatch = ''
patchShebangs ./build/script/package-weasis.sh
'';
buildPhase = ''
runHook preBuild
./build/script/package-weasis.sh --no-installer --jdk ${jdk25}
runHook postBuild
'';
installPhase = ''
runHook preInstall
''
+ lib.optionalString stdenv.isLinux ''
mkdir -p $out/share/{applications,pixmaps}
mv weasis-${platform}-jdk${lib.versions.major jdk25.version}-${finalAttrs.version}/Weasis/* $out/
mv $out/lib/*.png $out/share/pixmaps/
''
+ lib.optionalString stdenv.isDarwin ''
mkdir -p $out/Applications
mv weasis-${platform}-jdk${lib.versions.major jdk25.version}-${finalAttrs.version}/Weasis.app $out/Applications/
''
+ ''
runHook postInstall
'';
meta = {
description = "Multipurpose standalone and web-based DICOM viewer with a highly modular architecture";
homepage = "https://weasis.org";
# Using changelog from releases as it is more accurate
changelog = "https://github.com/nroduit/Weasis/releases/tag/v${finalAttrs.version}";
license = with lib.licenses; [
asl20
epl20
];
maintainers = [ ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
mainProgram = "Weasis";
};
})

View File

@@ -0,0 +1,36 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
stdenvNoCC.mkDerivation rec {
pname = "weather-icons";
version = "2.0.12";
src = fetchzip {
url = "https://github.com/erikflowers/weather-icons/archive/refs/tags/${version}.zip";
hash = "sha256-0ZFH2awUo4BkTpK1OsWZ4YKczJHo+HHM6ezGBJAmT+U=";
};
installPhase = ''
runHook preInstall
install -Dm644 _docs/font-source/weathericons-regular.otf -t $out/share/fonts/opentype
runHook postInstall
'';
meta = with lib; {
description = "Weather Icons";
longDescription = ''
Weather Icons is the only icon font and CSS with 222 weather themed icons,
ready to be dropped right into Bootstrap, or any project that needs high
quality weather, maritime, and meteorological based icons!
'';
homepage = "https://erikflowers.github.io/weather-icons/";
license = licenses.ofl;
platforms = platforms.all;
maintainers = with maintainers; [ pnelson ];
};
}

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchurl,
python3,
installShellFiles,
}:
stdenv.mkDerivation rec {
version = "2.5.0";
pname = "weather";
src = fetchurl {
url = "http://fungi.yuggoth.org/weather/src/${pname}-${version}.tar.xz";
sha256 = "sha256-wn3cpgfrlqntMIiVFh4317DrbGgQ4YRnFz3KHXacTw4=";
};
nativeBuildInputs = [
installShellFiles
python3.pkgs.wrapPython
];
dontConfigure = true;
dontBuild = true;
# Upstream doesn't provide a setup.py or alike, so we follow:
# http://fungi.yuggoth.org/weather/doc/install.rst#id3
installPhase = ''
site_packages=$out/${python3.sitePackages}
install -Dt $out/bin -m 755 weather
install -Dt $site_packages weather.py
install -Dt $out/share/weather-util \
airports overrides.{conf,log} places slist stations \
zctas zlist zones
install -Dt $out/etc weatherrc
sed -i \
-e "s|/etc|$out/etc|g" \
-e "s|else: default_setpath = \".:~/.weather|&:$out/share/weather-util|" \
$site_packages/weather.py
wrapPythonPrograms
installManPage weather.1 weatherrc.5
'';
meta = with lib; {
homepage = "http://fungi.yuggoth.org/weather";
description = "Quick access to current weather conditions and forecasts";
mainProgram = "weather";
license = licenses.isc;
maintainers = [ maintainers.matthiasbeyer ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,47 @@
{
lib,
fetchFromGitHub,
buildGoModule,
stdenv,
installShellFiles,
}:
buildGoModule rec {
pname = "weave-gitops";
version = "0.38.0";
src = fetchFromGitHub {
owner = "weaveworks";
repo = "weave-gitops";
rev = "v${version}";
sha256 = "sha256-Gm4DIQK8T+dTwB5swdrD+SjGgy/wFQ/fJYdSqNDSy9c=";
};
ldflags = [
"-s"
"-w"
"-X github.com/weaveworks/weave-gitops/cmd/gitops/version.Version=${version}"
];
vendorHash = "sha256-RiPBlpEQ69fhVf3B0qHQ+zEtPIet/Y/Jp/HfaTrIssE=";
subPackages = [ "cmd/gitops" ];
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd gitops \
--bash <($out/bin/gitops completion bash 2>/dev/null) \
--fish <($out/bin/gitops completion fish 2>/dev/null) \
--zsh <($out/bin/gitops completion zsh 2>/dev/null)
'';
meta = with lib; {
homepage = "https://docs.gitops.weave.works";
description = "Weave Gitops CLI";
license = licenses.mpl20;
platforms = platforms.linux;
maintainers = [ ];
mainProgram = "gitops";
};
}

View File

@@ -0,0 +1,37 @@
{
lib,
rustPlatform,
fetchFromGitHub,
testers,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "weaver";
version = "0.18.0";
src = fetchFromGitHub {
owner = "open-telemetry";
repo = "weaver";
tag = "v${finalAttrs.version}";
hash = "sha256-kEGz6alm+P6zKR4vxzsyZ67R99tVBjEIK0OEx6SzdvQ=";
};
cargoHash = "sha256-//nPXBUi7swKPusaamSJdsUTObnyh+wNc7i8CoyGWrU=";
checkFlags = [
# Skip tests requiring network
"--skip=test_cli_interface"
];
passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
};
meta = {
description = "OpenTelemetry tool for dealing with semantic conventions and application telemetry schemas";
homepage = "https://github.com/open-telemetry/weaver";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ aaronjheng ];
mainProgram = "weaver";
};
})

View File

@@ -0,0 +1,38 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "weaviate";
version = "1.32.8";
src = fetchFromGitHub {
owner = "weaviate";
repo = "weaviate";
rev = "v${version}";
hash = "sha256-RJnvPqOyK8IMIu0C5NZFW7fyuVxbiEYbBUyp6gBwYB4=";
};
vendorHash = "sha256-5Xv1YvNEti1fzlu6Ev65dQfXyyFusvsnlRQUSCRjc4s=";
subPackages = [ "cmd/weaviate-server" ];
ldflags = [
"-w"
"-extldflags"
"-static"
];
postInstall = ''
ln -s $out/bin/weaviate-server $out/bin/weaviate
'';
meta = with lib; {
description = "ML-first vector search engine";
homepage = "https://github.com/semi-technologies/weaviate";
license = licenses.bsd3;
maintainers = with maintainers; [ dit7ya ];
};
}

View File

@@ -0,0 +1,78 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchurl,
meson,
ninja,
vala,
pkg-config,
wrapGAppsHook3,
libzim-glib,
sqlite,
webkitgtk_4_1,
tinysparql,
libxml2,
libisocodes,
libhandy,
glib-networking,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "web-archives";
version = "0.5.0";
src = fetchFromGitHub {
owner = "birros";
repo = "web-archives";
rev = "v${finalAttrs.version}";
hash = "sha256-EYHChI+4tpjRp4KveHTB+5BSLtw0YLp5z2JJmA0xTlM=";
};
web-archive-darkreader = fetchurl {
# This is the same with build-aux/darkreader/Makefile
url = "https://github.com/birros/web-archives-darkreader/releases/download/v0.0.1/web-archives-darkreader_v0.0.1.js";
hash = "sha256-juhAqs2eCYZKerLnX3NvaW3NS0uOhqB7pyf/PRDvMqE=";
};
postPatch = ''
substituteInPlace meson.build \
--replace-fail \
"'make', '-C', 'build-aux/darkreader'" \
"'cp', '${finalAttrs.web-archive-darkreader}', 'build-aux/darkreader/web-archives-darkreader.js'"
'';
nativeBuildInputs = [
meson
ninja
vala
pkg-config
wrapGAppsHook3
];
buildInputs = [
libzim-glib
sqlite
webkitgtk_4_1
tinysparql
libxml2
libisocodes
libhandy
glib-networking
];
strictDeps = true;
passthru = {
inherit (finalAttrs) web-archive-darkreader;
};
meta = {
description = "Web archives reader offering the ability to browse offline millions of articles";
homepage = "https://github.com/birros/web-archives";
license = lib.licenses.gpl3Plus;
mainProgram = "web-archives";
maintainers = with lib.maintainers; [ aleksana ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,36 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
runCommand,
web-ext,
}:
buildNpmPackage rec {
pname = "web-ext";
version = "8.10.0";
src = fetchFromGitHub {
owner = "mozilla";
repo = "web-ext";
rev = version;
hash = "sha256-QAPRRsgsmMC0ZlGUf+dO1kL/ezW6Fq4tDlQVZOuJ7eI=";
};
npmDepsHash = "sha256-gd56IoctqidlZbHsYXwiPDZB9WANFl4miqDVcVzpbqg=";
npmBuildFlags = [ "--production" ];
passthru.tests.help = runCommand "${pname}-tests" { } ''
${web-ext}/bin/web-ext --help
touch $out
'';
meta = {
description = "Command line tool to help build, run, and test web extensions";
homepage = "https://github.com/mozilla/web-ext";
license = lib.licenses.mpl20;
mainProgram = "web-ext";
maintainers = [ ];
};
}

View File

@@ -0,0 +1,52 @@
{
lib,
stdenv,
fetchurl,
zlib,
libpng,
gd,
geoip,
db,
}:
stdenv.mkDerivation rec {
pname = "webalizer";
version = "2.23.08";
src = fetchurl {
url = "mirror://debian/pool/main/w/webalizer/webalizer_${version}.orig.tar.gz";
sha256 = "sha256-7a3bWqQcxKCBoVAOP6lmFdS0G8Eghrzt+ZOAGM557Y0=";
};
# Workaround build failure on -fno-common toolchains:
# ld: dns_resolv.o:(.bss+0x20): multiple definition of `system_info'; webalizer.o:(.bss+0x76e0): first defined here
env.NIX_CFLAGS_COMPILE = "-fcommon";
installFlags = [ "MANDIR=\${out}/share/man/man1" ];
preConfigure = ''
substituteInPlace ./configure \
--replace "--static" ""
'';
buildInputs = [
zlib
libpng
gd
geoip
db
];
configureFlags = [
"--enable-dns"
"--enable-geoip"
"--enable-shared"
];
meta = with lib; {
description = "Web server log file analysis program";
homepage = "https://webalizer.net/";
platforms = platforms.unix;
license = licenses.gpl2Plus;
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "webanalyze";
version = "0.4.1";
src = fetchFromGitHub {
owner = "rverton";
repo = "webanalyze";
tag = "v${version}";
hash = "sha256-rnNbEPlbye0gjUamwq1xjFM/4g0eEHsGOAZWziEqxwM=";
};
vendorHash = "sha256-XPOsC+HoLytgv1fhAaO5HYSvuOP6OhjLyOYTfiD64QI=";
meta = {
description = "Tool to uncover technologies used on websites";
homepage = "https://github.com/rverton/webanalyze";
changelog = "https://github.com/rverton/webanalyze/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "webanalyze";
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
buildGoModule,
fetchFromGitHub,
asciidoctor,
installShellFiles,
}:
buildGoModule rec {
pname = "webcat";
version = "0.2.0";
src = fetchFromGitHub {
owner = "rumpelsepp";
repo = "webcat";
rev = "v${version}";
hash = "sha256-JyZHH8JgS3uoNVicx1wj0SAzlrXyTrpwIBZuok6buRw=";
};
vendorHash = "sha256-duVp/obT+5M4Dl3BAdSgRaP3+LKmS0y51loMMdoGysw=";
nativeBuildInputs = [
asciidoctor
installShellFiles
];
postInstall = ''
make -C man man
installManPage man/webcat.1
'';
meta = with lib; {
homepage = "https://rumpelsepp.org/blog/ssh-through-websocket/";
description = "Lightweight swiss army knife for websockets";
license = licenses.gpl3Only;
maintainers = with maintainers; [ montag451 ];
mainProgram = "webcat";
};
}

View File

@@ -0,0 +1,12 @@
diff --git a/sources/code/common/main.ts b/sources/code/common/main.ts
index 3936ee0..bd745ef 100644
--- a/sources/code/common/main.ts
+++ b/sources/code/common/main.ts
@@ -358,6 +358,7 @@ app.userAgentFallback = getUserAgent(process.versions.chrome, userAgent.mobile,
const singleInstance = app.requestSingleInstanceLock();
function main(): void {
+ session.defaultSession.loadExtension("@vencord@");
if (overwriteMain) {
// Execute flag-specific functions for ready application.
overwriteMain();

View File

@@ -0,0 +1,29 @@
{
# allow overriding electron
electron_36,
webcord,
replaceVars,
lib,
vencord-web-extension,
}:
# nixpkgs-update: no auto update
(webcord.override { inherit electron_36; }).overrideAttrs (old: {
pname = "webcord-vencord";
patches = (old.patches or [ ]) ++ [
(replaceVars ./add-extension.patch {
vencord = vencord-web-extension;
})
];
meta = {
inherit (old.meta) license mainProgram platforms;
description = "Webcord with Vencord web extension";
maintainers = with lib.maintainers; [
FlafyDev
NotAShelf
];
};
})

View File

@@ -0,0 +1,95 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
copyDesktopItems,
python3,
xdg-utils,
electron_36,
makeDesktopItem,
}:
buildNpmPackage rec {
pname = "webcord";
version = "4.11.1";
src = fetchFromGitHub {
owner = "SpacingBat3";
repo = "WebCord";
tag = "v${version}";
hash = "sha256-u2Asoc5cwVRtD6yz77iJ8hA2IfVSA4iYI8snPCLufnE=";
};
npmDepsHash = "sha256-sREnthfmE01yzVwqMN6zbhTAquulztriytMSOcj3ZCo=";
makeCacheWritable = true;
nativeBuildInputs = [
copyDesktopItems
python3
];
# npm install will error when electron tries to download its binary
# we don't need it anyways since we wrap the program with our nixpkgs electron
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
# remove husky commit hooks, errors and aren't needed for packaging
postPatch = ''
rm -rf .husky
'';
# override installPhase so we can copy the only folders that matter
installPhase =
let
binPath = lib.makeBinPath [ xdg-utils ];
in
''
runHook preInstall
# Remove dev deps that aren't necessary for running the app
npm prune --omit=dev
mkdir -p $out/lib/node_modules/webcord
cp -r app node_modules sources package.json $out/lib/node_modules/webcord/
install -Dm644 sources/assets/icons/app.png $out/share/icons/hicolor/256x256/apps/webcord.png
# Add xdg-utils to path via suffix, per PR #181171
makeWrapper '${lib.getExe electron_36}' $out/bin/webcord \
--suffix PATH : "${binPath}" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
--add-flags $out/lib/node_modules/webcord/
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = "webcord";
exec = "webcord";
icon = "webcord";
desktopName = "WebCord";
comment = meta.description;
categories = [
"Network"
"InstantMessaging"
];
})
];
passthru.updateScript = ./update.sh;
meta = {
description = "Discord and SpaceBar electron-based client implemented without Discord API";
homepage = "https://github.com/SpacingBat3/WebCord";
downloadPage = "https://github.com/SpacingBat3/WebCord/releases";
changelog = "https://github.com/SpacingBat3/WebCord/releases/tag/v${version}";
license = lib.licenses.mit;
mainProgram = "webcord";
maintainers = with lib.maintainers; [
huantian
NotAShelf
];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,15 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p curl jq nix-update
set -ex
curl_github() {
curl -L ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} "$@"
}
latestTag=$(curl_github https://api.github.com/repos/SpacingBat3/Webcord/releases/latest | jq -r ".tag_name")
latestVersion="$(expr "$latestTag" : 'v\(.*\)')"
nix-update --version "$latestVersion" webcord
electronVersion=$(curl_github "https://raw.githubusercontent.com/SpacingBat3/WebCord/v$latestVersion/package.json" | jq -r ".devDependencies.electron" | sed -r 's|^\^([0-9]+).*|\1|')
sed -r "/webcord = / s|(electron_)[0-9]+|\1$electronVersion|" -i pkgs/top-level/all-packages.nix

View File

@@ -0,0 +1,49 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
libtirpc,
pam,
rpcsvc-proto,
enablePAM ? stdenv.hostPlatform.isLinux,
}:
rustPlatform.buildRustPackage {
pname = "webdav-server-rs";
# The v0.4.0 tag cannot build. So we use the 547602e commit.
version = "unstable-2021-08-16";
src = fetchFromGitHub {
owner = "miquels";
repo = "webdav-server-rs";
rev = "547602e78783935b4ddd038fb795366c9c476bcc";
sha256 = "sha256-nTygUEjAUXD0mRTmjt8/UPVfZA4rP6oop1s/fI5mYeg=";
};
cargoHash = "sha256-0Ee0L3gKNP1O3SFkImBzQrT1fgnWFrrW8owxEM1dUYQ=";
buildInputs = [ libtirpc ] ++ lib.optional enablePAM pam;
nativeBuildInputs = [ rpcsvc-proto ];
buildNoDefaultFeatures = true;
buildFeatures = [ "quota" ] ++ lib.optional enablePAM "pam";
postPatch = ''
substituteInPlace fs_quota/build.rs \
--replace '/usr/include/tirpc' '${libtirpc.dev}/include/tirpc'
'';
meta = with lib; {
description = "Implementation of WebDAV server in Rust";
longDescription = ''
webdav-server-rs is an implementation of WebDAV with full support for
RFC4918. It also supports local unix accounts, PAM authentication, and
quota.
'';
homepage = "https://github.com/miquels/webdav-server-rs";
license = licenses.asl20;
maintainers = with maintainers; [ pmy ];
mainProgram = "webdav-server";
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
fetchFromGitHub,
buildGoModule,
}:
buildGoModule rec {
pname = "webdav";
version = "5.8.0";
src = fetchFromGitHub {
owner = "hacdias";
repo = "webdav";
tag = "v${version}";
hash = "sha256-6G9NlQVYFDLuIxKJXq0Rcixx1AiDhTHUekumMNqXi44=";
};
vendorHash = "sha256-B78O13FPpkcuE808c2hLiIDPQdS5qlaw1dWLc9T7hvM=";
__darwinAllowLocalNetworking = true;
meta = {
description = "Simple WebDAV server";
homepage = "https://github.com/hacdias/webdav";
changelog = "https://github.com/hacdias/webdav/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
pmy
pbsds
];
mainProgram = "webdav";
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
stdenv,
fetchFromGitHub,
hiredis,
http-parser,
jansson,
libevent,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "webdis";
version = "0.1.23";
src = fetchFromGitHub {
owner = "nicolasff";
repo = "webdis";
rev = finalAttrs.version;
hash = "sha256-eFUI3RDDrEI1bV+SfTVsIO6yjswK7tzgNsNepoo7DQ4=";
};
buildInputs = [
hiredis
http-parser
jansson
libevent
];
makeFlags = [
"PREFIX=${placeholder "out"}"
"CONFDIR=${placeholder "out"}/share/webdis"
];
meta = {
description = "Redis HTTP interface with JSON output";
mainProgram = "webdis";
homepage = "https://webd.is/";
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [ wucke13 ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,183 @@
{
lib,
writeScript,
stdenv,
fetchurl,
alsa-lib,
at-spi2-atk,
at-spi2-core,
atk,
cairo,
cups,
dbus,
expat,
fontconfig,
freetype,
gdk-pixbuf,
glib,
gtk3,
harfbuzz,
libdrm,
libgcrypt,
libglvnd,
libkrb5,
libpulseaudio,
libsecret,
udev,
libxcb,
libxkbcommon,
libxcrypt-legacy,
lshw,
libgbm,
nspr,
nss,
pango,
zlib,
libX11,
libXcomposite,
libXcursor,
libXdamage,
libXext,
libXfixes,
libXi,
libXrandr,
libXrender,
libXtst,
libxshmfence,
xcbutil,
xcbutilimage,
xcbutilkeysyms,
xcbutilrenderutil,
xcbutilwm,
p7zip,
onetbb,
wayland,
libXScrnSaver,
}:
stdenv.mkDerivation rec {
pname = "webex";
version = "45.6.2.32823";
src = fetchurl {
url = "https://binaries.webex.com/WebexDesktop-Ubuntu-Gold/20250725151734/Webex_ubuntu.7z";
sha256 = "72e9693d7c1c09ebf2c93c5e29e2b52a012eaf3ac108d7759d66be500c528b3b";
};
nativeBuildInputs = [
p7zip
];
buildInputs = [
alsa-lib
at-spi2-atk
at-spi2-core
atk
cairo
cups
dbus
expat
fontconfig
freetype
glib
gdk-pixbuf
gtk3
harfbuzz
lshw
libgbm
nspr
nss
pango
zlib
libdrm
libgcrypt
libglvnd
libkrb5
libpulseaudio
libsecret
udev
libxcb
libxkbcommon
libxcrypt-legacy
libX11
libXcomposite
libXcursor
libXdamage
libXext
libXfixes
libXi
libXrandr
libXrender
libXtst
libxshmfence
xcbutil
xcbutilimage
libXScrnSaver
xcbutilkeysyms
xcbutilrenderutil
xcbutilwm
onetbb
wayland
];
libPath = "$out/opt/Webex/lib:$out/opt/Webex/bin:${lib.makeLibraryPath buildInputs}";
unpackPhase = ''
7z x $src
mv Webex_ubuntu/opt .
'';
postPatch = ''
substituteInPlace opt/Webex/bin/webex.desktop --replace /opt $out/opt
'';
dontPatchELF = true;
buildPhase = ''
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${libPath}" \
opt/Webex/bin/CiscoCollabHost \
opt/Webex/bin/CiscoCollabHostCef \
opt/Webex/bin/CiscoCollabHostCefWM \
opt/Webex/bin/WebexFileSelector \
opt/Webex/bin/pxgsettings
for each in $(find opt/Webex -type f | grep \\.so); do
patchelf --set-rpath "${libPath}" "$each"
done
'';
installPhase = ''
mkdir -p "$out/bin" "$out/share/applications"
cp -r opt "$out"
ln -s "$out/opt/Webex/bin/CiscoCollabHost" "$out/bin/webex"
chmod +x $out/bin/webex
mv "$out/opt/Webex/bin/webex.desktop" "$out/share/applications/webex.desktop"
'';
passthru.updateScript = writeScript "webex-update-script" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
set -eou pipefail;
channel=gold # blue, green, gold
manifest=$(curl -s "https://client-upgrade-a.wbx2.com/client-upgrade/api/v1/webexteamsdesktop/upgrade/@me?channel=$channel&model=ubuntu" | jq '.manifest')
url=$(jq -r '.packageLocation' <<< "$manifest")
version=$(jq -r '.version' <<< "$manifest")
hash=$(jq -r '.checksum' <<< "$manifest")
update-source-version ${pname} "$version" "$hash" "$url" --file=./pkgs/by-name/we/webex/package.nix
'';
meta = with lib; {
description = "All-in-one app to call, meet, message, and get work done";
homepage = "https://webex.com/";
downloadPage = "https://www.webex.com/downloads.html";
license = licenses.unfree;
maintainers = with lib.maintainers; [ uvnikita ];
platforms = [ "x86_64-linux" ];
};
}

View File

@@ -0,0 +1,82 @@
{
appstream-glib,
blueprint-compiler,
desktop-file-utils,
fetchFromGitHub,
gettext,
glib-networking,
gobject-introspection,
gtk4,
gtksourceview5,
lib,
libadwaita,
libsoup_3,
meson,
ninja,
nix-update-script,
pkg-config,
python3,
python3Packages,
stdenv,
wrapGAppsHook4,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "webfont-bundler";
version = "1.3.0";
src = fetchFromGitHub {
owner = "rafaelmardojai";
repo = "webfont-kit-generator";
tag = finalAttrs.version;
hash = "sha256-5TFsUSY6pJc/OwOklw5YocrleL9nzxKMVS1Bt6LPI/Q=";
};
nativeBuildInputs = [
appstream-glib
blueprint-compiler
desktop-file-utils
gettext
gobject-introspection
gtk4 # For gtk4-update-icon-cache
meson
ninja
pkg-config
wrapGAppsHook4
];
buildInputs = [
glib-networking
gtk4
gtksourceview5
libadwaita
libsoup_3
(python3.withPackages (
ps: with ps; [
brotli
fonttools
pygobject3
]
))
];
propagatedBuildInputs = [
python3Packages.pygobject3
python3Packages.brotli
];
passthru = {
updateScript = nix-update-script { };
};
meta = with lib; {
description = "Create @font-face kits easily";
longDescription = "Webfont Bundler is a simple utility that allows you to generate woff, woff2 and the necessary CSS boilerplate from non-web font formats (otf and ttf).";
changelog = "https://github.com/rafaelmardojai/webfont-kit-generator/releases/tag/${finalAttrs.version}";
mainProgram = "webfontkitgenerator";
homepage = "https://apps.gnome.org/WebfontKitGenerator/";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ benediktbroich ];
teams = [ teams.gnome-circle ];
platforms = platforms.unix;
};
})

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchFromGitHub,
mailcap,
openssl,
}:
stdenv.mkDerivation {
pname = "webfs";
version = "1.21-unstable-2021-02-24";
src = fetchFromGitHub {
owner = "ourway";
repo = "webfsd";
rev = "228affae0774251c6925372d465eb4e648327879";
hash = "sha256-uTo9f66cOKSsIGLUj1E/ywMXT1peekb93UlFBrfkpN0=";
};
buildInputs = [ openssl ];
makeFlags = [
"mimefile=${placeholder "out"}/etc/mime.types"
"prefix=${placeholder "out"}"
"USE_THREADS=yes"
];
postInstall = ''
install -Dm444 -t $out/etc ${mailcap}/etc/mime.types
'';
meta = with lib; {
description = "HTTP server for purely static content";
homepage = "http://linux.bytesex.org/misc/webfs.html";
license = licenses.gpl2Plus;
platforms = platforms.all;
maintainers = with maintainers; [ zimbatm ];
mainProgram = "webfsd";
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
buildGoModule,
fetchFromGitHub,
nixosTests,
}:
buildGoModule rec {
pname = "webhook";
version = "2.8.2";
src = fetchFromGitHub {
owner = "adnanh";
repo = "webhook";
rev = version;
sha256 = "sha256-3Ew72ADGTlvp6w37nYbCng7HHCZ0a7kVf3DNRNyCkZU=";
};
vendorHash = null;
subPackages = [ "." ];
doCheck = false;
passthru.tests = { inherit (nixosTests) webhook; };
meta = with lib; {
description = "Incoming webhook server that executes shell commands";
mainProgram = "webhook";
homepage = "https://github.com/adnanh/webhook";
license = licenses.mit;
maintainers = with maintainers; [ azahi ];
};
}

View File

@@ -0,0 +1,57 @@
{
stdenv,
autoreconfHook,
fetchFromGitHub,
gtk-sharp-3_0,
lib,
libxslt,
mono,
pkg-config,
webkitgtk_4_0,
}:
stdenv.mkDerivation rec {
pname = "webkit2-sharp";
version = "a59fd76dd730432c76b12ee6347ea66567107ab9";
src = fetchFromGitHub {
owner = "hbons";
repo = "webkit2-sharp";
rev = version;
sha256 = "sha256:0a7vx81zvzn2wq4q2mqrxvlps1mqk28lm1gpfndqryxm4iiw28vc";
};
nativeBuildInputs = [
autoreconfHook
libxslt
mono
pkg-config
];
buildInputs = [
gtk-sharp-3_0
webkitgtk_4_0
];
postPatch = ''
# Workaround build failure with WebKitGTK 2.40.0
# https://github.com/hbons/webkit2-sharp/issues/6
substituteInPlace sources/webkit2-sharp-api.raw --replace \
'<field cname="parentInstance" access="public" writeable="false" readable="true" name="ParentInstance" type="GtkContainer*"/>' \
'<field cname="parent" access="public" writeable="false" readable="true" name="Parent" type="GtkContainer*"/>'
'';
ac_cv_path_MONODOCER = "no";
installFlags = [ "GAPIXMLDIR=/tmp/gapixml" ];
passthru = {
webkitgtk = webkitgtk_4_0;
};
meta = {
description = "C# bindings for WebKit 2 with GTK+ 3";
homepage = "https://github.com/hbons/webkit2-sharp";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ kevincox ];
};
}

View File

@@ -0,0 +1,185 @@
{
lib,
python3,
fetchFromGitHub,
gettext,
pango,
harfbuzz,
librsvg,
gdk-pixbuf,
glib,
borgbackup,
writeText,
nixosTests,
}:
let
python = python3.override {
packageOverrides = final: prev: {
# https://github.com/django-crispy-forms/crispy-bootstrap3/issues/12
django = prev.django_5_1;
djangorestframework = prev.djangorestframework.overridePythonAttrs (old: {
# https://github.com/encode/django-rest-framework/discussions/9342
disabledTests = (old.disabledTests or [ ]) ++ [ "test_invalid_inputs" ];
});
};
};
in
python.pkgs.buildPythonApplication rec {
pname = "weblate";
version = "5.13.3";
pyproject = true;
outputs = [
"out"
"static"
];
src = fetchFromGitHub {
owner = "WeblateOrg";
repo = "weblate";
tag = "weblate-${version}";
hash = "sha256-PM5h9RqCMdt0FODE7MoCWv9I+RMFTgjDmSrid59cHOA=";
};
build-system = with python.pkgs; [ setuptools ];
nativeBuildInputs = [ gettext ];
# Build static files into a separate output
postBuild =
let
staticSettings = writeText "static_settings.py" ''
DEBUG = False
STATIC_ROOT = os.environ["static"]
COMPRESS_OFFLINE = True
# So we don't need postgres dependencies
DATABASES = {}
'';
in
''
mkdir $static
cat weblate/settings_example.py ${staticSettings} > weblate/settings_static.py
export DJANGO_SETTINGS_MODULE="weblate.settings_static"
${python.pythonOnBuildForHost.interpreter} manage.py compilemessages
${python.pythonOnBuildForHost.interpreter} manage.py collectstatic --no-input
${python.pythonOnBuildForHost.interpreter} manage.py compress
'';
pythonRelaxDeps = [
"rapidfuzz"
];
dependencies =
with python.pkgs;
[
aeidon
ahocorasick-rs
altcha
(toPythonModule (borgbackup.override { python3 = python; }))
celery
certifi
charset-normalizer
crispy-bootstrap3
crispy-bootstrap5
cryptography
cssselect
cython
cyrtranslit
dateparser
diff-match-patch
disposable-email-domains
django-appconf
django-celery-beat
django-compressor
django-cors-headers
django-crispy-forms
django-filter
django-redis
django-otp
django-otp-webauthn
django
djangorestframework-csv
djangorestframework
docutils
drf-spectacular
drf-standardized-errors
filelock
fluent-syntax
gitpython
hiredis
html2text
iniparse
jsonschema
lxml
mistletoe
nh3
openpyxl
packaging
phply
pillow
pycairo
pygments
pygobject3
pyicumessageformat
pyparsing
python-dateutil
qrcode
rapidfuzz
redis
requests
ruamel-yaml
sentry-sdk
siphashc
social-auth-app-django
social-auth-core
standardwebhooks
tesserocr
translate-toolkit
translation-finder
unidecode
user-agents
weblate-language-data
weblate-schemas
]
++ django.optional-dependencies.argon2
++ celery.optional-dependencies.redis
++ drf-spectacular.optional-dependencies.sidecar
++ drf-standardized-errors.optional-dependencies.openapi;
optional-dependencies = {
postgres = with python.pkgs; [ psycopg ];
};
# We don't just use wrapGAppsNoGuiHook because we need to expose GI_TYPELIB_PATH
GI_TYPELIB_PATH = lib.makeSearchPathOutput "out" "lib/girepository-1.0" [
pango
harfbuzz
librsvg
gdk-pixbuf
glib
];
makeWrapperArgs = [ "--set GI_TYPELIB_PATH \"$GI_TYPELIB_PATH\"" ];
passthru = {
inherit python;
# We need to expose this so weblate can work outside of calling its bin output
inherit GI_TYPELIB_PATH;
tests = {
inherit (nixosTests) weblate;
};
};
meta = {
description = "Web based translation tool with tight version control integration";
homepage = "https://weblate.org/";
changelog = "https://github.com/WeblateOrg/weblate/releases/tag/${src.tag}";
license = with lib.licenses; [
gpl3Plus
mit
];
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ erictapen ];
};
}

View File

@@ -0,0 +1,54 @@
{
lib,
buildGoModule,
fetchFromGitHub,
gitUpdater,
testers,
webmesh,
}:
buildGoModule rec {
pname = "webmesh";
version = "0.17.1";
src = fetchFromGitHub {
owner = "webmeshproj";
repo = "webmesh";
rev = "v${version}";
hash = "sha256-Inh7j01/xBJgGYmX1tGBRNYjn1N4AO2sywBwZ8yXlsY=";
};
vendorHash = "sha256-xoc7NSdg5bn3aXgcrolJwv8jyrv2HEXFmiCtRXBVwVg=";
env.CGO_ENABLED = 0;
subPackages = [
"cmd/webmesh-node"
"cmd/webmeshd"
"cmd/wmctl"
];
ldflags = [
"-w"
"-s"
"-X github.com/webmeshproj/webmesh/pkg/version.Version=${version}"
"-X github.com/webmeshproj/webmesh/pkg/version.GitCommit=v${version}"
];
passthru = {
updateScript = gitUpdater { rev-prefix = "v"; };
tests = {
webmesh-version = testers.testVersion {
package = webmesh;
};
};
};
meta = with lib; {
description = "Simple, distributed, zero-configuration WireGuard mesh provider";
mainProgram = "webmesh-node";
homepage = "https://webmeshproj.github.io";
license = licenses.asl20;
maintainers = with maintainers; [ bbigras ];
};
}

View File

@@ -0,0 +1,75 @@
{
lib,
stdenv,
fetchFromGitHub,
meson,
ninja,
pkg-config,
makeWrapper,
gdk-pixbuf,
libwebp,
}:
let
inherit (gdk-pixbuf) moduleDir;
loadersPath = "${gdk-pixbuf.binaryDir}/webp-loaders.cache";
in
stdenv.mkDerivation rec {
pname = "webp-pixbuf-loader";
version = "0.2.6";
src = fetchFromGitHub {
owner = "aruiz";
repo = "webp-pixbuf-loader";
rev = version;
sha256 = "sha256-2GDH5+YCwb2mPdMfEscmWDOzdGnWRcppE+4rcDCZog4=";
};
nativeBuildInputs = [
gdk-pixbuf.dev
meson
ninja
pkg-config
makeWrapper
];
buildInputs = [
gdk-pixbuf
libwebp
];
mesonFlags = [
"-Dgdk_pixbuf_moduledir=${placeholder "out"}/${moduleDir}"
];
postPatch = ''
# It looks for gdk-pixbuf-thumbnailer in this package's bin rather than the gdk-pixbuf bin. We need to patch that.
substituteInPlace webp-pixbuf.thumbnailer.in \
--replace "@bindir@/gdk-pixbuf-thumbnailer" "$out/libexec/gdk-pixbuf-thumbnailer-webp"
'';
postInstall = ''
GDK_PIXBUF_MODULE_FILE="$out/${loadersPath}" \
GDK_PIXBUF_MODULEDIR="$out/${moduleDir}" \
gdk-pixbuf-query-loaders --update-cache
# gdk-pixbuf disables the thumbnailer in cross-builds (https://gitlab.gnome.org/GNOME/gdk-pixbuf/-/commit/fc37708313a5fc52083cf10c9326f3509d67701f)
# and therefore makeWrapper will fail because 'gdk-pixbuf-thumbnailer' the executable does not exist.
''
+ lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
# It assumes gdk-pixbuf-thumbnailer can find the webp loader in the loaders.cache referenced by environment variable, breaking containment.
# So we replace it with a wrapped executable.
mkdir -p "$out/bin"
makeWrapper "${gdk-pixbuf}/bin/gdk-pixbuf-thumbnailer" "$out/libexec/gdk-pixbuf-thumbnailer-webp" \
--set GDK_PIXBUF_MODULE_FILE "$out/${loadersPath}"
'';
meta = with lib; {
description = "WebP GDK Pixbuf Loader library";
homepage = "https://github.com/aruiz/webp-pixbuf-loader";
license = licenses.lgpl2Plus;
platforms = platforms.unix;
maintainers = [ maintainers.cwyc ];
teams = [ teams.gnome ];
};
}

View File

@@ -0,0 +1,67 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchYarnDeps,
yarnConfigHook,
yarnBuildHook,
yarnInstallHook,
nodejs,
gitUpdater,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "webpack-cli";
version = "6.0.1";
src = fetchFromGitHub {
owner = "webpack";
repo = "webpack-cli";
tag = "webpack-cli@${finalAttrs.version}";
hash = "sha256-teQWaWWt3rKHEVbj3twt8WQXQO9HuzIBNuvFUfRmxqY=";
};
yarnKeepDevDeps = true;
yarnOfflineCache = fetchYarnDeps {
yarnLock = finalAttrs.src + "/yarn.lock";
hash = "sha256-iYyH1/ZyNKq4MqMcCl7y5WvDnuGnRY0sj8hHsQhe7z4=";
};
nativeBuildInputs = [
yarnConfigHook
yarnBuildHook
yarnInstallHook
# Needed for executing package.json scripts
nodejs
];
preInstall = ''
cp -r node_modules/* packages/webpack-cli/node_modules/
cp yarn.lock packages/webpack-cli/yarn.lock
cd packages/webpack-cli
'';
# Removes dangling symlinks that are created as part of the `yarn pack` process.
# They are not needed at runtime, so it's safe to remove them.
postInstall = ''
rm -rf $out/lib/node_modules/webpack-cli/node_modules/{.bin,webpack-cli,create-new-webpack-app,@webpack-cli}
'';
postFixup = ''
mv $out/bin/webpack-cli $out/bin/webpack
'';
passthru.updateScript = gitUpdater {
rev-prefix = "webpack-cli@";
};
meta = {
changelog = "https://github.com/webpack/webpack-cli/blob/webpack-cli%2540${finalAttrs.version}/CHANGELOG.md";
description = "Webpack's Command Line Interface";
homepage = "https://webpack.js.org/api/cli/";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pyrox0 ];
mainProgram = "webpack";
};
})

View File

@@ -0,0 +1,282 @@
diff --git a/webrtc/api/audio/audio_processing.h b/webrtc/api/audio/audio_processing.h
index dca75f2174dd1a42a21c6f46472f7686bfc79ca9..4580ba9fd9af339123a0516ab539208a71810c84 100644
--- a/webrtc/api/audio/audio_processing.h
+++ b/webrtc/api/audio/audio_processing.h
@@ -28,6 +28,7 @@
#include <string>
#include <utility>
+#include "absl/base/config.h"
#include "absl/base/nullability.h"
#include "absl/strings/string_view.h"
#include "api/array_view.h"
@@ -632,6 +633,7 @@ class RTC_EXPORT AudioProcessing : public RefCountInterface {
// return value of true indicates that the file has been
// sucessfully opened, while a value of false indicates that
// opening the file failed.
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
virtual bool CreateAndAttachAecDump(
absl::string_view file_name,
int64_t max_log_size_bytes,
@@ -640,6 +642,16 @@ class RTC_EXPORT AudioProcessing : public RefCountInterface {
absl::Nonnull<FILE*> handle,
int64_t max_log_size_bytes,
absl::Nonnull<TaskQueueBase*> worker_queue) = 0;
+#else
+ virtual bool CreateAndAttachAecDump(absl::string_view file_name,
+ int64_t max_log_size_bytes,
+ TaskQueueBase* absl_nonnull
+ worker_queue) = 0;
+ virtual bool CreateAndAttachAecDump(FILE* absl_nonnull handle,
+ int64_t max_log_size_bytes,
+ TaskQueueBase* absl_nonnull
+ worker_queue) = 0;
+#endif
// TODO(webrtc:5298) Deprecated variant.
// Attaches provided webrtc::AecDump for recording debugging
diff --git a/webrtc/api/make_ref_counted.h b/webrtc/api/make_ref_counted.h
index b5f4e99c8530fe88e8a34b12a8fb69ee5b868c52..080023a83ff9487b56249dd7a0d93a2b5919aa67 100644
--- a/webrtc/api/make_ref_counted.h
+++ b/webrtc/api/make_ref_counted.h
@@ -13,6 +13,7 @@
#include <type_traits>
#include <utility>
+#include "absl/base/config.h"
#include "absl/base/nullability.h"
#include "api/ref_count.h"
#include "api/scoped_refptr.h"
@@ -86,7 +87,11 @@ template <
typename std::enable_if<std::is_convertible_v<T*, RefCountInterface*> &&
std::is_abstract_v<T>,
T>::type* = nullptr>
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
absl::Nonnull<scoped_refptr<T>> make_ref_counted(Args&&... args) {
+#else
+absl_nonnull scoped_refptr<T> make_ref_counted(Args&&... args) {
+#endif
return scoped_refptr<T>(new RefCountedObject<T>(std::forward<Args>(args)...));
}
@@ -99,7 +104,11 @@ template <
!std::is_convertible_v<T*, RefCountInterface*> &&
webrtc_make_ref_counted_internal::HasAddRefAndRelease<T>::value,
T>::type* = nullptr>
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
absl::Nonnull<scoped_refptr<T>> make_ref_counted(Args&&... args) {
+#else
+absl_nonnull scoped_refptr<T> make_ref_counted(Args&&... args) {
+#endif
return scoped_refptr<T>(new T(std::forward<Args>(args)...));
}
@@ -113,7 +122,11 @@ template <
!webrtc_make_ref_counted_internal::HasAddRefAndRelease<T>::value,
T>::type* = nullptr>
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
absl::Nonnull<scoped_refptr<FinalRefCountedObject<T>>> make_ref_counted(
+#else
+absl_nonnull scoped_refptr<FinalRefCountedObject<T>> make_ref_counted(
+#endif
Args&&... args) {
return scoped_refptr<FinalRefCountedObject<T>>(
new FinalRefCountedObject<T>(std::forward<Args>(args)...));
diff --git a/webrtc/api/scoped_refptr.h b/webrtc/api/scoped_refptr.h
index c6fb5605ca2ef97509109c113e3a7f8af2d7ca7b..8c441ff07adf3e55dfaa5c6a487d51e869d5ba94 100644
--- a/webrtc/api/scoped_refptr.h
+++ b/webrtc/api/scoped_refptr.h
@@ -66,6 +66,7 @@
#include <cstddef>
#include <utility>
+#include "absl/base/config.h"
#include "absl/base/nullability.h"
namespace webrtc {
@@ -73,13 +74,19 @@ namespace webrtc {
template <class T>
class ABSL_NULLABILITY_COMPATIBLE scoped_refptr {
public:
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
using absl_nullability_compatible = void;
+#endif
using element_type = T;
scoped_refptr() : ptr_(nullptr) {}
scoped_refptr(std::nullptr_t) : ptr_(nullptr) {} // NOLINT(runtime/explicit)
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
explicit scoped_refptr(absl::Nullable<T*> p) : ptr_(p) {
+#else
+ explicit scoped_refptr(T* absl_nullable p) : ptr_(p) {
+#endif
if (ptr_)
ptr_->AddRef();
}
@@ -122,7 +129,11 @@ class ABSL_NULLABILITY_COMPATIBLE scoped_refptr {
return retVal;
}
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
scoped_refptr<T>& operator=(absl::Nullable<T*> p) {
+#else
+ scoped_refptr<T>& operator=(T* absl_nullable p) {
+#endif
// AddRef first so that self assignment should work
if (p)
p->AddRef();
@@ -152,7 +163,11 @@ class ABSL_NULLABILITY_COMPATIBLE scoped_refptr {
return *this;
}
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
void swap(absl::Nonnull<T**> pp) noexcept {
+#else
+ void swap(T** absl_nonnull pp) noexcept {
+#endif
T* p = ptr_;
ptr_ = *pp;
*pp = p;
diff --git a/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h b/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h
index 0d258a9ebc09f67a6bb5f37d524c64a68e040f3a..14d8b39a346a74437008c16e523b19b6c30c1e9f 100644
--- a/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h
+++ b/webrtc/modules/audio_processing/aec_dump/aec_dump_factory.h
@@ -29,6 +29,7 @@ class RTC_EXPORT AecDumpFactory {
// The AecDump takes responsibility for `handle` and closes it in the
// destructor. A non-null return value indicates that the file has been
// sucessfully opened.
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
static absl::Nullable<std::unique_ptr<AecDump>> Create(
FileWrapper file,
int64_t max_log_size_bytes,
@@ -41,6 +42,20 @@ class RTC_EXPORT AecDumpFactory {
absl::Nonnull<FILE*> handle,
int64_t max_log_size_bytes,
absl::Nonnull<TaskQueueBase*> worker_queue);
+#else
+ static absl_nullable std::unique_ptr<AecDump> Create(
+ FileWrapper file,
+ int64_t max_log_size_bytes,
+ TaskQueueBase* absl_nonnull worker_queue);
+ static absl_nullable std::unique_ptr<AecDump> Create(
+ absl::string_view file_name,
+ int64_t max_log_size_bytes,
+ TaskQueueBase* absl_nonnull worker_queue);
+ static absl_nullable std::unique_ptr<AecDump> Create(
+ FILE* absl_nonnull handle,
+ int64_t max_log_size_bytes,
+ TaskQueueBase* absl_nonnull worker_queue);
+#endif
};
} // namespace webrtc
diff --git a/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc b/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc
index 63929afac41934a4a9cac6b56ce8517c099fbeff..658bcee7f48416f4c60333f0860f95c0dbbafd87 100644
--- a/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc
+++ b/webrtc/modules/audio_processing/aec_dump/null_aec_dump_factory.cc
@@ -16,6 +16,7 @@
namespace webrtc {
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
absl::Nullable<std::unique_ptr<AecDump>> AecDumpFactory::Create(
FileWrapper file,
int64_t max_log_size_bytes,
@@ -37,3 +38,27 @@ absl::Nullable<std::unique_ptr<AecDump>> AecDumpFactory::Create(
return nullptr;
}
} // namespace webrtc
+#else
+absl_nullable std::unique_ptr<AecDump> AecDumpFactory::Create(
+ FileWrapper file,
+ int64_t max_log_size_bytes,
+ TaskQueueBase* absl_nonnull worker_queue) {
+ return nullptr;
+}
+
+absl_nullable std::unique_ptr<AecDump> AecDumpFactory::Create(
+ absl::string_view file_name,
+ int64_t max_log_size_bytes,
+ TaskQueueBase* absl_nonnull worker_queue) {
+ return nullptr;
+}
+
+absl_nullable std::unique_ptr<AecDump> AecDumpFactory::Create(
+ FILE* absl_nonnull handle,
+ int64_t max_log_size_bytes,
+ TaskQueueBase* absl_nonnull worker_queue) {
+ return nullptr;
+}
+} // namespace webrtc
+
+#endif
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.cc b/webrtc/modules/audio_processing/audio_processing_impl.cc
index a1cba51a1158fad909150e39db592c2dd13cb1fd..1dfe26d4a83fc968651868cdfd22fd38f4595468 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl.cc
+++ b/webrtc/modules/audio_processing/audio_processing_impl.cc
@@ -19,6 +19,7 @@
#include <type_traits>
#include <utility>
+#include "absl/base/config.h"
#include "absl/base/nullability.h"
#include "absl/strings/match.h"
#include "absl/strings/string_view.h"
@@ -1787,7 +1788,11 @@ void AudioProcessingImpl::UpdateRecommendedInputVolumeLocked() {
bool AudioProcessingImpl::CreateAndAttachAecDump(
absl::string_view file_name,
int64_t max_log_size_bytes,
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
absl::Nonnull<TaskQueueBase*> worker_queue) {
+#else
+ TaskQueueBase* absl_nonnull worker_queue) {
+#endif
std::unique_ptr<AecDump> aec_dump =
AecDumpFactory::Create(file_name, max_log_size_bytes, worker_queue);
if (!aec_dump) {
@@ -1801,7 +1806,11 @@ bool AudioProcessingImpl::CreateAndAttachAecDump(
bool AudioProcessingImpl::CreateAndAttachAecDump(
FILE* handle,
int64_t max_log_size_bytes,
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
absl::Nonnull<TaskQueueBase*> worker_queue) {
+#else
+ TaskQueueBase* absl_nonnull worker_queue) {
+#endif
std::unique_ptr<AecDump> aec_dump =
AecDumpFactory::Create(handle, max_log_size_bytes, worker_queue);
if (!aec_dump) {
diff --git a/webrtc/modules/audio_processing/audio_processing_impl.h b/webrtc/modules/audio_processing/audio_processing_impl.h
index ecdc055768bd2e9aa6b9ca7f11d5af4a648832ad..51a2bfbfaa812eea2ea7353483979d40e1ac7282 100644
--- a/webrtc/modules/audio_processing/audio_processing_impl.h
+++ b/webrtc/modules/audio_processing/audio_processing_impl.h
@@ -20,6 +20,7 @@
#include <string>
#include <vector>
+#include "absl/base/config.h"
#include "absl/base/nullability.h"
#include "absl/strings/string_view.h"
#include "api/array_view.h"
@@ -74,11 +75,19 @@ class AudioProcessingImpl : public AudioProcessing {
bool CreateAndAttachAecDump(
absl::string_view file_name,
int64_t max_log_size_bytes,
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
absl::Nonnull<TaskQueueBase*> worker_queue) override;
+#else
+ TaskQueueBase* absl_nonnull worker_queue) override;
+#endif
bool CreateAndAttachAecDump(
FILE* handle,
int64_t max_log_size_bytes,
+#if defined(ABSL_LTS_RELEASE_VERSION) && ABSL_LTS_RELEASE_VERSION < 20250512
absl::Nonnull<TaskQueueBase*> worker_queue) override;
+#else
+ TaskQueueBase* absl_nonnull worker_queue) override;
+#endif
// TODO(webrtc:5298) Deprecated variant.
void AttachAecDump(std::unique_ptr<AecDump> aec_dump) override;
void DetachAecDump() override;

View File

@@ -0,0 +1,75 @@
{
lib,
stdenv,
fetchFromGitLab,
fetchpatch,
abseil-cpp,
meson,
ninja,
pkg-config,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "webrtc-audio-processing";
version = "2.1";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "pulseaudio";
repo = "webrtc-audio-processing";
tag = "v${finalAttrs.version}";
hash = "sha256-YR4ELukJgHMbfe80H+r8OiaZUCAqefGXmVOaTVVgOqA=";
};
patches = [
(fetchpatch {
name = "gcc-15-compat.patch";
url = "https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/commit/e9c78dc4712fa6362b0c839ad57b6b46dce1ba83.diff";
hash = "sha256-QXOtya7RA0UTV9VK4qpql5D8QcOKAn6qURZvPpWT+vg=";
})
# fix build with abseil 202508
# upstream PR: https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/60
./abseil-202508.patch
];
outputs = [
"out"
"dev"
];
nativeBuildInputs = [
meson
ninja
pkg-config
];
propagatedBuildInputs = [
abseil-cpp
];
mesonFlags =
lib.lists.optional (!stdenv.hostPlatform.isAarch64) "-Dneon=disabled"
++ lib.lists.optional (stdenv.hostPlatform.isi686) "-Dinline-sse=false";
passthru.tests.pkg-config = testers.hasPkgConfigModules {
package = finalAttrs.finalPackage;
versionCheck = true;
};
meta = {
homepage = "https://www.freedesktop.org/software/pulseaudio/webrtc-audio-processing";
description = "More Linux packaging friendly copy of the AudioProcessing module from the WebRTC project";
pkgConfigModules = [ "webrtc-audio-processing-2" ];
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ fzdslr ];
platforms =
with lib.platforms;
lib.intersectLists
# https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/blob/master/webrtc/rtc_base/system/arch.h
(arm ++ aarch64 ++ mips ++ power ++ riscv ++ x86 ++ loongarch64)
# https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/blob/master/meson.build
(linux ++ windows ++ freebsd ++ netbsd ++ openbsd ++ darwin);
};
})

View File

@@ -0,0 +1,37 @@
This patch was extracted from the Gentoo powerpc64le-qtwebengine
patchset, referenced here:
https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-qt/qtwebengine/qtwebengine-5.15.3_p20220406.ebuild
and downloaded from here:
https://dev.gentoo.org/~asturm/distfiles/${PN}-5.15.3_p20220406-patchset.tar.xz
From 4bbb4482e14ad27cf0bd5032b1b5d4abba29dc99 Mon Sep 17 00:00:00 2001
From: Georgy Yakovlev <gyakovlev@gentoo.org>
Date: Fri, 27 Nov 2020 13:05:45 -0800
Subject: [PATCH] 5.15.2 ppc64le patchet
diff --git a/webrtc/typedefs.h b/webrtc/typedefs.h
index ce1f3e8..fd39a16 100644
--- a/webrtc/typedefs.h
+++ b/webrtc/typedefs.h
@@ -38,6 +38,18 @@
#define WEBRTC_ARCH_X86
#define WEBRTC_ARCH_32_BITS
#define WEBRTC_ARCH_LITTLE_ENDIAN
+#elif defined(__PPC__)
+#define WEBRTC_ARCH_PPC_FAMILY
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define WEBRTC_ARCH_LITTLE_ENDIAN
+#else
+#define WEBRTC_ARCH_BIG_ENDIAN
+#endif
+#if defined(__LP64__)
+#define WEBRTC_ARCH_64_BITS
+#else
+#define WEBRTC_ARCH_32_BITS
+#endif
#elif defined(__ARMEL__)
// TODO(ajm): We'd prefer to control platform defines here, but this is
// currently provided by the Android makefiles. Commented to avoid duplicate

View File

@@ -0,0 +1,18 @@
diff --git a/webrtc/typedefs.h b/webrtc/typedefs.h
index d875490..ce1f3e8 100644
--- a/webrtc/typedefs.h
+++ b/webrtc/typedefs.h
@@ -26,6 +26,13 @@
#elif defined(__aarch64__)
#define WEBRTC_ARCH_64_BITS
#define WEBRTC_ARCH_LITTLE_ENDIAN
+#elif defined(__riscv) || defined(__riscv__)
+#define WEBRTC_ARCH_LITTLE_ENDIAN
+#if __riscv_xlen == 64
+#define WEBRTC_ARCH_64_BITS
+#else
+#define WEBRTC_ARCH_32_BITS
+#endif
#elif defined(_M_IX86) || defined(__i386__)
#define WEBRTC_ARCH_X86_FAMILY
#define WEBRTC_ARCH_X86

View File

@@ -0,0 +1,76 @@
{
lib,
stdenv,
fetchurl,
fetchpatch,
autoreconfHook,
pkg-config,
}:
stdenv.mkDerivation rec {
pname = "webrtc-audio-processing";
version = "0.3.1";
src = fetchurl {
url = "https://freedesktop.org/software/pulseaudio/webrtc-audio-processing/webrtc-audio-processing-${version}.tar.xz";
sha256 = "1gsx7k77blfy171b6g3m0k0s0072v6jcawhmx1kjs9w5zlwdkzd0";
};
outputs = [
"out"
"dev"
];
patches = [
./enable-riscv.patch
./enable-powerpc.patch
# big-endian support, from https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/127
(fetchpatch {
name = "0001-webrtc-audio-processing-big-endian.patch";
url = "https://gitlab.freedesktop.org/pulseaudio/pulseaudio/uploads/2994c0512aaa76ebf41ce11c7b9ba23e/webrtc-audio-processing-0.2-big-endian.patch";
hash = "sha256-zVAj9H8SJureQd0t5O5v1je4ia8/gHJOXYxuEBEB6gg=";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/freebsd/freebsd-ports/2f3c3b1d9dadc25356da4b612130bf4dea27b817/audio/webrtc-audio-processing0/files/patch-configure.ac";
hash = "sha256-IOSW3ZLIuRXY/M+MU813M9o0Vu4mcGoAtdNRlJwESHw=";
extraPrefix = "";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/freebsd/freebsd-ports/27f26f19a34755fe4b939a7210d8ba7ee9358a0d/audio/webrtc-audio-processing0/files/patch-webrtc_base_stringutils.h";
hash = "sha256-j85CdFpDIPhhEquwA3P0r5djnMEGVnvfsPM2bYbURt8=";
extraPrefix = "";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/freebsd/freebsd-ports/0d316feccaf89c1bd804d6001274426a7135c93a/audio/webrtc-audio-processing0/files/patch-webrtc_base_platform__thread.cc";
hash = "sha256-MsZtNWv3bwxJLxpQaMqj34XIBhqAaO2NkBHjlFWZreA=";
extraPrefix = "";
})
];
nativeBuildInputs = [
autoreconfHook
pkg-config
];
patchPhase = lib.optionalString stdenv.hostPlatform.isMusl ''
substituteInPlace webrtc/base/checks.cc --replace 'defined(__UCLIBC__)' 1
'';
enableParallelBuilding = true;
meta = with lib; {
homepage = "https://www.freedesktop.org/software/pulseaudio/webrtc-audio-processing";
description = "More Linux packaging friendly copy of the AudioProcessing module from the WebRTC project";
license = licenses.bsd3;
# https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/blob/v0.3.1/webrtc/typedefs.h
# + our patches
platforms = intersectLists platforms.unix (
platforms.arm
++ platforms.aarch64
++ platforms.mips
++ platforms.power
++ platforms.riscv
++ platforms.x86
);
};
}

View File

@@ -0,0 +1,80 @@
{
lib,
stdenv,
fetchFromGitLab,
fetchurl,
abseil-cpp,
meson,
ninja,
pkg-config,
}:
stdenv.mkDerivation rec {
pname = "webrtc-audio-processing";
version = "1.3";
src = fetchFromGitLab {
domain = "gitlab.freedesktop.org";
owner = "pulseaudio";
repo = "webrtc-audio-processing";
rev = "v${version}";
hash = "sha256-8CDt4kMt2Owzyv22dqWIcFuHeg4Y3FxB405cLw3FZ+g=";
};
patches = [
# Fix an include oppsie that happens to not happen on glibc
# https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/merge_requests/38
(fetchurl {
url = "https://git.alpinelinux.org/aports/plain/community/webrtc-audio-processing-1/0001-rtc_base-Include-stdint.h-to-fix-build-failures.patch?id=625e19c19972e69e034c0870a31b375833d1ab5d";
hash = "sha256-9nI22SJoU0H3CzsPSAObtCFTadtvkzdnqIh6mxmUuds=";
})
# Add loongarch64 support
(fetchurl {
url = "https://gitlab.alpinelinux.org/alpine/aports/-/raw/0630fa25465530c0e7358f00016bdc812894f67f/community/webrtc-audio-processing-1/add-loongarch-support.patch";
hash = "sha256-Cn3KwKSSV/QJm1JW0pkEWB6OmeA0fRlVkiMU8OzXNzY=";
})
];
outputs = [
"out"
"dev"
];
nativeBuildInputs = [
meson
ninja
pkg-config
];
propagatedBuildInputs = [
abseil-cpp
];
env = lib.optionalAttrs stdenv.hostPlatform.isx86_32 {
# https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/issues/5
NIX_CFLAGS_COMPILE = "-msse2";
};
meta = with lib; {
homepage = "https://www.freedesktop.org/software/pulseaudio/webrtc-audio-processing";
description = "More Linux packaging friendly copy of the AudioProcessing module from the WebRTC project";
license = licenses.bsd3;
platforms =
intersectLists
# https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/blob/master/meson.build
(platforms.darwin ++ platforms.linux ++ platforms.windows)
# https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/blob/master/webrtc/rtc_base/system/arch.h
(
platforms.arm
++ platforms.aarch64
++ platforms.loongarch64
++ platforms.mips
++ platforms.power
++ platforms.riscv
++ platforms.x86
);
# BE platforms are unsupported
# https://gitlab.freedesktop.org/pulseaudio/webrtc-audio-processing/-/issues/31
badPlatforms = platforms.bigEndian;
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
python3,
fetchPypi,
}:
python3.pkgs.buildPythonApplication rec {
pname = "websecprobe";
version = "0.0.12";
pyproject = true;
src = fetchPypi {
pname = "WebSecProbe";
inherit version;
hash = "sha256-RX4tc6JaUVaNx8nidn8eMcbsmbcSY+VZbup6c6P7oOs=";
};
build-system = with python3.pkgs; [ setuptools ];
dependencies = with python3.pkgs; [
requests
tabulate
];
postInstall = ''
mv $out/bin/WebSecProbe $out/bin/$pname
'';
pythonImportsCheck = [ "WebSecProbe" ];
meta = {
description = "Web Security Assessment Tool";
homepage = "https://github.com/spyboy-productions/WebSecProbe/";
changelog = "https://github.com/spyboy-productions/WebSecProbe/releases/tag/${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "websecprobe";
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,77 @@
{
lib,
stdenv,
bash,
fetchFromGitHub,
fetchpatch,
libiconv,
makeWrapper,
openssl,
pkg-config,
rustPlatform,
versionCheckHook,
}:
rustPlatform.buildRustPackage rec {
pname = "websocat";
version = "1.14.0";
src = fetchFromGitHub {
owner = "vi";
repo = "websocat";
tag = "v${version}";
hash = "sha256-v5+9cbKe3c12/SrW7mgN6tvQIiAuweqvMIl46Ce9f2A=";
};
# Fix build with Rust 1.87
# FIXME: remove in next update
cargoPatches = [
(fetchpatch {
url = "https://github.com/vi/websocat/commit/d4455623e777231d69b029d69d7a17c0de2bafe7.diff";
hash = "sha256-OUQQ+3eESE3XcGgToErqvF8ItpT8YCMAZhbvRzkFKpc=";
})
];
cargoHash = "sha256-3m7Gg//vjNjYlesEjKsdqjU48dAtgSeugxingr8OJyY=";
nativeBuildInputs = [
pkg-config
makeWrapper
];
buildInputs = [
openssl
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
];
nativeInstallCheckInputs = [ versionCheckHook ];
buildFeatures = [ "ssl" ];
# Needed to get openssl-sys to use pkg-config.
OPENSSL_NO_VENDOR = 1;
# The wrapping is required so that the "sh-c" option of websocat works even
# if sh is not in the PATH (as can happen, for instance, when websocat is
# started as a systemd service).
postInstall = ''
wrapProgram $out/bin/websocat \
--prefix PATH : ${lib.makeBinPath [ bash ]}
'';
doInstallCheck = true;
meta = {
description = "Command-line client for WebSockets (like netcat/socat)";
homepage = "https://github.com/vi/websocat";
changelog = "https://github.com/vi/websocat/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
thoughtpolice
Br1ght0ne
];
mainProgram = "websocat";
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "websocketd";
version = "0.4.1";
src = fetchFromGitHub {
owner = "joewalnes";
repo = "websocketd";
rev = "v${version}";
sha256 = "sha256-cp4iBSQ6Cd0+NPZ2i79Mulg1z17u//OCm3yoArbZEHs=";
};
vendorHash = "sha256-i5IPJ3srUXL7WWjBW9w803VSoyjwA5JgPWKsAckPYxY=";
doCheck = false;
meta = with lib; {
description = "Turn any program that uses STDIN/STDOUT into a WebSocket server";
homepage = "http://websocketd.com/";
maintainers = [ maintainers.bjornfor ];
license = licenses.bsd2;
mainProgram = "websocketd";
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
}:
stdenv.mkDerivation rec {
pname = "websocket++";
version = "0.8.2";
src = fetchFromGitHub {
owner = "zaphoyd";
repo = "websocketpp";
rev = version;
sha256 = "sha256-9fIwouthv2GcmBe/UPvV7Xn9P2o0Kmn2hCI4jCh0hPM=";
};
patches = [
(fetchpatch {
url = "https://github.com/zaphoyd/websocketpp/commit/deb0a334471362608958ce59a6b0bcd3e5b73c24.patch?full_index=1";
hash = "sha256-bFCHwtRuCFz9vr4trmmBLziPSlEx6SNjsTcBv9zV8go=";
})
];
nativeBuildInputs = [ cmake ];
meta = with lib; {
homepage = "https://www.zaphoyd.com/websocketpp/";
description = "C++/Boost Asio based websocket client/server library";
license = licenses.bsd3;
platforms = platforms.unix;
maintainers = with maintainers; [ revol-xut ];
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
fetchFromGitHub,
python3,
}:
python3.pkgs.buildPythonApplication rec {
pname = "websploit";
version = "4.0.4";
pyproject = true;
src = fetchFromGitHub {
owner = "f4rih";
repo = "websploit";
tag = version;
hash = "sha256-LpDfJmH2FbL37Fk86CAC/bxFqM035DBN6c6FPfGpaIw=";
};
nativeBuildInputs = with python3.pkgs; [
setuptools
];
propagatedBuildInputs = with python3.pkgs; [
requests
scapy
];
# Project has no tests
doCheck = false;
pythonImportsCheck = [
"websploit"
];
meta = {
description = "High level MITM framework";
homepage = "https://github.com/f4rih/websploit";
changelog = "https://github.com/f4rih/websploit/releases/tag/${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ emilytrau ];
mainProgram = "websploit";
};
}

View File

@@ -0,0 +1,58 @@
{
lib,
fetchFromGitHub,
rustPlatform,
openssl,
pkg-config,
}:
let
version = "1.24.22";
in
rustPlatform.buildRustPackage {
pname = "websurfx";
inherit version;
src = fetchFromGitHub {
owner = "neon-mmd";
repo = "websurfx";
tag = "v${version}";
hash = "sha256-l04M2veWipVmmR4lN5+8mHpL2/16JMd3biRzEIacgac=";
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
];
cargoHash = "sha256-ekosi4t0InWh1c14jEe2MAWPCQ4qnqwPFvTAtAlwiuw=";
postPatch = ''
substituteInPlace src/handler.rs \
--replace-fail "/etc/xdg" "$out/etc/xdg" \
--replace-fail "/opt/websurfx" "$out/opt/websurfx"
'';
postInstall = ''
mkdir -p $out/etc/xdg
mkdir -p $out/opt/websurfx
cp -r websurfx $out/etc/xdg/
cp -r public $out/opt/websurfx/
'';
meta = {
description = "Open source alternative to searx";
longDescription = ''
An open source alternative to searx which provides a modern-looking,
lightning-fast, privacy respecting, secure meta search engine.
'';
homepage = "https://github.com/neon-mmd/websurfx";
changelog = "https://github.com/neon-mmd/websurfx/releases";
license = lib.licenses.agpl3Plus;
maintainers = with lib.maintainers; [ theobori ];
mainProgram = "websurfx";
};
}

View File

@@ -0,0 +1,66 @@
{
lib,
stdenv,
electron,
buildNpmPackage,
fetchFromGitHub,
fetchpatch,
}:
buildNpmPackage {
pname = "webtorrent-desktop";
version = "0.25-pre-ac7f16";
src = fetchFromGitHub {
owner = "webtorrent";
repo = "webtorrent-desktop";
rev = "ac7f16e71c96c5ad670bfcb8728df5af78ae21a1";
sha256 = "sha256-UEN5NhLVSQEO8rsiTW1hJPjNFL9KobW/Bho98FzKaf4=";
};
patches = [
# startup fix
(fetchpatch {
name = "2389.patch"; # https://github.com/webtorrent/webtorrent-desktop/pull/2389
url = "https://github.com/webtorrent/webtorrent-desktop/commit/407046d150ed7ff876a5e1978f68630e9c8f0074.patch";
hash = "sha256-hBJGLNNjcGRhYOFlLm/RL0po+70tEeJtR6Y/CfacPAI=";
})
];
npmDepsHash = "sha256-otAes6GkqoAVvfeWhWgyY4IVZIZxw3WtkrVdEWIk1Lk=";
makeCacheWritable = true;
npmRebuildFlags = [ "--ignore-scripts" ];
installPhase = ''
## Rebuild node_modules for production
## after babel compile has finished
rm -r node_modules
export NODE_ENV=production
npm ci --ignore-scripts
## delete unused files
rm -r test
## delete config for build time cache
npm config delete cache
## add script wrapper and desktop files; icons
mkdir -p $out/lib $out/bin $out/share/applications
cp -r . $out/lib/webtorrent-desktop
cat > $out/bin/WebTorrent <<EOF
#! ${stdenv.shell}
set -eu
exec ${electron}/bin/electron --no-sandbox $out/lib/webtorrent-desktop "\$@"
EOF
chmod +x $out/bin/WebTorrent
cp -r static/linux/share/icons $out/share/
sed "s#/opt/webtorrent-desktop#$out/bin#" \
< static/linux/share/applications/webtorrent-desktop.desktop \
> $out/share/applications/webtorrent-desktop.desktop
'';
meta = with lib; {
description = "Streaming torrent app for Mac, Windows, and Linux";
homepage = "https://webtorrent.io/desktop";
license = licenses.mit;
maintainers = [ maintainers.bendlas ];
mainProgram = "WebTorrent";
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
buildGoModule,
fetchFromGitLab,
}:
buildGoModule rec {
pname = "webtunnel";
version = "0.0.3";
src = fetchFromGitLab {
domain = "gitlab.torproject.org";
group = "tpo";
owner = "anti-censorship/pluggable-transports";
repo = "webtunnel";
rev = "v${version}";
hash = "sha256-HB95GCIJeO5fKUW23VHrtNZdc9x9fk2vnmI9JogDWSQ=";
};
vendorHash = "sha256-3AAPySLAoMimXUOiy8Ctl+ghG5q+3dWRNGXHpl9nfG0=";
meta = {
description = "Pluggable Transport based on HTTP Upgrade(HTTPT)";
homepage = "https://community.torproject.org/relay/setup/webtunnel/";
maintainers = [ lib.maintainers.gbtb ];
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,91 @@
{
lib,
stdenv,
fetchurl,
autoPatchelfHook,
dpkg,
makeBinaryWrapper,
alsa-lib,
e2fsprogs,
fontconfig,
gmp,
harfbuzz,
hicolor-icon-theme,
libdrm,
libGL,
libgpg-error,
libthai,
nss,
p11-kit,
zlib,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "webull-desktop";
version = "8.9.0";
src = fetchurl {
url = "https://u1sweb.webullfintech.com/us/Webull%20Desktop_8.9.0_80009000_global_x64signed.deb";
hash = "sha256-brt5EXUE9g72vN2Kx9/jf4P/lkVfWLsbzJIf13phgdI=";
};
nativeBuildInputs = [
autoPatchelfHook
dpkg
makeBinaryWrapper
];
buildInputs = [
stdenv.cc.cc.lib
alsa-lib
e2fsprogs
fontconfig
gmp
harfbuzz
libdrm
libGL
libgpg-error
libthai
nss
p11-kit
zlib
];
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r * $out
mkdir $out/bin
ln -s $out/usr/local/WebullDesktop/WebullDesktop $out/bin/webull-desktop
substituteInPlace $out/usr/share/applications/WebullDesktop.desktop \
--replace-fail Categories=Utiltity Categories=Finance
addAutoPatchelfSearchPath $out/usr/local/WebullDesktop
addAutoPatchelfSearchPath $out/usr/local/WebullDesktop/platforms
addAutoPatchelfSearchPath $out/usr/local/WebullDesktop/plugins/bearer
addAutoPatchelfSearchPath $out/usr/local/WebullDesktop/plugins/iconengines
addAutoPatchelfSearchPath $out/usr/local/WebullDesktop/plugins/imageformats
addAutoPatchelfSearchPath $out/usr/local/WebullDesktop/plugins/platforminputcontexts
addAutoPatchelfSearchPath $out/usr/local/WebullDesktop/plugins/platforms
addAutoPatchelfSearchPath $out/usr/local/WebullDesktop/plugins/position
addAutoPatchelfSearchPath $out/usr/local/WebullDesktop/plugins/printsupport
addAutoPatchelfSearchPath $out/usr/local/WebullDesktop/plugins/sqldrivers
addAutoPatchelfSearchPath $out/usr/local/WebullDesktop/plugins/xcbglintegrations
wrapProgram $out/usr/local/WebullDesktop/WebullDesktop --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath finalAttrs.buildInputs}:$out:$out/usr/local/WebullDesktop/platforms:$out/usr/local/WebullDesktop/platformsbearer:$out/usr/local/WebullDesktop/platformsiconengines:$out/usr/local/WebullDesktop/platformsimageformats:$out/usr/local/WebullDesktop/platformsplatforminputcontexts:$out/usr/local/WebullDesktop/platformsplatforms:$out/usr/local/WebullDesktop/platformsposition:$out/usr/local/WebullDesktop/platformsprintsupport:$out/usr/local/WebullDesktop/platformssqldrivers:$out/usr/local/WebullDesktop/platformsxcbglintegrations
runHook postInstall
'';
meta = with lib; {
description = "Webull desktop trading application";
homepage = "https://www.webull.com/trading-platforms/desktop-app";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ fauxmight ];
platforms = [ "x86_64-linux" ];
mainProgram = "webull-desktop";
};
})

View File

@@ -0,0 +1,27 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule {
pname = "webwormhole";
version = "0-unstable-2023-11-15";
src = fetchFromGitHub {
owner = "saljam";
repo = "webwormhole";
rev = "6ceee76274ee881e828bd48c5cc15c758b9ad77c";
hash = "sha256-C9r6wFhP5BkIClgTQol7LyMUHXOzyrX9Pn91VqBaqFQ=";
};
vendorHash = "sha256-+7ctAm2wnjmfMd6CHXlcAUwiUMS7cH4koDAvlEUAXEg=";
meta = with lib; {
description = "Send files using peer authenticated WebRTC";
homepage = "https://github.com/saljam/webwormhole";
license = licenses.bsd3;
maintainers = with maintainers; [ bbigras ];
mainProgram = "ww";
};
}

View File

@@ -0,0 +1,252 @@
{
stdenvNoCC,
stdenv,
lib,
fetchurl,
dpkg,
nss,
nspr,
xorg,
pango,
zlib,
atkmm,
libdrm,
libxkbcommon,
xcbutilwm,
xcbutilimage,
xcbutilkeysyms,
xcbutilrenderutil,
libgbm,
alsa-lib,
wayland,
atk,
qt6,
at-spi2-atk,
at-spi2-core,
dbus,
cups,
gtk3,
libxml2,
cairo,
freetype,
fontconfig,
vulkan-loader,
gdk-pixbuf,
libexif,
ffmpeg,
pulseaudio,
systemd,
libuuid,
expat,
bzip2,
glib,
libva,
libGL,
libnotify,
buildFHSEnv,
writeShellScript,
runCommandLocal,
cacert,
coreutils,
curl,
}:
let
wechat-uos-env = stdenvNoCC.mkDerivation {
meta.priority = 1;
name = "wechat-uos-env";
buildCommand = ''
mkdir -p $out/etc
mkdir -p $out/usr/bin
mkdir -p $out/usr/share
mkdir -p $out/opt
mkdir -p $out/var
ln -s ${wechat}/opt/* $out/opt/
'';
preferLocalBuild = true;
};
wechat-uos-runtime = with xorg; [
stdenv.cc.cc
stdenv.cc.libc
pango
zlib
xcbutilwm
xcbutilimage
xcbutilkeysyms
xcbutilrenderutil
libX11
libXt
libXext
libSM
libICE
libxcb
libxkbcommon
libxshmfence
libXi
libXft
libXcursor
libXfixes
libXScrnSaver
libXcomposite
libXdamage
libXtst
libXrandr
libnotify
atk
atkmm
cairo
at-spi2-atk
at-spi2-core
alsa-lib
dbus
cups
gtk3
gdk-pixbuf
libexif
ffmpeg
libva
freetype
fontconfig
libXrender
libuuid
expat
glib
nss
nspr
libGL
libxml2
pango
libdrm
libgbm
vulkan-loader
systemd
wayland
pulseaudio
qt6.qt5compat
bzip2
];
wechat =
let
sources = import ./sources.nix;
pname = "wechat-uos";
version = sources.version;
fetch =
{
url,
hash,
}:
runCommandLocal "wechat-uos-${version}-src"
{
outputHashAlgo = "sha256";
outputHash = hash;
nativeBuildInputs = [
curl
coreutils
];
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
}
''
curl -A "debian APT-HTTP/1.3 (1.6.11)" --retry 3 --retry-delay 3 -L "${url}" > $out
'';
srcs = {
x86_64-linux = fetch sources.amd64;
aarch64-linux = fetch sources.arm64;
loongarch64-linux = fetch sources.loongarch64;
};
src =
srcs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
in
stdenvNoCC.mkDerivation {
inherit pname src version;
nativeBuildInputs = [ dpkg ];
unpackPhase = ''
runHook preUnpack
dpkg -x $src ./wechat-uos
runHook postUnpack
'';
# Use ln for license to prevent being garbage collection
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r wechat-uos/* $out
runHook postInstall
'';
meta = with lib; {
description = "Messaging app";
homepage = "https://weixin.qq.com/";
license = licenses.unfree;
platforms = [
"x86_64-linux"
"aarch64-linux"
"loongarch64-linux"
];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
maintainers = with maintainers; [
pokon548
xddxdd
];
mainProgram = "wechat-uos";
};
};
in
buildFHSEnv {
inherit (wechat) pname version meta;
runScript = writeShellScript "wechat-uos-launcher" ''
export QT_QPA_PLATFORM=xcb
export QT_AUTO_SCREEN_SCALE_FACTOR=1
export LD_LIBRARY_PATH=${lib.makeLibraryPath wechat-uos-runtime}
if [[ ''${XMODIFIERS} =~ fcitx ]]; then
export QT_IM_MODULE=fcitx
export GTK_IM_MODULE=fcitx
elif [[ ''${XMODIFIERS} =~ ibus ]]; then
export QT_IM_MODULE=ibus
export GTK_IM_MODULE=ibus
export IBUS_USE_PORTAL=1
fi
${wechat.outPath}/opt/apps/com.tencent.wechat/files/wechat
'';
extraInstallCommands = ''
mkdir -p $out/share/applications
mkdir -p $out/share/icons
cp -r ${wechat.outPath}/opt/apps/com.tencent.wechat/entries/applications/com.tencent.wechat.desktop $out/share/applications
cp -r ${wechat.outPath}/opt/apps/com.tencent.wechat/entries/icons/* $out/share/icons/
substituteInPlace $out/share/applications/com.tencent.wechat.desktop \
--replace-quiet 'Exec=/usr/bin/wechat' "Exec=$out/bin/wechat-uos --"
# See https://github.com/NixOS/nixpkgs/issues/413491
sed -i \
-e '/\[Desktop Entry\]/a\' \
-e 'StartupWMClass=wechat' \
$out/share/applications/com.tencent.wechat.desktop
'';
targetPkgs = pkgs: [ wechat-uos-env ];
passthru.updateScript = ./update.sh;
extraOutputsToInstall = [
"usr"
"var/lib/uos"
"var/uos"
"etc"
];
}

View File

@@ -0,0 +1,17 @@
# Generated by ./update.sh - do not update manually!
# Last updated: 2025-09-25
{
version = "4.0.1.12";
amd64 = {
url = "https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.wechat/com.tencent.wechat_4.0.1.12_amd64.deb";
hash = "sha256-u0NbuB06my+v8yUxQ9CKSHp4nxHAcMEhVzbAozM9nQU=";
};
arm64 = {
url = "https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.wechat/com.tencent.wechat_4.0.1.12_arm64.deb";
hash = "sha256-GZnIMikYS+TGvTrEl+PT7KyjmXOXXOc0PMxp3Xfpqo8=";
};
loongarch64 = {
url = "https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.wechat/com.tencent.wechat_4.0.1.12_loongarch64.deb";
hash = "sha256-dON2EW1+2aiiCTuBdc+IwRAmC/x2bEcQcZcar7WOfZo=";
};
}

View File

@@ -0,0 +1,66 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash --pure --keep GITHUB_TOKEN -p nix git curl cacert nix-prefetch-git gzip
base_url_suffix="https://pro-store-packages.uniontech.com/appstore/dists/eagle-pro/appstore/binary-"
base_url_appendix="/Packages.gz"
target_package="com.tencent.wechat"
packages_file="Packages.gz"
url=()
version=() # TODO: Currently, there is no version differences between archs. This is reserved for future use.
hash=()
for i in amd64 arm64 loongarch64
do
current_url=$base_url_suffix$i$base_url_appendix
curl -A "debian APT-HTTP/1.3 (1.6.11)" -v -L -O $current_url
current_version=$(zgrep -A 20 "Package: $target_package" "$packages_file" | awk -v pkg="$target_package" '
BEGIN { found = 0 }
{
if ($0 ~ "^Package: "pkg) {
found = 1;
}
if (found && $1 == "Version:") {
print $2;
exit;
}
}
')
version+=("$current_version")
sha256sum=$(zgrep -A 20 "Package: $target_package" "$packages_file" | awk -v pkg="$target_package" '
BEGIN { found = 0 }
{
if ($0 ~ "^Package: "pkg) {
found = 1;
}
if (found && $1 == "SHA256:") {
print $2;
exit;
}
}
')
hash+=("$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri $sha256sum)")
url+=("https://pro-store-packages.uniontech.com/appstore/pool/appstore/c/com.tencent.wechat/com.tencent.wechat_"$version"_"$i".deb")
done
cat >sources.nix <<EOF
# Generated by ./update.sh - do not update manually!
# Last updated: $(date +%F)
{
version = "${version[0]}";
amd64 = {
url = "${url[0]}";
hash = "${hash[0]}";
};
arm64 = {
url = "${url[1]}";
hash = "${hash[1]}";
};
loongarch64 = {
url = "${url[2]}";
hash = "${hash[2]}";
};
}
EOF
rm -r Packages.gz

View File

@@ -0,0 +1,35 @@
{
pname,
version,
src,
meta,
stdenvNoCC,
_7zz,
}:
stdenvNoCC.mkDerivation {
inherit
pname
version
src
meta
;
# dmg is APFS formatted
nativeBuildInputs = [ _7zz ];
# ERROR: Dangerous link path was ignored : WeChat.app/Contents/MacOS/WeChatAppEx.app/Contents/Frameworks/WeChatAppEx Framework.framework/Versions/C/Libraries/xfile/libxfile_skia.dylib : ../xeditor/libxeditor_app.dylib
unpackCmd = ''
7zz x -snld "$curSrc"
'';
sourceRoot = ".";
installPhase = ''
runHook preInstall
mkdir -p $out/Applications
cp -a WeChat.app $out/Applications
runHook postInstall
'';
}

View File

@@ -0,0 +1,30 @@
{
pname,
version,
src,
meta,
appimageTools,
}:
let
appimageContents = appimageTools.extract {
inherit pname version src;
postExtract = ''
patchelf --replace-needed libtiff.so.5 libtiff.so $out/opt/wechat/wechat
'';
};
in
appimageTools.wrapAppImage {
inherit pname version meta;
src = appimageContents;
extraInstallCommands = ''
mkdir -p $out/share/applications
cp ${appimageContents}/wechat.desktop $out/share/applications/
mkdir -p $out/share/icons/hicolor/256x256/apps
cp ${appimageContents}/wechat.png $out/share/icons/hicolor/256x256/apps/
substituteInPlace $out/share/applications/wechat.desktop --replace-fail AppRun wechat
'';
}

View File

@@ -0,0 +1,66 @@
{
callPackage,
fetchurl,
lib,
stdenvNoCC,
}:
let
inherit (stdenvNoCC.hostPlatform) system;
pname = "wechat";
meta = {
description = "Messaging and calling app";
homepage = "https://www.wechat.com/en/";
downloadPage = "https://linux.weixin.qq.com/en";
license = lib.licenses.unfree;
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
maintainers = with lib.maintainers; [ prince213 ];
mainProgram = "wechat";
platforms = [
"aarch64-darwin"
"x86_64-darwin"
"aarch64-linux"
"x86_64-linux"
];
};
sources =
let
# https://dldir1.qq.com/weixin/mac/mac-release.xml
any-darwin =
let
version = "4.1.0.19-29668";
version' = lib.replaceString "-" "_" version;
in
{
inherit version;
src = fetchurl {
url = "https://dldir1v6.qq.com/weixin/Universal/Mac/xWeChatMac_universal_${version'}.dmg";
hash = "sha256-EAKfskB3zY4C05MVCoyxzW6wuRw8b2nXIynyEjx8Rvw=";
};
};
in
{
aarch64-darwin = any-darwin;
x86_64-darwin = any-darwin;
aarch64-linux = {
version = "4.1.0.10";
src = fetchurl {
url = "https://web.archive.org/web/20250930121708/https://dldir1v6.qq.com/weixin/Universal/Linux/WeChatLinux_arm64.AppImage";
hash = "sha256-qkNLA8nILsIi2ciIzr9pb3PejhbEvZ5fe4GlmjyjrEI=";
};
};
x86_64-linux = {
version = "4.1.0.10";
src = fetchurl {
url = "https://web.archive.org/web/20250930121506/https://dldir1v6.qq.com/weixin/Universal/Linux/WeChatLinux_x86_64.AppImage";
hash = "sha256-d/zdb69gmIcgAFCbWLKGfmD8ZFfuDlYdOy7vUJ7SiXc=";
};
};
};
in
callPackage (if stdenvNoCC.hostPlatform.isDarwin then ./darwin.nix else ./linux.nix) {
inherit pname meta;
inherit (sources.${system} or (throw "Unsupported system: ${system}")) version src;
}

View File

@@ -0,0 +1,56 @@
{
lib,
fetchFromGitHub,
python3,
python3Packages,
makeWrapper,
installShellFiles,
}:
python3Packages.buildPythonApplication rec {
pname = "weevely";
version = "4.0.2-unstable-2024-04-29";
pyproject = false;
src = fetchFromGitHub {
owner = "epinna";
repo = "weevely3";
rev = "3fe896a67af8c0b44f39f50fb7234812a9da2118";
hash = "sha256-rUFwy6eoQQ8eQFcmOP+tCS6mKdWmRjeeyAqsc0TYCHU=";
};
nativeBuildInputs = [
makeWrapper
installShellFiles
];
propagatedBuildInputs = with python3Packages; [
dateutils
mako
prettytable
pyopenssl
pysocks
pyyaml
];
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,share/weevely}
installManPage weevely.1
rm README.md CHANGELOG.md requirements.txt LICENSE weevely.1
cp -a * $out/share/weevely/
makeWrapper ${python3}/bin/python $out/bin/weevely \
--add-flags "$out/share/weevely/weevely.py" \
--prefix PYTHONPATH : ${python3Packages.makePythonPath propagatedBuildInputs}
runHook postInstall
'';
meta = with lib; {
description = "Weaponized web shell";
homepage = "https://github.com/epinna/weevely3";
mainProgram = "weevely";
license = licenses.gpl3Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ d3vil0p3r ];
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
rustPlatform,
fetchFromGitHub,
testers,
weggli,
}:
rustPlatform.buildRustPackage rec {
pname = "weggli";
version = "0.2.4";
src = fetchFromGitHub {
owner = "weggli-rs";
repo = "weggli";
rev = "v${version}";
hash = "sha256-6XSedsTUjcZzFXaNitsXlUBpxC6TYVMCB+AfH3x7c5E=";
};
cargoHash = "sha256-vJd+4cZuDSGThnkUULhwEUFbHlkiIGyxT+1fWRUsIJk=";
passthru.tests.version = testers.testVersion {
package = weggli;
command = "weggli -V";
version = "weggli ${version}";
};
meta = {
description = "Fast and robust semantic search tool for C and C++ codebases";
homepage = "https://github.com/weggli-rs/weggli";
changelog = "https://github.com/weggli-rs/weggli/releases/tag/v${version}";
mainProgram = "weggli";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
arturcygan
mfrw
];
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "wego";
version = "2.3";
src = fetchFromGitHub {
owner = "schachmat";
repo = "wego";
rev = version;
sha256 = "sha256-YGUll0Wi/oulNMXSrSFeAVe+aGpyFeyXRZTW4ngC3Zk=";
};
vendorHash = "sha256-aXrXw/7ZtSZXIKDMZuWPV2zAf0e0lU0QCBhua7tHGEY=";
meta = with lib; {
homepage = "https://github.com/schachmat/wego";
description = "Weather app for the terminal";
license = licenses.isc;
mainProgram = "wego";
};
}

View File

@@ -0,0 +1,83 @@
{
stdenv,
lib,
fetchFromGitHub,
elkhound,
ocaml-ng,
perl,
which,
fetchpatch,
}:
let
# 1. Needs ocaml >= 4.04 and <= 4.11 but works with 4.14 when patched
# 2. ocaml 4.10+ defaults to safe (immutable) strings so we need a version with
# that disabled as weidu is strongly dependent on mutable strings
ocaml' = ocaml-ng.ocamlPackages_4_14_unsafe_string.ocaml;
in
stdenv.mkDerivation rec {
pname = "weidu";
version = "249.00";
src = fetchFromGitHub {
owner = "WeiDUorg";
repo = "weidu";
rev = "v${version}";
sha256 = "sha256-+vkKTzFZdAzY2dL+mZ4A0PDxhTKGgs9bfArz7S6b4m4=";
};
patches = [
(fetchpatch {
url = "https://github.com/WeiDUorg/weidu/commit/bb90190d8bf7d102952c07d8288a7dc6c7a3322e.patch";
hash = "sha256-Z4hHdMR1dYjJeERJSqlYynyPu2CvE6+XJuCr9ogDmvk=";
})
];
postPatch = ''
substitute sample.Configuration Configuration \
--replace-fail /usr/bin ${lib.makeBinPath [ ocaml' ]} \
--replace-fail /usr/local/bin ${lib.makeBinPath [ ocaml' ]} \
--replace-fail elkhound ${lib.getExe elkhound}
mkdir -p obj/{.depend,x86_LINUX}
# undefined reference to `caml_hash_univ_param'
sed -i "20,21d;s/old_hash_param/hash_param/" hashtbl-4.03.0/myhashtbl.ml
'';
nativeBuildInputs = [
elkhound
ocaml'
perl
which
];
buildFlags = [
"weidu"
"weinstall"
"tolower"
];
installPhase = ''
runHook preInstall
for b in tolower weidu weinstall; do
install -Dm555 $b.asm.exe $out/bin/$b
done
install -Dm444 -t $out/share/doc/weidu README* COPYING
runHook postInstall
'';
meta = with lib; {
description = "InfinityEngine Modding Engine";
homepage = "https://weidu.org";
license = licenses.gpl2Only;
maintainers = with maintainers; [ peterhoeg ];
# should work fine on Windows
platforms = platforms.unix;
mainProgram = "weidu";
};
}

View File

@@ -0,0 +1,101 @@
{
lib,
stdenv,
fetchurl,
openjdk11,
unzip,
makeWrapper,
makeDesktopItem,
copyDesktopItems,
xdg-utils,
imagemagick,
maxMemoryAllocationPool ? "1000M",
}:
stdenv.mkDerivation rec {
pname = "weka";
version = "3.9.6";
src = fetchurl {
url = "mirror://sourceforge/weka/${lib.replaceStrings [ "." ] [ "-" ] "${pname}-${version}"}.zip";
sha256 = "sha256-8fVN4MXYqXNEmyVtXh1IrauHTBZWgWG8AvsGI5Y9Aj0=";
};
nativeBuildInputs = [
makeWrapper
unzip
imagemagick
]
++ lib.optionals stdenv.hostPlatform.isLinux [ copyDesktopItems ];
# The -Xmx1000M comes suggested from their download page:
# https://www.cs.waikato.ac.nz/ml/weka/downloading.html
installPhase = ''
runHook preInstall
mkdir -pv $out/share/weka
mkdir -p $out/share/icons/hicolor
cp -Rv * $out/share/weka
makeWrapper ${openjdk11}/bin/java $out/bin/weka \
--add-flags "-Xmx${maxMemoryAllocationPool} -jar $out/share/weka/weka.jar"
makeWrapper ${openjdk11}/bin/java $out/bin/weka-java \
--add-flags "-Xmx${maxMemoryAllocationPool} -cp $out/share/weka/weka.jar"
${lib.optionalString stdenv.hostPlatform.isLinux "
makeWrapper ${xdg-utils}/bin/xdg-open $out/bin/weka-doc --add-flags $out/share/weka/documentation.html
"}
cat << EOF > $out/bin/weka-home
#!${stdenv.shell}
echo -n $out/share/weka
EOF
chmod ugo+x $out/bin/weka-home
for n in 16 24 32 48 64 96 128 256; do
size=$n"x"$n
mkdir -p $out/share/icons/hicolor/$size/apps
magick convert $out/share/weka/weka.gif -resize $size $out/share/icons/hicolor/$size/apps/weka.png
done;
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = "weka";
exec = "weka";
icon = "weka";
desktopName = "WEKA";
categories = [
"Science"
"ArtificialIntelligence"
"ComputerScience"
];
})
(makeDesktopItem {
name = "weka-doc";
exec = "weka-doc";
icon = "weka";
desktopName = "View the WEKA documentation with a web browser";
categories = [
"Science"
"ArtificialIntelligence"
"ComputerScience"
];
})
];
meta = with lib; {
homepage = "https://www.cs.waikato.ac.nz/ml/weka/";
description = "Collection of machine learning algorithms for data mining tasks";
mainProgram = "weka";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.gpl2Plus;
maintainers = [ maintainers.mimame ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchsvn,
jre,
makeWrapper,
}:
stdenv.mkDerivation rec {
pname = "welkin";
version = "1.1";
src = fetchsvn {
url = "http://simile.mit.edu/repository/welkin";
rev = "9638";
sha256 = "1bqh3vam7y805xrmdw7k0ckcfwjg88wypxgv3njkkwyn7kxnfnqp";
};
sourceRoot = "${src.name}/tags/${version}";
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ jre ];
installPhase = ''
mkdir -p $out/{bin,share}
cp -R . $out/share
cp $out/share/welkin.sh $out/bin/welkin
sed -e 's@\./lib/welkin\.jar@'"$out"'/share/lib/welkin.jar@' -i $out/bin/welkin
wrapProgram $out/bin/welkin \
--set JAVA_HOME ${jre}
chmod a+x $out/bin/welkin
'';
meta = {
description = "RDF visualizer";
maintainers = with lib.maintainers; [
raskin
];
hydraPlatforms = [ ];
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.bsd3;
platforms = with lib.platforms; unix;
};
}

View File

@@ -0,0 +1,253 @@
{
lib,
stdenv,
fetchurl,
dpkg,
autoPatchelfHook,
makeWrapper,
nss,
xorg,
desktop-file-utils,
libpulseaudio,
libgcrypt,
dbus,
systemd,
udev,
libGL,
fontconfig,
freetype,
openssl,
wayland,
libdrm,
harfbuzz,
openldap,
curl,
nghttp2,
libunwind,
alsa-lib,
libidn2,
rtmpdump,
libpsl,
libkrb5,
xkeyboard_config,
libsForQt5,
pkg-config,
fetchFromGitHub,
cmake,
ninja,
wireplumber,
libportal,
xdg-desktop-portal,
opencv4WithoutCuda,
pipewire,
fetchgit,
}:
let
wemeet-wayland-screenshare = stdenv.mkDerivation {
pname = "wemeet-wayland-screenshare";
version = "0-unstable-2025-05-31";
src = fetchFromGitHub {
owner = "xuwd1";
repo = "wemeet-wayland-screenshare";
rev = "7f338966e162612b09d838512b11af5901414d05";
hash = "sha256-UtPcgEa+9KrF4CblC8D4oClvVJs+a5DWtwH/fD7puVs=";
fetchSubmodules = true;
};
nativeBuildInputs = [
cmake
ninja
pkg-config
];
buildInputs = [
wireplumber
libportal
xdg-desktop-portal
libsForQt5.qtwayland
opencv4WithoutCuda
pipewire
xorg.libXdamage
xorg.libXrandr
xorg.libX11
];
dontWrapQtApps = true;
meta = {
description = "Hooked WeMeet that enables screenshare on Wayland";
homepage = "https://github.com/xuwd1/wemeet-wayland-screenshare";
license = lib.licenses.mit;
};
};
# for mitigating file transfer crashes
libwemeetwrap = stdenv.mkDerivation {
pname = "libwemeetwrap";
version = "0-unstable-2023-12-14";
src = fetchgit {
url = "https://aur.archlinux.org/wemeet-bin.git";
rev = "8f03fbc4d5ae263ed7e670473886cfa1c146aecc";
hash = "sha256-ExzLCIoLu4KxaoeWNhMXixdlDTIwuPiYZkO+XVK8X10=";
};
dontWrapQtApps = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [
openssl
libpulseaudio
xorg.libX11
];
buildPhase = ''
runHook preBuild
read -ra openssl_args < <(pkg-config --libs openssl)
read -ra libpulse_args < <(pkg-config --cflags --libs libpulse)
# Comment out `-D WRAP_FORCE_SINK_HARDWARE` to disable the patch that forces wemeet detects sink as hardware sink
$CC $CFLAGS -Wall -Wextra -fPIC -shared \
"''${openssl_args[@]}" "''${libpulse_args[@]}" \
-o libwemeetwrap.so wrap.c -D WRAP_FORCE_SINK_HARDWARE
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm755 ./libwemeetwrap.so $out/lib/libwemeetwrap.so
runHook postInstall
'';
meta.license = lib.licenses.unfree;
};
selectSystem =
attrs:
attrs.${stdenv.hostPlatform.system}
or (throw "wemeet: ${stdenv.hostPlatform.system} is not supported");
in
stdenv.mkDerivation {
pname = "wemeet";
version = "3.19.2.400";
src = selectSystem {
x86_64-linux = fetchurl {
url = "https://updatecdn.meeting.qq.com/cos/fb7464ffb18b94a06868265bed984007/TencentMeeting_0300000000_3.19.2.400_x86_64_default.publish.officialwebsite.deb";
hash = "sha256-PSGc4urZnoBxtk1cwwz/oeXMwnI02Mv1pN2e9eEf5kE=";
};
aarch64-linux = fetchurl {
url = "https://updatecdn.meeting.qq.com/cos/867a8a2e99a215dcd4f60fe049dbe6cf/TencentMeeting_0300000000_3.19.2.400_arm64_default.publish.officialwebsite.deb";
hash = "sha256-avN+PHKKC58lMC5wd0yVLD0Ct7sbb4BtXjovish0ULU=";
};
};
nativeBuildInputs = [
dpkg
autoPatchelfHook
makeWrapper
];
buildInputs = [
nss
xorg.libX11
xorg.libSM
xorg.libICE
xorg.libXtst
desktop-file-utils
libpulseaudio
libgcrypt
dbus
systemd
udev
libGL
fontconfig
freetype
openssl
wayland
libdrm
harfbuzz
openldap
curl
nghttp2
libunwind
alsa-lib
libidn2
rtmpdump
libpsl
libkrb5
xkeyboard_config
];
installPhase = ''
runHook preInstall
mkdir -p $out/app
cp -r opt/wemeet $out/app/wemeet
cp -r usr/share $out/share
# bundled libcurl depends on openssl 1.1 which is not available in nixpkgs
rm -f $out/app/wemeet/lib/libcurl.so
substituteInPlace $out/share/applications/wemeetapp.desktop \
--replace-fail "/opt/wemeet/wemeetapp.sh" "wemeet" \
--replace-fail "/opt/wemeet/wemeet.svg" "wemeet"
substituteInPlace $out/app/wemeet/bin/qt.conf \
--replace-fail "Prefix = ../" "Prefix = $out/app/wemeet/lib"
cp -r $out/app/wemeet/icons $out/share/icons || true
install -Dm0644 $out/app/wemeet/wemeet.svg $out/share/icons/hicolor/scalable/apps/wemeet.svg
ln -s $out/app/wemeet/bin/raw/xcast.conf $out/app/wemeet/bin/xcast.conf
ln -s $out/app/wemeet/plugins $out/app/wemeet/lib/plugins
ln -s $out/app/wemeet/resources $out/app/wemeet/lib/resources
ln -s $out/app/wemeet/translations $out/app/wemeet/lib/translations
runHook postInstall
'';
# set LP_NUM_THREADS limit the number of cores used by rendering
# set XDG_SESSION_TYPE; unset WAYLAND_DISPLAY getting border shadows to work
# set QT_STYLE_OVERRIDE solve the color of the font is not visible when using the included Qt
# set IBUS_USE_PORTAL fix ibus
preFixup =
let
baseWrapperArgs = [
"--set LP_NUM_THREADS 2"
"--set QT_STYLE_OVERRIDE fusion"
"--set IBUS_USE_PORTAL 1"
"--set XKB_CONFIG_ROOT ${xkeyboard_config}/share/X11/xkb"
"--prefix LD_LIBRARY_PATH : $out/app/wemeet/lib:$out/translations:${xorg.libXext}/lib:${xorg.libXdamage}/lib:${opencv4WithoutCuda}/lib:${xorg.libXrandr}/lib"
"--prefix PATH : $out/app/wemeet/bin"
"--prefix QT_PLUGIN_PATH : $out/app/wemeet/plugins"
];
commonWrapperArgs = baseWrapperArgs ++ [
"--prefix LD_PRELOAD : ${libwemeetwrap}/lib/libwemeetwrap.so"
"--run 'if [[ $XDG_SESSION_TYPE == \"wayland\" ]]; then export LD_PRELOAD=${wemeet-wayland-screenshare}/lib/wemeet/libhook.so\${LD_PRELOAD:+:$LD_PRELOAD}; fi'"
];
xwaylandWrapperArgs = baseWrapperArgs ++ [
"--set XDG_SESSION_TYPE x11"
"--unset WAYLAND_DISPLAY"
"--prefix LD_PRELOAD : ${libwemeetwrap}/lib/libwemeetwrap.so:${wemeet-wayland-screenshare}/lib/wemeet/libhook.so"
];
in
''
makeWrapper $out/app/wemeet/bin/wemeetapp $out/bin/wemeet \
${lib.concatStringsSep " " commonWrapperArgs}
makeWrapper $out/app/wemeet/bin/wemeetapp $out/bin/wemeet-xwayland \
${lib.concatStringsSep " " xwaylandWrapperArgs}
'';
meta = {
description = "Tencent Video Conferencing";
homepage = "https://wemeet.qq.com";
license = lib.licenses.unfree;
mainProgram = "wemeet";
platforms = [
"x86_64-linux"
"aarch64-linux"
];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = with lib.maintainers; [ wrvsrx ];
};
}

View File

@@ -0,0 +1,45 @@
{
stdenv,
lib,
fetchFromGitHub,
tmux,
installShellFiles,
}:
stdenv.mkDerivation {
pname = "wemux";
version = "unstable-2021-04-16";
src = fetchFromGitHub {
owner = "zolrath";
repo = "wemux";
rev = "01c6541f8deceff372711241db2a13f21c4b210c";
sha256 = "1y962nzvs7sf720pl3wa582l6irxc8vavd0gp4ag4243b2gs4qvm";
};
nativeBuildInputs = [ installShellFiles ];
installPhase = ''
runHook preInstall
substituteInPlace wemux \
--replace tmux ${tmux}/bin/tmux \
--replace "/usr/local/etc" "/etc"
substituteInPlace man/wemux.1 --replace "/usr/local/etc" "/etc"
install -Dm755 wemux -t $out/bin
installManPage man/wemux.1
runHook postInstall
'';
meta = with lib; {
homepage = "https://github.com/zolrath/wemux";
description = "Multi-user tmux made easy";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ bsima ];
mainProgram = "wemux";
};
}

View File

@@ -0,0 +1,108 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
btrfs-progs,
writableTmpDirAsHomeHook,
installShellFiles,
versionCheckHook,
}:
buildGoModule (finalAttrs: {
pname = "werf";
version = "2.47.8";
src = fetchFromGitHub {
owner = "werf";
repo = "werf";
tag = "v${finalAttrs.version}";
hash = "sha256-1F/Gy5bKq+08aJaNM5XdI8/z2A6p+4UL+Rf/NXhtWlU=";
};
proxyVendor = true;
vendorHash = "sha256-bmHnpADqmJXMJvPRv7WpnafgPg+ZlwfsvXKdAxW5Ovg=";
subPackages = [ "cmd/werf" ];
nativeBuildInputs = [
installShellFiles
versionCheckHook
];
buildInputs =
lib.optionals stdenv.hostPlatform.isLinux [ btrfs-progs ]
++ lib.optionals stdenv.hostPlatform.isGnu [ stdenv.cc.libc.static ];
env.CGO_ENABLED = if stdenv.hostPlatform.isLinux then 1 else 0;
ldflags = [
"-s"
"-w"
"-X github.com/werf/werf/v2/pkg/werf.Version=v${finalAttrs.version}"
]
++ lib.optionals (finalAttrs.env.CGO_ENABLED == 1) [
"-extldflags=-static"
"-linkmode external"
];
tags = [
"containers_image_openpgp"
"dfrunmount"
"dfrunnetwork"
"dfrunsecurity"
"dfssh"
]
++ lib.optionals (finalAttrs.env.CGO_ENABLED == 1) [
"cni"
"exclude_graphdriver_devicemapper"
"netgo"
"no_devmapper"
"osusergo"
"static_build"
];
nativeCheckInputs = [ writableTmpDirAsHomeHook ];
preCheck = ''
# Test all packages.
unset subPackages
# Remove tests that fail or require external services.
rm -rf \
integration/suites \
pkg/true_git/*_test.go \
pkg/werf/exec/*_test.go \
test/e2e
''
+ lib.optionalString (finalAttrs.env.CGO_ENABLED == 0) ''
# A workaround for osusergo.
export USER=nixbld
'';
doInstallCheck = true;
versionCheckProgramArg = "version";
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
for shell in bash fish zsh; do
installShellCompletion \
--cmd werf \
--$shell <($out/bin/werf completion --shell=$shell)
done
'';
meta = {
description = "GitOps delivery tool";
longDescription = ''
werf is a CNCF Sandbox CLI tool to implement full-cycle CI/CD to
Kubernetes easily. werf integrates into your CI system and leverages
familiar and reliable technologies, such as Git, Dockerfile, Helm, and
Buildah.
'';
homepage = "https://werf.io";
changelog = "https://github.com/werf/werf/releases/tag/v${finalAttrs.version}";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.azahi ];
mainProgram = "werf";
};
})

View File

@@ -0,0 +1,34 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "wesher";
version = "0.2.6";
src = fetchFromGitHub {
owner = "costela";
repo = "wesher";
rev = "v${version}";
sha256 = "sha256-EIajvcBhS5G9dJzRgXhnD1QKOAhmzngdyCU4L7itT8U=";
};
vendorHash = "sha256-BZzhBC4C0OoAxUEDROkggCQF35C9Z4+0/Jk0ZD8Hz1s=";
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
meta = with lib; {
description = "Wireguard overlay mesh network manager";
homepage = "https://github.com/costela/wesher";
license = licenses.gpl3Only;
maintainers = with maintainers; [ tylerjl ];
platforms = platforms.linux;
mainProgram = "wesher";
};
}

View File

@@ -0,0 +1,136 @@
{
lib,
stdenv,
stdenvNoCC,
fetchFromGitHub,
cmake,
pkg-config,
SDL2,
SDL2_image,
SDL2_mixer,
SDL2_net,
SDL2_ttf,
pango,
gettext,
boost186,
libvorbis,
fribidi,
dbus,
libpng,
pcre,
openssl,
icu,
lua5_4,
curl,
nix-update-script,
}:
let
boost = boost186;
# wesnoth requires lua built with c++, see https://github.com/wesnoth/wesnoth/pull/8234
lua = lua5_4.override {
postConfigure = ''
makeFlagsArray+=("CC=$CXX")
'';
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "wesnoth";
version = "1.18.5";
src = fetchFromGitHub {
owner = "wesnoth";
repo = "wesnoth";
tag = finalAttrs.version;
hash = "sha256-0VZJAmaCg12x4S07H1kl5s2NGMEo/NSVnzMniREmPJk=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
SDL2
SDL2_image
SDL2_mixer
SDL2_net
SDL2_ttf
pango
gettext
boost
libvorbis
fribidi
dbus
libpng
pcre
openssl
icu
lua
curl
];
cmakeFlags = [
"-DENABLE_SYSTEM_LUA=ON"
];
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
app_name="The Battle for Wesnoth"
app_bundle="$out/Applications/$app_name.app"
app_contents="$app_bundle/Contents"
mkdir -p "$app_contents"
echo "APPL????" > "$app_contents/PkgInfo"
mv $out/bin "$app_contents/MacOS"
mv $out/share/wesnoth "$app_contents/Resources"
pushd ../projectfiles/Xcode
substitute Info.plist "$app_contents/Info.plist" \
--replace-fail ''\'''${EXECUTABLE_NAME}' wesnoth \
--replace-fail '$(PRODUCT_BUNDLE_IDENTIFIER)' org.wesnoth.Wesnoth \
--replace-fail ''\'''${PRODUCT_NAME}' "$app_name"
cp -r Resources/SDLMain.nib "$app_contents/Resources/"
install -m0644 Resources/{container-migration.plist,icon.icns} "$app_contents/Resources"
popd
# Make the game and dedicated server binary available for shell users
mkdir -p "$out/bin"
ln -s "$app_contents/MacOS/wesnothd" "$out/bin/wesnothd"
# Symlinking the game binary is unsifficient as it would be unable to
# find the bundle resources
cat << EOF > "$out/bin/wesnoth"
#!${stdenvNoCC.shell}
open -na "$app_bundle" --args "\$@"
EOF
chmod +x "$out/bin/wesnoth"
'';
passthru.updateScript = nix-update-script {
extraArgs = [
"--version-regex"
# the minor release number also denotes if this is a beta release:
# even is stable, odd is beta
"^(\\d+\\.\\d*[02468]\\.\\d+)$"
];
};
meta = {
description = "Battle for Wesnoth, a free, turn-based strategy game with a fantasy theme";
longDescription = ''
The Battle for Wesnoth is a Free, turn-based tactical strategy
game with a high fantasy theme, featuring both single-player, and
online/hotseat multiplayer combat. Fight a desperate battle to
reclaim the throne of Wesnoth, or take hand in any number of other
adventures.
'';
homepage = "https://www.wesnoth.org/";
changelog = "https://github.com/wesnoth/wesnoth/blob/${finalAttrs.version}/changelog.md";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [
niklaskorz
iedame
];
platforms = lib.platforms.unix;
mainProgram = "wesnoth";
};
})

View File

@@ -0,0 +1,152 @@
{
lib,
stdenv,
fetchurl,
fetchpatch2,
meson,
ninja,
pkg-config,
python3,
wayland-scanner,
cairo,
libGL,
libdisplay-info,
libdrm,
libevdev,
libinput,
libxkbcommon,
libgbm,
seatd,
wayland,
wayland-protocols,
xcbutilcursor,
demoSupport ? true,
jpegSupport ? true,
libjpeg,
lcmsSupport ? true,
lcms2,
pangoSupport ? true,
pango,
pipewireSupport ? true,
pipewire,
rdpSupport ? true,
freerdp,
remotingSupport ? true,
gst_all_1,
vaapiSupport ? true,
libva,
vncSupport ? true,
aml,
neatvnc,
pam,
webpSupport ? true,
libwebp,
xwaylandSupport ? true,
libXcursor,
xwayland,
}:
stdenv.mkDerivation rec {
pname = "weston";
version = "14.0.1";
src = fetchurl {
url = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${version}/downloads/weston-${version}.tar.xz";
hash = "sha256-qBUFBbEmpZ33gf6MMMjm+H2nAT4XkDnrhEpbu8x8ebM=";
};
patches = [
(fetchpatch2 {
# vnc: Allow neatvnc in version 0.9.0
# https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1649
url = "https://gitlab.freedesktop.org/wayland/weston/-/commit/b4386289d614f26e89e1c6eb17e048826e925ed1.patch";
hash = "sha256-mkIOup44C9Kp42tFMXz8Sis4URmPi4t605MQG672nJU=";
})
];
depsBuildBuild = [ pkg-config ];
nativeBuildInputs = [
meson
ninja
pkg-config
python3
wayland-scanner
];
buildInputs = [
cairo
libGL
libdisplay-info
libdrm
libevdev
libinput
libxkbcommon
libgbm
seatd
wayland
wayland-protocols
]
++ lib.optional jpegSupport libjpeg
++ lib.optional lcmsSupport lcms2
++ lib.optional pangoSupport pango
++ lib.optional pipewireSupport pipewire
++ lib.optional rdpSupport freerdp
++ lib.optionals remotingSupport [
gst_all_1.gstreamer
gst_all_1.gst-plugins-base
]
++ lib.optional vaapiSupport libva
++ lib.optionals vncSupport [
aml
neatvnc
pam
]
++ lib.optional webpSupport libwebp
++ lib.optionals xwaylandSupport [
libXcursor
xcbutilcursor
xwayland
];
mesonFlags = [
(lib.mesonBool "backend-drm-screencast-vaapi" vaapiSupport)
(lib.mesonBool "backend-pipewire" pipewireSupport)
(lib.mesonBool "backend-rdp" rdpSupport)
(lib.mesonBool "backend-vnc" vncSupport)
(lib.mesonBool "color-management-lcms" lcmsSupport)
(lib.mesonBool "demo-clients" demoSupport)
(lib.mesonBool "image-jpeg" jpegSupport)
(lib.mesonBool "image-webp" webpSupport)
(lib.mesonBool "pipewire" pipewireSupport)
(lib.mesonBool "remoting" remotingSupport)
(lib.mesonOption "simple-clients" "")
(lib.mesonBool "test-junit-xml" false)
(lib.mesonBool "xwayland" xwaylandSupport)
]
++ lib.optionals xwaylandSupport [
(lib.mesonOption "xwayland-path" (lib.getExe xwayland))
];
passthru.providedSessions = [ "weston" ];
meta = with lib; {
description = "Lightweight and functional Wayland compositor";
longDescription = ''
Weston is the reference implementation of a Wayland compositor, as well
as a useful environment in and of itself.
Out of the box, Weston provides a very basic desktop, or a full-featured
environment for non-desktop uses such as automotive, embedded, in-flight,
industrial, kiosks, set-top boxes and TVs. It also provides a library
allowing other projects to build their own full-featured environments on
top of Weston's core. A small suite of example or demo clients are also
provided.
'';
homepage = "https://gitlab.freedesktop.org/wayland/weston";
license = licenses.mit; # Expat version
platforms = platforms.linux;
mainProgram = "weston";
maintainers = with maintainers; [
qyliss
];
};
}

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchFromSourcehut,
pkg-config,
scdoc,
wayland-scanner,
wayland,
wayland-protocols,
libxkbcommon,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "wev";
version = "1.1.0";
src = fetchFromSourcehut {
owner = "~sircmpwn";
repo = "wev";
rev = finalAttrs.version;
hash = "sha256-0ZA44dMDuVYfplfutOfI2EdPNakE9KnOuRfk+CEDCRk=";
};
strictDeps = true;
# for scdoc
depsBuildBuild = [
pkg-config
];
nativeBuildInputs = [
pkg-config
scdoc
wayland-scanner
];
buildInputs = [
wayland
wayland-protocols
libxkbcommon
];
installFlags = [ "PREFIX=$(out)" ];
meta = {
homepage = "https://git.sr.ht/~sircmpwn/wev";
description = "Wayland event viewer";
longDescription = ''
This is a tool for debugging events on a Wayland window, analogous to the
X11 tool xev.
'';
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ wineee ];
platforms = lib.platforms.linux;
mainProgram = "wev";
};
})

View File

@@ -0,0 +1,107 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
makeWrapper,
dbus,
ffmpeg,
x264,
libva,
gst_all_1,
xorg,
libdrm,
pkg-config,
pango,
pipewire,
cmake,
git,
autoconf,
libtool,
typescript,
wayland,
libxkbcommon,
}:
rustPlatform.buildRustPackage {
pname = "weylus";
version = "unstable-2025-02-24";
src = fetchFromGitHub {
owner = "H-M-H";
repo = "weylus";
rev = "5202806798ccca67c24da52ba51ee50b973b7089";
sha256 = "sha256-lx1ZVp5DkQiL9/vw6PAZ34Lge+K8dfEVh6vLnCUNf7M=";
};
buildInputs = [
ffmpeg
x264
]
++ lib.optionals stdenv.hostPlatform.isLinux [
dbus
libva
gst_all_1.gst-plugins-base
xorg.libXext
xorg.libXft
xorg.libXinerama
xorg.libXcursor
xorg.libXrender
xorg.libXfixes
xorg.libXtst
xorg.libXrandr
xorg.libXcomposite
xorg.libXi
xorg.libXv
pango
libdrm
wayland
libxkbcommon
];
nativeBuildInputs = [
cmake
git
typescript
makeWrapper
]
++ lib.optionals stdenv.hostPlatform.isLinux [
pkg-config
autoconf
libtool
];
cargoHash = "sha256-dLhlYOrLjoBSRGDJB0qTEIb+oGnp9X+ADHddpYITdl8=";
cargoBuildFlags = [ "--features=ffmpeg-system" ];
cargoTestFlags = [ "--features=ffmpeg-system" ];
postFixup =
let
GST_PLUGIN_PATH = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" [
gst_all_1.gst-plugins-base
pipewire
];
in
lib.optionalString stdenv.hostPlatform.isLinux ''
wrapProgram $out/bin/weylus --prefix GST_PLUGIN_PATH : ${GST_PLUGIN_PATH}
'';
postInstall = ''
install -vDm755 weylus.desktop $out/share/applications/weylus.desktop
'';
env = {
NIX_CFLAGS_COMPILE = toString [
"-Wno-incompatible-pointer-types"
];
};
meta = with lib; {
description = "Use your tablet as graphic tablet/touch screen on your computer";
mainProgram = "weylus";
homepage = "https://github.com/H-M-H/Weylus";
license = with licenses; [ agpl3Only ];
maintainers = with maintainers; [ lom ];
};
}

View File

@@ -0,0 +1,35 @@
{
openssl,
pkg-config,
rustPlatform,
wezterm,
}:
rustPlatform.buildRustPackage {
pname = "wezterm-headless";
inherit (wezterm)
version
src
postPatch
cargoHash
meta
;
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
cargoBuildFlags = [
"--package"
"wezterm"
"--package"
"wezterm-mux-server"
];
doCheck = false;
postInstall = ''
install -Dm644 assets/shell-integration/wezterm.sh -t $out/etc/profile.d
install -Dm644 ${wezterm.passthru.terminfo}/share/terminfo/w/wezterm -t $out/share/terminfo/w
'';
}

View File

@@ -0,0 +1,167 @@
{
lib,
stdenv,
fetchFromGitHub,
fontconfig,
installShellFiles,
libGL,
libX11,
libxcb,
libxkbcommon,
ncurses,
nixosTests,
openssl,
perl,
pkg-config,
python3,
runCommand,
rustPlatform,
vulkan-loader,
wayland,
wezterm,
xcbutil,
xcbutilimage,
xcbutilkeysyms,
xcbutilwm,
zlib,
}:
rustPlatform.buildRustPackage rec {
pname = "wezterm";
version = "0-unstable-2025-08-14";
src = fetchFromGitHub {
owner = "wezterm";
repo = "wezterm";
rev = "bf9a2aeebacec19fd07b55234d626f006b22d369";
fetchSubmodules = true;
hash = "sha256-cD0r+TchRc/A+G3HMu2PjjPm8m7Ue7GpH9F/PlfJcKE=";
};
postPatch = ''
echo ${version} > .tag
# hash does not work well with NixOS
substituteInPlace assets/shell-integration/wezterm.sh \
--replace-fail 'hash wezterm 2>/dev/null' 'command type -P wezterm &>/dev/null' \
--replace-fail 'hash base64 2>/dev/null' 'command type -P base64 &>/dev/null' \
--replace-fail 'hash hostname 2>/dev/null' 'command type -P hostname &>/dev/null' \
--replace-fail 'hash hostnamectl 2>/dev/null' 'command type -P hostnamectl &>/dev/null'
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
# many tests fail with: No such file or directory
rm -r wezterm-ssh/tests
'';
# dep: syntax causes build failures in rare cases
# https://github.com/rust-secure-code/cargo-auditable/issues/124
# https://github.com/wezterm/wezterm/blob/main/nix/flake.nix#L134
auditable = false;
cargoHash = "sha256-chMbDMT8UWaiGovlzYn1UD8VFqb9UYHMDDx/A62wQsY=";
nativeBuildInputs = [
installShellFiles
ncurses # tic for terminfo
pkg-config
python3
]
++ lib.optional stdenv.hostPlatform.isDarwin perl;
buildInputs = [
fontconfig
openssl
zlib
]
++ lib.optionals stdenv.hostPlatform.isLinux [
libX11
libxcb
libxkbcommon
wayland
xcbutil
xcbutilimage
xcbutilkeysyms
xcbutilwm # contains xcb-ewmh among others
];
buildFeatures = [ "distro-defaults" ];
postInstall = ''
mkdir -p $out/nix-support
echo "${passthru.terminfo}" >> $out/nix-support/propagated-user-env-packages
install -Dm644 assets/icon/terminal.png $out/share/icons/hicolor/128x128/apps/org.wezfurlong.wezterm.png
install -Dm644 assets/wezterm.desktop $out/share/applications/org.wezfurlong.wezterm.desktop
install -Dm644 assets/wezterm.appdata.xml $out/share/metainfo/org.wezfurlong.wezterm.appdata.xml
install -Dm644 assets/shell-integration/wezterm.sh -t $out/etc/profile.d
installShellCompletion --cmd wezterm \
--bash assets/shell-completion/bash \
--fish assets/shell-completion/fish \
--zsh assets/shell-completion/zsh
install -Dm644 assets/wezterm-nautilus.py -t $out/share/nautilus-python/extensions
'';
preFixup =
lib.optionalString stdenv.hostPlatform.isLinux ''
patchelf \
--add-needed "${libGL}/lib/libEGL.so.1" \
--add-needed "${vulkan-loader}/lib/libvulkan.so.1" \
$out/bin/wezterm-gui
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p "$out/Applications"
OUT_APP="$out/Applications/WezTerm.app"
cp -r assets/macos/WezTerm.app "$OUT_APP"
rm $OUT_APP/*.dylib
cp -r assets/shell-integration/* "$OUT_APP"
# https://github.com/wezterm/wezterm/pull/6886
# macOS will only recognize our application bundle
# if the binaries are inside of it. Move them there
# and create symbolic links for them in bin/.
mv $out/bin/{wezterm,wezterm-mux-server,wezterm-gui,strip-ansi-escapes} "$OUT_APP"
ln -s "$OUT_APP"/{wezterm,wezterm-mux-server,wezterm-gui,strip-ansi-escapes} "$out/bin"
'';
passthru = {
# the headless variant is useful when deploying wezterm's mux server on remote severs
headless = import ./headless.nix {
inherit
openssl
pkg-config
rustPlatform
wezterm
;
};
terminfo =
runCommand "wezterm-terminfo"
{
nativeBuildInputs = [ ncurses ];
}
''
mkdir -p $out/share/terminfo $out/nix-support
tic -x -o $out/share/terminfo ${src}/termwiz/data/wezterm.terminfo
'';
tests = {
all-terminfo = nixosTests.allTerminfo;
# the test is commented out in nixos/tests/terminal-emulators.nix
#terminal-emulators = nixosTests.terminal-emulators.wezterm;
};
updateScript = ./update.sh;
};
meta = with lib; {
description = "GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust";
homepage = "https://wezterm.org";
license = licenses.mit;
mainProgram = "wezterm";
maintainers = with maintainers; [
mimame
SuperSandro2000
];
};
}

View File

@@ -0,0 +1,30 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq git nix-prefetch-git common-updater-scripts gnused nix-update
set -euo pipefail
OWNER="wez"
REPO="wezterm"
NIXPKGS_ROOT=$(git rev-parse --show-toplevel)
PACKAGE_NIX_ATTR_PATH="wezterm"
# For wezterm, the version is 0-unstable-YYYY-MM-DD, so we need to get the commit date
# from the latest commit, not the release tag.
# We also need the latest commit SHA for the rev.
LATEST_COMMIT_INFO=$(curl ${GITHUB_TOKEN:+--user ":$GITHUB_TOKEN"} --location --silent "https://api.github.com/repos/$OWNER/$REPO/commits/HEAD")
LATEST_REV=$(echo "$LATEST_COMMIT_INFO" | jq --raw-output '.sha')
COMMIT_DATE=$(echo "$LATEST_COMMIT_INFO" | jq --raw-output '.commit.author.date' | cut -d 'T' -f 1)
NEW_VERSION="0-unstable-$COMMIT_DATE"
FETCH_JSON=$(nix-prefetch-git --url "https://github.com/$OWNER/$REPO" --rev "$LATEST_REV" --fetch-submodules)
FETCH_HASH=$(echo "$FETCH_JSON" | jq --raw-output .hash)
(cd "$NIXPKGS_ROOT" && nix-update wezterm)
(cd "$NIXPKGS_ROOT" && update-source-version "$PACKAGE_NIX_ATTR_PATH" "$NEW_VERSION" "$FETCH_HASH" --rev="$LATEST_REV")
sed -i -e "s#version = \".*\"#version = \"$NEW_VERSION\"#" "$NIXPKGS_ROOT/pkgs/by-name/we/wezterm/package.nix"
echo "Wezterm update script finished."