2020-09-21 17:58:29 +02:00
|
|
|
{ stdenv, fetchFromGitHub, cmake, lib }:
|
2018-05-27 18:12:52 +02:00
|
|
|
|
2019-08-13 13:19:14 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "libversion";
|
2020-01-27 14:30:04 +01:00
|
|
|
version = "3.0.1";
|
2018-05-27 18:12:52 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "repology";
|
|
|
|
repo = "libversion";
|
|
|
|
rev = version;
|
2020-01-27 14:30:04 +01:00
|
|
|
sha256 = "13x5djdpv6aryxsbw6a3b6vwzi9f4aa3gn9dqb7axzppggayawyk";
|
2018-05-27 18:12:52 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake ];
|
|
|
|
|
2020-09-21 17:58:29 +02:00
|
|
|
cmakeFlags = lib.optional stdenv.isDarwin [
|
|
|
|
"-DCMAKE_SKIP_BUILD_RPATH=OFF" # needed for tests
|
|
|
|
];
|
|
|
|
|
2020-01-27 14:30:04 +01:00
|
|
|
preCheck = ''
|
2020-05-31 10:40:07 +02:00
|
|
|
export LD_LIBRARY_PATH=/build/source/build/libversion/''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
|
2020-01-27 14:30:04 +01:00
|
|
|
'';
|
2018-05-27 18:12:52 +02:00
|
|
|
doCheck = true;
|
|
|
|
checkTarget = "test";
|
|
|
|
|
2021-01-21 18:00:13 +01:00
|
|
|
meta = with lib; {
|
2018-05-27 18:12:52 +02:00
|
|
|
description = "Advanced version string comparison library";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/repology/libversion";
|
2018-05-27 18:12:52 +02:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ ryantm ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|