depot/third_party/nixpkgs/pkgs/development/libraries/libversion/default.nix
Default email 6d4aeb4377 Project import generated by Copybara.
GitOrigin-RevId: 0f213d0fee84280d8c3a97f7469b988d6fe5fcdf
2023-01-11 08:51:40 +01:00

35 lines
1,013 B
Nix

{ stdenv, fetchFromGitHub, cmake, lib }:
stdenv.mkDerivation rec {
pname = "libversion";
version = "3.0.2";
src = fetchFromGitHub {
owner = "repology";
repo = "libversion";
rev = version;
hash = "sha256-P/ykRy+LgcfWls4Zw8noel/K9mh/PnKy3smoQtuSi00=";
};
nativeBuildInputs = [ cmake ];
cmakeFlags = [
# https://github.com/NixOS/nixpkgs/issues/144170
# the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly
# (setting it to an absolute path causes include files to go to $out/$out/include,
# because the absolute path is interpreted with root at $out).
"-DCMAKE_INSTALL_INCLUDEDIR=include"
"-DCMAKE_INSTALL_LIBDIR=lib"
];
checkTarget = "test";
doCheck = true;
meta = with lib; {
description = "Advanced version string comparison library";
homepage = "https://github.com/repology/libversion";
license = with licenses; [ mit ];
maintainers = with maintainers; [ ryantm ];
platforms = platforms.unix;
};
}