about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/basu/default.nix
blob: 4665c4c2d158b2e2549b061b7cd0a03513b3d943 (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
{ lib
, stdenv
, fetchFromSourcehut
, audit
, pkg-config
, libcap
, gperf
, meson
, ninja
, python3
, getent
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "basu";
  version = "0.2.1";

  src = fetchFromSourcehut {
    owner = "~emersion";
    repo = "basu";
    rev = "v${finalAttrs.version}";
    hash = "sha256-zIaEIIo8lJeas2gVjMezO2hr8RnMIT7iiCBilZx5lRQ=";
  };

  outputs = [ "out" "dev" "lib" ];

  buildInputs = [
    audit
    gperf
    libcap
  ];

  nativeBuildInputs = [
    pkg-config
    meson
    ninja
    python3
    getent
  ];

  preConfigure = ''
    pushd src/basic
    patchShebangs \
      generate-cap-list.sh generate-errno-list.sh generate-gperfs.py
    popd
  '';

  meta = {
    homepage = "https://sr.ht/~emersion/basu";
    description = "The sd-bus library, extracted from systemd";
    mainProgram = "basuctl";
    license = lib.licenses.lgpl21Only;
    maintainers = with lib.maintainers; [ AndersonTorres ];
    platforms = lib.platforms.linux;
  };
})