2020-04-20 06:51:06 +02:00
|
|
|
{ pkgs ? import <nixpkgs> { } }:
|
|
|
|
|
|
|
|
let
|
|
|
|
package = pkgs.callPackage ./. {};
|
2020-04-24 05:18:56 +02:00
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--enable-generic"
|
|
|
|
"--with-boost-libdir=${pkgs.boost.out}/lib"
|
|
|
|
"--with-boost=${pkgs.boost.dev}"
|
|
|
|
"--with-magic-file=${pkgs.file}/share/misc/magic.mgc"
|
2020-05-15 23:52:38 +02:00
|
|
|
"--with-rocksdb-includes=${pkgs.rocksdb.src}"
|
|
|
|
"--with-rocksdb-libs=${pkgs.rocksdb.out}"
|
2020-04-24 05:18:56 +02:00
|
|
|
"--enable-jemalloc"
|
|
|
|
"--with-imagemagick-includes=${pkgs.graphicsmagick}/include/GraphicsMagick"
|
|
|
|
"--with-log-level=DEBUG"
|
|
|
|
];
|
|
|
|
|
|
|
|
configure = pkgs.writeShellScriptBin "configure" ''
|
|
|
|
exec ./configure ${pkgs.lib.concatStringsSep " " configureFlags}
|
|
|
|
'';
|
2020-04-20 06:51:06 +02:00
|
|
|
in pkgs.mkShell {
|
|
|
|
buildInputs = with pkgs; [
|
2020-05-13 20:36:40 +02:00
|
|
|
libsodium openssl file boost gmp llvm rocksdb
|
2020-04-20 06:51:06 +02:00
|
|
|
zlib lz4 snappy
|
|
|
|
graphicsmagick
|
|
|
|
jemalloc
|
|
|
|
];
|
2020-04-24 05:18:56 +02:00
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
git autoconf automake libtool gcc clang cmake pkg-config doxygen graphviz
|
|
|
|
configure
|
|
|
|
];
|
2020-04-20 06:51:06 +02:00
|
|
|
|
|
|
|
shellHook = ''
|
|
|
|
WORKDIR=$(mktemp -d)
|
|
|
|
export RUNTIME_DIRECTORY=$WORKDIR/runtime
|
|
|
|
export STATE_DIRECTORY=$WORKDIR/state
|
|
|
|
export CACHE_DIRECTORY=$WORKDIR/cache
|
|
|
|
export LOGS_DIRECTORY=$WORKDIR/logs
|
|
|
|
export CONFIGURATION_DIRECTORY=$WORKDIR/configuration
|
|
|
|
|
|
|
|
mkdir -p $RUNTIME_DIRECTORY $STATE_DIRECTORY $LOGS_DIRECTORY
|
|
|
|
mkdir -p $CACHE_DIRECTORY $CONFIGURATION_DIRECTORY
|
|
|
|
'';
|
|
|
|
}
|