From e518d5cf9774cceeae8bb4e2fe802cfb92068ae4 Mon Sep 17 00:00:00 2001 From: Yury Shvedov Date: Wed, 18 Dec 2024 19:44:55 +0300 Subject: [PATCH] freecad: fix for devshell Linking with `gfortrun.cc.lib` instead of `gfortrun.cc`. For unknown reason previous variant works well withing sandbox. But there was an issue with building freecad in development shell. The `${gfortran.cc}/lib` does not contains shared (.so) variants of libraries but static archives (.a). This leads to invalid linking of shared library with static archive which was not compiled with `-fPIC`. Change-Id: I1e0503204ddeb61eb0d5c251beb8ce60d71d20fd --- pkgs/by-name/fr/freecad/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/fr/freecad/package.nix b/pkgs/by-name/fr/freecad/package.nix index 26ddbf8c4306..551269240c4c 100644 --- a/pkgs/by-name/fr/freecad/package.nix +++ b/pkgs/by-name/fr/freecad/package.nix @@ -155,7 +155,7 @@ freecad-utils.makeCustomizable (stdenv.mkDerivation (finalAttrs: { # This should work on both x86_64, and i686 linux preBuild = '' - export NIX_LDFLAGS="-L${gfortran.cc}/lib64 -L${gfortran.cc}/lib $NIX_LDFLAGS"; + export NIX_LDFLAGS="-L${gfortran.cc.lib}/lib64 -L${gfortran.cc.lib}/lib $NIX_LDFLAGS"; ''; preConfigure = ''