Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 21.05 33 lines 853 B view raw
1{ stdenv, fetchFromGitHub, cmake, lib }: 2 3stdenv.mkDerivation rec { 4 pname = "libversion"; 5 version = "3.0.1"; 6 7 src = fetchFromGitHub { 8 owner = "repology"; 9 repo = "libversion"; 10 rev = version; 11 sha256 = "13x5djdpv6aryxsbw6a3b6vwzi9f4aa3gn9dqb7axzppggayawyk"; 12 }; 13 14 nativeBuildInputs = [ cmake ]; 15 16 cmakeFlags = lib.optional stdenv.isDarwin [ 17 "-DCMAKE_SKIP_BUILD_RPATH=OFF" # needed for tests 18 ]; 19 20 preCheck = '' 21 export LD_LIBRARY_PATH=/build/source/build/libversion/''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH 22 ''; 23 doCheck = true; 24 checkTarget = "test"; 25 26 meta = with lib; { 27 description = "Advanced version string comparison library"; 28 homepage = "https://github.com/repology/libversion"; 29 license = with licenses; [ mit ]; 30 maintainers = with maintainers; [ ryantm ]; 31 platforms = platforms.unix; 32 }; 33}