Created
March 13, 2024 21:29
-
-
Save krupkat/d4880b048b28bd967dc4c3233c458105 to your computer and use it in GitHub Desktop.
[Boost with C++20] #boost #nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> { } }: | |
let | |
build-env = pkgs.stdenv; | |
boost-src = { | |
version = "1.84.0"; | |
src = pkgs.fetchurl { | |
url = "https://archives.boost.io/release/1.84.0/source/boost_1_84_0.tar.bz2"; | |
sha256 = "cc4b893acf645c9d4b698e9a0f08ca8846aa5d6c68275c14c3e7949c24109454"; | |
}; | |
}; | |
boost-build = pkgs.boost-build.override { | |
stdenv = build-env; | |
useBoost = boost-src; | |
}; | |
boost184 = (pkgs.boost.override { | |
stdenv = build-env; | |
boost-build = boost-build; | |
extraB2Args = [ "cxxstd=20" ]; | |
}).overrideAttrs | |
(finalAttrs: previousAttrs: boost-src); | |
in | |
build-env.mkDerivation { | |
name = "boost184-nix-shell"; | |
nativeBuildInputs = with pkgs; [ | |
clang-tools_17 | |
cmake | |
]; | |
buildInputs = with pkgs; [ | |
boost184 | |
openssl | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment