summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2024-01-11 23:28:41 -0500
committerGitHub <noreply@github.com>2024-01-11 23:28:41 -0500
commita1982c92d8980a0114372973cbdfe0a307f1bdea (patch)
treec9169f3eca87bc29c75f68834d81f4779570d0b8
parentMerge pull request #280150 from obsidiansystems/readline-windows-23.05 (diff)
parentrapidcheck: Add `meta.pkgConfigModules` and test (diff)
downloadnixpkgs-origin/nixos-23.05-small.tar.gz
Merge pull request #280330 from obsidiansystems/rapidcheck-23.05origin/nixpkgs-23.05-darwinorigin/nixos-23.05-small
[Backport release-23.05] rapidcheck: Simplify installation, update, pkg-config
-rw-r--r--pkgs/development/libraries/rapidcheck/default.nix38
-rw-r--r--pkgs/tools/package-management/nix/common.nix2
2 files changed, 23 insertions, 17 deletions
diff --git a/pkgs/development/libraries/rapidcheck/default.nix b/pkgs/development/libraries/rapidcheck/default.nix
index 6f3f43799ea4..566e7acd7e8d 100644
--- a/pkgs/development/libraries/rapidcheck/default.nix
+++ b/pkgs/development/libraries/rapidcheck/default.nix
@@ -3,40 +3,48 @@
, fetchFromGitHub
, cmake
, unstableGitUpdater
+, testers
}:
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
pname = "rapidcheck";
- version = "unstable-2023-04-16";
+ version = "unstable-2023-12-14";
src = fetchFromGitHub {
owner = "emil-e";
repo = "rapidcheck";
- rev = "a5724ea5b0b00147109b0605c377f1e54c353ba2";
- hash = "sha256-nq2VBDREkAOnvtdYr3m0TYNXx7mv9hbV5HZFVL2uTTg=";
+ rev = "ff6af6fc683159deb51c543b065eba14dfcf329b";
+ hash = "sha256-Ixz5RpY0n8Un/Pv4XoTfbs40+70iyMbkQUjDqoLaWOg=";
};
+ outputs = [ "out" "dev" ];
+
nativeBuildInputs = [ cmake ];
cmakeFlags = [
"-DBUILD_SHARED_LIBS=${lib.toUpper (lib.boolToString (!stdenv.hostPlatform.isStatic))}"
+ "-DRC_INSTALL_ALL_EXTRAS=TRUE"
];
- # Install the extras headers
- postInstall = ''
- cp -r $src/extras $out
- chmod -R +w $out/extras
- rm $out/extras/CMakeLists.txt
- rm $out/extras/**/CMakeLists.txt
- '';
-
- passthru.updateScript = unstableGitUpdater { };
+ passthru = {
+ updateScript = unstableGitUpdater { };
+ tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
+ };
meta = with lib; {
description = "A C++ framework for property based testing inspired by QuickCheck";
- inherit (src.meta) homepage;
+ inherit (finalAttrs.src.meta) homepage;
maintainers = with maintainers; [ ];
license = licenses.bsd2;
+ pkgConfigModules = [
+ "rapidcheck"
+ # Extras
+ "rapidcheck_boost"
+ "rapidcheck_boost_test"
+ "rapidcheck_catch"
+ "rapidcheck_doctest"
+ "rapidcheck_gtest"
+ ];
platforms = platforms.all;
};
-}
+})
diff --git a/pkgs/tools/package-management/nix/common.nix b/pkgs/tools/package-management/nix/common.nix
index 19b8d77bb4a7..1c7c4033881c 100644
--- a/pkgs/tools/package-management/nix/common.nix
+++ b/pkgs/tools/package-management/nix/common.nix
@@ -171,8 +171,6 @@ self = stdenv.mkDerivation {
] ++ lib.optionals (!atLeast24) [
# option was removed in 2.4
"--disable-init-state"
- ] ++ lib.optionals atLeast214 [
- "CXXFLAGS=-I${lib.getDev rapidcheck}/extras/gtest/include"
] ++ lib.optionals stdenv.isLinux [
"--with-sandbox-shell=${busybox-sandbox-shell}/bin/busybox"
] ++ lib.optionals (atLeast210 && stdenv.isLinux && stdenv.hostPlatform.isStatic) [