summary refs log tree commit diff
path: root/pkgs/tools/admin/procs/default.nix
blob: 20e9c8b3d47a6e84fc9114eb9a49264c79b688f4 (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
{ stdenv, fetchFromGitHub, rustPlatform, fetchpatch
, Security
}:

rustPlatform.buildRustPackage rec {
  pname = "procs";
  version = "0.8.16";

  src = fetchFromGitHub {
    owner = "dalance";
    repo = pname;
    rev = "v${version}";
    sha256 = "0l4n3gr1sc7wfa21p8yh7idaii0mnfpyqp4cg7f9l4345isy94vq";
  };

  cargoSha256 = "03c63dlzvag341n6la1s61ccri1avlprd91m11z9zzjhi9b46kcr";

  buildInputs = stdenv.lib.optional stdenv.isDarwin Security;

  patches = [
    # Fix tests on darwin. Remove with the next release
    (fetchpatch {
      url = "https://github.com/dalance/procs/commit/bb554e247b5b339bc00fa5dd2e771b0d7cb09cd5.patch";
      sha256 = "1szvvifa4pdbgdsmdj5f0zq6qzf1lh6wwc6ipawblfzwmg7d9wvk";
    })
  ];

  meta = with stdenv.lib; {
    description = "A modern replacement for ps written in Rust";
    homepage = "https://github.com/dalance/procs";
    license = with licenses; [ mit ];
    maintainers = [ maintainers.dalance ];
    platforms = with platforms; linux ++ darwin;
  };
}