diff --git a/flake.lock b/flake.lock index 6158090..c98384e 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,54 @@ { "nodes": { + "hyprlang": { + "inputs": { + "hyprutils": "hyprutils", + "nixpkgs": [ + "nixpkgs" + ], + "systems": [ + "systems" + ] + }, + "locked": { + "lastModified": 1735393019, + "narHash": "sha256-NPpqA8rtmDLsEmZOmz+qR67zsB6Y503Jnv+nSFLKJZ8=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "55608efdaa387af7bfdc0eddb404c409958efa43", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprutils": { + "inputs": { + "nixpkgs": [ + "hyprlang", + "nixpkgs" + ], + "systems": [ + "hyprlang", + "systems" + ] + }, + "locked": { + "lastModified": 1734796073, + "narHash": "sha256-TnuKsa8OHrSJEmHm3TLGOWbPNA1gRjmZLsRzKrCqOsg=", + "owner": "hyprwm", + "repo": "hyprutils", + "rev": "c3331116ebd0b71df5ae8c6efe9a7f94148b03bf", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprutils", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1736012469, @@ -18,6 +67,7 @@ }, "root": { "inputs": { + "hyprlang": "hyprlang", "nixpkgs": "nixpkgs", "systems": "systems" } diff --git a/flake.nix b/flake.nix index 7070845..e2288c6 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,12 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; systems.url = "github:nix-systems/default-linux"; + + hyprlang = { + url = "github:hyprwm/hyprlang"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.systems.follows = "systems"; + }; }; outputs = { @@ -22,7 +28,7 @@ } ); in { - overlays = import ./nix/overlays.nix { inherit inputs self lib; }; + overlays = import ./nix/overlays.nix {inherit inputs self lib;}; packages = eachSystem (system: { default = self.packages.${system}.hyprland-qt-support; diff --git a/nix/default.nix b/nix/default.nix index 04e51c4..21f0b14 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -2,16 +2,14 @@ lib, nix-gitignore, stdenv, - cmake, ninja, qt6, pkg-config, hyprlang, version ? "0", -}: let - inherit (lib.strings) makeBinPath; -in stdenv.mkDerivation { +}: +stdenv.mkDerivation { pname = "hyprland-qt-support"; inherit version; diff --git a/nix/overlays.nix b/nix/overlays.nix index aa69d0f..3e211a5 100644 --- a/nix/overlays.nix +++ b/nix/overlays.nix @@ -14,6 +14,7 @@ in { default = self.overlays.hyprland-qt-support; hyprland-qt-support = lib.composeManyExtensions [ + inputs.hyprlang.overlays.default (final: prev: { hyprland-qt-support = final.callPackage ./. { version = "${version}+date=${date}_${self.shortRev or "dirty"}"; diff --git a/nix/shell.nix b/nix/shell.nix index 76cc31c..2888493 100644 --- a/nix/shell.nix +++ b/nix/shell.nix @@ -2,17 +2,19 @@ pkgs ? import {}, hyprland-qt-support ? pkgs.callPackage ./default.nix {}, ... -}: pkgs.mkShell { - inputsFrom = [ hyprland-qt-support ]; - nativeBuildInputs = [ pkgs.clang-tools pkgs.parallel ]; +}: +pkgs.mkShell { + inputsFrom = [hyprland-qt-support]; + nativeBuildInputs = [pkgs.clang-tools pkgs.parallel]; shellHook = let inherit (pkgs.lib.strings) concatMapStringsSep; - qtLibPath = f: concatMapStringsSep ":" f (with pkgs.qt6; [ - qtbase - qtdeclarative - qtwayland - ]); + qtLibPath = f: + concatMapStringsSep ":" f (with pkgs.qt6; [ + qtbase + qtdeclarative + qtwayland + ]); in '' # Add Qt-related environment variables. export QT_PLUGIN_PATH=${qtLibPath (p: "${p}/lib/qt-6/plugins")}