nix: move to hyprland-qt-support (#25)

This commit is contained in:
outfoxxed 2025-01-08 15:01:50 -08:00 committed by GitHub
parent d870718d78
commit 126a2299ec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 69 additions and 16 deletions

View file

@ -1,5 +1,28 @@
{
"nodes": {
"hyprland-qt-support": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"systems": [
"systems"
]
},
"locked": {
"lastModified": 1736374981,
"narHash": "sha256-DI/ZjoOIpKiZSLxAZ406bon68jtfKMlkNrmOSqi86lU=",
"owner": "hyprwm",
"repo": "hyprland-qt-support",
"rev": "d4615b8e40dcdfc11b6020d3e022f8744843a9f8",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-qt-support",
"type": "github"
}
},
"hyprutils": {
"inputs": {
"nixpkgs": [
@ -10,11 +33,11 @@
]
},
"locked": {
"lastModified": 1732288281,
"narHash": "sha256-XTU9B53IjGeJiJ7LstOhuxcRjCOFkQFl01H78sT9Lg4=",
"lastModified": 1736164519,
"narHash": "sha256-1LimBKvDpBbeX+qW7T240WEyw+DBVpDotZB4JYm8Aps=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "b26f33cc1c8a7fd5076e19e2cce3f062dca6351c",
"rev": "3c895da64b0eb19870142196fa48c07090b441c4",
"type": "github"
},
"original": {
@ -25,11 +48,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1732014248,
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
"lastModified": 1736012469,
"narHash": "sha256-/qlNWm/IEVVH7GfgAIyP6EsVZI6zjAx1cV5zNyrs+rI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
"rev": "8f3e1f807051e32d8c95cd12b9b421623850a34d",
"type": "github"
},
"original": {
@ -41,6 +64,7 @@
},
"root": {
"inputs": {
"hyprland-qt-support": "hyprland-qt-support",
"hyprutils": "hyprutils",
"nixpkgs": "nixpkgs",
"systems": "systems"

View file

@ -10,6 +10,12 @@
inputs.nixpkgs.follows = "nixpkgs";
inputs.systems.follows = "systems";
};
hyprland-qt-support = {
url = "github:hyprwm/hyprland-qt-support";
inputs.nixpkgs.follows = "nixpkgs";
inputs.systems.follows = "systems";
};
};
outputs = {
@ -36,14 +42,9 @@
});
devShells = eachSystem (system: {
default = pkgsFor.${system}.mkShell {
inputsFrom = [self.packages.${system}.hyprpolkitagent];
shellHook = ''
# Generate compile_commands.json
CMAKE_EXPORT_COMPILE_COMMANDS=1 cmake -S . -B ./build
ln -s build/compile_commands.json .
'';
default = import ./nix/shell.nix {
pkgs = pkgsFor.${system};
inherit (pkgsFor.${system}) hyprpolkitagent;
};
});
};

View file

@ -4,6 +4,7 @@
cmake,
pkg-config,
hyprutils,
hyprland-qt-support,
kdePackages,
polkit,
qt6,
@ -32,9 +33,9 @@ in
buildInputs = [
hyprutils
kdePackages.kirigami-addons
kdePackages.polkit-qt-1
hyprland-qt-support
polkit
kdePackages.polkit-qt-1
qt6.qtbase
qt6.qtsvg
qt6.qtwayland

View file

@ -15,6 +15,7 @@ in {
hyprpolkitagent = lib.composeManyExtensions [
inputs.hyprutils.overlays.default
inputs.hyprland-qt-support.overlays.default
(final: prev: {
hyprpolkitagent = final.callPackage ./. {
stdenv = final.gcc14Stdenv;

26
nix/shell.nix Normal file
View file

@ -0,0 +1,26 @@
{
pkgs ? import <nixpkgs> {},
hyprpolkitagent ? pkgs.callPackage ./default.nix {},
...
}: pkgs.mkShell {
inputsFrom = [ hyprpolkitagent ];
nativeBuildInputs = [ pkgs.clang-tools ];
shellHook = let
inherit (pkgs.lib.strings) concatMapStringsSep;
qtLibPath = f: concatMapStringsSep ":" f (with pkgs.qt6; [
qtbase
qtdeclarative
qtwayland
pkgs.hyprland-qt-support
]);
in ''
# Add Qt-related environment variables.
export QT_PLUGIN_PATH=${qtLibPath (p: "${p}/lib/qt-6/plugins")}
export QML2_IMPORT_PATH=${qtLibPath (p: "${p}/lib/qt-6/qml")}
# Generate compile_commands.json
CMAKE_EXPORT_COMPILE_COMMANDS=1 cmake -S . -B ./build
ln -s build/compile_commands.json .
'';
}