about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/tools/misc/fsatrace/default.nix
blob: d99374ac5373496c15ebb971451a7dbc78083515 (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
{ lib, stdenv, fetchFromGitHub }:

stdenv.mkDerivation rec {
  pname = "fsatrace";
  version = "0.0.5";

  src = fetchFromGitHub {
    owner = "jacereda";
    repo = "fsatrace";
    rev = "5af79511828ca6cea4e5dd9f28e1676fb0b705e9";
    "hash" = "sha256-pn07qlrRaM153znEviziuKWrkX9cLsNFCujovmE4UUA=";
  };

  installDir = "libexec/${pname}-${version}";

  makeFlags = [ "INSTALLDIR=$(out)/$(installDir)" ];

  preInstall = ''
    mkdir -p $out/$installDir
  '';

  postInstall = ''
    mkdir -p $out/bin
    ln -s $out/$installDir/fsatrace $out/bin/fsatrace
  '';

  meta = with lib; {
    homepage = "https://github.com/jacereda/fsatrace";
    description = "filesystem access tracer";
    mainProgram = "fsatrace";
    license = licenses.isc;
    platforms = platforms.linux;
  };
}