2022-11-04 12:27:35 +00:00
|
|
|
{ lib
|
|
|
|
, buildGoModule
|
|
|
|
, fetchFromGitHub
|
2021-12-06 16:07:01 +00:00
|
|
|
, pkg-config
|
2022-11-04 12:27:35 +00:00
|
|
|
, wayland
|
|
|
|
, libX11
|
|
|
|
, xbitmaps
|
|
|
|
, libXcursor
|
|
|
|
, libXmu
|
|
|
|
, libXpm
|
|
|
|
, libheif
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
buildGoModule rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "wallutils";
|
2022-11-04 12:27:35 +00:00
|
|
|
version = "5.12.4";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "xyproto";
|
|
|
|
repo = "wallutils";
|
|
|
|
rev = version;
|
2022-11-04 12:27:35 +00:00
|
|
|
sha256 = "sha256-NODG4Lw/7X1aoT+dDSWxWEbDX6EAQzzDJPwsWOLaJEM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
vendorSha256 = null;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
patches = [ ./lscollection-Add-NixOS-paths-to-DefaultWallpaperDirectories.patch ];
|
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
excludedPackages = [
|
|
|
|
"./pkg/event/cmd" # Development tools
|
|
|
|
];
|
|
|
|
|
|
|
|
ldflags = [ "-s" "-w" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ wayland libX11 xbitmaps libXcursor libXmu libXpm libheif ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
preCheck =
|
|
|
|
let skippedTests = [
|
|
|
|
"TestClosest" # Requiring Wayland or X.
|
|
|
|
"TestNewSimpleEvent" # Blocking
|
|
|
|
"TestEveryMinute" # Blocking
|
|
|
|
]; in
|
|
|
|
''
|
|
|
|
export XDG_RUNTIME_DIR=`mktemp -d`
|
|
|
|
|
|
|
|
buildFlagsArray+=("-run" "[^(${builtins.concatStringsSep "|" skippedTests})]")
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Utilities for handling monitors, resolutions, and (timed) wallpapers";
|
|
|
|
inherit (src.meta) homepage;
|
2022-11-04 12:27:35 +00:00
|
|
|
license = licenses.bsd3;
|
2021-12-06 16:07:01 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|