Merge pull request #133078 from polykernel/fuzzel-patch-1

This commit is contained in:
Sandro 2021-08-08 06:12:14 +02:00 committed by GitHub
commit ce5dfe63f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,22 +1,75 @@
{ stdenv, lib, fetchzip, pkg-config, meson, ninja, wayland, pixman, cairo, librsvg, wayland-protocols, wlroots, libxkbcommon, scdoc, git, tllist, fcft}:
{ stdenv
, lib
, fetchFromGitea
, pkg-config
, meson
, ninja
, wayland-scanner
, wayland
, pixman
, wayland-protocols
, libxkbcommon
, scdoc
, tllist
, fcft
, enableCairo ? true
, enablePNG ? true
, enableSVG ? true
# Optional dependencies
, cairo
, librsvg
, libpng
}:
let
# Courtesy of sternenseemann and FRidh, commit c9a7fdfcfb420be8e0179214d0d91a34f5974c54
mesonFeatureFlag = opt: b: "-D${opt}=${if b then "enabled" else "disabled"}";
in
stdenv.mkDerivation rec {
pname = "fuzzel";
version = "1.6.1";
src = fetchzip {
url = "https://codeberg.org/dnkl/fuzzel/archive/${version}.tar.gz";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "dnkl";
repo = "fuzzel";
rev = version;
sha256 = "sha256-JW5sAlTprSRIdFbmSaUreGtNccERgQMGEW+WCSscYQk=";
};
nativeBuildInputs = [ pkg-config meson ninja scdoc git ];
buildInputs = [ wayland pixman cairo librsvg wayland-protocols wlroots libxkbcommon tllist fcft ];
nativeBuildInputs = [
pkg-config
wayland-scanner
meson
ninja
scdoc
];
buildInputs = [
wayland
pixman
wayland-protocols
libxkbcommon
tllist
fcft
] ++ lib.optional enableCairo cairo
++ lib.optional enablePNG libpng
++ lib.optional enableSVG librsvg;
mesonBuildType = "release";
mesonFlags = [
(mesonFeatureFlag "enable-cairo" enableCairo)
(mesonFeatureFlag "enable-png" enablePNG)
(mesonFeatureFlag "enable-svg" enableSVG)
];
meta = with lib; {
description = "Wayland-native application launcher, similar to rofis drun mode";
homepage = "https://codeberg.org/dnkl/fuzzel";
license = licenses.mit;
maintainers = with maintainers; [ fionera ];
maintainers = with maintainers; [ fionera polykernel ];
platforms = with platforms; linux;
changelog = "https://codeberg.org/dnkl/fuzzel/releases/tag/${version}";
};