about summary refs log tree commit diff
path: root/pkgs/by-name
diff options
context:
space:
mode:
authorNick Cao <nickcao@nichi.co>2024-04-25 10:19:34 -0400
committerGitHub <noreply@github.com>2024-04-25 10:19:34 -0400
commita9e3d60ed58cd81c67f8412f441081f337021d18 (patch)
treeb3a7733d127bc26a7706ca002f86de46f80642f7 /pkgs/by-name
parentd774af4ae04f7064afb922cfc177f8815d138d9d (diff)
parent4e4eed59ed4ee8be3406ccb0439d93b0e8d522a9 (diff)
Merge pull request #306743 from NixOS/backport-289762-to-release-23.11
[Backport release-23.11] rifiuti: init at 20040505_1
Diffstat (limited to 'pkgs/by-name')
-rw-r--r--pkgs/by-name/ri/rifiuti/package.nix64
1 files changed, 64 insertions, 0 deletions
diff --git a/pkgs/by-name/ri/rifiuti/package.nix b/pkgs/by-name/ri/rifiuti/package.nix
new file mode 100644
index 0000000000000..d1134e2288212
--- /dev/null
+++ b/pkgs/by-name/ri/rifiuti/package.nix
@@ -0,0 +1,64 @@
+{ lib
+, stdenv
+, fetchzip
+, fetchurl
+}:
+
+stdenv.mkDerivation (finalAttrs: {
+  pname = "rifiuti";
+  version = "20040505_1";
+
+  src = fetchzip {
+    url = "mirror://sourceforge/project/odessa/Rifiuti/${finalAttrs.version}/rifiuti_${finalAttrs.version}.zip";
+    hash = "sha256-bVPz0nXexGtQtXxGb3Mc79tzyZikc7KxNNWuvgu6pQ0=";
+  };
+
+  patches = [
+    (fetchurl {
+      name = "add-GCC-hardening.patch";
+      url = "https://salsa.debian.org/pkg-security-team/rifiuti/-/raw/f237358a91b12776beb9942c79ccb3aea180968a/debian/patches/add-GCC-hardening";
+      hash = "sha256-Z4UajJ8WydoCKjkG4q7WsBSXWwkM8B6UXBoWN1Qas60=";
+    })
+    (fetchurl {
+      name = "fix-bts-crash-on-malformed-file.patch";
+      url = "https://salsa.debian.org/pkg-security-team/rifiuti/-/raw/5b51604942b518b7752843cf7d693f202dc9c6f1/debian/patches/fix-bts-crash-on-malformed-file.patch";
+      hash = "sha256-1kZKC6qIGpCl1zOvKiWh6FcyYX3WozHBSPBHUsL2eMI=";
+    })
+    (fetchurl {
+      name = "fix-warnings";
+      url = "https://salsa.debian.org/pkg-security-team/rifiuti/-/raw/f237358a91b12776beb9942c79ccb3aea180968a/debian/patches/fix-warnings";
+      hash = "sha256-9/OckpNqZQdkmNsUeHUEi6wT12mBd7aMA5dKgQAxXq8=";
+    })
+    (fetchurl {
+      name = "use-CC-and-abort-on-error.patch";
+      url = "https://salsa.debian.org/pkg-security-team/rifiuti/-/raw/5bd48acbcb63cee324556c4ec29750ce1e41755c/debian/patches/use-CC-and-abort-on-error.patch";
+      hash = "sha256-RE4Vswtc887neJ3yAe0YWcs5YtZbwd1UtcTF4zBsmlo=";
+    })
+  ];
+
+  postPatch = ''
+    substituteInPlace src/Makefile \
+      --replace-fail gcc cc
+  '';
+
+  makeFlags = [
+    "-C src"
+  ];
+
+  enableParallelBuilding = true;
+
+  installPhase = ''
+    runHook preInstall
+    install -D bin/rifiuti $out/bin/rifiuti
+    runHook postInstall
+  '';
+
+  meta = with lib; {
+    description = "Analyze Windows Recycle Bin INFO2 file";
+    mainProgram = "rifiuti";
+    homepage = "https://sourceforge.net/projects/odessa/files/Rifiuti";
+    maintainers = with maintainers; [ d3vil0p3r ];
+    platforms = platforms.unix;
+    license = licenses.bsd3;
+  };
+})