summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorWilliam A. Kennington III <william@wkennington.com>2014-10-29 09:22:58 -0700
committerWilliam A. Kennington III <william@wkennington.com>2014-10-29 09:23:08 -0700
commit578d77ae0efd05e586dddea52926990644c0df49 (patch)
tree1746ccbef9116d28a024bf1462597543106ace5f /pkgs/tools
parent18548efe659147a3f9ae3661cbeb9fc6162d3b42 (diff)
downloadnixpkgs-578d77ae0efd05e586dddea52926990644c0df49.tar
nixpkgs-578d77ae0efd05e586dddea52926990644c0df49.tar.gz
nixpkgs-578d77ae0efd05e586dddea52926990644c0df49.tar.bz2
nixpkgs-578d77ae0efd05e586dddea52926990644c0df49.tar.lz
nixpkgs-578d77ae0efd05e586dddea52926990644c0df49.tar.xz
nixpkgs-578d77ae0efd05e586dddea52926990644c0df49.tar.zst
nixpkgs-578d77ae0efd05e586dddea52926990644c0df49.zip
jfsrec: Undelete and fix evaluation
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/filesystems/jfsrec/default.nix23
-rw-r--r--pkgs/tools/filesystems/jfsrec/jfsrec-gcc-4.3.patch24
2 files changed, 47 insertions, 0 deletions
diff --git a/pkgs/tools/filesystems/jfsrec/default.nix b/pkgs/tools/filesystems/jfsrec/default.nix
new file mode 100644
index 00000000000..5b5e7c8808e
--- /dev/null
+++ b/pkgs/tools/filesystems/jfsrec/default.nix
@@ -0,0 +1,23 @@
+{ stdenv, fetchurl, boost }:
+
+stdenv.mkDerivation {
+  name = "jfsrec-0-pre-svn-7";
+
+  src = fetchurl {
+    url = mirror://sourceforge/jfsrec/jfsrec-svn-7.tar.gz;
+    sha256 = "163z6ljr05vw2k5mj4fim2nlg4khjyibrii95370pvn474mg28vg";
+  };
+
+  patches = [ ./jfsrec-gcc-4.3.patch ];
+  buildInputs = [ boost ];
+
+  preConfigure =
+    ''
+      sed -e '/[#]include [<]config.h[>]/a\#include <string.h>' -i src/unicode_to_utf8.cpp
+    '';
+
+  meta = {
+    description = "JFS recovery tool";
+    homepage = http://jfsrec.sourceforge.net/;
+  };
+}
diff --git a/pkgs/tools/filesystems/jfsrec/jfsrec-gcc-4.3.patch b/pkgs/tools/filesystems/jfsrec/jfsrec-gcc-4.3.patch
new file mode 100644
index 00000000000..063a7c24813
--- /dev/null
+++ b/pkgs/tools/filesystems/jfsrec/jfsrec-gcc-4.3.patch
@@ -0,0 +1,24 @@
+Taken from Archlinux, although this solves the build in gcc 4.4, not 4.3.
+http://aur.archlinux.org/packages/jfsrec-svn/jfsrec-svn/jfsrec-gcc-4.3.patch
+diff -uBdr jfsrec/src/device.cpp jfsrec-build/src/device.cpp
+--- jfsrec/src/device.cpp	2009-12-01 18:34:03.860437077 +0100
++++ jfsrec-build/src/device.cpp	2009-12-01 18:39:48.297067088 +0100
+@@ -20,6 +20,7 @@
+ //Parts of the code in this file was originally taken from JFS's xpeek (debugfs_jfs)
+ 
+ #include "device.h"
++#include <stdio.h>
+ #ifdef __linux__
+  #include <linux/fs.h>
+  #include <sys/ioctl.h>
+diff -uBdr jfsrec/src/unicode_to_utf8.cpp jfsrec-build/src/unicode_to_utf8.cpp
+--- jfsrec/src/unicode_to_utf8.cpp	2009-12-01 18:34:03.860437077 +0100
++++ jfsrec-build/src/unicode_to_utf8.cpp	2009-12-01 18:39:43.501626737 +0100
+@@ -8,6 +8,7 @@
+  */
+ #include <config.h>
+ #include "unicode_to_utf8.h"
++#include <string.h>
+ #define JFS_PATH_MAX 4096
+ 
+ /*