Unverified Commit 7fdb86a6 authored by Sandro Jäckel's avatar Sandro Jäckel Committed by GitHub
Browse files

dwm: fix static build (#420689)

parents aebfe37d 15d2f6c2
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@
  libXinerama,
  libXft,
  writeText,
  pkg-config,
  patches ? [ ],
  conf ? null,
  # update script dependencies
@@ -21,6 +22,8 @@ stdenv.mkDerivation rec {
    sha256 = "sha256-Ideev6ny+5MUGDbCZmy4H0eExp1k5/GyNS+blwuglyk=";
  };

  nativeBuildInputs = lib.optional stdenv.hostPlatform.isStatic pkg-config;

  buildInputs = [
    libX11
    libXinerama
@@ -31,6 +34,10 @@ stdenv.mkDerivation rec {
    sed -i "s@/usr/local@$out@" config.mk
  '';

  preBuild = lib.optional stdenv.hostPlatform.isStatic ''
    makeFlagsArray+=(LDFLAGS="$(${stdenv.cc.targetPrefix}pkg-config --static --libs x11 xinerama xft)")
  '';

  # Allow users set their own list of patches
  inherit patches;