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

stdenv.mkDerivation rec {
  pname = "libversion";
  version = "3.0.1";

  src = fetchFromGitHub {
    owner = "repology";
    repo = "libversion";
    rev = version;
    sha256 = "13x5djdpv6aryxsbw6a3b6vwzi9f4aa3gn9dqb7axzppggayawyk";
  };

  nativeBuildInputs = [ cmake ];

  preCheck = ''
    export LD_LIBRARY_PATH=/build/source/build/libversion/:$LD_LIBRARY_PATH
  '';
  doCheck = true;
  checkTarget = "test";

  meta = with stdenv.lib; {
    description = "Advanced version string comparison library";
    homepage = "https://github.com/repology/libversion";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ ryantm ];
    platforms = platforms.unix;
  };
}