lol
1{ stdenv, fetchFromGitHub, fuse, pkgconfig }:
2
3stdenv.mkDerivation rec {
4 name = "tup-${version}";
5 version = "0.7.3";
6
7 src = fetchFromGitHub {
8 owner = "gittup";
9 repo = "tup";
10 rev = "v${version}";
11 sha256 = "1x2grwmlf2izip4djb8cjwgl8p3x0bmfqwzjsc017mqi17qkijy8";
12 };
13
14 buildInputs = [ fuse pkgconfig ];
15
16 configurePhase = ''
17 sed -i 's/`git describe`/v${version}/g' Tupfile
18 '';
19
20 # Regular tup builds require fusermount to have suid, which nix cannot
21 # currently provide in a build environment, so we bootstrap and use 'tup
22 # generate' instead
23 buildPhase = ''
24 ./build.sh
25 ./build/tup generate script.sh
26 ./script.sh
27 '';
28
29 installPhase = ''
30 mkdir -p $out/bin
31 cp tup $out/bin/
32
33 mkdir -p $out/share/man/man1
34 cp tup.1 $out/share/man/man1/
35 '';
36
37 meta = with stdenv.lib; {
38 description = "A fast, file-based build system";
39 longDescription = ''
40 Tup is a file-based build system for Linux, OSX, and Windows. It inputs a list
41 of file changes and a directed acyclic graph (DAG), then processes the DAG to
42 execute the appropriate commands required to update dependent files. Updates are
43 performed with very little overhead since tup implements powerful build
44 algorithms to avoid doing unnecessary work. This means you can stay focused on
45 your project rather than on your build system.
46 '';
47 homepage = http://gittup.org/tup/;
48 license = licenses.gpl2;
49 platforms = platforms.linux ++ platforms.darwin;
50 };
51}