2024-01-25 14:12:00 +00:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, ncurses
|
|
|
|
, autoreconfHook
|
|
|
|
}:
|
|
|
|
|
2021-10-17 02:12:59 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "xstow";
|
2024-01-25 14:12:00 +00:00
|
|
|
version = "1.1.1";
|
2021-10-17 02:12:59 +00:00
|
|
|
|
2024-01-25 14:12:00 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "majorkingleo";
|
|
|
|
repo = "xstow";
|
|
|
|
rev = version;
|
|
|
|
fetchSubmodules = true;
|
|
|
|
hash = "sha256-c89+thw5N3Cgl1Ww+W7c3YsyhNJMLlreedvdWJFY3WY=";
|
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; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Replacement of GNU Stow written in C++";
|
2024-01-25 14:12:00 +00:00
|
|
|
homepage = "https://github.com/majorkingleo/xstow";
|
2021-10-17 02:12:59 +00:00
|
|
|
license = licenses.gpl2Only;
|
|
|
|
maintainers = with maintainers; [ nzbr ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|