boost: generalize the header-only expression

The 'header-only-wrapper' expression can now wrap any version of boost
that's passed to it as an argument.
This commit is contained in:
Peter Simons 2013-07-03 21:38:34 +02:00
parent ea04555518
commit 9e98650f8d
2 changed files with 10 additions and 6 deletions

View File

@ -1,10 +1,15 @@
{ stdenv, fetchurl }: { stdenv, fetchurl, boost }:
let
version = stdenv.lib.removePrefix "boost-" boost.name;
pkgid = stdenv.lib.replaceChars ["-" "."] ["_" "_"] boost.name;
in
stdenv.mkDerivation { stdenv.mkDerivation {
name = "boost-headers-1.54.0"; name = "boost-headers-${version}";
src = fetchurl { src = fetchurl {
url = "mirror://sourceforge/boost/boost_1_54_0.tar.bz2"; url = "mirror://sourceforge/boost/${pkgid}.tar.bz2";
sha256 = "07df925k56pbz3gvhxpx54aij34qd40a7sxw4im11brnwdyr4zh4"; sha256 = "07df925k56pbz3gvhxpx54aij34qd40a7sxw4im11brnwdyr4zh4";
}; };
@ -12,7 +17,7 @@ stdenv.mkDerivation {
installPhase = '' installPhase = ''
mkdir -p $out/include mkdir -p $out/include
tar xf $src -C $out/include --strip-components=1 boost_1_54_0/boost tar xf $src -C $out/include --strip-components=1 ${pkgid}/boost
''; '';
meta = { meta = {

View File

@ -3703,8 +3703,7 @@ let
boost154 = callPackage ../development/libraries/boost/1.54.nix { }; boost154 = callPackage ../development/libraries/boost/1.54.nix { };
boost = boost154; boost = boost154;
boostHeaders154 = callPackage ../development/libraries/boost/1.54-headers.nix { }; boostHeaders = callPackage ../development/libraries/boost/header-only-wrapper.nix { };
boostHeaders = boostHeaders154;
botan = callPackage ../development/libraries/botan { }; botan = callPackage ../development/libraries/botan { };