pkgsStatic.xstow: fix undefined reference error

This commit is contained in:
Dmitry Bogatov 2022-11-24 18:38:15 -05:00
parent 2da473132f
commit c4d336b239

View file

@ -1,4 +1,4 @@
{ stdenv, lib, fetchurl, ncurses }: { stdenv, lib, fetchurl, ncurses, autoreconfHook }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "xstow"; pname = "xstow";
version = "1.1.0"; version = "1.1.0";
@ -8,6 +8,16 @@ stdenv.mkDerivation rec {
sha256 = "sha256-wXQ5XSmogAt1torfarrqIU4nBYj69MGM/HBYqeIE+dw="; sha256 = "sha256-wXQ5XSmogAt1torfarrqIU4nBYj69MGM/HBYqeIE+dw=";
}; };
nativeBuildInputs = [ autoreconfHook ];
# Upstream seems to try to support building both static and dynamic version
# of executable on dynamic systems, but fails with link error when attempting
# to cross-build "xstow-static" to the system where "xstow" proper is static.
postPatch = lib.optionalString stdenv.hostPlatform.isStatic ''
substituteInPlace src/Makefile.am --replace xstow-static ""
substituteInPlace src/Makefile.am --replace xstow-stow ""
'';
buildInputs = [ buildInputs = [
ncurses ncurses
]; ];