2021-02-13 14:23:35 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
2021-08-08 23:34:03 +00:00
|
|
|
, fetchFromGitea
|
|
|
|
, pkg-config
|
2021-02-13 14:23:35 +00:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pixman
|
|
|
|
, tllist
|
|
|
|
, wayland
|
2021-08-08 23:34:03 +00:00
|
|
|
, wayland-scanner
|
2021-02-13 14:23:35 +00:00
|
|
|
, wayland-protocols
|
2021-08-08 23:34:03 +00:00
|
|
|
, enablePNG ? true
|
|
|
|
, enableJPEG ? true
|
|
|
|
# Optional dependencies
|
|
|
|
, libpng
|
|
|
|
, libjpeg
|
2021-02-13 14:23:35 +00:00
|
|
|
}:
|
|
|
|
|
2021-08-08 23:34:03 +00:00
|
|
|
let
|
|
|
|
# Courtesy of sternenseemann and FRidh, commit c9a7fdfcfb420be8e0179214d0d91a34f5974c54
|
2022-11-21 17:40:18 +00:00
|
|
|
mesonFeatureFlag = feature: flag:
|
|
|
|
"-D${feature}=${if flag then "enabled" else "disabled"}";
|
2021-08-08 23:34:03 +00:00
|
|
|
in
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "wbg";
|
2021-08-08 23:34:03 +00:00
|
|
|
version = "1.0.2";
|
2021-02-13 14:23:35 +00:00
|
|
|
|
2021-08-08 23:34:03 +00:00
|
|
|
src = fetchFromGitea {
|
|
|
|
domain = "codeberg.org";
|
|
|
|
owner = "dnkl";
|
|
|
|
repo = "wbg";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-PKEOWRcSAB4Uv5TfameQIEZh6s6xCGdyoZ13etL1TKA=";
|
2021-02-13 14:23:35 +00:00
|
|
|
};
|
|
|
|
|
2021-08-08 23:34:03 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
wayland-scanner
|
|
|
|
];
|
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
buildInputs = [
|
|
|
|
pixman
|
|
|
|
tllist
|
|
|
|
wayland
|
|
|
|
wayland-protocols
|
2021-08-08 23:34:03 +00:00
|
|
|
] ++ lib.optional enablePNG libpng
|
|
|
|
++ lib.optional enableJPEG libjpeg;
|
|
|
|
|
|
|
|
mesonBuildType = "release";
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
(mesonFeatureFlag "png" enablePNG)
|
|
|
|
(mesonFeatureFlag "jpeg" enableJPEG)
|
2021-02-13 14:23:35 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Wallpaper application for Wayland compositors";
|
|
|
|
homepage = "https://codeberg.org/dnkl/wbg";
|
2021-08-08 23:34:03 +00:00
|
|
|
changelog = "https://codeberg.org/dnkl/wbg/releases/tag/${version}";
|
2021-02-13 14:23:35 +00:00
|
|
|
license = licenses.isc;
|
|
|
|
maintainers = with maintainers; [ AndersonTorres ];
|
|
|
|
platforms = with platforms; linux;
|
|
|
|
};
|
|
|
|
}
|