mirror of
https://github.com/hyprwm/hyprlock.git
synced 2026-05-09 06:18:01 +02:00
cleanup nix test-meta derivation
This commit is contained in:
parent
79059c4409
commit
fd5e702478
2 changed files with 3 additions and 17 deletions
|
|
@ -11,18 +11,10 @@
|
|||
wayland-scanner,
|
||||
version ? "git",
|
||||
}: let
|
||||
inherit (lib.lists) flatten foldl';
|
||||
inherit (lib.sources) cleanSourceWith cleanSource;
|
||||
inherit (lib.strings) hasSuffix cmakeBool;
|
||||
|
||||
adapters = flatten [
|
||||
stdenvAdapters.useMoldLinker
|
||||
stdenvAdapters.keepDebugInfo
|
||||
];
|
||||
|
||||
customStdenv = foldl' (acc: adapter: adapter acc) stdenv adapters;
|
||||
inherit (lib.strings) hasSuffix;
|
||||
in
|
||||
customStdenv.mkDerivation (finalAttrs: {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hyprlock-test-meta";
|
||||
inherit version;
|
||||
|
||||
|
|
@ -40,20 +32,14 @@ in
|
|||
hyprwayland-scanner
|
||||
pkg-config
|
||||
wayland-scanner
|
||||
egl-wayland
|
||||
];
|
||||
|
||||
buildInputs = hyprlock.buildInputs;
|
||||
|
||||
cmakeBuildType = "Debug";
|
||||
|
||||
cmakeFlags = [(cmakeBool "TESTS" true)];
|
||||
|
||||
meta = {
|
||||
homepage = "https://github.com/hyprwm/hyprlock";
|
||||
description = "Hyprlock testing utility";
|
||||
license = lib.licenses.bsd3;
|
||||
platforms = hyprlock.meta.platforms;
|
||||
mainProgram = "wait-for-lock";
|
||||
};
|
||||
})
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ in {
|
|||
hyprlock_cmd = f"${lib.getExe' pkgs.apitrace "apitrace"} trace --output {log_file_path}.trace --api egl {hyprlock_cmd}"
|
||||
machine.execute(f"hyprctl --instance 0 dispatch exec '{hyprlock_cmd}'")
|
||||
|
||||
wait_for_lock_exit_status, out = machine.execute("WAYLAND_DISPLAY=wayland-1 ${flake.hyprlock-test-meta}/bin/wait-for-lock")
|
||||
wait_for_lock_exit_status, out = machine.execute("WAYLAND_DISPLAY=wayland-1 ${lib.getExe' flake.hyprlock-test-meta "wait-for-lock"}")
|
||||
print(f"Wait for lock exit code: {wait_for_lock_exit_status}")
|
||||
if wait_for_lock_exit_status != 0:
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue