2022-12-02 08:20:57 +00:00
|
|
|
{ stdenv, lib, fetchurl, ncurses, autoreconfHook }:
|
2021-10-17 02:12:59 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "xstow";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "1.1.0";
|
2021-10-17 02:12:59 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://downloads.sourceforge.net/sourceforge/${pname}/${pname}-${version}.tar.bz2";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-wXQ5XSmogAt1torfarrqIU4nBYj69MGM/HBYqeIE+dw=";
|
2021-10-17 02:12:59 +00:00
|
|
|
};
|
|
|
|
|
2022-12-02 08:20:57 +00: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-17 02:12:59 +00:00
|
|
|
buildInputs = [
|
|
|
|
ncurses
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2021-10-17 02:12:59 +00:00
|
|
|
description = "A replacement of GNU Stow written in C++";
|
2023-02-22 10:55:15 +00:00
|
|
|
homepage = "https://xstow.sourceforge.net";
|
2021-10-17 02:12:59 +00:00
|
|
|
license = licenses.gpl2Only;
|
|
|
|
maintainers = with maintainers; [ nzbr ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|