hyprsysteminfo/nix/default.nix
outfoxxed 00beba904f
core: use qt libraries and follow qml module conventions (#8)
* core: use qt libraries and follow qml module conventions

Uses a qml module instead of a context property.
Replaces usages of std and hyprutils with qtbase where applicable.
Removes dependencies: hyprutils, wl-copy, whoami, uname.
Rolls c++ version back to 20, as 23 isn't currently required for anything.

* core: use hyprutils and std again
2024-10-15 11:38:31 +01:00

53 lines
1.1 KiB
Nix

{
lib,
stdenv,
cmake,
kdePackages,
pciutils,
qt6,
pkg-config,
hyprutils,
version ? "0",
}: let
inherit (lib.sources) cleanSource cleanSourceWith;
inherit (lib.strings) hasSuffix makeBinPath;
in
stdenv.mkDerivation {
pname = "hyprsysteminfo";
inherit version;
src = cleanSourceWith {
filter = name: _type: let
baseName = baseNameOf (toString name);
in
! (hasSuffix ".nix" baseName);
src = cleanSource ../.;
};
nativeBuildInputs = [
cmake
pkg-config
qt6.wrapQtAppsHook
];
buildInputs = [
kdePackages.kirigami-addons
qt6.qtbase
qt6.qtsvg
qt6.qtwayland
hyprutils
];
preFixup = ''
qtWrapperArgs+=(--prefix PATH : "${makeBinPath [pciutils]}")
'';
meta = {
description = "A tiny qt6/qml application to display information about the running system";
homepage = "https://github.com/hyprwm/hyprsysteminfo";
license = lib.licenses.bsd3;
maintainers = [lib.maintainers.fufexan];
mainProgram = "hyprsysteminfo";
platforms = lib.platforms.linux;
};
}