Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freecad: add ifc support #330190

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

freecad: add ifc support #330190

wants to merge 2 commits into from

Conversation

autra
Copy link
Contributor

@autra autra commented Jul 26, 2024

Description of changes

This PR adds optional ifc support with ifcopenshell.

It depends on #312381 (fix ifcopenshell build)

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@ofborg ofborg bot added the 2.status: merge conflict This PR has merge conflicts with the target branch label Jul 26, 2024
@luzpaz
Copy link
Contributor

luzpaz commented Sep 24, 2024

Just a heads up

@autra
Copy link
Contributor Author

autra commented Sep 24, 2024

Thanks, we shouldn't step too much into each other shoes hopefully ;-)

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux and removed 2.status: merge conflict This PR has merge conflicts with the target branch labels Oct 6, 2024
@autra autra marked this pull request as ready for review October 11, 2024 12:00
@autra autra force-pushed the freecad_ifc_support branch 2 times, most recently from 4259d7b to 09d03a4 Compare October 23, 2024 15:01
@autra
Copy link
Contributor Author

autra commented Oct 23, 2024

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 330190


x86_64-linux

@autra
Copy link
Contributor Author

autra commented Oct 24, 2024

This is now ready. I took the opportunity to document the different options so that they appear in https://search.nixos.org/ (I hope it's the correct way, if it is, I think all packages should just do that).

@AndersonTorres
Copy link
Member

I think all packages should just do that

All packages can't do that. Indeed no package can do that.

This "configuration via input parameters" is too unstable and prone to errors.
#324199

Atemu is experimenting with the module system in #312432 to provide a better experience.

@@ -210,6 +215,14 @@ stdenv.mkDerivation (finalAttrs: {
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.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole string should be in a README.md file, instead of cluttering the stdout.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for educating me on the problem about the configuration via input parameters. But, to be honest, I don't understand what your suggestion is. How should I implement optional ifcopenshell support? Is my code ok or is there a better way to do it?

I think all packages should just do that

All packages can't do that. Indeed no package can do that.

Here I'm speaking specifically about documenting in longDescription so that it appears in search.nixos.org (I feel like we are mixing this with the ifcSupport option maybe?). Are you saying that there is no way to document the different options of a package there and that people do need to check the source code to learn about the customization possibilities?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so that it appears in search.nixos.org

It looks like a deviation of purpose of longDescription.

This field describes the software, not the input parameters of the build script.
Further, it is not "a field to be shown in search.nixos.org engine".

Further, the discoverability of Nixpkgs is very problematic, and such workaround is far from helpful.

Copy link
Contributor Author

@autra autra Oct 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like we are mixing two orthogonal topics here : the issue you linked is about nixos options installing packages under the hood. Here I'm talking about package options that changes the derivation itself. These options are available for nix/nixpkgs itself, not only for nixos. Both are kinda related yes, but not entirely.

I agree longDescription was probably not meant for that, but in my opinion it's still better than nothing. I'd argue to keep this commit , but as you are set on removing this, I'll amend it and put this in a README.

@autra
Copy link
Contributor Author

autra commented Oct 30, 2024

@AndersonTorres I added a README. For the option, I see no alternative right now :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants