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

70 lines
1.6 KiB
Nix
Raw Normal View History

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