From 7580fbb4be6fa9ef922bd3b1b90aecefffc91616 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Wed, 5 Jan 2022 18:07:41 -0300 Subject: [PATCH] berry: 0.1.7 -> 0.1.9 --- .../window-managers/berry/default.nix | 44 +++++++++++++------ 1 file changed, 31 insertions(+), 13 deletions(-) diff --git a/pkgs/applications/window-managers/berry/default.nix b/pkgs/applications/window-managers/berry/default.nix index b2d28ca55f23..23aa8ff8201e 100644 --- a/pkgs/applications/window-managers/berry/default.nix +++ b/pkgs/applications/window-managers/berry/default.nix @@ -1,24 +1,35 @@ -{ lib, stdenv +{ lib +, stdenv , fetchFromGitHub +, copyDesktopItems +, fontconfig +, freetype , libX11 , libXext , libXft , libXinerama -, fontconfig -, freetype +, makeDesktopItem +, pkg-config +, which }: stdenv.mkDerivation rec { pname = "berry"; - version = "0.1.7"; + version = "0.1.9"; src = fetchFromGitHub { owner = "JLErvin"; repo = pname; rev = version; - sha256 = "sha256-2kFVOE5l1KQvDb5KDL7y0p4M7awJLrxJF871cyc0YZ8="; + hash = "sha256-E1kjqSv2eylJ/9EGcxQrJ2P7VaehyUiirk0TxlPWSnM="; }; + nativeBuildInputs = [ + copyDesktopItems + pkg-config + which + ]; + buildInputs =[ libX11 libXext @@ -28,16 +39,21 @@ stdenv.mkDerivation rec { freetype ]; - preBuild = '' - makeFlagsArray+=( PREFIX="${placeholder "out"}" - X11INC="${libX11.dev}/include" - X11LIB="${libX11}/lib" - XINERAMALIBS="-lXinerama" - XINERAMAFLAGS="-DXINERAMA" - FREETYPELIBS="-lfontconfig -lXft" - FREETYPEINC="${freetype.dev}/include/freetype2" ) + preConfigure = '' + patchShebangs configure ''; + desktopItems = [ + (makeDesktopItem { + name = pname; + exec = "berry"; + comment = meta.description; + desktopName = "Berry Window Manager"; + genericName = "Berry Window Manager"; + categories = "Utility;"; + }) + ]; + meta = with lib; { description = "A healthy, bite-sized window manager"; longDescription = '' @@ -59,3 +75,5 @@ stdenv.mkDerivation rec { platforms = platforms.linux; }; } +# TODO: report upstream that `which` is not POSIX; the `command` shell builtin +# should be used instead