2022-11-25 00:38:15 +01:00
|
|
|
{ stdenv, lib, fetchurl, ncurses, autoreconfHook }:
|
2021-10-12 22:46:10 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "xstow";
|
2022-08-02 10:26:34 +02:00
|
|
|
version = "1.1.0";
|
2021-10-12 22:46:10 +02:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://downloads.sourceforge.net/sourceforge/${pname}/${pname}-${version}.tar.bz2";
|
2022-08-02 10:26:34 +02:00
|
|
|
sha256 = "sha256-wXQ5XSmogAt1torfarrqIU4nBYj69MGM/HBYqeIE+dw=";
|
2021-10-12 22:46:10 +02:00
|
|
|
};
|
|
|
|
|
2022-11-25 00:38:15 +01:00
|
|
|
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 ""
|
|
|
|
'';
|
|
|
|
|
2021-10-12 22:46:10 +02:00
|
|
|
buildInputs = [
|
|
|
|
ncurses
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-05-28 15:22:26 +02:00
|
|
|
broken = stdenv.isDarwin;
|
2021-10-12 22:46:10 +02:00
|
|
|
description = "A replacement of GNU Stow written in C++";
|
|
|
|
homepage = "http://xstow.sourceforge.net";
|
|
|
|
license = licenses.gpl2Only;
|
|
|
|
maintainers = with maintainers; [ nzbr ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|