Merge master into staging-next

This commit is contained in:
github-actions[bot] 2024-11-10 18:03:58 +00:00 committed by GitHub
commit aa759748db
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 305 additions and 180 deletions

View File

@ -95,7 +95,7 @@ in
after = ["network.target"];
wantedBy = ["multi-user.target"];
script = ''
${fhsEnvExecutable} --dir ${cfg.dataDir} ${allowRemoteGuiRpcFlag}
exec ${fhsEnvExecutable} --dir ${cfg.dataDir} ${allowRemoteGuiRpcFlag}
'';
serviceConfig = {
User = "boinc";

View File

@ -275,7 +275,7 @@ in
systemd.services.guix-daemon = {
environment = serviceEnv;
script = ''
${lib.getExe' package "guix-daemon"} \
exec ${lib.getExe' package "guix-daemon"} \
--build-users-group=${cfg.group} \
${lib.optionalString (cfg.substituters.urls != [ ])
"--substitute-urls='${lib.concatStringsSep " " cfg.substituters.urls}'"} \
@ -384,7 +384,7 @@ in
}
'';
script = ''
${lib.getExe' package "guix"} publish \
exec ${lib.getExe' package "guix"} publish \
--user=${cfg.publish.user} --port=${builtins.toString cfg.publish.port} \
${lib.escapeShellArgs cfg.publish.extraArgs}
'';
@ -440,12 +440,10 @@ in
description = "Guix garbage collection";
startAt = cfg.gc.dates;
script = ''
${lib.getExe' package "guix"} gc ${lib.escapeShellArgs cfg.gc.extraArgs}
exec ${lib.getExe' package "guix"} gc ${lib.escapeShellArgs cfg.gc.extraArgs}
'';
serviceConfig = {
Type = "oneshot";
PrivateDevices = true;
PrivateNetwork = true;
ProtectControlGroups = true;

View File

@ -1,101 +1,153 @@
{ lib, stdenv, fetchurl, buildPackages
, alsa-lib
, at-spi2-atk
, at-spi2-core
, atk
, cairo
, cups
, dbus
, dpkg
, expat
, fontconfig
, freetype
, gdk-pixbuf
, glib
, adwaita-icon-theme
, gsettings-desktop-schemas
, gtk3
, gtk4
, qt6
, libX11
, libXScrnSaver
, libXcomposite
, libXcursor
, libXdamage
, libXext
, libXfixes
, libXi
, libXrandr
, libXrender
, libXtst
, libdrm
, libkrb5
, libuuid
, libxkbcommon
, libxshmfence
, mesa
, nspr
, nss
, pango
, pipewire
, snappy
, udev
, wayland
, xdg-utils
, coreutils
, xorg
, zlib
{
lib,
stdenv,
fetchurl,
buildPackages,
alsa-lib,
at-spi2-atk,
at-spi2-core,
atk,
cairo,
cups,
dbus,
dpkg,
expat,
fontconfig,
freetype,
gdk-pixbuf,
glib,
adwaita-icon-theme,
gsettings-desktop-schemas,
gtk3,
gtk4,
qt6,
libX11,
libXScrnSaver,
libXcomposite,
libXcursor,
libXdamage,
libXext,
libXfixes,
libXi,
libXrandr,
libXrender,
libXtst,
libdrm,
libkrb5,
libuuid,
libxkbcommon,
libxshmfence,
mesa,
nspr,
nss,
pango,
pipewire,
snappy,
udev,
wayland,
xdg-utils,
coreutils,
xorg,
zlib,
# command line arguments which are always set e.g "--disable-gpu"
, commandLineArgs ? ""
commandLineArgs ? "",
# Necessary for USB audio devices.
, pulseSupport ? stdenv.hostPlatform.isLinux
, libpulseaudio
pulseSupport ? stdenv.hostPlatform.isLinux,
libpulseaudio,
# For GPU acceleration support on Wayland (without the lib it doesn't seem to work)
, libGL
libGL,
# For video acceleration via VA-API (--enable-features=VaapiVideoDecoder,VaapiVideoEncoder)
, libvaSupport ? stdenv.hostPlatform.isLinux
, libva
, enableVideoAcceleration ? libvaSupport
libvaSupport ? stdenv.hostPlatform.isLinux,
libva,
enableVideoAcceleration ? libvaSupport,
# For Vulkan support (--enable-features=Vulkan); disabled by default as it seems to break VA-API
, vulkanSupport ? false
, addDriverRunpath
, enableVulkan ? vulkanSupport
vulkanSupport ? false,
addDriverRunpath,
enableVulkan ? vulkanSupport,
}:
{ pname
, version
, hash
, url
, platform
{
pname,
version,
hash,
url,
platform,
}:
let
inherit (lib) optional optionals makeLibraryPath makeSearchPathOutput makeBinPath
optionalString strings escapeShellArg;
inherit (lib)
optional
optionals
makeLibraryPath
makeSearchPathOutput
makeBinPath
optionalString
strings
escapeShellArg
;
deps = [
alsa-lib at-spi2-atk at-spi2-core atk cairo cups dbus expat
fontconfig freetype gdk-pixbuf glib gtk3 gtk4 libdrm libX11 libGL
libxkbcommon libXScrnSaver libXcomposite libXcursor libXdamage
libXext libXfixes libXi libXrandr libXrender libxshmfence
libXtst libuuid mesa nspr nss pango pipewire udev wayland
xorg.libxcb zlib snappy libkrb5 qt6.qtbase
]
++ optional pulseSupport libpulseaudio
++ optional libvaSupport libva;
alsa-lib
at-spi2-atk
at-spi2-core
atk
cairo
cups
dbus
expat
fontconfig
freetype
gdk-pixbuf
glib
gtk3
gtk4
libdrm
libX11
libGL
libxkbcommon
libXScrnSaver
libXcomposite
libXcursor
libXdamage
libXext
libXfixes
libXi
libXrandr
libXrender
libxshmfence
libXtst
libuuid
mesa
nspr
nss
pango
pipewire
udev
wayland
xorg.libxcb
zlib
snappy
libkrb5
qt6.qtbase
] ++ optional pulseSupport libpulseaudio ++ optional libvaSupport libva;
rpath = makeLibraryPath deps + ":" + makeSearchPathOutput "lib" "lib64" deps;
binpath = makeBinPath deps;
enableFeatures = optionals enableVideoAcceleration [ "VaapiVideoDecoder" "VaapiVideoEncoder" ]
enableFeatures =
optionals enableVideoAcceleration [
"VaapiVideoDecoder"
"VaapiVideoEncoder"
]
++ optional enableVulkan "Vulkan";
disableFeatures = [ "OutdatedBuildDetector" ] # disable automatic updates
disableFeatures =
[ "OutdatedBuildDetector" ] # disable automatic updates
# The feature disable is needed for VAAPI to work correctly: https://github.com/brave/brave-browser/issues/20935
++ optionals enableVideoAcceleration [ "UseChromeOSDirectVideoDecoder" ];
in
@ -120,7 +172,10 @@ stdenv.mkDerivation {
buildInputs = [
# needed for GSETTINGS_SCHEMAS_PATH
glib gsettings-desktop-schemas gtk3 gtk4
glib
gsettings-desktop-schemas
gtk3
gtk4
# needed for XDG_ICON_DIRS
adwaita-icon-theme
@ -181,13 +236,22 @@ stdenv.mkDerivation {
gappsWrapperArgs+=(
--prefix LD_LIBRARY_PATH : ${rpath}
--prefix PATH : ${binpath}
--suffix PATH : ${lib.makeBinPath [ xdg-utils coreutils ]}
${optionalString (enableFeatures != []) ''
--suffix PATH : ${
lib.makeBinPath [
xdg-utils
coreutils
]
}
${
optionalString (enableFeatures != [ ]) ''
--add-flags "--enable-features=${strings.concatStringsSep "," enableFeatures}\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+,WaylandWindowDecorations}}"
''}
${optionalString (disableFeatures != []) ''
''
}
${
optionalString (disableFeatures != [ ]) ''
--add-flags "--disable-features=${strings.concatStringsSep "," disableFeatures}"
''}
''
}
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto}}"
${optionalString vulkanSupport ''
--prefix XDG_DATA_DIRS : "${addDriverRunpath.driverLink}/share"
@ -206,7 +270,9 @@ stdenv.mkDerivation {
meta = {
homepage = "https://brave.com/";
description = "Privacy-oriented browser for Desktop and Laptop computers";
changelog = "https://github.com/brave/brave-browser/blob/master/CHANGELOG_DESKTOP.md#" + lib.replaceStrings [ "." ] [ "" ] version;
changelog =
"https://github.com/brave/brave-browser/blob/master/CHANGELOG_DESKTOP.md#"
+ lib.replaceStrings [ "." ] [ "" ] version;
longDescription = ''
Brave browser blocks the ads and trackers that slow you down,
chew up your bandwidth, and invade your privacy. Brave lets you
@ -214,8 +280,17 @@ stdenv.mkDerivation {
'';
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [ uskudnik rht jefflabonte nasirhm buckley310 ];
platforms = [ "aarch64-linux" "x86_64-linux" ];
maintainers = with lib.maintainers; [
uskudnik
rht
jefflabonte
nasirhm
buckley310
];
platforms = [
"aarch64-linux"
"x86_64-linux"
];
mainProgram = "brave";
};
}

View File

@ -1,24 +1,32 @@
# Expression generated by update.sh; do not edit it by hand!
{ stdenv, callPackage, ... }@args:
callPackage ./make-brave.nix (removeAttrs args [ "callPackage" ])
(
if stdenv.hostPlatform.isAarch64 then
rec {
let
pname = "brave";
version = "1.71.121";
version = "1.71.123";
allArchives = {
aarch64-linux = {
url = "https://github.com/brave/brave-browser/releases/download/v${version}/brave-browser_${version}_arm64.deb";
hash = "sha256-+MBZXtgaEiTqEd63HpPbi4KjHOHPRRcf8q3QDe+YsKk=";
platform = "aarch64-linux";
}
else if stdenv.hostPlatform.isx86_64 then
rec {
pname = "brave";
version = "1.71.121";
hash = "sha256-u3fme771Q5F00fYiLez9mhGQR2mORYdSabXovr0+OYE=";
};
x86_64-linux = {
url = "https://github.com/brave/brave-browser/releases/download/v${version}/brave-browser_${version}_amd64.deb";
hash = "sha256-sc2FFSttm9+yh8atJQ6KS5ZL87Ov9vUXJeVKYTPNpy0=";
platform = "x86_64-linux";
}
hash = "sha256-fJczTAra+j8+veicz4lIyKSNJyxJK4q9gpZoAyQwkxQ=";
};
};
archive =
if builtins.hasAttr stdenv.system allArchives then
allArchives.${stdenv.system}
else
throw "Unsupported platform."
throw "Unsupported platform.";
in
callPackage ./make-brave.nix (removeAttrs args [ "callPackage" ]) (
archive
// {
inherit pname version;
platform = stdenv.system;
}
)

View File

@ -1,17 +1,15 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl gnused nix
#!nix-shell -i bash -p curl gnused nix jq
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
latestVersionAarch64="$(curl -sL https://brave-browser-apt-release.s3.brave.com/dists/stable/main/binary-arm64/Packages \
| sed -r -n 's/^Version: (.*)/\1/p' | head -n1)"
latestVersion="$(curl --fail -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} "https://api.github.com/repos/brave/brave-browser/releases/latest" | jq -r '.tag_name' | sed 's/^v//')"
hashAarch64="$(nix hash to-sri --type sha256 \
$(curl -sL https://brave-browser-apt-release.s3.brave.com/dists/stable/main/binary-arm64/Packages \
| sed -r -n 's/^SHA256: (.*)/\1/p' | head -n1)
)"
latestVersionAmd64="$(curl -sL https://brave-browser-apt-release.s3.brave.com/dists/stable/main/binary-amd64/Packages \
| sed -r -n 's/^Version: (.*)/\1/p' | head -n1)"
hashAmd64="$(nix hash to-sri --type sha256 \
$(curl -sL https://brave-browser-apt-release.s3.brave.com/dists/stable/main/binary-amd64/Packages \
| sed -r -n 's/^SHA256: (.*)/\1/p' | head -n1)
@ -21,25 +19,33 @@ cat > $SCRIPT_DIR/package.nix << EOF
# Expression generated by update.sh; do not edit it by hand!
{ stdenv, callPackage, ... }@args:
callPackage ./make-brave.nix (removeAttrs args [ "callPackage" ])
(
if stdenv.hostPlatform.isAarch64 then
rec {
let
pname = "brave";
version = "${latestVersionAarch64}";
version = "${latestVersion}";
allArchives = {
aarch64-linux = {
url = "https://github.com/brave/brave-browser/releases/download/v\${version}/brave-browser_\${version}_arm64.deb";
hash = "${hashAarch64}";
platform = "aarch64-linux";
}
else if stdenv.hostPlatform.isx86_64 then
rec {
pname = "brave";
version = "${latestVersionAmd64}";
};
x86_64-linux = {
url = "https://github.com/brave/brave-browser/releases/download/v\${version}/brave-browser_\${version}_amd64.deb";
hash = "${hashAmd64}";
platform = "x86_64-linux";
}
};
};
archive =
if builtins.hasAttr stdenv.system allArchives then
allArchives.\${stdenv.system}
else
throw "Unsupported platform."
throw "Unsupported platform.";
in
callPackage ./make-brave.nix (removeAttrs args [ "callPackage" ]) (
archive
// {
inherit pname version;
platform = stdenv.system;
}
)
EOF

View File

@ -2,18 +2,23 @@
buildHomeAssistantComponent,
fetchFromGitHub,
lib,
gitUpdater,
}:
buildHomeAssistantComponent rec {
owner = "KartoffelToby";
domain = "better_thermostat";
version = "1.6.0";
version = "1.6.1";
src = fetchFromGitHub {
owner = "KartoffelToby";
repo = "better_thermostat";
rev = "refs/tags/${version}";
hash = "sha256-9iwrGKk3/m38ghDVGzKODWo9vzzZxJ91413/KWnULJU=";
hash = "sha256-zXO2UDLhSTOemzsO9G5ZUzr50Zg8kDW/aObn6Y3j70k=";
};
passthru.updateScript = gitUpdater {
ignoredVersions = "(Alpha|Beta|alpha|beta).*";
};
meta = {

View File

@ -0,0 +1,33 @@
{
lib,
fetchFromGitHub,
buildHomeAssistantComponent,
dirigera,
}:
buildHomeAssistantComponent rec {
owner = "sanjoyg";
domain = "dirigera_platform";
version = "2.6.4";
src = fetchFromGitHub {
owner = "sanjoyg";
repo = "dirigera_platform";
rev = version;
hash = "sha256-ftJUmJ5UWgm22YBfCIBAxRjG+niougw5ekrQNuSRgzI=";
};
postPatch = ''
substituteInPlace custom_components/dirigera_platform/manifest.json \
--replace-fail "0.0.1" "${version}"
'';
dependencies = [ dirigera ];
meta = with lib; {
description = "Home-assistant integration for IKEA Dirigera hub";
homepage = "https://github.com/sanjoyg/dirigera_platform";
maintainers = with maintainers; [ rhoriguchi ];
license = licenses.mit;
};
}