2021-01-23 12:26:19 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fuse3, pkg-config, pcre }:
|
2015-01-09 06:06:22 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "tup";
|
2020-10-31 10:21:04 +00:00
|
|
|
version = "0.7.10";
|
|
|
|
outputs = [ "bin" "man" "out" ];
|
2015-01-09 06:06:22 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "gittup";
|
|
|
|
repo = "tup";
|
|
|
|
rev = "v${version}";
|
2020-10-31 10:21:04 +00:00
|
|
|
sha256 = "1qd07h4wi0743l7z2vybfvhwp61g2p2pc5qhl40672ryl24nvd1d";
|
2015-01-09 06:06:22 +00:00
|
|
|
};
|
|
|
|
|
2021-01-19 06:50:56 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2020-10-31 10:21:04 +00:00
|
|
|
buildInputs = [ fuse3 pcre ];
|
2015-01-09 06:06:22 +00:00
|
|
|
|
|
|
|
configurePhase = ''
|
2018-12-28 01:14:11 +00:00
|
|
|
sed -i 's/`git describe`/v${version}/g' src/tup/link.sh
|
|
|
|
sed -i 's/pcre-confg/pkg-config pcre/g' Tupfile Tuprules.tup
|
2015-01-09 06:06:22 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# Regular tup builds require fusermount to have suid, which nix cannot
|
|
|
|
# currently provide in a build environment, so we bootstrap and use 'tup
|
|
|
|
# generate' instead
|
|
|
|
buildPhase = ''
|
|
|
|
./build.sh
|
2018-12-28 01:14:11 +00:00
|
|
|
./build/tup init
|
2015-01-09 06:06:22 +00:00
|
|
|
./build/tup generate script.sh
|
|
|
|
./script.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2020-10-31 10:21:04 +00:00
|
|
|
install -D tup -t $bin/bin/
|
|
|
|
install -D tup.1 -t $man/share/man/man1/
|
2015-01-09 06:06:22 +00:00
|
|
|
'';
|
|
|
|
|
2020-06-13 06:33:55 +01:00
|
|
|
setupHook = ./setup-hook.sh;
|
2020-06-13 06:26:20 +01:00
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2015-01-09 06:06:22 +00:00
|
|
|
description = "A fast, file-based build system";
|
|
|
|
longDescription = ''
|
|
|
|
Tup is a file-based build system for Linux, OSX, and Windows. It inputs a list
|
|
|
|
of file changes and a directed acyclic graph (DAG), then processes the DAG to
|
|
|
|
execute the appropriate commands required to update dependent files. Updates are
|
|
|
|
performed with very little overhead since tup implements powerful build
|
|
|
|
algorithms to avoid doing unnecessary work. This means you can stay focused on
|
|
|
|
your project rather than on your build system.
|
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://gittup.org/tup/";
|
2015-01-09 06:06:22 +00:00
|
|
|
license = licenses.gpl2;
|
2020-06-13 06:25:22 +01:00
|
|
|
maintainers = with maintainers; [ ehmry ];
|
2015-01-09 06:06:22 +00:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
|
|
};
|
|
|
|
}
|