Skip to content

Commit

Permalink
Merge staging-next-23.11 into staging-23.11
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Apr 28, 2024
2 parents 5ed92e5 + 64394c5 commit 1828f9e
Show file tree
Hide file tree
Showing 18 changed files with 283 additions and 200 deletions.
3 changes: 2 additions & 1 deletion nixos/modules/services/matrix/appservice-irc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,9 @@ in {
RestrictRealtime = true;
PrivateMounts = true;
SystemCallFilter = [
"@system-service @pkey @chown"
"@system-service @pkey"
"~@privileged @resources"
"@chown"
];
SystemCallArchitectures = "native";
# AF_UNIX is required to connect to a postgres socket.
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/editors/vscode/extensions/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -930,8 +930,8 @@ let
mktplcRef = {
name = "vscode-markdownlint";
publisher = "DavidAnson";
version = "0.54.0";
sha256 = "sha256-BrPFFRspJIz1U08hPbLziCmRUeZv2NhRrTCx6qvhOJw=";
version = "0.55.0";
hash = "sha256-slfHfRPcuRu+649n6kAr2bv9H6J+DvYVN/ysq1QpPQM=";
};
meta = {
changelog = "https://marketplace.visualstudio.com/items/DavidAnson.vscode-markdownlint/changelog";
Expand Down
13 changes: 8 additions & 5 deletions pkgs/applications/graphics/sane/backends/brscan5/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ let
in
stdenv.mkDerivation rec {
pname = "brscan5";
version = "1.3.0-0";
version = "1.3.1-0";
src = {
"i686-linux" = fetchurl {
url = "https://download.brother.com/welcome/dlf104034/${pname}-${version}.i386.deb";
sha256 = "sha256-LpbPUo8iD5CcwUoIOa1UYHQXMrZZJ7PjZpcuyXhXjzk=";
hash = "sha256-BgS64vwsKESJBDz9H2MDwcGiresROSNFP1b+7+zlE5c=";
};
"x86_64-linux" = fetchurl {
url = "https://download.brother.com/welcome/dlf104033/${pname}-${version}.amd64.deb";
sha256 = "sha256-ntVe/e6/cdz3+LSpGilMFZecxfv74pd7ksh85SzEdKc=";
hash = "sha256-0UMbXMBlyiZI90WG5FWEP2mIZEBsxXd11dtgtyuSDnY=";
};
}."${system}" or (throw "Unsupported system: ${system}");

Expand All @@ -33,9 +33,12 @@ stdenv.mkDerivation rec {

postPatch =
let
# Download .deb for both amd64 and i386, then unpack like unpackPhase
# to get the offset, run:
# strings -n 10 --radix=d opt/brother/scanner/brscan5/libsane-brother5.so.1.0.7 | grep "/opt/brother/scanner/brscan5/models"
patchOffsetBytes =
if system == "x86_64-linux" then 86528
else if system == "i686-linux" then 79140
if system == "x86_64-linux" then 86592
else if system == "i686-linux" then 79236
else throw "Unsupported system: ${system}";
in
''
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/networking/browsers/brave/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ in

stdenv.mkDerivation rec {
pname = "brave";
version = "1.64.113";
version = "1.65.122";

src = fetchurl {
url = "https://github.com/brave/brave-browser/releases/download/v${version}/brave-browser_${version}_amd64.deb";
hash = "sha256-T0uVq1yxDXNi6x9ot5bs3NRaOQ+RwBThvULS6EZ+Bdg=";
hash = "sha256-zhRH/EG+8Qx9B2Gm5n9DYVwheyfiqIBwyYygART5b6A=";
};

dontConfigure = true;
Expand Down
61 changes: 29 additions & 32 deletions pkgs/applications/networking/remote/anydesk/default.nix
Original file line number Diff line number Diff line change
@@ -1,42 +1,20 @@
{ lib, stdenv, fetchurl, makeWrapper, makeDesktopItem, genericUpdater, writeShellScript
, atk, cairo, gdk-pixbuf, glib, gnome2, gtk2, libGLU, libGL, pango, xorg, minizip
, lsb-release, freetype, fontconfig, polkit, polkit_gnome, pciutils
, lsb-release, freetype, fontconfig, polkit, polkit_gnome, pciutils, copyDesktopItems
, pulseaudio }:

let
description = "Desktop sharing application, providing remote support and online meetings";

desktopItem = makeDesktopItem {
name = "AnyDesk";
exec = "@out@/bin/anydesk %u";
icon = "anydesk";
desktopName = "AnyDesk";
genericName = description;
categories = [ "Network" ];
startupNotify = false;
};

in stdenv.mkDerivation rec {
pname = "anydesk";
version = "6.3.0";
version = "6.3.2";

src = fetchurl {
urls = [
"https://download.anydesk.com/linux/${pname}-${version}-amd64.tar.gz"
"https://download.anydesk.com/linux/generic-linux/${pname}-${version}-amd64.tar.gz"
"https://download.anydesk.com/linux/anydesk-${version}-amd64.tar.gz"
"https://download.anydesk.com/linux/generic-linux/anydesk-${version}-amd64.tar.gz"
];
hash = "sha256-seMzfTXOGa+TljgpmIsgFOis+79r0bWt+4vH3Nb+5FI=";
};

passthru = {
updateScript = genericUpdater {
versionLister = writeShellScript "anydesk-versionLister" ''
curl -s https://anydesk.com/en/downloads/linux \
| grep "https://[a-z0-9._/-]*-amd64.tar.gz" -o \
| uniq \
| sed 's,.*/anydesk-\(.*\)-amd64.tar.gz,\1,g'
'';
};
hash = "sha256-nSY4qHRsEvQk4M3JDHalAk3C6Y21WlfDQ2Gpp6/jjMs=";
};

buildInputs = [
Expand All @@ -48,7 +26,19 @@ in stdenv.mkDerivation rec {
libXrandr libXtst libXt libICE libSM libXrender
]);

nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [ copyDesktopItems makeWrapper ];

desktopItems = [
(makeDesktopItem {
name = "AnyDesk";
exec = "anydesk %u";
icon = "anydesk";
desktopName = "AnyDesk";
genericName = description;
categories = [ "Network" ];
startupNotify = false;
})
];

installPhase = ''
runHook preInstall
Expand All @@ -57,7 +47,6 @@ in stdenv.mkDerivation rec {
install -m755 anydesk $out/bin/anydesk
cp copyright README $out/share/doc/anydesk
cp -r icons/hicolor/* $out/share/icons/hicolor/
cp ${desktopItem}/share/applications/*.desktop $out/share/applications
runHook postInstall
'';
Expand All @@ -75,11 +64,19 @@ in stdenv.mkDerivation rec {
wrapProgram $out/bin/anydesk \
--prefix PATH : ${lib.makeBinPath [ lsb-release pciutils ]}
substituteInPlace $out/share/applications/*.desktop \
--subst-var out
'';

passthru = {
updateScript = genericUpdater {
versionLister = writeShellScript "anydesk-versionLister" ''
curl -s https://anydesk.com/en/downloads/linux \
| grep "https://[a-z0-9._/-]*-amd64.tar.gz" -o \
| uniq \
| sed 's,.*/anydesk-\(.*\)-amd64.tar.gz,\1,g'
'';
};
};

meta = with lib; {
inherit description;
homepage = "https://www.anydesk.com";
Expand Down
6 changes: 3 additions & 3 deletions pkgs/applications/networking/shellhub-agent/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@

buildGoModule rec {
pname = "shellhub-agent";
version = "0.14.3";
version = "0.15.0";

src = fetchFromGitHub {
owner = "shellhub-io";
repo = "shellhub";
rev = "v${version}";
hash = "sha256-XnkU/I41x6JqrH5D6JGw1fgdiNfiMOBy9DUUXzKwkGg=";
hash = "sha256-533GGzSlpF9Rz8SrV0x6Hea/H8WxujuPF3cwmL5vdCw=";
};

modRoot = "./agent";

vendorHash = "sha256-nuFgJc1xQU4X86ojdFzs+9Gp3HDLsw3tkMcprlXCrko=";
vendorHash = "sha256-F3di9oTuE7qWzvAbHMkrSG+hkEs7FpEo4tLX6dCdklY=";

ldflags = [ "-s" "-w" "-X main.AgentVersion=v${version}" ];

Expand Down
6 changes: 3 additions & 3 deletions pkgs/development/tools/rust/cargo-tally/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

rustPlatform.buildRustPackage rec {
pname = "cargo-tally";
version = "1.0.43";
version = "1.0.44";

src = fetchCrate {
inherit pname version;
hash = "sha256-LPqoq9iry8nNXphFdmjwepNB1bK8/myOEoT4UM0xF70=";
hash = "sha256-CLMMrzEvw0QrlDPUfM67thzSXZ6hOfNw7mUVNdMcRgA=";
};

cargoHash = "sha256-FU4NYa2S9x0IXhPtWM0PyOBCGCGHj80QR7DRuDgDYJY=";
cargoHash = "sha256-XMuApConypaF6PNylDx9Dg2e1VvPy8m///Pnk/S14g8=";

buildInputs = lib.optionals stdenv.isDarwin (with darwin.apple_sdk_11_0.frameworks; [
DiskArbitration
Expand Down
20 changes: 12 additions & 8 deletions pkgs/games/prismlauncher/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ assert lib.assertMsg (stdenv.isLinux || !gamemodeSupport) "gamemodeSupport is on

stdenv.mkDerivation (finalAttrs: {
pname = "prismlauncher-unwrapped";
version = "8.0";
version = "8.3";

src = fetchFromGitHub {
owner = "PrismLauncher";
repo = "PrismLauncher";
rev = finalAttrs.version;
hash = "sha256-WBajtfj3qAMq8zd2S53CQyHiyqtvffLOHOjmOpdALAA=";
hash = "sha256-1YGzCgNdzscnOVeNlHMFJa0RbMo6C2qQjtBOeDxHakI=";
};

nativeBuildInputs = [ extra-cmake-modules cmake jdk17 ninja canonicalize-jars-hook ];
Expand All @@ -60,7 +60,11 @@ stdenv.mkDerivation (finalAttrs: {
"-DLauncher_BUILD_PLATFORM=nixpkgs"
] ++ lib.optionals (msaClientID != null) [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ]
++ lib.optionals (lib.versionOlder qtbase.version "6") [ "-DLauncher_QT_VERSION_MAJOR=5" ]
++ lib.optionals stdenv.isDarwin [ "-DINSTALL_BUNDLE=nodeps" "-DMACOSX_SPARKLE_UPDATE_FEED_URL=''" ];
++ lib.optionals stdenv.isDarwin [
"-DINSTALL_BUNDLE=nodeps"
"-DMACOSX_SPARKLE_UPDATE_FEED_URL=''"
"-DCMAKE_INSTALL_PREFIX=${placeholder "out"}/Applications/"
];

postUnpack = ''
rm -rf source/libraries/libnbtplusplus
Expand All @@ -69,7 +73,7 @@ stdenv.mkDerivation (finalAttrs: {

dontWrapQtApps = true;

meta = with lib; {
meta = {
mainProgram = "prismlauncher";
homepage = "https://prismlauncher.org/";
description = "A free, open source launcher for Minecraft";
Expand All @@ -78,9 +82,9 @@ stdenv.mkDerivation (finalAttrs: {
their own mods, texture packs, saves, etc) and helps you manage them and
their associated options with a simple interface.
'';
platforms = with platforms; linux ++ darwin;
changelog = "https://github.com/PrismLauncher/PrismLauncher/releases/tag/${version}";
license = licenses.gpl3Only;
maintainers = with maintainers; [ minion3665 Scrumplex getchoo ];
platforms = with lib.platforms; linux ++ darwin;
changelog = "https://github.com/PrismLauncher/PrismLauncher/releases/tag/${finalAttrs.version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ minion3665 Scrumplex getchoo ];
};
})
63 changes: 48 additions & 15 deletions pkgs/games/prismlauncher/wrapper.nix
Original file line number Diff line number Diff line change
@@ -1,74 +1,107 @@
{ lib
, stdenv
, symlinkJoin
, prismlauncher-unwrapped
, makeWrapper
, wrapQtAppsHook
, addOpenGLRunpath

, prismlauncher-unwrapped

, qtbase # needed for wrapQtAppsHook
, qtsvg
, qtwayland
, xorg
, libpulseaudio
, libGL
, glfw
, glfw-wayland-minecraft
, openal
, jdk8
, jdk17
, jdk21
, gamemode
, flite
, mesa-demos
, pciutils
, udev
, vulkan-loader
, libusb1

, msaClientID ? null
, gamemodeSupport ? stdenv.isLinux
, textToSpeechSupport ? stdenv.isLinux
, controllerSupport ? stdenv.isLinux
, jdks ? [ jdk17 jdk8 ]

# Adds `glfw-wayland-minecraft` to `LD_LIBRARY_PATH`
# when launched on wayland, allowing for the game to be run natively.
# Make sure to enable "Use system installation of GLFW" in instance settings
# for this to take effect
#
# Warning: This build of glfw may be unstable, and the launcher
# itself can take slightly longer to start
, withWaylandGLFW ? false

, jdks ? [ jdk21 jdk17 jdk8 ]
, additionalLibs ? [ ]
, additionalPrograms ? [ ]
}:

assert lib.assertMsg (withWaylandGLFW -> stdenv.isLinux) "withWaylandGLFW is only available on Linux";

let
prismlauncherFinal = prismlauncher-unwrapped.override {
prismlauncher' = prismlauncher-unwrapped.override {
inherit msaClientID gamemodeSupport;
};
in

symlinkJoin {
name = "prismlauncher-${prismlauncherFinal.version}";
name = "prismlauncher-${prismlauncher'.version}";

paths = [ prismlauncherFinal ];
paths = [ prismlauncher' ];

nativeBuildInputs = [
wrapQtAppsHook
];
]
# purposefully using a shell wrapper here for variable expansion
# see https://github.com/NixOS/nixpkgs/issues/172583
++ lib.optional withWaylandGLFW makeWrapper;

buildInputs = [
qtbase
qtsvg
]
++ lib.optional (lib.versionAtLeast qtbase.version "6" && stdenv.isLinux) qtwayland;

waylandPreExec = lib.optionalString withWaylandGLFW ''
if [ -n "$WAYLAND_DISPLAY" ]; then
export LD_LIBRARY_PATH=${lib.getLib glfw-wayland-minecraft}/lib:"$LD_LIBRARY_PATH"
fi
'';

postBuild = ''
${lib.optionalString withWaylandGLFW ''
qtWrapperArgs+=(--run "$waylandPreExec")
''}
wrapQtAppsHook
'';

qtWrapperArgs =
let
runtimeLibs = (with xorg; [
libX11
libXext
libXcursor
libXrandr
libXxf86vm
])
++ [
runtimeLibs = [
xorg.libX11
xorg.libXext
xorg.libXcursor
xorg.libXrandr
xorg.libXxf86vm

# lwjgl
libpulseaudio
libGL
glfw
openal
stdenv.cc.cc.lib
vulkan-loader # VulkanMod's lwjgl

# oshi
udev
Expand All @@ -93,5 +126,5 @@ symlinkJoin {
"--prefix PATH : ${lib.makeBinPath runtimePrograms}"
];

inherit (prismlauncherFinal) meta;
inherit (prismlauncher') meta;
}
Loading

0 comments on commit 1828f9e

Please sign in to comment.