mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
ac-library: 1.5.1 -> 1.6
This commit is contained in:
parent
59dff5cf0a
commit
d944d582c0
1 changed files with 39 additions and 2 deletions
|
@ -4,17 +4,19 @@
|
|||
lib,
|
||||
python3,
|
||||
nix-update-script,
|
||||
cmake,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "ac-library";
|
||||
version = "1.5.1";
|
||||
version = "1.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "atcoder";
|
||||
repo = "ac-library";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-AIqG98c1tcxxhYcX+NSf6Rw3onw61T5NTZtqQzT9jls=";
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-1wwzN/JPS6daj1vDFuEN5z20tMdLfMvEKti0sxCVlHA=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
|
@ -26,6 +28,41 @@ stdenv.mkDerivation (finalAttrs: {
|
|||
python3
|
||||
];
|
||||
|
||||
nativeInstallCheckInputs = [
|
||||
python3.pkgs.pytest
|
||||
cmake
|
||||
];
|
||||
|
||||
dontUseCmakeConfigure = true;
|
||||
|
||||
doInstallCheck = true;
|
||||
installCheckPhase = ''
|
||||
runHook preInstallCheck
|
||||
|
||||
substituteInPlace test/test_expander.py \
|
||||
--replace-fail "g++" "$CXX"
|
||||
python -m pytest --ignore-glob='test/unittest/googletest/*'
|
||||
|
||||
pushd test/unittest
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD=$STDCXX
|
||||
make
|
||||
ctest -VV
|
||||
popd
|
||||
|
||||
runHook postInstallCheck
|
||||
'';
|
||||
|
||||
# We don't need -fno-strict-overflow because it will break UBSanitize's overflow check especially when the operation number is static definded.
|
||||
hardeningDisable = [ "strictoverflow" ];
|
||||
|
||||
env = {
|
||||
NIX_CFLAGS_COMPILE = toString [
|
||||
"-Wno-error=array-bounds"
|
||||
];
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue