summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD3vil0p3r <vozaanthony@gmail.com>2024-02-17 14:58:04 +0100
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2024-04-29 18:59:32 +0000
commit866a0cac87d9b85d38371491042af4cddd524b8e (patch)
tree994350fca4d98371150a9fd1b9e51cf98185bc93
parentMerge pull request #307460 from risicle/ris-spicedb-CVE-2024-32001-r23.11 (diff)
downloadnixpkgs-origin/backport-289535-to-release-23.11.tar.gz
(cherry picked from commit 265c3d737ebb8021fc4f9b1c77379658a42da2e7)
-rw-r--r--pkgs/by-name/mi/missidentify/fix-darwin-build.patch11
-rw-r--r--pkgs/by-name/mi/missidentify/package.nix56
2 files changed, 67 insertions, 0 deletions
diff --git a/pkgs/by-name/mi/missidentify/fix-darwin-build.patch b/pkgs/by-name/mi/missidentify/fix-darwin-build.patch
new file mode 100644
index 000000000000..cc54480567af
--- /dev/null
+++ b/pkgs/by-name/mi/missidentify/fix-darwin-build.patch
@@ -0,0 +1,11 @@
+--- a/main.h
++++ b/main.h
+@@ -68,7 +68,7 @@ memset(VAR,0,SIZE * sizeof(TYPE));
+
+
+
+-#ifdef __GLIBC__
++#if defined(__GLIBC__) || defined (__APPLE__)
+ extern char *__progname;
+ #else
+ char *__progname; \ No newline at end of file
diff --git a/pkgs/by-name/mi/missidentify/package.nix b/pkgs/by-name/mi/missidentify/package.nix
new file mode 100644
index 000000000000..2fbce5bf96f2
--- /dev/null
+++ b/pkgs/by-name/mi/missidentify/package.nix
@@ -0,0 +1,56 @@
+{ lib
+, stdenv
+, fetchurl
+, autoreconfHook
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+ pname = "missidentify";
+ version = "1.0";
+
+ src = fetchurl {
+ url = "mirror://sourceforge/project/missidentify/missidentify/missidentify-${finalAttrs.version}/missidentify-${finalAttrs.version}.tar.gz";
+ hash = "sha256-nnIRN8hpKM0IZCe0HUrrJGrxvBYKeBmdU168rlo8op0=";
+ };
+
+ patches = [
+ # define PATH_MAX variable to fix a FTBFS in Hurd.
+ (fetchurl {
+ name = "fix-FTBFS-Hurd.patch";
+ url = "https://salsa.debian.org/pkg-security-team/missidentify/-/raw/14b7169c3157dbad65fc80fdd82ec6634df20ffd/debian/patches/fix-FTBFS-Hurd.patch";
+ hash = "sha256-wGEzTfT76s5Q7s/5s913c4x9MMn9c0v/4Lhr+QakPQY=";
+ })
+ # fix a hyphen used as minus sign and a typo in manpage.
+ (fetchurl {
+ name = "fix-manpage.patch";
+ url = "https://salsa.debian.org/pkg-security-team/missidentify/-/raw/14b7169c3157dbad65fc80fdd82ec6634df20ffd/debian/patches/fix-manpage.patch";
+ hash = "sha256-7LzQs6ETRSjdnEhlKOVWC3grevwOmGs0h4Z6AYGysD8=";
+ })
+ # fix darwin build
+ ./fix-darwin-build.patch
+ ];
+
+ nativeBuildInputs = [ autoreconfHook ];
+
+ configureFlags = lib.optionals (stdenv.hostPlatform.isAarch32 || stdenv.hostPlatform.isAarch64) [ "--build=arm" ];
+
+ meta = with lib; {
+ description = "Find Win32 applications";
+ longDescription = ''
+ Miss Identify is a program to find Win32 applications. In
+ its default mode it displays the filename of any executable
+ that does not have an executable extension (i.e. exe, dll,
+ com, sys, cpl, hxs, hxi, olb, rll, or tlb). The program can
+ also be run to display all executables encountered,
+ regardless of the extension. This is handy when looking
+ for all of the executables on a drive. Other options allow
+ the user to record the strings found in an executable and
+ to work recursively.
+ '';
+ mainProgram = "missidentify";
+ homepage = "https://missidentify.sourceforge.net";
+ maintainers = with maintainers; [ d3vil0p3r ];
+ platforms = platforms.unix;
+ license = licenses.gpl2Only;
+ };
+})