From 4ace88d63b14ef62f24d26c984775edc2ab1737c Mon Sep 17 00:00:00 2001 From: Ivan Kozik Date: Tue, 11 Apr 2023 11:22:55 +0000 Subject: [PATCH] python38Packages.meson: fix build with libxcrypt This fixes: ``` Found ninja-1.11.1 at /nix/store/msnllnk5qn0nmwlwdz1kd2zc91w8b2da-ninja-1.11.1/bin/ninja [1/2] Compiling C object ext/tachyon.cpython-38-x86_64-linux-gnu.so.p/tachyon_module.c.o FAILED: ext/tachyon.cpython-38-x86_64-linux-gnu.so.p/tachyon_module.c.o gcc -Iext/tachyon.cpython-38-x86_64-linux-gnu.so.p -Iext '-I../test cases/python/8 different python versions/ext' -I/nix/store/vpm9l2pqd7wkrlr6mzhakfqm93rx70j6-python3-3.8.16/include/python3.8 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -O3 -fPIC -MD -MQ ext/tachyon.cpython-38-x86_64-linux-gnu.so.p/tachyon_module.c.o -MF ext/tachyon.cpython-38-x86_64-linux-gnu.so.p/tachyon_module.c.o.d -o ext/tachyon.cpython-38-x86_64-linux-gnu.so.p/tachyon_module.c.o -c '../test cases/python/8 different python versions/ext/tachyon_module.c' In file included from ../test cases/python/8 different python versions/ext/tachyon_module.c:19: /nix/store/vpm9l2pqd7wkrlr6mzhakfqm93rx70j6-python3-3.8.16/include/python3.8/Python.h:44:10: fatal error: crypt.h: No such file or directory 44 | #include | ^~~~~~~~~ compilation terminated. ninja: build stopped: subcommand failed. ``` --- pkgs/development/tools/build-managers/meson/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/tools/build-managers/meson/default.nix b/pkgs/development/tools/build-managers/meson/default.nix index 23e11a324337..8ddc38beb5ec 100644 --- a/pkgs/development/tools/build-managers/meson/default.nix +++ b/pkgs/development/tools/build-managers/meson/default.nix @@ -12,6 +12,7 @@ , OpenGL , AppKit , Cocoa +, libxcrypt }: python3.pkgs.buildPythonApplication rec { @@ -120,6 +121,10 @@ python3.pkgs.buildPythonApplication rec { --replace "python3 -c " "${python3.interpreter} -c " ''; + buildInputs = lib.optionals (python3.pythonOlder "3.9") [ + libxcrypt + ]; + nativeBuildInputs = [ installShellFiles ]; postInstall = ''