summary refs log tree commit diff
path: root/pkgs/tools/filesystems/lizardfs
diff options
context:
space:
mode:
authorKevin Liu <kevin@potatofrom.space>2018-08-23 13:49:33 -0400
committerKevin Liu <kevin@potatofrom.space>2018-11-24 19:43:03 -0500
commit4bbc1a6ce39a7e9313ef7b46d5da6e92e79884e1 (patch)
tree8d4e13cf4c3feacbeaa4eccd7bb46eb023cf05c1 /pkgs/tools/filesystems/lizardfs
parente81b1a06beb95d3bbb0496bfe882aa93a2f84d45 (diff)
downloadnixpkgs-4bbc1a6ce39a7e9313ef7b46d5da6e92e79884e1.tar
nixpkgs-4bbc1a6ce39a7e9313ef7b46d5da6e92e79884e1.tar.gz
nixpkgs-4bbc1a6ce39a7e9313ef7b46d5da6e92e79884e1.tar.bz2
nixpkgs-4bbc1a6ce39a7e9313ef7b46d5da6e92e79884e1.tar.lz
nixpkgs-4bbc1a6ce39a7e9313ef7b46d5da6e92e79884e1.tar.xz
nixpkgs-4bbc1a6ce39a7e9313ef7b46d5da6e92e79884e1.tar.zst
nixpkgs-4bbc1a6ce39a7e9313ef7b46d5da6e92e79884e1.zip
lizardfs: 3.11.3 -> 3.12.0
Diffstat (limited to 'pkgs/tools/filesystems/lizardfs')
-rw-r--r--pkgs/tools/filesystems/lizardfs/default.nix37
-rw-r--r--pkgs/tools/filesystems/lizardfs/remove-download-external.patch25
2 files changed, 53 insertions, 9 deletions
diff --git a/pkgs/tools/filesystems/lizardfs/default.nix b/pkgs/tools/filesystems/lizardfs/default.nix
index 0c8f05d6904..4aeadefee34 100644
--- a/pkgs/tools/filesystems/lizardfs/default.nix
+++ b/pkgs/tools/filesystems/lizardfs/default.nix
@@ -1,4 +1,5 @@
 { stdenv
+, fetchzip
 , fetchFromGitHub
 , cmake
 , makeWrapper
@@ -16,28 +17,46 @@
 , zlib # optional
 }:
 
-stdenv.mkDerivation rec {
+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}";
-  version = "3.11.3";
+  version = "3.12.0";
 
   src = fetchFromGitHub {
     owner = "lizardfs";
     repo = "lizardfs";
     rev = "v${version}";
-    sha256 = "1njgj242vgpdqb1di321jfqk4al5lk72x2iyp0nldy7h6r98l2ww";
+    sha256 = "0zk73wmx82ari3m2mv0zx04x1ggsdmwcwn7k6bkl5c0jnxffc4ax";
   };
 
-  buildInputs = 
-    [ cmake fuse asciidoc libxml2 libxslt docbook_xml_dtd_412 docbook_xsl
-      zlib boost pkgconfig judy pam makeWrapper
+  nativeBuildInputs = [ cmake pkgconfig makeWrapper ];
+
+  buildInputs =
+    [ fuse asciidoc libxml2 libxslt docbook_xml_dtd_412 docbook_xsl
+      zlib boost judy pam
     ];
 
+  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"
-
-    # mfssnapshot and mfscgiserv are deprecated
-    rm $out/bin/mfssnapshot $out/sbin/mfscgiserv
   '';
 
   meta = with stdenv.lib; {
diff --git a/pkgs/tools/filesystems/lizardfs/remove-download-external.patch b/pkgs/tools/filesystems/lizardfs/remove-download-external.patch
new file mode 100644
index 00000000000..6bbe9519777
--- /dev/null
+++ b/pkgs/tools/filesystems/lizardfs/remove-download-external.patch
@@ -0,0 +1,25 @@
+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)