From 40dc8633ec657c089a3b3ba14790e453737368f3 Mon Sep 17 00:00:00 2001 From: SailorSnoW Date: Fri, 12 Sep 2025 00:38:38 +0200 Subject: [PATCH] import gpu-screen-recorder only on x86_64 --- flake.nix | 165 +++++++++++++++++++++++++++++------------------------- 1 file changed, 90 insertions(+), 75 deletions(-) diff --git a/flake.nix b/flake.nix index 29a5921..cdb0de6 100644 --- a/flake.nix +++ b/flake.nix @@ -11,81 +11,96 @@ }; }; - outputs = { - self, - nixpkgs, - systems, - quickshell, - ... - }: let - eachSystem = nixpkgs.lib.genAttrs (import systems); - in { - formatter = eachSystem ( - system: - nixpkgs.legacyPackages.${system}.alejandra - ); + outputs = + { + self, + nixpkgs, + systems, + quickshell, + ... + }: + let + eachSystem = nixpkgs.lib.genAttrs (import systems); + in + { + formatter = eachSystem (system: nixpkgs.legacyPackages.${system}.alejandra); - packages = eachSystem ( - system: let - pkgs = nixpkgs.legacyPackages.${system}; - qs = quickshell.packages.${system}.default.override { - withX11 = false; - withI3 = false; - }; - - runtimeDeps = with pkgs; [ - bash - bluez - brightnessctl - cava - cliphist - coreutils - ddcutil - file - findutils - gpu-screen-recorder - libnotify - matugen - networkmanager - wl-clipboard - ]; - - fontconfig = pkgs.makeFontsConf { - fontDirectories = [ - pkgs.roboto - pkgs.inter-nerdfont - ]; - }; - in { - default = pkgs.stdenv.mkDerivation { - pname = "noctalia-shell"; - version = self.rev or self.dirtyRev or "dirty"; - src = ./.; - - nativeBuildInputs = [pkgs.gcc pkgs.makeWrapper pkgs.qt6.wrapQtAppsHook]; - buildInputs = [qs pkgs.xkeyboard-config pkgs.qt6.qtbase]; - propagatedBuildInputs = runtimeDeps; - - installPhase = '' - mkdir -p $out/share/noctalia-shell - cp -r ./* $out/share/noctalia-shell - - makeWrapper ${qs}/bin/qs $out/bin/noctalia-shell \ - --prefix PATH : "${pkgs.lib.makeBinPath runtimeDeps}" \ - --set FONTCONFIG_FILE "${fontconfig}" \ - --add-flags "-p $out/share/noctalia-shell" - ''; - - meta = { - description = "A sleek and minimal desktop shell thoughtfully crafted for Wayland, built with Quickshell."; - homepage = "https://github.com/noctalia-dev/noctalia-shell"; - license = pkgs.lib.licenses.mit; - mainProgram = "noctalia-shell"; + packages = eachSystem ( + system: + let + pkgs = nixpkgs.legacyPackages.${system}; + qs = quickshell.packages.${system}.default.override { + withX11 = false; + withI3 = false; }; - }; - } - ); - defaultPackage = eachSystem (system: self.packages.${system}.default); - }; -} \ No newline at end of file + runtimeDeps = + with pkgs; + [ + bash + bluez + brightnessctl + cava + cliphist + coreutils + ddcutil + file + findutils + libnotify + matugen + networkmanager + wl-clipboard + ] + ++ lib.optionals (pkgs.stdenv.hostPlatform.isx86_64) [ + gpu-screen-recorder + ]; + + fontconfig = pkgs.makeFontsConf { + fontDirectories = [ + pkgs.roboto + pkgs.inter-nerdfont + ]; + }; + in + { + default = pkgs.stdenv.mkDerivation { + pname = "noctalia-shell"; + version = self.rev or self.dirtyRev or "dirty"; + src = ./.; + + nativeBuildInputs = [ + pkgs.gcc + pkgs.makeWrapper + pkgs.qt6.wrapQtAppsHook + ]; + buildInputs = [ + qs + pkgs.xkeyboard-config + pkgs.qt6.qtbase + ]; + propagatedBuildInputs = runtimeDeps; + + installPhase = '' + mkdir -p $out/share/noctalia-shell + cp -r ./* $out/share/noctalia-shell + + makeWrapper ${qs}/bin/qs $out/bin/noctalia-shell \ + --prefix PATH : "${pkgs.lib.makeBinPath runtimeDeps}" \ + --set FONTCONFIG_FILE "${fontconfig}" \ + --add-flags "-p $out/share/noctalia-shell" + ''; + + meta = { + description = "A sleek and minimal desktop shell thoughtfully crafted for Wayland, built with Quickshell."; + homepage = "https://github.com/noctalia-dev/noctalia-shell"; + license = pkgs.lib.licenses.mit; + mainProgram = "noctalia-shell"; + }; + }; + } + ); + + defaultPackage = eachSystem (system: self.packages.${system}.default); + }; +} +