From 768fe6ed06b52efa5ba4b1b339200696bd2d0cca Mon Sep 17 00:00:00 2001 From: "William A. Kennington III" Date: Sun, 14 Sep 2014 15:10:03 -0700 Subject: [PATCH] boost-build: Add derivation --- .../development/tools/boost-build/default.nix | 44 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 46 insertions(+) create mode 100644 pkgs/development/tools/boost-build/default.nix diff --git a/pkgs/development/tools/boost-build/default.nix b/pkgs/development/tools/boost-build/default.nix new file mode 100644 index 000000000000..5538eae4104a --- /dev/null +++ b/pkgs/development/tools/boost-build/default.nix @@ -0,0 +1,44 @@ +{ stdenv, fetchurl }: + +stdenv.mkDerivation rec { + name = "boost-build-2.0-m12"; + + src = fetchurl { + url = "mirror://sourceforge/boost/${name}.tar.bz2"; + sha256 = "10sbbkx2752r4i1yshyp47nw29lyi1p34sy6hj7ivvnddiliayca"; + }; + + patchPhase = '' + grep -r '/usr/share/boost-build' \ + | awk '{split($0,a,":"); print a[1];}' \ + | xargs sed -i "s,/usr/share/boost-build,$out/share/boost-build," + ''; + + buildPhase = '' + cd jam_src + ./build.sh + ''; + + installPhase = '' + # Install Bjam + mkdir -p $out/bin + cd "$(ls | grep bin)" + cp -a bjam $out/bin + + # Bjam is B2 + ln -s bjam $out/bin/b2 + + # Install the shared files (don't include jam_src) + cd ../.. + rm -rf jam_src + mkdir -p $out/share + cp -a . $out/share/boost-build + ''; + + meta = with stdenv.lib; { + homepage = http://www.boost.org/boost-build2/; + license = "boost-license"; + platforms = platforms.unix; + maintainers = with maintainers; [ wkennington ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dffb37bf4661..b08950702277 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -599,6 +599,8 @@ let boomerang = callPackage ../development/tools/boomerang { }; + boost-build = callPackage ../development/tools/boost-build { }; + bootchart = callPackage ../tools/system/bootchart { }; bro = callPackage ../applications/networking/ids/bro { };