gmock: refactor source

This commit is contained in:
Vladimír Čunát 2016-01-18 18:45:03 +01:00
parent 352ff0be29
commit 4c1e9ffd12
2 changed files with 10 additions and 28 deletions

View File

@ -1,11 +1,13 @@
{ stdenv, cmake, callPackage }:
let
source = callPackage ./source.nix { };
in
stdenv.mkDerivation rec {
name = "gmock-${source.version}";
{ stdenv, cmake, fetchzip }:
src = source;
stdenv.mkDerivation rec {
name = "gmock-${version}";
version = "1.7.0";
src = fetchzip {
url = "https://googlemock.googlecode.com/files/gmock-${version}.zip";
sha256 = "04n9p6pf3mrqsabrsncv32d3fqvd86zmcdq3gyni7liszgfk0paz";
};
buildInputs = [ cmake ];
@ -28,5 +30,5 @@ stdenv.mkDerivation rec {
maintainers = [ stdenv.lib.maintainers.auntie ];
};
passthru = { inherit source; };
passthru = { source = src; };
}

View File

@ -1,20 +0,0 @@
{ fetchzip, stdenv, unzip, ... }:
stdenv.mkDerivation rec {
name = "gmock-src-${version}";
version = "1.7.0";
src = fetchzip {
url = "https://googlemock.googlecode.com/files/gmock-${version}.zip";
sha256="04n9p6pf3mrqsabrsncv32d3fqvd86zmcdq3gyni7liszgfk0paz";
};
buildInputs = [ unzip ];
installPhase = ''
mkdir $out
cp -r * $out
'';
passthru = { inherit version; };
}