New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gtest: Add pkgconfig support #49310
gtest: Add pkgconfig support #49310
Conversation
Could you please rename commit message to |
I wonder why |
--- a/pkgs/development/libraries/gtest/default.nix
+++ b/pkgs/development/libraries/gtest/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, cmake, fetchFromGitHub }:
+{ stdenv, cmake, ninja, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "gtest-${version}";
version = "1.8.1";
@@ -10,24 +10,7 @@
sha256 = "0270msj6n7mggh4xqqjp54kswbl7mkcc8px1p5dqdpmw5ngh9fzk";
};
- buildInputs = [ cmake ];
-
- configurePhase = ''
- mkdir build
- cd build
- cmake ../ -DCMAKE_INSTALL_PREFIX=$out
- '';
-
- installPhase = ''
- mkdir -p $out/lib
- cp -v googlemock/gtest/libgtest.a googlemock/gtest/libgtest_main.a googlemock/libgmock.a googlemock/libgmock_main.a $out/lib
- ln -s $out/lib/libgmock.a $out/lib/libgoogletest.a
- mkdir -p $out/include
- cp -v -r ../googlemock/include/gmock $out/include
- cp -v -r ../googletest/include/gtest $out/include
- mkdir -p $out/src
- cp -v -r ../googlemock/src/* ../googletest/src/* $out/src
- '';
+ nativeBuildInputs = [ cmake ninja ];
meta = with stdenv.lib; {
description = "Google's framework for writing C++ tests"; |
a6971bd
to
7fc03ce
Compare
@jtojnar Thanks for looking at the builder. It looked also strange to me, but i didn't dig deeper due to my narrow focus on having |
3c176bd
to
d89ed3b
Compare
@GrahamcOfBorg build gtest |
Success on x86_64-darwin (full log) Attempted: gtest Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: gtest Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: gtest Partial log (click to expand)
|
Motivation for this change
Googletest generated some nice pkg-config files, which are cool for
pkg_check_modules
checks.Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)