nixpkgs/pkgs/tools/filesystems/lizardfs/default.nix

71 lines
1.6 KiB
Nix
Raw Normal View History

{ stdenv
2018-08-23 19:49:33 +02:00
, fetchzip
, fetchFromGitHub
, cmake
, makeWrapper
, python
2018-11-22 03:54:14 +01:00
, db
, fuse
2016-06-17 00:12:55 +02:00
, asciidoc
, libxml2
, libxslt
2016-09-02 20:57:08 +02:00
, docbook_xml_dtd_412
, docbook_xsl
, boost
, pkgconfig
, judy
, pam
, zlib # optional
}:
2018-08-23 19:49:33 +02: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 {
name = "lizardfs-${version}";
2018-08-23 19:49:33 +02:00
version = "3.12.0";
src = fetchFromGitHub {
owner = "lizardfs";
repo = "lizardfs";
2016-09-14 19:04:23 +02:00
rev = "v${version}";
2018-08-23 19:49:33 +02:00
sha256 = "0zk73wmx82ari3m2mv0zx04x1ggsdmwcwn7k6bkl5c0jnxffc4ax";
};
2018-08-23 19:49:33 +02:00
nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
buildInputs =
2018-11-22 03:54:14 +01:00
[ db fuse asciidoc libxml2 libxslt docbook_xml_dtd_412 docbook_xsl
2018-08-23 19:49:33 +02:00
zlib boost judy pam
2016-09-02 20:57:08 +02:00
];
2018-08-23 19:49:33 +02: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/
'';
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 ];
};
}