3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/applications/misc/wbg/default.nix

67 lines
1.3 KiB
Nix
Raw Normal View History

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