about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libmodule/default.nix
blob: dd98908f3111abcbdfc94172640497c48c60d8c4 (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
{ lib, stdenv, fetchFromGitHub
, cmake, pkg-config }:

stdenv.mkDerivation rec {
  pname = "libmodule";
  version = "5.0.1";

  src = fetchFromGitHub {
    owner = "FedeDP";
    repo = "libmodule";
    rev = version;
    sha256 = "sha256-wkRiDWO9wUyxkAeqvm99u22Jq4xnQJx6zS7Sb+R8iMg=";
  };

  nativeBuildInputs = [
    cmake
    pkg-config
  ];

  # https://github.com/FedeDP/libmodule/issues/7
  postPatch = ''
    substituteInPlace Extra/libmodule.pc.in \
      --replace '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
      --replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
  '';

  meta = with lib; {
    description = "C simple and elegant implementation of an actor library";
    homepage = "https://github.com/FedeDP/libmodule";
    platforms = platforms.linux;
    license = licenses.mit;
    maintainers = with maintainers; [
      eadwu
    ];
  };
}