Loading pkgs/by-name/hy/hyperscan/package.nix +6 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,12 @@ stdenv.mkDerivation (finalAttrs: { substituteInPlace libhs.pc.in \ --replace-fail "libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@" "libdir=@CMAKE_INSTALL_LIBDIR@" \ --replace-fail "includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@" "includedir=@CMAKE_INSTALL_INCLUDEDIR@" substituteInPlace cmake/pcre.cmake --replace-fail 'CHECK_C_SOURCE_COMPILES("#include <pcre.h.generic> #if PCRE_MAJOR != ''${PCRE_REQUIRED_MAJOR_VERSION} || PCRE_MINOR < ''${PCRE_REQUIRED_MINOR_VERSION} #error Incorrect pcre version #endif main() {}" CORRECT_PCRE_VERSION)' 'set(CORRECT_PCRE_VERSION TRUE)' ''; doCheck = true; Loading pkgs/development/python-modules/hyperscan/default.nix +25 −16 Original line number Diff line number Diff line Loading @@ -3,42 +3,51 @@ pkgs, buildPythonPackage, fetchFromGitHub, pdm-backend, setuptools, wheel, symlinkJoin, cmake, ninja, pathspec, pcre, pkg-config, scikit-build-core, pytestCheckHook, pytest-mock, }: let lib-deps = symlinkJoin { name = "hyperscan-static-deps"; paths = [ (pkgs.hyperscan.override { withStatic = true; }) (pcre.overrideAttrs { dontDisableStatic = 0; }).out ]; }; in buildPythonPackage rec { pname = "hyperscan"; version = "0.7.8"; version = "0.7.9"; pyproject = true; src = fetchFromGitHub { owner = "darvid"; repo = "python-hyperscan"; tag = "v${version}"; hash = "sha256-gNXE2VjHRTmIMyoLyTsmC9CuY3YT5ZsKfNZvMRthPn0="; hash = "sha256-tf3dQgY0p+J6GIS8pB3+kvomNVYcbMJ+72T8IVbrnrU="; }; buildInputs = [ (pkgs.hyperscan.override { withStatic = true; }) # we need static pcre to be built, by default only shared library is built (pcre.overrideAttrs { dontDisableStatic = 0; }) ]; env.CMAKE_ARGS = "-DHS_SRC_ROOT=${pkgs.hyperscan.src} -DHS_BUILD_LIB_ROOT=${lib-deps}/lib"; dontUseCmakeConfigure = true; nativeBuildInputs = [ pkg-config pdm-backend setuptools wheel cmake pathspec ninja scikit-build-core ]; pythonImportsCheck = [ "hyperscan" ]; pytestFlagsArray = [ "tests" ]; nativeCheckInputs = [ pytestCheckHook pytest-mock Loading Loading
pkgs/by-name/hy/hyperscan/package.nix +6 −0 Original line number Diff line number Diff line Loading @@ -58,6 +58,12 @@ stdenv.mkDerivation (finalAttrs: { substituteInPlace libhs.pc.in \ --replace-fail "libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@" "libdir=@CMAKE_INSTALL_LIBDIR@" \ --replace-fail "includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@" "includedir=@CMAKE_INSTALL_INCLUDEDIR@" substituteInPlace cmake/pcre.cmake --replace-fail 'CHECK_C_SOURCE_COMPILES("#include <pcre.h.generic> #if PCRE_MAJOR != ''${PCRE_REQUIRED_MAJOR_VERSION} || PCRE_MINOR < ''${PCRE_REQUIRED_MINOR_VERSION} #error Incorrect pcre version #endif main() {}" CORRECT_PCRE_VERSION)' 'set(CORRECT_PCRE_VERSION TRUE)' ''; doCheck = true; Loading
pkgs/development/python-modules/hyperscan/default.nix +25 −16 Original line number Diff line number Diff line Loading @@ -3,42 +3,51 @@ pkgs, buildPythonPackage, fetchFromGitHub, pdm-backend, setuptools, wheel, symlinkJoin, cmake, ninja, pathspec, pcre, pkg-config, scikit-build-core, pytestCheckHook, pytest-mock, }: let lib-deps = symlinkJoin { name = "hyperscan-static-deps"; paths = [ (pkgs.hyperscan.override { withStatic = true; }) (pcre.overrideAttrs { dontDisableStatic = 0; }).out ]; }; in buildPythonPackage rec { pname = "hyperscan"; version = "0.7.8"; version = "0.7.9"; pyproject = true; src = fetchFromGitHub { owner = "darvid"; repo = "python-hyperscan"; tag = "v${version}"; hash = "sha256-gNXE2VjHRTmIMyoLyTsmC9CuY3YT5ZsKfNZvMRthPn0="; hash = "sha256-tf3dQgY0p+J6GIS8pB3+kvomNVYcbMJ+72T8IVbrnrU="; }; buildInputs = [ (pkgs.hyperscan.override { withStatic = true; }) # we need static pcre to be built, by default only shared library is built (pcre.overrideAttrs { dontDisableStatic = 0; }) ]; env.CMAKE_ARGS = "-DHS_SRC_ROOT=${pkgs.hyperscan.src} -DHS_BUILD_LIB_ROOT=${lib-deps}/lib"; dontUseCmakeConfigure = true; nativeBuildInputs = [ pkg-config pdm-backend setuptools wheel cmake pathspec ninja scikit-build-core ]; pythonImportsCheck = [ "hyperscan" ]; pytestFlagsArray = [ "tests" ]; nativeCheckInputs = [ pytestCheckHook pytest-mock Loading