Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qwhitesurgtkdecorations init at 0.1.0 #365475

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20995,6 +20995,12 @@
githubId = 216167;
name = "Steve Jones";
};
sjhaleprogrammer = {
email = "[email protected]";
github = "sjhaleprogrammer";
githubId = 60676867;
name = "Samuel Hale";
};
sjmackenzie = {
email = "[email protected]";
github = "sjmackenzie";
Expand Down
9 changes: 9 additions & 0 deletions nixos/modules/config/qt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ let
libsForQt5.qt5ct
qt6Packages.qt6ct
];
whitesur = [
qwhitesurgtkdecorations
qwhitesurgtkdecorations-qt6
];
};

stylePackages = with pkgs; {
Expand Down Expand Up @@ -131,6 +135,10 @@ in
"qt6Packages"
"qt6gtk2"
]
[
"qwhitesurgtkdecorations"
"qwhitesurgtkdecorations-qt6"
]
];
description = ''
Selects the platform theme to use for Qt applications.
Expand All @@ -143,6 +151,7 @@ in
application.
- `qt5ct`: Use Qt style set using the [qt5ct](https://sourceforge.net/projects/qt5ct/)
and [qt6ct](https://github.com/trialuser02/qt6ct) applications.
- 'whitesur': Use WhitesurGTK theme with [qwhitesurgtkdecorations](https://github.com/FengZhongShaoNian/QWhiteSurGtkDecorations)
'';
};

Expand Down
62 changes: 62 additions & 0 deletions pkgs/by-name/qw/qwhitesurgtkdecorations/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
qt5,
qt6,
wayland,
nix-update-script,
useQt6 ? false,

# Shadows support on Qt5 requires the feature backported from Qt6:
# https://src.fedoraproject.org/rpms/qt5-qtwayland/blob/rawhide/f/qtwayland-decoration-support-backports-from-qt6.patch
qt5ShadowsSupport ? false,
}:

let
qt = if useQt6 then qt6 else qt5;
qtVersion = if useQt6 then "6" else "5";

in
stdenv.mkDerivation (finalAttrs: {
pname = "qwhitesurgtkdecorations";
version = "0.1.0";

src = fetchFromGitHub {
owner = "FengZhongShaoNian";
repo = "QWhiteSurGtkDecorations";
rev = finalAttrs.version;
hash = "sha256-dMwaLHAbpTBP8UvUvrW+CRBzgr11o+OAbsTW7AcnZsI=";
};

nativeBuildInputs = [
cmake
];

buildInputs = with qt; [
qtbase
qtsvg
qtwayland
wayland
];

dontWrapQtApps = true;

cmakeFlags =
[
"-DQT_PLUGINS_DIR=${placeholder "out"}/${qt.qtbase.qtPluginPrefix}"
]
++ lib.optional useQt6 "-DUSE_QT6=true"
++ lib.optional qt5ShadowsSupport "-DHAS_QT6_SUPPORT=true";

passthru.updateScript = nix-update-script { };

meta = {
description = "Qt${qtVersion} decoration plugin implementing WhiteSurGTK-like client-side decorations. This project is modified based on the QAdwaitaDecorations project. Some of the icon resources used in this project come from WhiteSur-gtk-theme.";
homepage = "https://github.com/FengZhongShaoNian/QWhiteSurGtkDecorations";
license = lib.licenses.lgpl21Plus;
maintainers = with lib.maintainers; [ sjhaleprogrammer ];
platforms = lib.platforms.linux;
};
})
4 changes: 4 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10639,6 +10639,10 @@ with pkgs;
useQt6 = true;
};

qwhitesurgtkdecorations-qt6 = callPackage ../by-name/qw/qwhitesurgtkdecorations/package.nix {
useQt6 = true;
};

randomx = darwin.apple_sdk_11_0.callPackage ../development/libraries/randomx { };

remodel = callPackage ../development/tools/remodel {
Expand Down
Loading