From a7b5c86f25fa067c7cb07ece189449999dfbf81c Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 25 Mar 2025 14:40:27 +0000 Subject: [PATCH] dtrx: fix .tar.lz extraction --- hosts/common/programs/dtrx.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/hosts/common/programs/dtrx.nix b/hosts/common/programs/dtrx.nix index 27a537fb6..a5f5c91ae 100644 --- a/hosts/common/programs/dtrx.nix +++ b/hosts/common/programs/dtrx.nix @@ -1,14 +1,24 @@ { pkgs, ... }: { sane.programs.dtrx = { - packageUnwrapped = pkgs.dtrx.override { + packageUnwrapped = (pkgs.dtrx.override { # `binutils` is the nix wrapper, which reads nix-related env vars # before passing on to e.g. `ld`. # dtrx probably only needs `ar` at runtime, not even `ld`. binutils = pkgs.binutils-unwrapped; # build without rpm support, since `rpm` package doesn't cross-compile. rpm = null; - }; + }).overrideAttrs (upstream: { + patches = (upstream.patches or []) ++ [ + (pkgs.fetchpatch2 { + # https://github.com/dtrx-py/dtrx/pull/62 + # this is needed for as long as i'm interacting with .tar.lz archives which are actually LZMA and not lzip. + name = "fix .tar.lz mapping"; + url = "https://github.com/dtrx-py/dtrx/commit/ff379f1444b142bb461f26780e32f82e60856be2.patch"; + hash = "sha256-WNz5i/iJqyxmZh/1mw6M8hWeiQdRvyhCta7gN/va6lQ="; + }) + ]; + }); sandbox.whitelistPwd = true; sandbox.autodetectCliPaths = "existing"; #< for the archive };