Merge pull request #277687 from snaar/update-far2l

far2l: 2.4.1 -> 2.5.3
This commit is contained in:
Nikolay Korotkiy 2023-12-30 21:02:25 +04:00 committed by GitHub
commit 97959816b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 39 deletions

View File

@ -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 ];

View File

@ -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"