uriparser: build from source repository, not from release tarball
This commit is contained in:
parent
0ab4c8a8c5
commit
f20b560666
@ -1,32 +1,33 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
fetchurl,
|
fetchFromGitHub,
|
||||||
cmake,
|
cmake,
|
||||||
gtest,
|
gtest,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "uriparser";
|
pname = "uriparser";
|
||||||
version = "0.9.8";
|
version = "0.9.8";
|
||||||
|
|
||||||
# Release tarball differs from source tarball
|
src = fetchFromGitHub {
|
||||||
src = fetchurl {
|
owner = "uriparser";
|
||||||
url = "https://github.com/uriparser/uriparser/releases/download/${pname}-${version}/${pname}-${version}.tar.bz2";
|
repo = "uriparser";
|
||||||
hash = "sha256-ctG1Wb46GAb3iKPZvjShsGPUKqI4spuk7mM9bv/NM70=";
|
tag = "uriparser-${finalAttrs.version}";
|
||||||
|
hash = "sha256-U/AM8ULKGDfL3t+VUcn+t9sn4z/uc+pDjf2HHwHLI2M=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DURIPARSER_BUILD_DOCS=OFF"
|
(lib.cmakeBool "URIPARSER_BUILD_DOCS" false)
|
||||||
] ++ lib.optional (!doCheck) "-DURIPARSER_BUILD_TESTS=OFF";
|
(lib.cmakeBool "URIPARSER_BUILD_TESTS" finalAttrs.finalPackage.doCheck)
|
||||||
|
];
|
||||||
|
|
||||||
nativeCheckInputs = [ gtest ];
|
nativeCheckInputs = [ gtest ];
|
||||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
changelog = "https://github.com/uriparser/uriparser/blob/uriparser-${version}/ChangeLog";
|
changelog = "https://github.com/uriparser/uriparser/blob/uriparser-${finalAttrs.version}/ChangeLog";
|
||||||
description = "Strictly RFC 3986 compliant URI parsing library";
|
description = "Strictly RFC 3986 compliant URI parsing library";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
uriparser is a strictly RFC 3986 compliant URI parsing and handling library written in C.
|
uriparser is a strictly RFC 3986 compliant URI parsing and handling library written in C.
|
||||||
@ -38,4 +39,4 @@ stdenv.mkDerivation rec {
|
|||||||
mainProgram = "uriparse";
|
mainProgram = "uriparse";
|
||||||
platforms = lib.platforms.unix;
|
platforms = lib.platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user