about summary refs log tree commit diff
path: root/pkgs/applications/misc/far2l
diff options
context:
space:
mode:
authorsnaar <snaar@snaar.net>2023-12-30 03:35:01 -0500
committersnaar <snaar@snaar.net>2023-12-30 11:34:35 -0500
commit5b2eefcc03d53975afae837bf15d94f142b94d71 (patch)
treef00d2c62e02fe258da663b8ea9a32adb2f541f8b /pkgs/applications/misc/far2l
parent15e70943fd8c6f9da2ab0ad09d8d616598d151e3 (diff)
far2l: 2.4.1 -> 2.5.3
seems to address core dump that started to happen on 23.11;
patch for python installation script no longer needed, so automatic updates should be unblocked now
Diffstat (limited to 'pkgs/applications/misc/far2l')
-rw-r--r--pkgs/applications/misc/far2l/default.nix36
-rw-r--r--pkgs/applications/misc/far2l/python_prebuild.patch20
2 files changed, 17 insertions, 39 deletions
diff --git a/pkgs/applications/misc/far2l/default.nix b/pkgs/applications/misc/far2l/default.nix
index ee17568c0118c..bca4a1d86a726 100644
--- a/pkgs/applications/misc/far2l/default.nix
+++ b/pkgs/applications/misc/far2l/default.nix
@@ -1,4 +1,4 @@
-{ lib, stdenv, fetchFromGitHub, makeWrapper, cmake, ninja, pkg-config, m4, bash
+{ lib, stdenv, fetchFromGitHub, makeWrapper, cmake, ninja, pkg-config, m4, perl, bash
 , xdg-utils, zip, unzip, gzip, bzip2, gnutar, p7zip, xz
 , IOKit, Carbon, Cocoa, AudioToolbox, OpenGL, System
 , withTTYX ? true, libX11
@@ -14,18 +14,16 @@
 
 stdenv.mkDerivation rec {
   pname = "far2l";
-  version = "2.4.1";
+  version = "2.5.3";
 
   src = fetchFromGitHub {
     owner = "elfmz";
     repo = "far2l";
     rev = "v_${version}";
-    sha256 = "sha256-0t1ND6LmDcivfrZ8RaEr1vjeS5JtaeWkoHkl2e7Xr5s=";
+    sha256 = "sha256-aK6+7ChFAkeDiEYU2llBb//PBej2Its/wBeuG7ys/ew=";
   };
 
-  patches = [ ./python_prebuild.patch ];
-
-  nativeBuildInputs = [ cmake ninja pkg-config m4 makeWrapper ];
+  nativeBuildInputs = [ cmake ninja pkg-config m4 perl makeWrapper ];
 
   buildInputs = lib.optional withTTYX libX11
     ++ lib.optional withGUI wxGTK32
@@ -39,21 +37,21 @@ stdenv.mkDerivation rec {
 
   postPatch = ''
     patchShebangs python/src/prebuild.sh
-    substituteInPlace far2l/src/vt/vtcompletor.cpp \
-      --replace '"/bin/bash"' '"${bash}/bin/bash"'
-    substituteInPlace far2l/src/cfg/config.cpp \
-      --replace '"/bin/bash"' '"${bash}/bin/bash"'
+    patchShebangs far2l/bootstrap/view.sh
   '';
 
-  cmakeFlags = lib.mapAttrsToList (k: v: "-D${k}=${if v then "yes" else "no"}") {
-    TTYX = withTTYX;
-    USEWX = withGUI;
-    USEUCD = withUCD;
-    COLORER = withColorer;
-    MULTIARC = withMultiArc;
-    NETROCKS = withNetRocks;
-    PYTHON = withPython;
-  };
+  cmakeFlags = [
+    (lib.cmakeBool "TTYX" withTTYX)
+    (lib.cmakeBool "USEWX" withGUI)
+    (lib.cmakeBool "USEUCD" withUCD)
+    (lib.cmakeBool "COLORER" withColorer)
+    (lib.cmakeBool "MULTIARC" withMultiArc)
+    (lib.cmakeBool "NETROCKS" withNetRocks)
+    (lib.cmakeBool "PYTHON" withPython)
+  ] ++ lib.optionals withPython [
+    (lib.cmakeFeature "VIRTUAL_PYTHON" "python")
+    (lib.cmakeFeature "VIRTUAL_PYTHON_VERSION" "python")
+  ];
 
   runtimeDeps = [ unzip zip p7zip xz gzip bzip2 gnutar ];
 
diff --git a/pkgs/applications/misc/far2l/python_prebuild.patch b/pkgs/applications/misc/far2l/python_prebuild.patch
deleted file mode 100644
index 87762da52e054..0000000000000
--- a/pkgs/applications/misc/far2l/python_prebuild.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-diff --git i/python/src/prebuild.sh w/python/src/prebuild.sh
-index d2847ee5..aa1ecc53 100755
---- i/python/src/prebuild.sh
-+++ w/python/src/prebuild.sh
-@@ -12,9 +12,6 @@ mkdir -p "$DST/incpy"
- if [ ! -f "$DST/python/.prepared" ]; then
- 	echo "Preparing python virtual env at $DST/python using $PYTHON"
- 	mkdir -p "$DST/python"
--	$PYTHON -m venv --system-site-packages "$DST/python"
--	"$DST/python/bin/python" -m pip install --upgrade pip || true
--	"$DST/python/bin/python" -m pip install --ignore-installed cffi debugpy pcpp
- 	$PREPROCESSOR "$SRC/python/src/consts.gen" | sh > "${DST}/incpy/consts.h"
- 
- 	echo "1" > "$DST/python/.prepared"
-@@ -26,4 +23,4 @@ cp -f -R \
- 	"$SRC/python/configs/plug/far2l/"* \
- 	"$DST/incpy/"
- 
--"$DST/python/bin/python" "$SRC/python/src/pythongen.py" "${SRC}" "${DST}/incpy"
-+"python" "$SRC/python/src/pythongen.py" "${SRC}" "${DST}/incpy"