1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/development/tools/build-managers/tup/default.nix

55 lines
1.6 KiB
Nix
Raw Normal View History

2018-12-28 01:14:11 +00:00
{ stdenv, fetchFromGitHub, fuse, pkgconfig, pcre }:
2015-01-09 06:06:22 +00:00
stdenv.mkDerivation rec {
pname = "tup";
2018-12-28 01:14:11 +00:00
version = "0.7.8";
2015-01-09 06:06:22 +00:00
src = fetchFromGitHub {
owner = "gittup";
repo = "tup";
rev = "v${version}";
2018-12-28 01:14:11 +00:00
sha256 = "07dmz712zbs5kayf98kywp7blssgh0y2gc1623jbsynmqwi77mcb";
2015-01-09 06:06:22 +00:00
};
nativeBuildInputs = [ pkgconfig ];
2018-12-28 01:14:11 +00:00
buildInputs = [ fuse 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 = ''
mkdir -p $out/bin
cp tup $out/bin/
mkdir -p $out/share/man/man1
cp tup.1 $out/share/man/man1/
'';
meta = with stdenv.lib; {
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.
'';
homepage = http://gittup.org/tup/;
license = licenses.gpl2;
platforms = platforms.linux ++ platforms.darwin;
};
}