From cd9bb3a278c33115ebbcaf14e7ceb8e3a57e6b64 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Sat, 27 Jul 2024 11:57:02 -0300 Subject: [PATCH] dwl: nixfmt-rfc-style --- pkgs/by-name/dw/dwl/package.nix | 83 ++++++++++++++++++--------------- 1 file changed, 45 insertions(+), 38 deletions(-) diff --git a/pkgs/by-name/dw/dwl/package.nix b/pkgs/by-name/dw/dwl/package.nix index 65ea637d6de1..8f2a178aa263 100644 --- a/pkgs/by-name/dw/dwl/package.nix +++ b/pkgs/by-name/dw/dwl/package.nix @@ -1,22 +1,23 @@ -{ lib -, stdenv -, fetchFromGitea -, installShellFiles -, libX11 -, libinput -, libxcb -, libxkbcommon -, pixman -, pkg-config -, wayland-scanner -, wayland -, wayland-protocols -, wlroots -, writeText -, xcbutilwm -, xwayland -, enableXWayland ? true -, conf ? null +{ + lib, + stdenv, + fetchFromGitea, + installShellFiles, + libX11, + libinput, + libxcb, + libxkbcommon, + pixman, + pkg-config, + wayland-scanner, + wayland, + wayland-protocols, + wlroots, + writeText, + xcbutilwm, + xwayland, + enableXWayland ? true, + conf ? null, }: stdenv.mkDerivation (finalAttrs: { @@ -37,28 +38,34 @@ stdenv.mkDerivation (finalAttrs: { wayland-scanner ]; - buildInputs = [ - libinput - libxcb - libxkbcommon - pixman - wayland - wayland-protocols - wlroots - ] ++ lib.optionals enableXWayland [ - libX11 - xcbutilwm - xwayland + buildInputs = + [ + libinput + libxcb + libxkbcommon + pixman + wayland + wayland-protocols + wlroots + ] + ++ lib.optionals enableXWayland [ + libX11 + xcbutilwm + xwayland + ]; + + outputs = [ + "out" + "man" ]; - outputs = [ "out" "man" ]; - # Allow users to set an alternative config.def.h - postPatch = let - configFile = if lib.isDerivation conf || builtins.isPath conf - then conf - else writeText "config.def.h" conf; - in lib.optionalString (conf != null) "cp ${configFile} config.def.h"; + postPatch = + let + configFile = + if lib.isDerivation conf || builtins.isPath conf then conf else writeText "config.def.h" conf; + in + lib.optionalString (conf != null) "cp ${configFile} config.def.h"; makeFlags = [ "PKG_CONFIG=${stdenv.cc.targetPrefix}pkg-config"