Unverified Commit b919fc1d authored by Mario Rodas's avatar Mario Rodas Committed by GitHub
Browse files

Merge pull request #202748 from KAction/patch/v1/pkgsStatic.xstow

pkgsStatic.xstow: fix undefined reference error
parents 8e036dae c4d336b2
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
{ stdenv, lib, fetchurl, ncurses }:
{ stdenv, lib, fetchurl, ncurses, autoreconfHook }:
stdenv.mkDerivation rec {
  pname = "xstow";
  version = "1.1.0";
@@ -8,6 +8,16 @@ stdenv.mkDerivation rec {
    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 = [
    ncurses
  ];