Commit cd9bb3a2 authored by Anderson Torres's avatar Anderson Torres
Browse files

dwl: nixfmt-rfc-style

parent b3d40c2a
Loading
Loading
Loading
Loading
+45 −38
Original line number Diff line number Diff line
{ 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,7 +38,8 @@ stdenv.mkDerivation (finalAttrs: {
    wayland-scanner
  ];

  buildInputs = [
  buildInputs =
    [
      libinput
      libxcb
      libxkbcommon
@@ -45,20 +47,25 @@ stdenv.mkDerivation (finalAttrs: {
      wayland
      wayland-protocols
      wlroots
  ] ++ lib.optionals enableXWayland [
    ]
    ++ 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"