gtest: Modularize out the source files into a derivation
This commit is contained in:
parent
967ad3fbc3
commit
f9dcf13b6e
|
@ -1,15 +1,13 @@
|
||||||
{ stdenv, fetchurl, unzip, cmake}:
|
{ stdenv, cmake, callPackage }:
|
||||||
|
let
|
||||||
|
source = callPackage ./source.nix { };
|
||||||
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
version = "1.7.0";
|
name = "gtest-${source.version}";
|
||||||
name = "gtest-${version}";
|
|
||||||
|
|
||||||
src = fetchurl {
|
src = source;
|
||||||
url = "https://googletest.googlecode.com/files/${name}.zip";
|
|
||||||
sha256="03fnw3bizw9bcx7l5qy1vz7185g33d5pxqcb6aqxwlrzv26s2z14";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildInputs = [ unzip cmake ];
|
buildInputs = [ cmake ];
|
||||||
|
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
mkdir build
|
mkdir build
|
||||||
|
@ -31,5 +29,6 @@ stdenv.mkDerivation rec {
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
maintainers = with maintainers; [ zoomulator ];
|
maintainers = with maintainers; [ zoomulator ];
|
||||||
};
|
};
|
||||||
}
|
|
||||||
|
|
||||||
|
passthru = { inherit source; };
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
{ fetchurl, stdenv, unzip, ... }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "gtest-src-${version}";
|
||||||
|
version = "1.7.0";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://googletest.googlecode.com/files/gtest-${version}.zip";
|
||||||
|
sha256 = "03fnw3bizw9bcx7l5qy1vz7185g33d5pxqcb6aqxwlrzv26s2z14";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ unzip ];
|
||||||
|
|
||||||
|
buildCommand = ''
|
||||||
|
unpackPhase
|
||||||
|
cd gtest-${version}
|
||||||
|
mkdir $out
|
||||||
|
cp -r * $out
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru = { inherit version; };
|
||||||
|
}
|
Loading…
Reference in New Issue