summary refs log tree commit diff
path: root/pkgs/tools/filesystems
diff options
context:
space:
mode:
authorRenaud <c0bw3b@users.noreply.github.com>2019-10-25 07:54:24 +0200
committerGitHub <noreply@github.com>2019-10-25 07:54:24 +0200
commitb74a6b11a6b62eca1facb8db3fc372cc14104884 (patch)
treee45cd5537fe2877de291f59a3513849317690d3d /pkgs/tools/filesystems
parentd463f540c61aa40dadfb64d4ba59b8f6781a0c11 (diff)
downloadnixpkgs-b74a6b11a6b62eca1facb8db3fc372cc14104884.tar
nixpkgs-b74a6b11a6b62eca1facb8db3fc372cc14104884.tar.gz
nixpkgs-b74a6b11a6b62eca1facb8db3fc372cc14104884.tar.bz2
nixpkgs-b74a6b11a6b62eca1facb8db3fc372cc14104884.tar.lz
nixpkgs-b74a6b11a6b62eca1facb8db3fc372cc14104884.tar.xz
nixpkgs-b74a6b11a6b62eca1facb8db3fc372cc14104884.tar.zst
nixpkgs-b74a6b11a6b62eca1facb8db3fc372cc14104884.zip
lizardfs: use spdlog from nixpkgs (#71938)
Diffstat (limited to 'pkgs/tools/filesystems')
-rw-r--r--pkgs/tools/filesystems/lizardfs/default.nix45
-rw-r--r--pkgs/tools/filesystems/lizardfs/remove-download-external.patch25
2 files changed, 17 insertions, 53 deletions
diff --git a/pkgs/tools/filesystems/lizardfs/default.nix b/pkgs/tools/filesystems/lizardfs/default.nix
index 6a9d68291f2..3ae898d4ba8 100644
--- a/pkgs/tools/filesystems/lizardfs/default.nix
+++ b/pkgs/tools/filesystems/lizardfs/default.nix
@@ -1,9 +1,9 @@
 { stdenv
-, fetchzip
 , fetchFromGitHub
+, fetchpatch
 , cmake
 , makeWrapper
-, python
+, python2
 , db
 , fuse
 , asciidoc
@@ -15,25 +15,17 @@
 , pkgconfig
 , judy
 , pam
+, spdlog
 , zlib # optional
 }:
 
-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 {
+stdenv.mkDerivation rec {
   pname = "lizardfs";
   version = "3.12.0";
 
   src = fetchFromGitHub {
-    owner = "lizardfs";
-    repo = "lizardfs";
+    owner = pname;
+    repo = pname;
     rev = "v${version}";
     sha256 = "0zk73wmx82ari3m2mv0zx04x1ggsdmwcwn7k6bkl5c0jnxffc4ax";
   };
@@ -42,26 +34,23 @@ in stdenv.mkDerivation rec {
 
   buildInputs =
     [ db fuse asciidoc libxml2 libxslt docbook_xml_dtd_412 docbook_xsl
-      zlib boost judy pam
+      zlib boost judy pam spdlog python2
     ];
 
   patches = [
-    ./remove-download-external.patch
+    # Use system-provided spdlog instead of downloading an old one (next two patches)
+    (fetchpatch {
+      url = "https://salsa.debian.org/debian/lizardfs/raw/d003c371/debian/patches/system-spdlog.patch";
+      sha256 = "1znpqqzb0k5bb7s4d7abfxzn5ry1khz8r76sb808c95cpkw91a9i";
+    })
+    (fetchpatch {
+      url = "https://salsa.debian.org/debian/lizardfs/raw/bfcd5bcf/debian/patches/spdlog.patch";
+      sha256 = "0j44rb816i6kfh3y2qdha59c4ja6wmcnlrlq29il4ybxn42914md";
+    })
   ];
 
-  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;
+    homepage = "https://lizardfs.com";
     description = "A highly reliable, scalable and efficient distributed file system";
     platforms = platforms.linux;
     license = licenses.gpl3;
diff --git a/pkgs/tools/filesystems/lizardfs/remove-download-external.patch b/pkgs/tools/filesystems/lizardfs/remove-download-external.patch
deleted file mode 100644
index 6bbe9519777..00000000000
--- a/pkgs/tools/filesystems/lizardfs/remove-download-external.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From d3f8111ade372c1eb7f3973031f59198508fb588 Mon Sep 17 00:00:00 2001
-From: Kevin Liu <kevin@potatofrom.space>
-Date: Thu, 23 Aug 2018 10:31:42 -0400
-Subject: [PATCH] Remove download_external for spdlog
-
----
- cmake/Libraries.cmake | 5 -----
- 1 file changed, 5 deletions(-)
-
-diff --git a/cmake/Libraries.cmake b/cmake/Libraries.cmake
-index 1f951e59..2134444a 100644
---- a/cmake/Libraries.cmake
-+++ b/cmake/Libraries.cmake
-@@ -7,11 +7,6 @@ if(ENABLE_TESTS)
-                     "ef5e700c8a0f3ee123e2e0209b8b4961")
- endif()
- 
--download_external(SPDLOG "spdlog-0.14.0"
--                  "https://github.com/gabime/spdlog/archive/v0.14.0.zip"
--                  "f213d83c466aa7044a132e2488d71b11"
--                  "spdlog-1")
--
- # Find standard libraries
- find_package(Socket REQUIRED)
- find_package(Threads REQUIRED)