treewide: alejandra -> nixfmt
This commit is contained in:
parent
d98f7ffaf5
commit
52ece2b017
8 changed files with 521 additions and 460 deletions
66
flake.nix
66
flake.nix
|
|
@ -88,23 +88,28 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = inputs @ {
|
||||
outputs =
|
||||
inputs@{
|
||||
self,
|
||||
nixpkgs,
|
||||
systems,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
eachSystem = lib.genAttrs (import systems);
|
||||
pkgsFor = eachSystem (system:
|
||||
pkgsFor = eachSystem (
|
||||
system:
|
||||
import nixpkgs {
|
||||
localSystem = system;
|
||||
overlays = with self.overlays; [
|
||||
hyprland-packages
|
||||
hyprland-extras
|
||||
];
|
||||
});
|
||||
pkgsCrossFor = eachSystem (system: crossSystem:
|
||||
}
|
||||
);
|
||||
pkgsCrossFor = eachSystem (
|
||||
system: crossSystem:
|
||||
import nixpkgs {
|
||||
localSystem = system;
|
||||
inherit crossSystem;
|
||||
|
|
@ -112,29 +117,36 @@
|
|||
hyprland-packages
|
||||
hyprland-extras
|
||||
];
|
||||
});
|
||||
pkgsDebugFor = eachSystem (system:
|
||||
}
|
||||
);
|
||||
pkgsDebugFor = eachSystem (
|
||||
system:
|
||||
import nixpkgs {
|
||||
localSystem = system;
|
||||
overlays = with self.overlays; [
|
||||
hyprland-debug
|
||||
];
|
||||
});
|
||||
pkgsDebugCrossFor = eachSystem (system: crossSystem:
|
||||
}
|
||||
);
|
||||
pkgsDebugCrossFor = eachSystem (
|
||||
system: crossSystem:
|
||||
import nixpkgs {
|
||||
localSystem = system;
|
||||
inherit crossSystem;
|
||||
overlays = with self.overlays; [
|
||||
hyprland-debug
|
||||
];
|
||||
});
|
||||
in {
|
||||
overlays = import ./nix/overlays.nix {inherit self lib inputs;};
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
overlays = import ./nix/overlays.nix { inherit self lib inputs; };
|
||||
|
||||
checks = eachSystem (system:
|
||||
(lib.filterAttrs
|
||||
(n: _: (lib.hasPrefix "hyprland" n) && !(lib.hasSuffix "debug" n))
|
||||
self.packages.${system})
|
||||
checks = eachSystem (
|
||||
system:
|
||||
(lib.filterAttrs (
|
||||
n: _: (lib.hasPrefix "hyprland" n) && !(lib.hasSuffix "debug" n)
|
||||
) self.packages.${system})
|
||||
// {
|
||||
inherit (self.packages.${system}) xdg-desktop-portal-hyprland;
|
||||
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
|
||||
|
|
@ -144,18 +156,18 @@
|
|||
enable = true;
|
||||
entry = "${self.formatter.${system}}/bin/hyprland-treewide-formatter";
|
||||
pass_filenames = false;
|
||||
excludes = ["subprojects"];
|
||||
excludes = [ "subprojects" ];
|
||||
always_run = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
// (import ./nix/tests inputs pkgsFor.${system}));
|
||||
// (import ./nix/tests inputs pkgsFor.${system})
|
||||
);
|
||||
|
||||
packages = eachSystem (system: {
|
||||
default = self.packages.${system}.hyprland;
|
||||
inherit
|
||||
(pkgsFor.${system})
|
||||
inherit (pkgsFor.${system})
|
||||
# hyprland-packages
|
||||
hyprland
|
||||
hyprland-unwrapped
|
||||
|
|
@ -170,18 +182,20 @@
|
|||
|
||||
devShells = eachSystem (system: {
|
||||
default =
|
||||
pkgsFor.${system}.mkShell.override {
|
||||
pkgsFor.${system}.mkShell.override
|
||||
{
|
||||
inherit (self.packages.${system}.default) stdenv;
|
||||
} {
|
||||
}
|
||||
{
|
||||
name = "hyprland-shell";
|
||||
hardeningDisable = ["fortify"];
|
||||
inputsFrom = [pkgsFor.${system}.hyprland];
|
||||
packages = [pkgsFor.${system}.clang-tools];
|
||||
hardeningDisable = [ "fortify" ];
|
||||
inputsFrom = [ pkgsFor.${system}.hyprland ];
|
||||
packages = [ pkgsFor.${system}.clang-tools ];
|
||||
inherit (self.checks.${system}.pre-commit-check) shellHook;
|
||||
};
|
||||
});
|
||||
|
||||
formatter = eachSystem (system: pkgsFor.${system}.callPackage ./nix/formatter.nix {});
|
||||
formatter = eachSystem (system: pkgsFor.${system}.callPackage ./nix/formatter.nix { });
|
||||
|
||||
nixosModules.default = import ./nix/module.nix inputs;
|
||||
homeManagerModules.default = import ./nix/hm-module.nix self;
|
||||
|
|
|
|||
|
|
@ -60,12 +60,23 @@
|
|||
hidpiXWayland ? false,
|
||||
legacyRenderer ? false,
|
||||
withHyprtester ? false,
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (builtins) foldl' readFile;
|
||||
inherit (lib.asserts) assertMsg;
|
||||
inherit (lib.attrsets) mapAttrsToList;
|
||||
inherit (lib.lists) flatten concatLists optional optionals;
|
||||
inherit (lib.strings) makeBinPath optionalString cmakeBool trim;
|
||||
inherit (lib.lists)
|
||||
flatten
|
||||
concatLists
|
||||
optional
|
||||
optionals
|
||||
;
|
||||
inherit (lib.strings)
|
||||
makeBinPath
|
||||
optionalString
|
||||
cmakeBool
|
||||
trim
|
||||
;
|
||||
fs = lib.fileset;
|
||||
|
||||
adapters = flatten [
|
||||
|
|
@ -75,12 +86,17 @@
|
|||
|
||||
customStdenv = foldl' (acc: adapter: adapter acc) stdenv adapters;
|
||||
in
|
||||
assert assertMsg (!nvidiaPatches) "The option `nvidiaPatches` has been removed.";
|
||||
assert assertMsg (!enableNvidiaPatches) "The option `enableNvidiaPatches` has been removed.";
|
||||
assert assertMsg (!hidpiXWayland) "The option `hidpiXWayland` has been removed. Please refer https://wiki.hypr.land/Configuring/XWayland";
|
||||
assert assertMsg (!legacyRenderer) "The option `legacyRenderer` has been removed. Legacy renderer is no longer supported.";
|
||||
assert assertMsg (!withHyprtester) "The option `withHyprtester` has been removed. Hyprtester is always built now.";
|
||||
customStdenv.mkDerivation (finalAttrs: {
|
||||
assert assertMsg (!nvidiaPatches) "The option `nvidiaPatches` has been removed.";
|
||||
assert assertMsg (!enableNvidiaPatches) "The option `enableNvidiaPatches` has been removed.";
|
||||
assert assertMsg (!hidpiXWayland)
|
||||
"The option `hidpiXWayland` has been removed. Please refer https://wiki.hypr.land/Configuring/XWayland";
|
||||
assert assertMsg (
|
||||
!legacyRenderer
|
||||
) "The option `legacyRenderer` has been removed. Legacy renderer is no longer supported.";
|
||||
assert assertMsg (
|
||||
!withHyprtester
|
||||
) "The option `withHyprtester` has been removed. Hyprtester is always built now.";
|
||||
customStdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hyprland${optionalString debug "-debug"}";
|
||||
inherit version withTests;
|
||||
|
||||
|
|
@ -90,7 +106,8 @@ in
|
|||
fs.intersection
|
||||
# allows non-flake builds to only include files tracked by git
|
||||
(fs.gitTracked ../.)
|
||||
(fs.unions (flatten [
|
||||
(
|
||||
fs.unions (flatten [
|
||||
../assets/hyprland-portals.conf
|
||||
../assets/install
|
||||
../hyprctl
|
||||
|
|
@ -106,8 +123,12 @@ in
|
|||
(fs.fileFilter (file: file.hasExt "conf" || file.hasExt "in") ../example)
|
||||
(fs.fileFilter (file: file.hasExt "sh") ../scripts)
|
||||
(fs.fileFilter (file: file.name == "CMakeLists.txt") ../.)
|
||||
(optional withTests [../tests ../hyprtester])
|
||||
]));
|
||||
(optional withTests [
|
||||
../tests
|
||||
../hyprtester
|
||||
])
|
||||
])
|
||||
);
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
|
@ -175,8 +196,8 @@ in
|
|||
wayland-protocols
|
||||
wayland-scanner
|
||||
]
|
||||
(optionals customStdenv.hostPlatform.isBSD [epoll-shim])
|
||||
(optionals customStdenv.hostPlatform.isMusl [libexecinfo])
|
||||
(optionals customStdenv.hostPlatform.isBSD [ epoll-shim ])
|
||||
(optionals customStdenv.hostPlatform.isMusl [ libexecinfo ])
|
||||
(optionals enableXWayland [
|
||||
libxcb
|
||||
libxcb-errors
|
||||
|
|
@ -190,10 +211,7 @@ in
|
|||
|
||||
strictDeps = true;
|
||||
|
||||
cmakeBuildType =
|
||||
if debug
|
||||
then "Debug"
|
||||
else "RelWithDebInfo";
|
||||
cmakeBuildType = if debug then "Debug" else "RelWithDebInfo";
|
||||
|
||||
# we want as much debug info as possible
|
||||
dontStrip = debug;
|
||||
|
|
@ -218,12 +236,14 @@ in
|
|||
postInstall = ''
|
||||
${optionalString wrapRuntimeDeps ''
|
||||
wrapProgram $out/bin/Hyprland \
|
||||
--suffix PATH : ${makeBinPath [
|
||||
--suffix PATH : ${
|
||||
makeBinPath [
|
||||
binutils
|
||||
hyprland-guiutils
|
||||
pciutils
|
||||
pkgconf
|
||||
]}
|
||||
]
|
||||
}
|
||||
''}
|
||||
|
||||
${optionalString withTests ''
|
||||
|
|
@ -235,7 +255,7 @@ in
|
|||
''}
|
||||
'';
|
||||
|
||||
passthru.providedSessions = ["hyprland"] ++ optionals withSystemd ["hyprland-uwsm"];
|
||||
passthru.providedSessions = [ "hyprland" ] ++ optionals withSystemd [ "hyprland-uwsm" ];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/hyprwm/Hyprland";
|
||||
|
|
@ -244,4 +264,4 @@ in
|
|||
platforms = lib.platforms.linux;
|
||||
mainProgram = "Hyprland";
|
||||
};
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
writeShellApplication,
|
||||
deadnix,
|
||||
statix,
|
||||
alejandra,
|
||||
nixfmt,
|
||||
llvmPackages_19,
|
||||
fd,
|
||||
}:
|
||||
|
|
@ -11,7 +11,7 @@ writeShellApplication {
|
|||
runtimeInputs = [
|
||||
deadnix
|
||||
statix
|
||||
alejandra
|
||||
nixfmt
|
||||
llvmPackages_19.clang-tools
|
||||
fd
|
||||
];
|
||||
|
|
@ -24,14 +24,14 @@ writeShellApplication {
|
|||
nix_format() {
|
||||
if [ "$*" = 0 ]; then
|
||||
fd '.*\.nix' . -E "$excludes" -x statix fix -- {} \;
|
||||
fd '.*\.nix' . -E "$excludes" -X deadnix -e -- {} \; -X alejandra {} \;
|
||||
fd '.*\.nix' . -E "$excludes" -X deadnix -e -- {} \; -X nixfmt {} \;
|
||||
elif [ -d "$1" ]; then
|
||||
fd '.*\.nix' "$1" -E "$excludes" -i -x statix fix -- {} \;
|
||||
fd '.*\.nix' "$1" -E "$excludes" -i -X deadnix -e -- {} \; -X alejandra {} \;
|
||||
fd '.*\.nix' "$1" -E "$excludes" -i -X deadnix -e -- {} \; -X nixfmt {} \;
|
||||
else
|
||||
statix fix -- "$1"
|
||||
deadnix -e "$1"
|
||||
alejandra "$1"
|
||||
nixfmt "$1"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,15 @@
|
|||
self: {
|
||||
config,
|
||||
self:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
|
||||
package = self.packages.${system}.default;
|
||||
in {
|
||||
in
|
||||
{
|
||||
config = {
|
||||
wayland.windowManager.hyprland.package = lib.mkDefault package;
|
||||
};
|
||||
|
|
|
|||
51
nix/lib.nix
51
nix/lib.nix
|
|
@ -1,4 +1,5 @@
|
|||
lib: let
|
||||
lib:
|
||||
let
|
||||
inherit (lib)
|
||||
attrNames
|
||||
filterAttrs
|
||||
|
|
@ -81,15 +82,23 @@ lib: let
|
|||
|
||||
:::
|
||||
*/
|
||||
toHyprlang = {
|
||||
topCommandsPrefixes ? ["$" "bezier"],
|
||||
bottomCommandsPrefixes ? [],
|
||||
}: attrs: let
|
||||
toHyprlang' = attrs: let
|
||||
toHyprlang =
|
||||
{
|
||||
topCommandsPrefixes ? [
|
||||
"$"
|
||||
"bezier"
|
||||
],
|
||||
bottomCommandsPrefixes ? [ ],
|
||||
}:
|
||||
attrs:
|
||||
let
|
||||
toHyprlang' =
|
||||
attrs:
|
||||
let
|
||||
# Specially configured `toKeyValue` generator with support for duplicate keys
|
||||
# and a legible key-value separator.
|
||||
mkCommands = generators.toKeyValue {
|
||||
mkKeyValue = generators.mkKeyValueDefault {} " = ";
|
||||
mkKeyValue = generators.mkKeyValueDefault { } " = ";
|
||||
listsAsDuplicateKeys = true;
|
||||
indent = ""; # No indent, since we don't have nesting
|
||||
};
|
||||
|
|
@ -99,8 +108,7 @@ lib: let
|
|||
commands = flattenAttrs (p: k: "${p}:${k}") attrs;
|
||||
|
||||
# General filtering function to check if a key starts with any prefix in a given list.
|
||||
filterCommands = list: n:
|
||||
foldl (acc: prefix: acc || hasPrefix prefix n) false list;
|
||||
filterCommands = list: n: foldl (acc: prefix: acc || hasPrefix prefix n) false list;
|
||||
|
||||
# Partition keys into top commands and the rest
|
||||
result = partition (filterCommands topCommandsPrefixes) (attrNames commands);
|
||||
|
|
@ -174,25 +182,20 @@ lib: let
|
|||
```
|
||||
|
||||
:::
|
||||
|
||||
*/
|
||||
flattenAttrs = pred: attrs: let
|
||||
flattenAttrs' = prefix: attrs:
|
||||
flattenAttrs =
|
||||
pred: attrs:
|
||||
let
|
||||
flattenAttrs' =
|
||||
prefix: attrs:
|
||||
builtins.foldl' (
|
||||
acc: key: let
|
||||
acc: key:
|
||||
let
|
||||
value = attrs.${key};
|
||||
newKey =
|
||||
if prefix == ""
|
||||
then key
|
||||
else pred prefix key;
|
||||
newKey = if prefix == "" then key else pred prefix key;
|
||||
in
|
||||
acc
|
||||
// (
|
||||
if builtins.isAttrs value
|
||||
then flattenAttrs' newKey value
|
||||
else {"${newKey}" = value;}
|
||||
)
|
||||
) {} (builtins.attrNames attrs);
|
||||
acc // (if builtins.isAttrs value then flattenAttrs' newKey value else { "${newKey}" = value; })
|
||||
) { } (builtins.attrNames attrs);
|
||||
in
|
||||
flattenAttrs' "" attrs;
|
||||
in
|
||||
|
|
|
|||
|
|
@ -1,18 +1,21 @@
|
|||
inputs: {
|
||||
inputs:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
inherit (pkgs.stdenv.hostPlatform) system;
|
||||
selflib = import ./lib.nix lib;
|
||||
cfg = config.programs.hyprland;
|
||||
in {
|
||||
in
|
||||
{
|
||||
options = {
|
||||
programs.hyprland = {
|
||||
plugins = lib.mkOption {
|
||||
type = with lib.types; listOf (either package path);
|
||||
default = [];
|
||||
default = [ ];
|
||||
description = ''
|
||||
List of Hyprland plugins to use. Can either be packages or
|
||||
absolute plugin paths.
|
||||
|
|
@ -20,7 +23,9 @@ in {
|
|||
};
|
||||
|
||||
settings = lib.mkOption {
|
||||
type = with lib.types; let
|
||||
type =
|
||||
with lib.types;
|
||||
let
|
||||
valueType =
|
||||
nullOr (oneOf [
|
||||
bool
|
||||
|
|
@ -36,7 +41,7 @@ in {
|
|||
};
|
||||
in
|
||||
valueType;
|
||||
default = {};
|
||||
default = { };
|
||||
description = ''
|
||||
Hyprland configuration written in Nix. Entries with the same key
|
||||
should be written as lists. Variables' and colors' names should be
|
||||
|
|
@ -92,8 +97,15 @@ in {
|
|||
|
||||
topPrefixes = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
default = ["$" "bezier"];
|
||||
example = ["$" "bezier" "source"];
|
||||
default = [
|
||||
"$"
|
||||
"bezier"
|
||||
];
|
||||
example = [
|
||||
"$"
|
||||
"bezier"
|
||||
"source"
|
||||
];
|
||||
description = ''
|
||||
List of prefix of attributes to put at the top of the config.
|
||||
'';
|
||||
|
|
@ -101,8 +113,8 @@ in {
|
|||
|
||||
bottomPrefixes = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
default = [];
|
||||
example = ["source"];
|
||||
default = [ ];
|
||||
example = [ "source" ];
|
||||
description = ''
|
||||
List of prefix of attributes to put at the bottom of the config.
|
||||
'';
|
||||
|
|
@ -117,20 +129,22 @@ in {
|
|||
};
|
||||
}
|
||||
(lib.mkIf cfg.enable {
|
||||
environment.etc."xdg/hypr/hyprland.conf" = let
|
||||
shouldGenerate = cfg.extraConfig != "" || cfg.settings != {} || cfg.plugins != [];
|
||||
environment.etc."xdg/hypr/hyprland.conf" =
|
||||
let
|
||||
shouldGenerate = cfg.extraConfig != "" || cfg.settings != { } || cfg.plugins != [ ];
|
||||
|
||||
pluginsToHyprlang = plugins:
|
||||
selflib.toHyprlang {
|
||||
pluginsToHyprlang =
|
||||
_plugins:
|
||||
selflib.toHyprlang
|
||||
{
|
||||
topCommandsPrefixes = cfg.topPrefixes;
|
||||
bottomCommandsPrefixes = cfg.bottomPrefixes;
|
||||
}
|
||||
{
|
||||
"exec-once" = let
|
||||
mkEntry = entry:
|
||||
if lib.types.package.check entry
|
||||
then "${entry}/lib/lib${entry.pname}.so"
|
||||
else entry;
|
||||
"exec-once" =
|
||||
let
|
||||
mkEntry =
|
||||
entry: if lib.types.package.check entry then "${entry}/lib/lib${entry.pname}.so" else entry;
|
||||
hyprctl = lib.getExe' config.programs.hyprland.package "hyprctl";
|
||||
in
|
||||
map (p: "${hyprctl} plugin load ${mkEntry p}") cfg.plugins;
|
||||
|
|
@ -138,14 +152,13 @@ in {
|
|||
in
|
||||
lib.mkIf shouldGenerate {
|
||||
text =
|
||||
lib.optionalString (cfg.plugins != [])
|
||||
(pluginsToHyprlang cfg.plugins)
|
||||
+ lib.optionalString (cfg.settings != {})
|
||||
(selflib.toHyprlang {
|
||||
lib.optionalString (cfg.plugins != [ ]) (pluginsToHyprlang cfg.plugins)
|
||||
+ lib.optionalString (cfg.settings != { }) (
|
||||
selflib.toHyprlang {
|
||||
topCommandsPrefixes = cfg.topPrefixes;
|
||||
bottomCommandsPrefixes = cfg.bottomPrefixes;
|
||||
}
|
||||
cfg.settings)
|
||||
} cfg.settings
|
||||
)
|
||||
+ lib.optionalString (cfg.extraConfig != "") cfg.extraConfig;
|
||||
};
|
||||
})
|
||||
|
|
|
|||
|
|
@ -2,20 +2,27 @@
|
|||
self,
|
||||
lib,
|
||||
inputs,
|
||||
}: let
|
||||
mkDate = longDate: (lib.concatStringsSep "-" [
|
||||
}:
|
||||
let
|
||||
mkDate =
|
||||
longDate:
|
||||
(lib.concatStringsSep "-" [
|
||||
(builtins.substring 0 4 longDate)
|
||||
(builtins.substring 4 2 longDate)
|
||||
(builtins.substring 6 2 longDate)
|
||||
]);
|
||||
ver = lib.removeSuffix "\n" (builtins.readFile ../VERSION);
|
||||
in {
|
||||
in
|
||||
{
|
||||
# Contains what a user is most likely to care about:
|
||||
# Hyprland itself, XDPH and the Share Picker.
|
||||
default = lib.composeManyExtensions (with self.overlays; [
|
||||
default = lib.composeManyExtensions (
|
||||
with self.overlays;
|
||||
[
|
||||
hyprland-packages
|
||||
hyprland-extras
|
||||
]);
|
||||
]
|
||||
);
|
||||
|
||||
# Packages for variations of Hyprland, dependencies included.
|
||||
hyprland-packages = lib.composeManyExtensions [
|
||||
|
|
@ -33,49 +40,45 @@ in {
|
|||
self.overlays.glaze
|
||||
|
||||
# Hyprland packages themselves
|
||||
(final: _prev: let
|
||||
(
|
||||
final: _prev:
|
||||
let
|
||||
date = mkDate (self.lastModifiedDate or "19700101");
|
||||
version = "${ver}+date=${date}_${self.shortRev or "dirty"}";
|
||||
in {
|
||||
in
|
||||
{
|
||||
hyprland = final.callPackage ./default.nix {
|
||||
stdenv = final.gcc15Stdenv;
|
||||
commit = self.rev or "";
|
||||
revCount = self.sourceInfo.revCount or "";
|
||||
inherit date version;
|
||||
};
|
||||
hyprland-unwrapped = final.hyprland.override {wrapRuntimeDeps = false;};
|
||||
hyprland-unwrapped = final.hyprland.override { wrapRuntimeDeps = false; };
|
||||
|
||||
hyprland-with-tests = final.hyprland.override {withTests = true;};
|
||||
hyprland-with-tests = final.hyprland.override { withTests = true; };
|
||||
|
||||
hyprland-with-hyprtester =
|
||||
builtins.trace ''
|
||||
hyprland-with-hyprtester = builtins.trace ''
|
||||
hyprland-with-hyprtester was removed. Please use the hyprland package.
|
||||
Hyprtester is always built now.
|
||||
''
|
||||
final.hyprland;
|
||||
'' final.hyprland;
|
||||
|
||||
# deprecated packages
|
||||
hyprland-legacy-renderer =
|
||||
builtins.trace ''
|
||||
hyprland-legacy-renderer = builtins.trace ''
|
||||
hyprland-legacy-renderer was removed. Please use the hyprland package.
|
||||
Legacy renderer is no longer supported.
|
||||
''
|
||||
final.hyprland;
|
||||
'' final.hyprland;
|
||||
|
||||
hyprland-nvidia =
|
||||
builtins.trace ''
|
||||
hyprland-nvidia = builtins.trace ''
|
||||
hyprland-nvidia was removed. Please use the hyprland package.
|
||||
Nvidia patches are no longer needed.
|
||||
''
|
||||
final.hyprland;
|
||||
'' final.hyprland;
|
||||
|
||||
hyprland-hidpi =
|
||||
builtins.trace ''
|
||||
hyprland-hidpi = builtins.trace ''
|
||||
hyprland-hidpi was removed. Please use the hyprland package.
|
||||
For more information, refer to https://wiki.hypr.land/Configuring/XWayland.
|
||||
''
|
||||
final.hyprland;
|
||||
})
|
||||
'' final.hyprland;
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
# Debug
|
||||
|
|
@ -83,10 +86,10 @@ in {
|
|||
# Dependencies
|
||||
self.overlays.hyprland-packages
|
||||
|
||||
(final: prev: {
|
||||
aquamarine = prev.aquamarine.override {debug = true;};
|
||||
hyprutils = prev.hyprutils.override {debug = true;};
|
||||
hyprland-debug = prev.hyprland.override {debug = true;};
|
||||
(_final: prev: {
|
||||
aquamarine = prev.aquamarine.override { debug = true; };
|
||||
hyprutils = prev.hyprutils.override { debug = true; };
|
||||
hyprland-debug = prev.hyprland.override { debug = true; };
|
||||
})
|
||||
];
|
||||
|
||||
|
|
@ -100,7 +103,8 @@ in {
|
|||
# this version is the one used in the git submodule, and allows us to
|
||||
# fetch the source without '?submodules=1'
|
||||
udis86 = final: prev: {
|
||||
udis86-hyprland = prev.udis86.overrideAttrs (_self: _super: {
|
||||
udis86-hyprland = prev.udis86.overrideAttrs (
|
||||
_self: _super: {
|
||||
src = final.fetchFromGitHub {
|
||||
owner = "canihavesomecoffee";
|
||||
repo = "udis86";
|
||||
|
|
@ -108,13 +112,14 @@ in {
|
|||
hash = "sha256-HifdUQPGsKQKQprByeIznvRLONdOXeolOsU5nkwIv3g=";
|
||||
};
|
||||
|
||||
patches = [];
|
||||
});
|
||||
patches = [ ];
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
# Even though glaze itself disables it by default, nixpkgs sets ENABLE_SSL set to true.
|
||||
# Since we don't include openssl, the build failes without the `enableSSL = false;` override
|
||||
glaze = final: prev: {
|
||||
glaze = _final: prev: {
|
||||
glaze-hyprland = prev.glaze.override {
|
||||
enableSSL = false;
|
||||
enableInterop = false;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
inputs: pkgs: let
|
||||
inputs: pkgs:
|
||||
let
|
||||
flake = inputs.self.packages.${pkgs.stdenv.hostPlatform.system};
|
||||
hyprland = flake.hyprland-with-tests;
|
||||
in {
|
||||
in
|
||||
{
|
||||
tests = pkgs.testers.runNixOSTest {
|
||||
name = "hyprland-tests";
|
||||
|
||||
nodes.machine = {pkgs, ...}: {
|
||||
nodes.machine =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Programs needed for tests
|
||||
jq
|
||||
|
|
@ -63,7 +67,7 @@ in {
|
|||
};
|
||||
|
||||
# Doesn't seem to do much, thought it would fix XWayland crashing
|
||||
qemu.options = ["-vga none -device virtio-gpu-pci"];
|
||||
qemu.options = [ "-vga none -device virtio-gpu-pci" ];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue