From c04bca34016c41d1fcab222e2d61a26a285340c6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 14 Mar 2018 19:11:13 +0100 Subject: Factor out commonality between release.nix and shell.nix --- release-common.nix | 40 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) (limited to 'release-common.nix') diff --git a/release-common.nix b/release-common.nix index f9df6fab9ff6..0c12bc7ceb38 100644 --- a/release-common.nix +++ b/release-common.nix @@ -1,9 +1,11 @@ { pkgs }: +with pkgs; + rec { # Use "busybox-sandbox-shell" if present, # if not (legacy) fallback and hope it's sufficient. - sh = pkgs.busybox-sandbox-shell or (pkgs.busybox.override { + sh = pkgs.busybox-sandbox-shell or (busybox.override { useMusl = true; enableStatic = true; enableMinimal = true; @@ -30,7 +32,41 @@ rec { configureFlags = [ "--disable-init-state" "--enable-gc" - ] ++ pkgs.lib.optionals pkgs.stdenv.isLinux [ + ] ++ lib.optionals stdenv.isLinux [ "--with-sandbox-shell=${sh}/bin/busybox" ]; + + tarballDeps = + [ bison + flex + libxml2 + libxslt + docbook5 + docbook5_xsl + autoconf-archive + autoreconfHook + ]; + + buildDeps = + [ curl + bzip2 xz brotli + openssl pkgconfig sqlite boehmgc + boost + + # Tests + git + mercurial + ] + ++ lib.optional stdenv.isLinux libseccomp + ++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium + ++ lib.optional (stdenv.isLinux || stdenv.isDarwin) + (aws-sdk-cpp.override { + apis = ["s3"]; + customMemoryManagement = false; + }); + + perlDeps = + [ perl + perlPackages.DBDSQLite + ]; } -- cgit 1.4.1