Skip to content

Conversation

sh4k095
Copy link

@sh4k095 sh4k095 commented Jun 27, 2025

I wish to contribute this scientific python library to Nixpkgs. It is a tool to generate machine-learned interatomic potentials. The derivation builds successfully on NixOS and nixpkgs 25.05.

Important:

The original license of the package (ASL, Academic Software License) is not present in lib.licenses. It has been changed to gpl2Only in my expression just to get it to evaluate, but this needs to be corrected.

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/)
  • Nixpkgs 25.11 Release Notes (or backporting 24.11 and 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 24.11 and 25.05 NixOS Release notes)
    • (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, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

Add a 👍 reaction to pull requests you find important.

@nixpkgs-ci nixpkgs-ci 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. 12.first-time contribution This PR is the author's first one; please be gentle! 6.topic: python Python is a high-level, general-purpose programming language. labels Jun 27, 2025
@nixpkgs-ci nixpkgs-ci bot added the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Jul 4, 2025
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/python3packages-tensorpotential-reviewer-wanted/67044/1

Copy link
Member

@Sigmanificient Sigmanificient left a comment

Choose a reason for hiding this comment

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

Please add the missing declaration within pkgs/top-level/python-packages.nix

Copy link
Member

@Sigmanificient Sigmanificient left a comment

Choose a reason for hiding this comment

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

Whoops meant request changes

@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Aug 9, 2025
@nix-owners nix-owners bot requested a review from natsukium August 12, 2025 19:52
@sh4k095
Copy link
Author

sh4k095 commented Aug 12, 2025

@Sigmanificient, thank you for reviewing my PR. Upon your request to specify the dependencies, I noticed that one of them (matscipy) is missing in nixpkgs. I created another PR to contribute it (433184). Unfortunately I didn't get matscipy to build. I assume this PR would need to wait until 433184 is merged. Could you perhaps have a look at that PR as well?

Also:

Important:

The original license of the package (ASL, Academic Software License) is not present in lib.licenses. It has been changed to gpl2Only in my expression just to get it to evaluate, but this needs to be corrected.

@Sigmanificient
Copy link
Member

Sigmanificient commented Aug 12, 2025

Remember next time that you can define multiple package in a single pr, as long as you keep them in separate commits, it is simpler to manage 😉

Here is an example on how to define a new license: 8d21ee7

@nix-owners nix-owners bot requested review from emilazy and alyssais August 15, 2025 16:23
lib/licenses.nix Outdated
fullName = "Academic Software License";
url = "https://github.com/ACEsuit/ACE.jl/blob/main/ASL.md";
};

Copy link
Member

Choose a reason for hiding this comment

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

Given we already have asl20, I'm not sure calling a completely different license asl is a good idea…

Copy link
Member

Choose a reason for hiding this comment

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

What do you think should be done about this?

Copy link
Member

Choose a reason for hiding this comment

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

Also the licence is not FOSS and must be marked free = false; (it is not even redistributable AFAICT, since all the grants are conditional on non‐commercial use).

Copy link
Member

Choose a reason for hiding this comment

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

Is it likely to be used for more than just this one package?

Copy link
Author

Choose a reason for hiding this comment

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

Is it likely to be used for more than just this one package?

I am not sure, but I'd say the answer is more no than yes: the license is relatively recent and not widely adopted from what I see (even among scientific software).

Copy link
Member

Choose a reason for hiding this comment

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

Then the simplest thing to do would be to just inline the license expression.

Copy link
Author

@sh4k095 sh4k095 Aug 18, 2025

Choose a reason for hiding this comment

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

@alyssais, could you be more specific on the necessary steps to include the license?

Copy link
Member

Choose a reason for hiding this comment

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

Take the attribute set you're adding to licenses.nix, and use it directly as the value of meta.license in your package instead.

Copy link
Member

Choose a reason for hiding this comment

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

Still needs to be marked non-free.

@Sigmanificient Sigmanificient changed the title python3Packages: add tensorpotential package python313Packages.tensorpotential: init at 0.5.1 Aug 15, 2025
Copy link
Member

@alyssais alyssais left a comment

Choose a reason for hiding this comment

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

License looks fine to me now — will bow out of the review here, but remember that in the end we want a single commit for package additions. :)

@sh4k095
Copy link
Author

sh4k095 commented Aug 22, 2025

@alyssais thank you. I will squash everything together once it all works properly. :)

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Aug 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: merge conflict This PR has merge conflicts with the target branch 6.topic: python Python is a high-level, general-purpose programming language. 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. 12.first-time contribution This PR is the author's first one; please be gentle!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants