Skip to content

Commit

Permalink
rapidcheck: Use stock installation, multiple outputs
Browse files Browse the repository at this point in the history
We had neglected to nice `RC_INSTALL_ALL_EXTRAS`, which will take care
of installing the "extras" for us.

Now that they are in a standard directory, we don't need to smuggle in
the extra `-I` for Nix's tests either.

(cherry picked from commit ab8cf01)
(cherry picked from commit 0acb4d6)
  • Loading branch information
Ericson2314 committed Jan 11, 2024
1 parent 86501af commit 63fa907
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 3 additions & 8 deletions pkgs/development/libraries/rapidcheck/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,15 @@ stdenv.mkDerivation rec {
hash = "sha256-nq2VBDREkAOnvtdYr3m0TYNXx7mv9hbV5HZFVL2uTTg=";
};

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 { };

meta = with lib; {
Expand Down
2 changes: 0 additions & 2 deletions pkgs/tools/package-management/nix/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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) [
Expand Down

0 comments on commit 63fa907

Please sign in to comment.