about summary refs log tree commit diff
path: root/nixpkgs/pkgs/servers/web-apps/anuko-time-tracker/default.nix
blob: 583f2db81938d02885ea2b72331be384b637ecb7 (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
{ lib
, stdenvNoCC
, fetchFromGitHub
, nixosTests
, php
}:

stdenvNoCC.mkDerivation rec {
  pname = "anuko-time-tracker";
  version = "1.22.19.5806";

  # Project commits directly into master and has no release schedule.
  # Fortunately the current version is defined in the 'APP_VERSION' constant in
  # /initialize.php so we use its value and set the rev to the commit sha of when the
  # constant was last updated.
  src = fetchFromGitHub {
    owner = "anuko";
    repo = "timetracker";
    rev = "43a19fcb51a21f6e3169084ac81308a6ef751e63";
    hash = "sha256-ZRF9FFbntYY01JflCXkYZyXfyu/x7LNdyOB94UkVFR0=";
  };

  # There's nothing to build.
  dontBuild = true;

  installPhase = ''
    mkdir $out/
    cp -R ./* $out
  '';

  passthru.tests = {
    inherit (nixosTests) anuko-time-tracker;
  };

  meta = {
    description = "Simple, easy to use, open source time tracking system";
    license = lib.licenses.sspl;
    homepage = "https://github.com/anuko/timetracker/";
    platforms = php.meta.platforms;
    maintainers = with lib.maintainers; [ michaelshmitty ];
  };
}