Skip to content

Commit

Permalink
Merge master into staging-next
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Aug 20, 2023
2 parents 1bb2855 + f03d4e0 commit 57d8f92
Show file tree
Hide file tree
Showing 89 changed files with 1,552 additions and 1,048 deletions.
4 changes: 3 additions & 1 deletion nixos/lib/make-squashfs.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, squashfsTools, closureInfo
{ lib, stdenv, squashfsTools, closureInfo

, # The root directory of the squashfs filesystem is filled with the
# closures of the Nix store paths listed here.
Expand All @@ -22,11 +22,13 @@ stdenv.mkDerivation {
# for nix-store --load-db.
cp $closureInfo/registration nix-path-registration
'' + lib.optionalString stdenv.buildPlatform.is32bit ''
# 64 cores on i686 does not work
# fails with FATAL ERROR: mangle2:: xz compress failed with error code 5
if ((NIX_BUILD_CORES > 48)); then
NIX_BUILD_CORES=48
fi
'' + ''
# Generate the squashfs image.
mksquashfs nix-path-registration $(cat $closureInfo/store-paths) $out \
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/audio/faust/faust2alqt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
, alsa-lib
, qtbase
, writeText
, makeWrapper
, buildPackages
}:
let
# Wrap the binary coming out of the the compilation script, so it knows QT_PLUGIN_PATH
wrapBinary = writeText "wrapBinary" ''
source ${makeWrapper}/nix-support/setup-hook
source ${buildPackages.makeWrapper}/nix-support/setup-hook
for p in $FILES; do
workpath=$PWD
cd -- "$(dirname "$p")"
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/audio/faust/faust2jaqt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
, libsndfile
, alsa-lib
, writeText
, makeWrapper
, buildPackages
, which
}:
let
# Wrap the binary coming out of the the compilation script, so it knows QT_PLUGIN_PATH
wrapBinary = writeText "wrapBinary" ''
source ${makeWrapper}/nix-support/setup-hook
source ${buildPackages.makeWrapper}/nix-support/setup-hook
for p in $FILES; do
workpath=$PWD
cd -- "$(dirname "$p")"
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/audio/furnace/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@

stdenv.mkDerivation rec {
pname = "furnace";
version = "0.6pre7";
version = "0.6pre8";

src = fetchFromGitHub {
owner = "tildearrow";
repo = "furnace";
rev = "v${version}";
fetchSubmodules = true;
sha256 = "sha256-Gr4XDfYaRUFdtnCJ6i0oRDszwAZYVW6Mbj4Sp7El5+8=";
sha256 = "sha256-kV3XlZAVkb+SfGqBi7I7Br58zjSAfh4kiUk2KCcXnFA=";
};

postPatch = lib.optionalString stdenv.hostPlatform.isLinux ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
let
gdbDefaultsTo = if gdbUseFixed then "${gdb}/bin/gdb" else "gdb";
in
vscode-utils.buildVscodeMarketplaceExtension rec {
vscode-utils.buildVscodeMarketplaceExtension {
mktplcRef = {
name = "cpptools";
publisher = "ms-vscode";
version = "1.11.0";
sha256 = "c0725d3914aeb2515627691727455cc27e7a75031fa02ca957be02cc210bd64d";
version = "1.17.3";
sha256 = "sha256-4mKCBqUCOndKEfsJqTIsfwEt+0CZI8QAhBj3Y4+wKlg=";
arch = "linux-x64";
};

Expand Down
70 changes: 70 additions & 0 deletions pkgs/applications/graphics/trimage/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{ lib
, stdenv
, fetchFromGitHub
, substituteAll

, python3
, installShellFiles
, makeWrapper
, wrapQtAppsHook

, advancecomp
, jpegoptim
, optipng
, pngcrush
}:

let
pythonEnv = python3.withPackages (ps: with ps; [ pyqt5 ]);
binPath = lib.makeBinPath [
advancecomp
jpegoptim
optipng
pngcrush
];
in
stdenv.mkDerivation {
pname = "trimage";
version = "1.0.7-dev";

src = fetchFromGitHub {
owner = "Kilian";
repo = "Trimage";
rev = "ad74684272a31eee6af289cc59fd90fd962d2806";
hash = "sha256-jdcGGTqr3f3Xnp6thYmASQYiZh9nagLUTmlFnJ5Hqmc=";
};

nativeBuildInputs = [
installShellFiles
makeWrapper
wrapQtAppsHook
];

dontWrapQtApps = true;

installPhase = ''
runHook preInstall
mkdir $out
cp -R trimage $out
installManPage doc/trimage.1
install -Dm444 desktop/trimage.desktop -t $out/share/applications
install -Dm444 desktop/trimage.svg -t $out/share/icons/hicolor/scalable/apps
makeWrapper ${pythonEnv}/bin/python $out/bin/trimage \
--add-flags "$out/trimage/trimage.py" \
--prefix PATH : ${binPath} \
"''${qtWrapperArgs[@]}"
runHook postInstall
'';

meta = {
description = "A cross-platform tool for optimizing PNG and JPG files";
homepage = "https://github.com/Kilian/Trimage";
license = lib.licenses.mit;
mainProgram = "trimage";
maintainers = with lib.maintainers; [ tomasajt ];
};
}
4 changes: 2 additions & 2 deletions pkgs/applications/misc/cartridges/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
}:
stdenv.mkDerivation (finalAttrs: {
pname = "cartridges";
version = "2.1.1";
version = "2.2.1";

src = fetchFromGitHub {
owner = "kra-mo";
repo = "cartridges";
rev = "v${finalAttrs.version}";
sha256 = "sha256-jycTLKTHKhxd4t+3NB23Tf1oAvqiDHHsNmS6uLikgGA=";
sha256 = "sha256-LCO3GSRNi1alP9rRwBAfVAF49i4FmhsMOG9LW4PGB3s=";
};

buildInputs = [
Expand Down
9 changes: 4 additions & 5 deletions pkgs/applications/misc/ratt/default.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{ buildGoModule, fetchFromSourcehut, lib }:
buildGoModule rec {
pname = "ratt";
version = "unstable-2022-01-11";
version = "unstable-2023-02-12";

src = fetchFromSourcehut {
owner = "~ghost08";
repo = "ratt";
rev = "eac7e14b15ad4e916e7d072780397c414c740630";
hash = "sha256-/WzPF98MovNg4t5NJhL2Z1bAFDG/3I56M9YgRJF7Wjk=";
rev = "ed1a675685b9d86d6602e168199ba9b4260f5f06";
hash = "sha256-HfS97Lxt6FAj/2/WAzLI06F/h6TP5m2lHHOTAs8XNFY=";
};

proxyVendor = true;
vendorSha256 = "sha256-4TEdnJ7lCuBka6rtoKowf5X3VqCgfwvGHeJ5B5Q5C20=";
vendorHash = "sha256-6cpHDwnxdc/9YPj77JVuT5ZDFjKkF6nBX4RgZr/9fFY=";

# tests try to access the internet to scrape websites
doCheck = false;
Expand All @@ -21,6 +21,5 @@ buildGoModule rec {
homepage = "https://git.sr.ht/~ghost08/ratt";
license = licenses.mit;
maintainers = with maintainers; [ kmein ];
platforms = platforms.linux ++ platforms.darwin;
};
}
4 changes: 2 additions & 2 deletions pkgs/applications/misc/slweb/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

stdenv.mkDerivation rec {
pname = "slweb";
version = "0.6.1";
version = "0.6.7";

src = fetchFromSourcehut {
owner = "~strahinja";
repo = pname;
rev = "v${version}";
sha256 = "sha256-TZxnJEBodRdZzL96Ichs+oiXVltF2HXVUKDETBQcIaI=";
sha256 = "sha256-Y7w3yVqA8MNJJ3OcGaeziydZyzF0bap41Il6eE/Hu40=";
};

nativeBuildInputs = [ redo-apenwarr ];
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/misc/todiff/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ rustPlatform.buildRustPackage rec {
owner = "Ekleog";
repo = "todiff";
rev = version;
sha256 = "1y0v8nkaqb8kn61xwarpbyrq019gxx1f5f5p1hzw73nqxadc1rcm";
hash = "sha256-leXAmurYjsM/DLe44kLvLwWAs183K96DsRMtrKZFG/g=";
};

cargoSha256 = "0vrn1vc3rwabv6l2r1qb7mkcxbp75q79bfl3rxhyi51ra3ij507r";
cargoHash = "sha256-+YAi41A5lOhhz4O6lQ4u567OZj0Lhyyo2UvxPNgONm8=";

checkFeatures = [ "integration_tests" ];

Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/misc/waypaper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@

python3.pkgs.buildPythonApplication rec {
pname = "waypaper";
version = "1.2";
version = "1.5";

src = fetchFromGitHub {
owner = "anufrievroman";
repo = "waypaper";
rev = "refs/tags/${version}";
hash = "sha256-wD3DtxP4aUwIn+EoM3s1Y9VNEcUGhtyugNBEFHI9eqw=";
hash = "sha256-lK4TygR9cwEHcnrC0E5vE7Jor6afEiM9TmEgGXj+hNA=";
};

nativeBuildInputs = [
Expand Down
72 changes: 21 additions & 51 deletions pkgs/applications/networking/browsers/qutebrowser/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, fetchzip, fetchFromGitHub, python3
{ stdenv, lib, fetchurl, fetchzip, python3
, wrapQtAppsHook, glib-networking
, asciidoc, docbook_xml_dtd_45, docbook_xsl, libxml2
, libxslt, gst_all_1 ? null
Expand All @@ -8,16 +8,14 @@
, pipewireSupport ? stdenv.isLinux
, pipewire
, qtwayland
, mkDerivationWith ? null
, qtbase ? null
, qtwebengine ? null
, wrapGAppsHook ? null
, qtbase
, qtwebengine
, wrapGAppsHook
, enableWideVine ? false
, widevine-cdm
}: let
isQt6 = mkDerivationWith == null;
}:

python3Packages = python3.pkgs;
let
pdfjs = let
version = "3.9.179";
in
Expand All @@ -27,40 +25,21 @@
stripRoot = false;
};

backendPackage =
if backend == "webengine" then if isQt6 then python3Packages.pyqt6-webengine else python3Packages.pyqtwebengine else
if backend == "webkit" then python3Packages.pyqt5_with_qtwebkit else
throw ''
Unknown qutebrowser backend "${backend}".
Valid choices are qtwebengine (recommended) or qtwebkit.
'';

buildPythonApplication = if isQt6 then python3Packages.buildPythonApplication else mkDerivationWith python3Packages.buildPythonApplication;

pname = "qutebrowser";
version = if isQt6 then "unstable-2023-04-18" else "2.5.4";
version = "3.0.0";
in

assert withMediaPlayback -> gst_all_1 != null;
assert isQt6 -> backend != "webkit";
assert lib.assertMsg (backend != "webkit") ''
Support for the QtWebKit backend has been removed.
Please remove the `backend = "webkit"` option from your qutebrowser override.
'';

buildPythonApplication {
python3.pkgs.buildPythonApplication {
inherit pname version;

src = if isQt6 then
# comes from the master branch of upstream
# https://github.com/qutebrowser/qutebrowser/issues/7202
# https://github.com/qutebrowser/qutebrowser/discussions/7628
fetchFromGitHub {
owner = "qutebrowser";
repo = "qutebrowser";
rev = "d4cafc0019a4a5574caa11966fc40ede89076d26";
hash = "sha256-Ma79EPvnwmQkeXEG9aSnD/Vt1DGhK2JX9dib7uARH8M=";
}
# the release tarballs are different from the git checkout!
else fetchurl {
src = fetchurl {
url = "https://github.com/qutebrowser/qutebrowser/releases/download/v${version}/${pname}-${version}.tar.gz";
hash = "sha256-pGCyICUn5CpnDCbSJdn6ZBfQkswfFvOpXnvJXdicGrE=";
hash = "sha256-Oer0p/DwUfOejUCgSCSkMvLLAjNyJx51qgN7bcQQ2Pw=";
};

# Needs tox
Expand All @@ -77,20 +56,18 @@ buildPythonApplication {
nativeBuildInputs = [
wrapQtAppsHook wrapGAppsHook asciidoc
docbook_xml_dtd_45 docbook_xsl libxml2 libxslt
]
++ lib.optional isQt6 python3Packages.pygments;
python3.pkgs.pygments
];

propagatedBuildInputs = with python3Packages; ([
pyyaml backendPackage jinja2 pygments
propagatedBuildInputs = with python3.pkgs; ([
pyyaml pyqtwebengine jinja2 pygments
# scripts and userscripts libs
tldextract beautifulsoup4
readability-lxml pykeepass stem
pynacl
# extensive ad blocking
adblock
]
++ lib.optional (pythonOlder "3.9") importlib-resources
++ lib.optional stdenv.isLinux qtwayland
] ++ lib.optional stdenv.isLinux qtwayland
);

patches = [
Expand All @@ -100,10 +77,6 @@ buildPythonApplication {
dontWrapGApps = true;
dontWrapQtApps = true;

preConfigure = lib.optionalString isQt6 ''
python scripts/asciidoc2html.py
'';

postPatch = ''
substituteInPlace qutebrowser/misc/quitter.py --subst-var-by qutebrowser "$out/bin/qutebrowser"
Expand Down Expand Up @@ -141,10 +114,7 @@ buildPythonApplication {
makeWrapperArgs+=(
"''${gappsWrapperArgs[@]}"
"''${qtWrapperArgs[@]}"
--add-flags '--backend ${backend}'
--set QUTE_QTWEBENGINE_VERSION_OVERRIDE "${lib.getVersion qtwebengine}"
${lib.optionalString isQt6 ''--set QUTE_QT_WRAPPER "PyQt6"''}
${lib.optionalString (pipewireSupport && backend == "webengine") ''--prefix LD_LIBRARY_PATH : ${libPath}''}
${lib.optionalString pipewireSupport ''--prefix LD_LIBRARY_PATH : ${libPath}''}
${lib.optionalString enableWideVine ''--add-flags "--qt-flag widevine-path=${widevine-cdm}/share/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so"''}
)
'';
Expand All @@ -153,7 +123,7 @@ buildPythonApplication {
homepage = "https://github.com/qutebrowser/qutebrowser";
description = "Keyboard-focused browser with a minimal GUI";
license = licenses.gpl3Plus;
platforms = if enableWideVine then [ "x86_64-linux" ] else backendPackage.meta.platforms;
platforms = if enableWideVine then [ "x86_64-linux" ] else qtwebengine.meta.platforms;
maintainers = with maintainers; [ jagajaga rnhmjoj ebzzry dotlambda nrdxp ];
};
}
Loading

0 comments on commit 57d8f92

Please sign in to comment.