about summary refs log tree commit diff
path: root/pkgs/tools/misc/urn-timer/default.nix
blob: 83dad9ebe7f83e9e8c4de77d92b1324095ab5ece (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{ lib, stdenv
, fetchFromGitHub
, fetchpatch
, unstableGitUpdater
, xxd
, pkg-config
, imagemagick
, wrapGAppsHook
, gtk3
, jansson
}:

stdenv.mkDerivation {
  pname = "urn-timer";
  version = "unstable-2017-08-20";

  src = fetchFromGitHub {
    owner = "3snowp7im";
    repo = "urn";
    rev = "246a7a642fa7a673166c1bd281585d0fc22e75b2";
    sha256 = "0bniwf3nhsqapsss9m9y9ylh38v6v7q45999wa1qcsddpa72k0i0";
    fetchSubmodules = true;
  };

  patches = [
    # https://github.com/3snowp7im/urn/pull/50
    (fetchpatch {
      name = "stop-hardcoding-prefix";
      url = "https://github.com/3snowp7im/urn/commit/6054ee62dcd6095e31e8fb2a229155dbbcb39f68.patch";
      sha256 = "1xdkylbqlqjwqx4pb9v1snf81ag7b6q8vybirz3ibsv6iy79v9pk";
    })
    # https://github.com/3snowp7im/urn/pull/53
    (fetchpatch {
      name = "create-installation-directories";
      url = "https://github.com/3snowp7im/urn/commit/fb032851b9c5bebb5066d306f5366f0be34f0797.patch";
      sha256 = "0jjhcz4n8bm3hl56rvjzkvxr6imc05qlyavzjrlafa19hf036g4a";
    })
  ];

  postPatch = ''substituteInPlace GNUmakefile --replace 'rsync -a --exclude=".*"' 'cp -r' '';

  nativeBuildInputs = [
    xxd
    pkg-config
    imagemagick
    wrapGAppsHook
  ];

  buildInputs = [
    gtk3
    jansson
  ];

  makeFlags = [ "PREFIX=$(out)" ];

  passthru.updateScript = unstableGitUpdater {
    url = "https://github.com/3snowp7im/urn.git";
  };

  meta = with lib; {
    homepage = "https://github.com/3snowp7im/urn";
    description = "Split tracker / timer for speedrunning with GTK+ frontend";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ fgaz ];
  };
}