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

aliza: init at 1.9.7 #285657

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

aliza: init at 1.9.7 #285657

wants to merge 4 commits into from

Conversation

luxzeitlos
Copy link
Contributor

Description of changes

We used to have aliza, but it was removed because it needed gtk4, was not build form source, and broke. We now build aliza from source and with gtk5.

We don't use by-name, because we need libsForQt5.callPackage.

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.05 Release Notes (or backporting 23.05 and 23.11 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.

@h7x4
Copy link
Member

h7x4 commented Feb 2, 2024

We don't use by-name, because we need libsForQt5.callPackage.

I think it still fits into by-name, if you callPackage the path of the package in by-name. There's a lot of new packages that do this to inherit from darwin.apple_sdk.frameworks for example.

We used to have aliza, but it was removed because it needed gtk4, was not build form source, and broke. We now build aliza from source and with gtk5.

Co-authored-by: h7x4 <h7x4@nani.wtf>
@luxzeitlos
Copy link
Contributor Author

We don't use by-name, because we need libsForQt5.callPackage.

I think it still fits into by-name, if you callPackage the path of the package in by-name. There's a lot of new packages that do this to inherit from darwin.apple_sdk.frameworks for example.

@h7x4 thanks for the hint, but the validation does not like it if the second arg is empty.
Besides that this is stolen from nextpnrWithGui, which does the libsForQt5.callPackage ../by-name....

Also this does work. Not sure if the validation is correct or not, or how to proceed here.

@luxzeitlos luxzeitlos requested a review from h7x4 February 2, 2024 14:59
@h7x4
Copy link
Member

h7x4 commented Feb 2, 2024

@h7x4 thanks for the hint, but the validation does not like it if the second arg is empty.

That seems like an oversight in the pkgs/by-name check.

@infinisil have you seen this before?

@h7x4
Copy link
Member

h7x4 commented Feb 2, 2024

Maybe it would make more sense to import libsForQt5 as an argument in the package, and access the qt packages through libsForQt5.<name>?

@infinisil
Copy link
Member

The error could be improved, but it means that only packages for pkgs.callPackage are allowed, so no libsForQt5.callPackage. But indeed as @h7x4 suggests, you can likely refactor it to work with a standard callPackage, though I'm not 100% sure this would be exactly the same in the end.

Besides that this is stolen from nextpnrWithGui, which does the libsForQt5.callPackage ../by-name....

The extended definition of that is

  nextpnrWithGui = libsForQt5.callPackage ../by-name/ne/nextpnr/package.nix { ... }

Only attributes defined via pkgs/by-name need to use pkgs.callPackage, there's no restrictions for other attributes. In this case, only nextpnr is defined in pkgs/by-name (via an implicit pkgs.callPackage), nextpnrWithGui is not (it merely reuses the same file).

@luxzeitlos
Copy link
Contributor Author

Maybe it would make more sense to import libsForQt5 as an argument in the package, and access the qt packages through libsForQt5.<name>?

How would that look like then?

@luxzeitlos
Copy link
Contributor Author

Well, so I took it out of by-name, should be good now?


buildInputs = [
itk
cmake
Copy link
Member

Choose a reason for hiding this comment

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

Usually it goes on nativeBuildInputs.

Comment on lines +32 to +35
"-DCMAKE_BUILD_TYPE:STRING=Release"
"-DALIZA_QT_VERSION:STRING=5"
"-DITK_DIR:STRING=${itk}"
"-DMDCM_USE_SYSTEM_ZLIB:BOOL=ON"
Copy link
Member

@AndersonTorres AndersonTorres Feb 5, 2024

Choose a reason for hiding this comment

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

Suggested change
"-DCMAKE_BUILD_TYPE:STRING=Release"
"-DALIZA_QT_VERSION:STRING=5"
"-DITK_DIR:STRING=${itk}"
"-DMDCM_USE_SYSTEM_ZLIB:BOOL=ON"
(lib.cmakeFeature "CMAKE_BUILD_TYPE" "Release")
(lib.cmakeFeature "ALIZA_QT_VERSION" "5")
(lib.cmakeOptionType "filepath" "ITK_DIR" itk)
(lib.cmakeBool "MDCM_USE_SYSTEM_ZLIB" true)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

are you sure (lib.cmakeBool "-MDCM_USE_SYSTEM_ZLIB" true) is correct?

Copy link
Member

Choose a reason for hiding this comment

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

... why not?

pkgs/applications/science/medicine/aliza/default.nix Outdated Show resolved Hide resolved
pkgs/applications/science/medicine/aliza/default.nix Outdated Show resolved Hide resolved
pkgs/applications/science/medicine/aliza/default.nix Outdated Show resolved Hide resolved
@AndersonTorres
Copy link
Member

Maybe it would make more sense to import libsForQt5 as an argument in the package, and access the qt packages through libsForQt5.<name>?

To be honest, I do not like that extra scoping.
I don't believe QT5/QT6 libraries are so important to the point of deserving an "overlay" like this.
X11 is way more important than this, and no one created a "libsForXorg.callPackage" (yet).

Also it contaminates some decisions. I remember when cmake was wrapped under libsForQt5.callPackage...

luxzeitlos and others added 2 commits February 5, 2024 19:39
Co-authored-by: Anderson Torres <torres.anderson.85@protonmail.com>
Co-authored-by: Anderson Torres <torres.anderson.85@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants