diff options
Diffstat (limited to 'nixpkgs/pkgs/by-name/fr')
-rw-r--r-- | nixpkgs/pkgs/by-name/fr/frankenphp/package.nix | 2 | ||||
-rw-r--r-- | nixpkgs/pkgs/by-name/fr/free42/package.nix | 4 | ||||
-rw-r--r-- | nixpkgs/pkgs/by-name/fr/freecad/0001-NIXOS-don-t-ignore-PYTHONPATH.patch | 61 | ||||
-rw-r--r-- | nixpkgs/pkgs/by-name/fr/freecad/package.nix | 196 | ||||
-rw-r--r-- | nixpkgs/pkgs/by-name/fr/frequest/package.nix | 60 | ||||
-rw-r--r-- | nixpkgs/pkgs/by-name/fr/fretboard/package.nix | 17 | ||||
-rw-r--r-- | nixpkgs/pkgs/by-name/fr/fritz-exporter/console-script.patch | 14 | ||||
-rw-r--r-- | nixpkgs/pkgs/by-name/fr/fritz-exporter/package.nix | 10 |
8 files changed, 335 insertions, 29 deletions
diff --git a/nixpkgs/pkgs/by-name/fr/frankenphp/package.nix b/nixpkgs/pkgs/by-name/fr/frankenphp/package.nix index 423a1dd1f2e5..90d10fc87f40 100644 --- a/nixpkgs/pkgs/by-name/fr/frankenphp/package.nix +++ b/nixpkgs/pkgs/by-name/fr/frankenphp/package.nix @@ -35,7 +35,7 @@ in buildGoModule rec { hash = "sha256-tQ35GZuw7Ag1YfmOUarVY45yk4yugNLJetEV4m2w3GE="; }; - sourceRoot = "source/caddy"; + sourceRoot = "${src.name}/caddy"; # frankenphp requires C code that would be removed with `go mod tidy` # https://github.com/golang/go/issues/26366 diff --git a/nixpkgs/pkgs/by-name/fr/free42/package.nix b/nixpkgs/pkgs/by-name/fr/free42/package.nix index a552921153d3..415f6f6f8b9d 100644 --- a/nixpkgs/pkgs/by-name/fr/free42/package.nix +++ b/nixpkgs/pkgs/by-name/fr/free42/package.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "free42"; - version = "3.1.4"; + version = "3.1.5"; src = fetchFromGitHub { owner = "thomasokken"; repo = "free42"; rev = "v${finalAttrs.version}"; - hash = "sha256-XAYi4CBOx5KkqJyz6WkPlWC+bfbEReyaSv9SRCe6TDw="; + hash = "sha256-YFTmEyOd/r8Pbj+PzD+VYkkB0gqDJ4wteLBTdwa1qcE="; }; nativeBuildInputs = [ diff --git a/nixpkgs/pkgs/by-name/fr/freecad/0001-NIXOS-don-t-ignore-PYTHONPATH.patch b/nixpkgs/pkgs/by-name/fr/freecad/0001-NIXOS-don-t-ignore-PYTHONPATH.patch new file mode 100644 index 000000000000..27e5fb81b8d0 --- /dev/null +++ b/nixpkgs/pkgs/by-name/fr/freecad/0001-NIXOS-don-t-ignore-PYTHONPATH.patch @@ -0,0 +1,61 @@ +From c4f452ef6ae083ed21095313582f6d1bd775cbf3 Mon Sep 17 00:00:00 2001 +From: Andreas Rammhold <andreas@rammhold.de> +Date: Thu, 2 Nov 2023 17:32:07 +0100 +Subject: [PATCH] NIXOS: don't ignore PYTHONPATH + +On NixOS or rather within nixpkgs we provide the runtime Python +packages via the PYTHONPATH environment variable. FreeCAD tries its +best to ignore Python environment variables that are being inherited +from the environment. For Python versions >=3.11 it also tries to +initialize the interpreter config without any environmental data. We +have to initialize the configuration *with* the information from the +environment for our packaging to work. + +Upstream has purposely isolated the environments AFAIK and thus +shouldn't accept this patch (as is). What they might accept (once +support for older Python versions has been dropped) is removing the +PYTHONPATH specific putenv calls. +--- + src/Base/Interpreter.cpp | 2 +- + src/Main/MainGui.cpp | 3 --- + 2 files changed, 1 insertion(+), 4 deletions(-) + +diff --git a/src/Base/Interpreter.cpp b/src/Base/Interpreter.cpp +index 52c47168af..9966bd0013 100644 +--- a/src/Base/Interpreter.cpp ++++ b/src/Base/Interpreter.cpp +@@ -554,7 +554,9 @@ void initInterpreter(int argc,char *argv[]) + { + PyStatus status; + PyConfig config; + PyConfig_InitIsolatedConfig(&config); ++ config.isolated = 0; ++ config.use_environment = 1; + + status = PyConfig_SetBytesArgv(&config, argc, argv); + if (PyStatus_Exception(status)) { +diff --git a/src/Main/MainGui.cpp b/src/Main/MainGui.cpp +index 48ae847ef4..28813df383 100644 +--- a/src/Main/MainGui.cpp ++++ b/src/Main/MainGui.cpp +@@ -112,17 +112,14 @@ int main( int argc, char ** argv ) + // See https://forum.freecad.org/viewtopic.php?f=18&t=20600 + // See Gui::Application::runApplication() + putenv("LC_NUMERIC=C"); +- putenv("PYTHONPATH="); + #elif defined(FC_OS_MACOSX) + (void)QLocale::system(); +- putenv("PYTHONPATH="); + #elif defined(__MINGW32__) + const char* mingw_prefix = getenv("MINGW_PREFIX"); + const char* py_home = getenv("PYTHONHOME"); + if (!py_home && mingw_prefix) + _putenv_s("PYTHONHOME", mingw_prefix); + #else +- _putenv("PYTHONPATH="); + // https://forum.freecad.org/viewtopic.php?f=4&t=18288 + // https://forum.freecad.org/viewtopic.php?f=3&t=20515 + const char* fc_py_home = getenv("FC_PYTHONHOME"); +-- +2.42.0 + diff --git a/nixpkgs/pkgs/by-name/fr/freecad/package.nix b/nixpkgs/pkgs/by-name/fr/freecad/package.nix new file mode 100644 index 000000000000..436d94bd0f98 --- /dev/null +++ b/nixpkgs/pkgs/by-name/fr/freecad/package.nix @@ -0,0 +1,196 @@ +{ lib +, cmake +, coin3d +, doxygen +, eigen +, fetchFromGitHub +, fmt +, freecad # for passthru.tests +, gfortran +, gts +, hdf5 +, libGLU +, libXmu +, libf2c +, libredwg +, libsForQt5 +, libspnav +, medfile +, mpi +, ninja +, ode +, opencascade-occt +, pkg-config +, python3Packages +, runCommand # for passthru.tests +, spaceNavSupport ? stdenv.isLinux +, stdenv +, swig +, vtk +, wrapGAppsHook +, xercesc +, zlib +}: + +let + boost = python3Packages.boost; + inherit (libsForQt5) + qtbase + qttools + qtwebengine + qtx11extras + qtxmlpatterns + soqt + wrapQtAppsHook; + inherit (python3Packages) + gitpython + matplotlib + pivy + ply + pycollada + pyside2 + pyside2-tools + python + pyyaml + scipy + shiboken2; +in +stdenv.mkDerivation (finalAttrs: { + pname = "freecad"; + version = "0.21.2"; + + src = fetchFromGitHub { + owner = "FreeCAD"; + repo = "FreeCAD"; + rev = finalAttrs.version; + hash = "sha256-OX4s9rbGsAhH7tLJkUJYyq2A2vCdkq/73iqYo9adogs="; + }; + + nativeBuildInputs = [ + cmake + ninja + pkg-config + pyside2-tools + gfortran + wrapQtAppsHook + wrapGAppsHook + ]; + + buildInputs = [ + gitpython # for addon manager + boost + coin3d + doxygen + eigen + fmt + gts + hdf5 + libGLU + libXmu + libf2c + matplotlib + medfile + mpi + ode + opencascade-occt + pivy + ply # for openSCAD file support + pycollada + pyside2 + pyside2-tools + python + pyyaml # (at least for) PyrateWorkbench + qtbase + qttools + qtwebengine + qtxmlpatterns + scipy + shiboken2 + soqt + swig + vtk + xercesc + zlib + ] ++ lib.optionals spaceNavSupport [ + libspnav + qtx11extras + ]; + + patches = [ + ./0001-NIXOS-don-t-ignore-PYTHONPATH.patch + ]; + + cmakeFlags = [ + "-Wno-dev" # turns off warnings which otherwise makes it hard to see what is going on + "-DBUILD_FLAT_MESH:BOOL=ON" + "-DBUILD_QT5=ON" + "-DSHIBOKEN_INCLUDE_DIR=${shiboken2}/include" + "-DSHIBOKEN_LIBRARY=Shiboken2::libshiboken" + ("-DPYSIDE_INCLUDE_DIR=${pyside2}/include" + + ";${pyside2}/include/PySide2/QtCore" + + ";${pyside2}/include/PySide2/QtWidgets" + + ";${pyside2}/include/PySide2/QtGui" + ) + "-DPYSIDE_LIBRARY=PySide2::pyside2" + ]; + + # This should work on both x86_64, and i686 linux + preBuild = '' + export NIX_LDFLAGS="-L${gfortran.cc}/lib64 -L${gfortran.cc}/lib $NIX_LDFLAGS"; + ''; + + preConfigure = '' + qtWrapperArgs+=(--prefix PYTHONPATH : "$PYTHONPATH") + ''; + + qtWrapperArgs = [ + "--set COIN_GL_NO_CURRENT_CONTEXT_CHECK 1" + "--prefix PATH : ${libredwg}/bin" + "--set QT_QPA_PLATFORM xcb" + ]; + + postFixup = '' + mv $out/share/doc $out + ln -s $out/bin/FreeCAD $out/bin/freecad + ln -s $out/bin/FreeCADCmd $out/bin/freecadcmd + ''; + + passthru.tests = { + # Check that things such as argument parsing still work correctly with + # the above PYTHONPATH patch. Previously the patch used above changed + # the `PyConfig_InitIsolatedConfig` to `PyConfig_InitPythonConfig`, + # which caused the built-in interpreter to attempt (and fail) to doubly + # parse argv. This should catch if that ever regresses and also ensures + # that PYTHONPATH is still respected enough for the FreeCAD console to + # successfully run and check that it was included in `sys.path`. + python-path = runCommand "freecad-test-console" { + nativeBuildInputs = [ freecad ]; + } '' + HOME="$(mktemp -d)" PYTHONPATH="$(pwd)/test" FreeCADCmd --log-file $out -c "if not '$(pwd)/test' in sys.path: sys.exit(1)" </dev/null + ''; + }; + + meta = { + homepage = "https://www.freecad.org"; + description = "General purpose Open Source 3D CAD/MCAD/CAx/CAE/PLM modeler"; + longDescription = '' + FreeCAD is an open-source parametric 3D modeler made primarily to design + real-life objects of any size. Parametric modeling allows you to easily + modify your design by going back into your model history and changing its + parameters. + + FreeCAD allows you to sketch geometry constrained 2D shapes and use them + as a base to build other objects. It contains many components to adjust + dimensions or extract design details from 3D models to create high quality + production ready drawings. + + FreeCAD is designed to fit a wide range of uses including product design, + mechanical engineering and architecture. Whether you are a hobbyist, a + programmer, an experienced CAD user, a student or a teacher, you will feel + right at home with FreeCAD. + ''; + license = lib.licenses.lgpl2Plus; + maintainers = with lib.maintainers; [ viric gebner AndersonTorres ]; + platforms = lib.platforms.linux; + }; +}) diff --git a/nixpkgs/pkgs/by-name/fr/frequest/package.nix b/nixpkgs/pkgs/by-name/fr/frequest/package.nix new file mode 100644 index 000000000000..cd157115ecfa --- /dev/null +++ b/nixpkgs/pkgs/by-name/fr/frequest/package.nix @@ -0,0 +1,60 @@ +{ lib, stdenv, fetchFromGitHub, qt5 }: + +stdenv.mkDerivation (finalAttrs: { + pname = "frequest"; + version = "1.2a"; + + srcs = [ + (fetchFromGitHub { + owner = "fabiobento512"; + name = "frequest"; + repo = "FRequest"; + rev = "v${finalAttrs.version}"; + hash = "sha256-fdn3MK5GWBOhJjpMtRaytO9EsVzz6KJknDhqWtAyXCc="; + }) + # The application depends on hard-coded relative paths to ../CommonLibs and ../CommonUtils. + # See https://github.com/fabiobento512/FRequest/wiki/Building-FRequest for more info. + # Upstream provides no tags for these dependencies, use latest commit on their `master` branch. + # Changing the name of these srcs will break the build. + (fetchFromGitHub { + owner = "fabiobento512"; + name = "CommonLibs"; + repo = "CommonLibs"; + rev = "d3906931bb06ddf4194ff711a59e1dcff80fa82f"; + hash = "sha256-iLJJ95yJ+VjNPuk8fNEDvYBI0db0rcfJF12a9azGv1Y="; + }) + (fetchFromGitHub { + owner = "fabiobento512"; + name = "CommonUtils"; + repo = "CommonUtils"; + rev = "53970984f6538d78350be1b9426032bcb5bcf818"; + hash = "sha256-nRv9DriSOuAiWhy+KkOVNEz5oSgNNNJZqk8sNwgbx8U="; + }) + ]; + sourceRoot = "frequest"; + + buildInputs = [ + qt5.qtbase + ]; + + nativeBuildInputs = [ + qt5.wrapQtAppsHook + qt5.qmake + ]; + + # Without this, nothing gets installed in $out. + postInstall = '' + install -D FRequest $out/bin/FRequest + install -D LinuxAppImageDeployment/frequest.desktop $out/share/applications/frequest.desktop + install -D LinuxAppImageDeployment/frequest_icon.png $out/share/icons/hicolor/128x128/apps/frequest_icon.png + ''; + + meta = { + description = "A fast, lightweight and opensource desktop application to make HTTP(s) requests"; + homepage = "https://fabiobento512.github.io/FRequest"; + license = lib.licenses.gpl3Plus; + maintainers = with lib.maintainers; [ eliandoran ]; + platforms = lib.platforms.linux; + mainProgram = "frequest"; + }; +}) diff --git a/nixpkgs/pkgs/by-name/fr/fretboard/package.nix b/nixpkgs/pkgs/by-name/fr/fretboard/package.nix index 093ad1ac8d67..fa772d61867f 100644 --- a/nixpkgs/pkgs/by-name/fr/fretboard/package.nix +++ b/nixpkgs/pkgs/by-name/fr/fretboard/package.nix @@ -1,6 +1,7 @@ { lib , blueprint-compiler , cargo +, darwin , desktop-file-utils , fetchFromGitHub , glib @@ -17,19 +18,19 @@ stdenv.mkDerivation rec { pname = "fretboard"; - version = "5.3"; + version = "5.4"; src = fetchFromGitHub { owner = "bragefuglseth"; - repo = pname; + repo = "fretboard"; rev = "v${version}"; - hash = "sha256-wwq4Xq6IVLF2hICk9HfCpfxpWer8PNWywD8p3wQdp6U="; + hash = "sha256-GqnwAB7hmg2QLwSWqrZtTp6+FybK8/v4GZx/lMi0dGY="; }; cargoDeps = rustPlatform.fetchCargoTarball { inherit src; name = "${pname}-${version}"; - hash = "sha256-H/dAKaYHxRmldny8EoasrcDROZhLo5UbHPAoMicDehA="; + hash = "sha256-sGvb1+HKIqNSgCV9UzkCrkGrpjA34Pe9eq2/w3K/w/E="; }; nativeBuildInputs = [ @@ -48,8 +49,14 @@ stdenv.mkDerivation rec { glib gtk4 libadwaita + ] ++ lib.optionals stdenv.isDarwin [ + darwin.apple_sdk.frameworks.Foundation ]; + env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.cc.isClang [ + "-Wno-error=incompatible-function-pointer-types" + ]); + meta = with lib; { description = "Look up guitar chords"; homepage = "https://github.com/bragefuglseth/fretboard"; @@ -57,6 +64,6 @@ stdenv.mkDerivation rec { license = licenses.gpl3Plus; maintainers = with maintainers; [ michaelgrahamevans ]; mainProgram = "fretboard"; - platforms = platforms.linux; + platforms = platforms.unix; }; } diff --git a/nixpkgs/pkgs/by-name/fr/fritz-exporter/console-script.patch b/nixpkgs/pkgs/by-name/fr/fritz-exporter/console-script.patch deleted file mode 100644 index e13e78f2d184..000000000000 --- a/nixpkgs/pkgs/by-name/fr/fritz-exporter/console-script.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff --git a/pyproject.toml b/pyproject.toml -index ffad1a4..e7551da 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -44,6 +44,9 @@ coverage = ">=6.4.4,<8.0.0" - pytest-cov = ">=3,<5" - ruff = "^0.1.7" - -+[tool.poetry.scripts] -+fritzexporter = "fritzexporter.__main__:main" -+ - [build-system] - requires = ["poetry-core"] - build-backend = "poetry.core.masonry.api" diff --git a/nixpkgs/pkgs/by-name/fr/fritz-exporter/package.nix b/nixpkgs/pkgs/by-name/fr/fritz-exporter/package.nix index 3306802b840f..d79b74eb9a2b 100644 --- a/nixpkgs/pkgs/by-name/fr/fritz-exporter/package.nix +++ b/nixpkgs/pkgs/by-name/fr/fritz-exporter/package.nix @@ -5,21 +5,16 @@ python3.pkgs.buildPythonApplication rec { pname = "fritz-exporter"; - version = "2.3.1"; + version = "2.5.0"; pyproject = true; src = fetchFromGitHub { owner = "pdreker"; repo = "fritz_exporter"; rev = "fritzexporter-v${version}"; - hash = "sha256-Dv/2Og1OJV7canZ8Y5Pai5gPRUvcRDYmSGoD2pnAkSs="; + hash = "sha256-x5WCVDIKdreQCmVpiWbmVBNo42P5kSxX9dLMBKfZTWc="; }; - patches = [ - # https://github.com/pdreker/fritz_exporter/pull/282 - ./console-script.patch - ]; - postPatch = '' # don't test coverage sed -i "/^addopts/d" pyproject.toml @@ -31,6 +26,7 @@ python3.pkgs.buildPythonApplication rec { propagatedBuildInputs = with python3.pkgs; [ attrs + defusedxml fritzconnection prometheus-client pyyaml |