about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/filesystems/f2fs-tools
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/filesystems/f2fs-tools')
-rw-r--r--nixpkgs/pkgs/tools/filesystems/f2fs-tools/default.nix25
-rw-r--r--nixpkgs/pkgs/tools/filesystems/f2fs-tools/f2fs-tools-cross-fix.patch29
2 files changed, 54 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/filesystems/f2fs-tools/default.nix b/nixpkgs/pkgs/tools/filesystems/f2fs-tools/default.nix
new file mode 100644
index 000000000000..4b3d5c9ac1ef
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/f2fs-tools/default.nix
@@ -0,0 +1,25 @@
+{ lib, stdenv, fetchgit, autoreconfHook, libselinux, libuuid, pkg-config }:
+
+stdenv.mkDerivation rec {
+  pname = "f2fs-tools";
+  version = "1.14.0";
+
+  src = fetchgit {
+    url = "https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git";
+    rev = "refs/tags/v${version}";
+    sha256 = "06ss05n87i1c3149qb3n7j1qp2scv3g2adx0v6ljkl59ab9b5saj";
+  };
+
+  nativeBuildInputs = [ autoreconfHook pkg-config ];
+  buildInputs = [ libselinux libuuid ];
+
+  patches = [ ./f2fs-tools-cross-fix.patch ];
+
+  meta = with lib; {
+    homepage = "http://git.kernel.org/cgit/linux/kernel/git/jaegeuk/f2fs-tools.git/";
+    description = "Userland tools for the f2fs filesystem";
+    license = licenses.gpl2;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ ehmry jagajaga ];
+  };
+}
diff --git a/nixpkgs/pkgs/tools/filesystems/f2fs-tools/f2fs-tools-cross-fix.patch b/nixpkgs/pkgs/tools/filesystems/f2fs-tools/f2fs-tools-cross-fix.patch
new file mode 100644
index 000000000000..e01a97b0bc3c
--- /dev/null
+++ b/nixpkgs/pkgs/tools/filesystems/f2fs-tools/f2fs-tools-cross-fix.patch
@@ -0,0 +1,29 @@
+diff --git a/configure.ac b/configure.ac
+index 9b0e872..0108219 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -20,14 +20,16 @@ AC_DEFINE([F2FS_MINOR_VERSION], m4_bpatsubst(f2fs_tools_version,
+ 				[\([0-9]*\).\([0-9]*\)\(\w\|\W\)*], [\2]),
+ 				[Minor version for f2fs-tools])
+ 
+-AS_IF([test -d .git],[
+-	AC_DEFINE([F2FS_TOOLS_DATE],
+-		"m4_bpatsubst(f2fs_tools_gitdate,
+-		[\([0-9-]*\)\(\w\|\W\)*], [\1])",
+-		[f2fs-tools date based on Git commits])],[
+-	AC_DEFINE([F2FS_TOOLS_DATE],
+-		"f2fs_tools_date",
+-		[f2fs-tools date based on Source releases])])
++dnl AS_IF([test -d .git],[
++dnl	AC_DEFINE([F2FS_TOOLS_DATE],
++dnl		"m4_bpatsubst(f2fs_tools_gitdate,
++dnl		[\([0-9-]*\)\(\w\|\W\)*], [\1])",
++dnl		[f2fs-tools date based on Git commits])],[
++dnl	AC_DEFINE([F2FS_TOOLS_DATE],
++dnl		"f2fs_tools_date",
++dnl		[f2fs-tools date based on Source releases])])
++
++AC_DEFINE([F2FS_TOOLS_DATE], "f2fs_tools_date", [f2fs-tools date based on Source releases])
+ 
+ AC_CONFIG_SRCDIR([config.h.in])
+ AC_CONFIG_HEADER([config.h])