From e12985318cc082ad018e1b283480dbc7229004e5 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Thu, 8 Jul 2021 14:12:02 +0200 Subject: [PATCH] afterstep: Fix libSM usage & build on non-NixOS Linux --- .../window-managers/afterstep/default.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/window-managers/afterstep/default.nix b/pkgs/applications/window-managers/afterstep/default.nix index fbb4a7a5e49..ec7d3ae5004 100644 --- a/pkgs/applications/window-managers/afterstep/default.nix +++ b/pkgs/applications/window-managers/afterstep/default.nix @@ -1,7 +1,7 @@ { lib, stdenv, fetchurl, pkg-config -, libjpeg, libtiff, libpng, freetype +, libtiff , fltk, gtk -, libX11, libXext, libICE +, libICE, libSM , dbus , fetchpatch }: @@ -24,8 +24,16 @@ stdenv.mkDerivation rec { }) ]; + postPatch = '' + # Causes fatal ldconfig cache generation attempt on non-NixOS Linux + for mkfile in autoconf/Makefile.common.lib.in libAfter{Base,Image}/Makefile.in; do + substituteInPlace $mkfile \ + --replace 'test -w /etc' 'false' + done + ''; + nativeBuildInputs = [ pkg-config ]; - buildInputs = [ libjpeg libtiff libpng freetype fltk gtk libX11 libXext libICE dbus dbus ]; + buildInputs = [ libtiff fltk gtk libICE libSM dbus ]; # A strange type of bug: dbus is not immediately found by pkg-config preConfigure = ''