diff options
author | Peter Simons <simons@cryp.to> | 2013-07-03 21:38:34 +0200 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2013-07-03 21:38:34 +0200 |
commit | 9e98650f8d32ed25fe04de141f17391490a1477d (patch) | |
tree | 4857da256606565807ee850aa29e977c8036933b /pkgs/development/libraries | |
parent | ea04555518f69a303ef63289ec79fabba1854982 (diff) |
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.
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/boost/header-only-wrapper.nix (renamed from pkgs/development/libraries/boost/1.54-headers.nix) | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/pkgs/development/libraries/boost/1.54-headers.nix b/pkgs/development/libraries/boost/header-only-wrapper.nix index c50833b12a360..d32462d37208d 100644 --- a/pkgs/development/libraries/boost/1.54-headers.nix +++ b/pkgs/development/libraries/boost/header-only-wrapper.nix @@ -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 { - name = "boost-headers-1.54.0"; + name = "boost-headers-${version}"; src = fetchurl { - url = "mirror://sourceforge/boost/boost_1_54_0.tar.bz2"; + url = "mirror://sourceforge/boost/${pkgid}.tar.bz2"; sha256 = "07df925k56pbz3gvhxpx54aij34qd40a7sxw4im11brnwdyr4zh4"; }; @@ -12,7 +17,7 @@ stdenv.mkDerivation { installPhase = '' 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 = { |