From c06a7086bfe5c50f2d04a811da046ff58b448e02 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 25 Oct 2022 18:31:45 +0200 Subject: [PATCH 1/2] =?UTF-8?q?rizin:=20Do=20not=20use=20Meson=E2=80=99s?= =?UTF-8?q?=20Python?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is intentionally minimal and IMO should not be exposed at all. This should be fixed in rizin upstream. The hack was introduced in commit 577d2454c2a2d2cf3876a232fd809337e0181ae4 and this patch fixes it more properly. --- pkgs/development/tools/analysis/rizin/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pkgs/development/tools/analysis/rizin/default.nix b/pkgs/development/tools/analysis/rizin/default.nix index 5f14a4017c52..dad7193dd25d 100644 --- a/pkgs/development/tools/analysis/rizin/default.nix +++ b/pkgs/development/tools/analysis/rizin/default.nix @@ -14,6 +14,7 @@ , lz4 , xxHash , meson +, python3 , cmake , ninja , capstone @@ -43,7 +44,9 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ pkg-config meson - meson.python3.pkgs.pyyaml + (python3.withPackages (pp: with pp; [ + pyyaml + ])) ninja cmake ]; @@ -79,6 +82,14 @@ stdenv.mkDerivation rec { xxHash ]; + postPatch = '' + # find_installation without arguments uses Meson’s Python interpreter, + # which does not have any extra modules. + # https://github.com/mesonbuild/meson/pull/9904 + substituteInPlace meson.build \ + --replace "import('python').find_installation()" "find_program('python3')" + ''; + meta = { description = "UNIX-like reverse engineering framework and command-line toolset."; homepage = "https://rizin.re/"; From 9629c0577a7b050c7b53a18ca3582eaddf00e37c Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Tue, 25 Oct 2022 18:31:45 +0200 Subject: [PATCH 2/2] Revert "meson: expose python3 in passthru" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit IMO Meson’s Python should not be exposed at all. This reverts commit 38f48cfc4f060ddfd4c03187ed3f75b702a114c3. --- pkgs/development/tools/build-managers/meson/default.nix | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix index 5107438fe91d..866fa303148a 100644 --- a/pkgs/development/tools/build-managers/meson/default.nix +++ b/pkgs/development/tools/build-managers/meson/default.nix @@ -103,10 +103,6 @@ python3.pkgs.buildPythonApplication rec { installShellCompletion --bash data/shell-completions/bash/meson ''; - passthru = { - inherit python3; - }; - meta = with lib; { homepage = "https://mesonbuild.com"; description = "An open source, fast and friendly build system made in Python";