about summary refs log tree commit diff
path: root/pkgs/tools/misc/timelimit/default.nix
blob: f943c5ee7292b24e76604d97ca49a1eaf7b5d482 (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
{ lib, stdenv, fetchFromGitLab, perl }:

stdenv.mkDerivation rec {
  pname = "timelimit";
  version = "1.9.2";

  src = fetchFromGitLab {
    owner = "timelimit";
    repo = pname;
    rev = "release/${version}";
    hash = "sha256-5IEAF8zCKaCVH6BAxjoa/2rrue9pRGBBkFzN57d+g+g=";
  };

  nativeCheckInputs = [ perl ];
  doCheck = true;

  installFlags = [ "PREFIX=$(out)" ];
  INSTALL_PROGRAM = "install -m755";
  INSTALL_DATA = "install -m644";

  meta = with lib; {
    description = "Execute a command and terminates the spawned process after a given time with a given signal";
    homepage = "https://devel.ringlet.net/sysutils/timelimit/";
    license = licenses.bsd2;
    platforms = platforms.all;
    maintainers = with maintainers; [ figsoda ];
    mainProgram = "timelimit";
  };
}