diff options
author | D3vil0p3r <vozaanthony@gmail.com> | 2024-02-11 14:38:14 +0100 |
---|---|---|
committer | D3vil0p3r <vozaanthony@gmail.com> | 2024-02-17 13:34:22 +0100 |
commit | 96294a048d993610633732493d9d6092b2f5b157 (patch) | |
tree | 722ab9817e2e0cf474ecee0e1f2303cee960b102 /pkgs/by-name/sc | |
parent | eacbf8380266646ff2a96c1de5cbb3c9c13ed66d (diff) |
scrounge-ntfs: init at 0.9
Diffstat (limited to 'pkgs/by-name/sc')
-rw-r--r-- | pkgs/by-name/sc/scrounge-ntfs/darwin.diff | 42 | ||||
-rw-r--r-- | pkgs/by-name/sc/scrounge-ntfs/package.nix | 27 |
2 files changed, 69 insertions, 0 deletions
diff --git a/pkgs/by-name/sc/scrounge-ntfs/darwin.diff b/pkgs/by-name/sc/scrounge-ntfs/darwin.diff new file mode 100644 index 0000000000000..fb4620198d073 --- /dev/null +++ b/pkgs/by-name/sc/scrounge-ntfs/darwin.diff @@ -0,0 +1,42 @@ +diff -ur a/src/compat.h b/src/compat.h +--- a/src/compat.h 2007-05-27 00:59:43.000000000 +0000 ++++ b/src/compat.h 2024-02-17 11:53:01.541895388 +0000 +@@ -27,6 +27,7 @@ + #ifdef HAVE_CONFIG_H + #include "config.h" + #endif ++#include <sys/stat.h> + #endif + + #include <sys/types.h> +@@ -186,6 +187,8 @@ + void vwarnc(int code, const char *fmt, va_list ap); + void warnx(const char *fmt, ...); + void vwarnx(const char *fmt, va_list ap); ++#else ++#include <err.h> + #endif + + #ifndef HAVE_REALLOCF +@@ -323,7 +326,8 @@ + #ifdef _WIN32 + #define lseek64 _lseeki64 + #else +- #if SIZEOF_OFF_T == 8 ++ #if SIZEOF_OFF_T == 8 || defined(__APPLE__) ++ _Static_assert(sizeof(off_t) == 8, "off_t must be 8 bytes"); + #define lseek64 lseek + #else + #error ERROR: Must have a working 64 bit seek function +diff -ur a/src/ntfs.c b/src/ntfs.c +--- a/src/ntfs.c 2007-05-27 01:00:08.000000000 +0000 ++++ b/src/ntfs.c 2024-02-17 11:48:19.402694507 +0000 +@@ -20,7 +20,7 @@ + #include "usuals.h" + #include "ntfs.h" + +-#include "malloc.h" ++#include "stdlib.h" + #include "string.h" + + diff --git a/pkgs/by-name/sc/scrounge-ntfs/package.nix b/pkgs/by-name/sc/scrounge-ntfs/package.nix new file mode 100644 index 0000000000000..51c0b1860750d --- /dev/null +++ b/pkgs/by-name/sc/scrounge-ntfs/package.nix @@ -0,0 +1,27 @@ +{ lib +, stdenv +, fetchurl +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "scrounge-ntfs"; + version = "0.9"; + + src = fetchurl { + url = "http://thewalter.net/stef/software/scrounge/scrounge-ntfs-${finalAttrs.version}.tar.gz"; + hash = "sha256-HYrMIMTRPmgAac/vaZ1jaUFchyAl5B0quxgHH0DHJ84="; + }; + + patches = [ + ./darwin.diff + ]; + + meta = with lib; { + description = "Data recovery program for NTFS file systems"; + mainProgram = "scrounge-ntfs"; + homepage = "http://thewalter.net/stef/software/scrounge/"; + maintainers = with maintainers; [ d3vil0p3r ]; + platforms = platforms.unix; + license = licenses.bsd3; + }; +}) |