about summary refs log tree commit diff
path: root/pkgs/by-name/ig
diff options
context:
space:
mode:
authoresthromeris <esthromeris@riseup.net>2024-01-09 15:15:18 +0100
committeresthromeris <esthromeris@riseup.net>2024-01-27 11:05:07 +0100
commitb19c0e84e472a74a974a636105857e81237bac7a (patch)
treeb6cbbb285f754018f05557b8ad5d80112d277c7f /pkgs/by-name/ig
parentc17bbc805fa8cc63164346121bbf08b2a98ce962 (diff)
igir: use autoPatchelfHook
This fixes https://github.com/NixOS/nixpkgs/issues/279695
Diffstat (limited to 'pkgs/by-name/ig')
-rw-r--r--pkgs/by-name/ig/igir/package.nix44
1 files changed, 44 insertions, 0 deletions
diff --git a/pkgs/by-name/ig/igir/package.nix b/pkgs/by-name/ig/igir/package.nix
new file mode 100644
index 0000000000000..80e22a5e4334e
--- /dev/null
+++ b/pkgs/by-name/ig/igir/package.nix
@@ -0,0 +1,44 @@
+{ lib
+, buildNpmPackage
+, fetchFromGitHub
+
+# for patching bundled 7z binary from the 7zip-bin node module
+# at lib/node_modules/igir/node_modules/7zip-bin/linux/x64/7za
+, autoPatchelfHook
+, stdenv
+}:
+
+buildNpmPackage rec {
+  pname = "igir";
+  version = "2.2.1";
+
+  src = fetchFromGitHub {
+    owner = "emmercm";
+    repo = "igir";
+    rev = "v${version}";
+    hash = "sha256-MlLnnwlqFkzSZi+6OGS/ZPYRPjV7CY/piFvilwhhR9A=";
+  };
+
+  npmDepsHash = "sha256-yVo2ZKu2lEOYG12Gk5GQXamprkP5jEyKlSTZdPjNWQM=";
+
+  # I have no clue why I have to do this
+  postPatch = ''
+    patchShebangs scripts/update-readme-help.sh
+  '';
+
+  nativeBuildInputs = [ autoPatchelfHook ];
+
+  buildInputs = [ stdenv.cc.cc.lib ];
+
+  # from lib/node_modules/igir/node_modules/@node-rs/crc32-linux-x64-musl/crc32.linux-x64-musl.node
+  # Irrelevant to our use
+  autoPatchelfIgnoreMissingDeps = [ "libc.musl-x86_64.so.1" ];
+
+  meta = with lib; {
+    description = "A video game ROM collection manager to help filter, sort, patch, archive, and report on collections on any OS";
+    homepage = "https://igir.io";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ TheBrainScrambler ];
+    platforms = platforms.linux;
+  };
+}