2016-06-14 19:29:50 +01:00
|
|
|
{ stdenv
|
2018-08-23 18:49:33 +01:00
|
|
|
, fetchzip
|
2016-06-14 19:29:50 +01:00
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, makeWrapper
|
|
|
|
, python
|
2018-11-22 02:54:14 +00:00
|
|
|
, db
|
2016-06-14 19:29:50 +01:00
|
|
|
, fuse
|
2016-06-16 23:12:55 +01:00
|
|
|
, asciidoc
|
|
|
|
, libxml2
|
|
|
|
, libxslt
|
2016-09-02 19:57:08 +01:00
|
|
|
, docbook_xml_dtd_412
|
|
|
|
, docbook_xsl
|
2016-06-14 19:29:50 +01:00
|
|
|
, boost
|
|
|
|
, pkgconfig
|
|
|
|
, judy
|
|
|
|
, pam
|
|
|
|
, zlib # optional
|
|
|
|
}:
|
|
|
|
|
2018-08-23 18:49:33 +01:00
|
|
|
let
|
|
|
|
# See https://github.com/lizardfs/lizardfs/blob/3.12/cmake/Libraries.cmake
|
|
|
|
# We have to download it ourselves, as the build script normally does a download
|
|
|
|
# on-build, which is not good
|
|
|
|
spdlog = fetchzip {
|
|
|
|
name = "spdlog-0.14.0";
|
|
|
|
url = "https://github.com/gabime/spdlog/archive/v0.14.0.zip";
|
|
|
|
sha256 = "13730429gwlabi432ilpnja3sfvy0nn2719vnhhmii34xcdyc57q";
|
|
|
|
};
|
|
|
|
in stdenv.mkDerivation rec {
|
2016-06-14 19:29:50 +01:00
|
|
|
name = "lizardfs-${version}";
|
2018-08-23 18:49:33 +01:00
|
|
|
version = "3.12.0";
|
2016-06-14 19:29:50 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lizardfs";
|
|
|
|
repo = "lizardfs";
|
2016-09-14 18:04:23 +01:00
|
|
|
rev = "v${version}";
|
2018-08-23 18:49:33 +01:00
|
|
|
sha256 = "0zk73wmx82ari3m2mv0zx04x1ggsdmwcwn7k6bkl5c0jnxffc4ax";
|
2016-06-14 19:29:50 +01:00
|
|
|
};
|
|
|
|
|
2018-08-23 18:49:33 +01:00
|
|
|
nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
|
|
|
|
|
|
|
|
buildInputs =
|
2018-11-22 02:54:14 +00:00
|
|
|
[ db fuse asciidoc libxml2 libxslt docbook_xml_dtd_412 docbook_xsl
|
2018-08-23 18:49:33 +01:00
|
|
|
zlib boost judy pam
|
2016-09-02 19:57:08 +01:00
|
|
|
];
|
2016-06-14 19:29:50 +01:00
|
|
|
|
2018-08-23 18:49:33 +01:00
|
|
|
patches = [
|
|
|
|
./remove-download-external.patch
|
|
|
|
];
|
|
|
|
|
|
|
|
postUnpack = ''
|
|
|
|
mkdir $sourceRoot/external/spdlog-0.14.0
|
|
|
|
cp -R ${spdlog}/* $sourceRoot/external/spdlog-0.14.0/
|
|
|
|
chmod -R 755 $sourceRoot/external/spdlog-0.14.0/
|
|
|
|
'';
|
|
|
|
|
2016-06-14 19:29:50 +01:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/sbin/lizardfs-cgiserver \
|
|
|
|
--prefix PATH ":" "${python}/bin"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = https://lizardfs.com;
|
|
|
|
description = "A highly reliable, scalable and efficient distributed file system";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl3;
|
|
|
|
maintainers = [ maintainers.rushmorem ];
|
|
|
|
};
|
|
|
|
}
|