2017-05-15 15:30:33 +00:00
|
|
|
{ pkgs }:
|
|
|
|
|
2018-03-14 18:11:13 +00:00
|
|
|
with pkgs;
|
|
|
|
|
2018-07-03 16:15:59 +00:00
|
|
|
let
|
|
|
|
|
|
|
|
cpptoml = runCommand "cpptoml"
|
|
|
|
{ src = fetchFromGitHub {
|
|
|
|
owner = "skystrife";
|
|
|
|
repo = "cpptoml";
|
|
|
|
rev = "43d7d8e52de149fd84aedf7eb71814ff9e6b2f7e";
|
|
|
|
sha256 = "0gdxk1mj5hpj93df1kwfl903w06nihbb1ayr3x336775jm2d2cw6";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
''
|
|
|
|
mkdir -p $out/include
|
|
|
|
cp $src/include/cpptoml.h $out/include/
|
|
|
|
'';
|
|
|
|
|
|
|
|
in
|
|
|
|
|
2017-05-15 15:30:33 +00:00
|
|
|
rec {
|
2018-02-05 17:28:27 +00:00
|
|
|
# Use "busybox-sandbox-shell" if present,
|
|
|
|
# if not (legacy) fallback and hope it's sufficient.
|
2018-03-14 18:11:13 +00:00
|
|
|
sh = pkgs.busybox-sandbox-shell or (busybox.override {
|
2017-05-15 15:30:33 +00:00
|
|
|
useMusl = true;
|
|
|
|
enableStatic = true;
|
|
|
|
enableMinimal = true;
|
|
|
|
extraConfig = ''
|
2018-02-05 16:25:26 +00:00
|
|
|
CONFIG_FEATURE_FANCY_ECHO y
|
|
|
|
CONFIG_FEATURE_SH_MATH y
|
|
|
|
CONFIG_FEATURE_SH_MATH_64 y
|
|
|
|
|
2017-05-15 15:30:33 +00:00
|
|
|
CONFIG_ASH y
|
2018-02-05 16:25:26 +00:00
|
|
|
CONFIG_ASH_OPTIMIZE_FOR_SIZE y
|
|
|
|
|
|
|
|
CONFIG_ASH_ALIAS y
|
|
|
|
CONFIG_ASH_BASH_COMPAT y
|
|
|
|
CONFIG_ASH_CMDCMD y
|
2017-10-07 12:43:55 +00:00
|
|
|
CONFIG_ASH_ECHO y
|
2018-02-05 16:25:26 +00:00
|
|
|
CONFIG_ASH_GETOPTS y
|
|
|
|
CONFIG_ASH_INTERNAL_GLOB y
|
|
|
|
CONFIG_ASH_JOB_CONTROL y
|
|
|
|
CONFIG_ASH_PRINTF y
|
2017-10-07 12:43:55 +00:00
|
|
|
CONFIG_ASH_TEST y
|
2017-05-15 15:30:33 +00:00
|
|
|
'';
|
2018-02-05 17:28:27 +00:00
|
|
|
});
|
2017-05-15 15:30:33 +00:00
|
|
|
|
|
|
|
configureFlags =
|
|
|
|
[ "--disable-init-state"
|
|
|
|
"--enable-gc"
|
2018-03-14 18:11:13 +00:00
|
|
|
] ++ lib.optionals stdenv.isLinux [
|
2017-05-15 15:30:33 +00:00
|
|
|
"--with-sandbox-shell=${sh}/bin/busybox"
|
|
|
|
];
|
2018-03-14 18:11:13 +00:00
|
|
|
|
|
|
|
tarballDeps =
|
|
|
|
[ bison
|
|
|
|
flex
|
|
|
|
libxml2
|
|
|
|
libxslt
|
|
|
|
docbook5
|
|
|
|
docbook5_xsl
|
|
|
|
autoconf-archive
|
|
|
|
autoreconfHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildDeps =
|
|
|
|
[ curl
|
|
|
|
bzip2 xz brotli
|
|
|
|
openssl pkgconfig sqlite boehmgc
|
|
|
|
boost
|
2018-07-03 16:15:59 +00:00
|
|
|
cpptoml
|
2018-03-14 18:11:13 +00:00
|
|
|
|
|
|
|
# Tests
|
|
|
|
git
|
|
|
|
mercurial
|
|
|
|
]
|
2018-06-18 20:50:37 +00:00
|
|
|
++ lib.optionals stdenv.isLinux [libseccomp utillinuxMinimal]
|
2018-03-14 18:11:13 +00:00
|
|
|
++ lib.optional (stdenv.isLinux || stdenv.isDarwin) libsodium
|
|
|
|
++ lib.optional (stdenv.isLinux || stdenv.isDarwin)
|
|
|
|
(aws-sdk-cpp.override {
|
2018-05-07 13:23:51 +00:00
|
|
|
apis = ["s3" "transfer"];
|
2018-03-14 18:11:13 +00:00
|
|
|
customMemoryManagement = false;
|
|
|
|
});
|
|
|
|
|
|
|
|
perlDeps =
|
|
|
|
[ perl
|
|
|
|
perlPackages.DBDSQLite
|
|
|
|
];
|
2017-05-15 15:30:33 +00:00
|
|
|
}
|