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

miniforge: added default.nix #368381

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

miniforge: added default.nix #368381

wants to merge 10 commits into from

Conversation

qxrein
Copy link
Contributor

@qxrein qxrein commented Dec 26, 2024

63d2c3f

python-modules/miniforge: init at 24.11.0-0

Add miniforge package, a conda-forge distribution that includes mamba 1.5.11.

Features:

Based on the latest 24.11.0-0 release
Supports x86_64, aarch64 platforms
Includes Python 3 and conda package manager
Testing:

Builds successfully on NixOS
Package installs and conda command works
Closes #368355

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/)
  • 25.05 Release Notes (or backporting 24.11 and 25.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.

@github-actions github-actions 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 labels Dec 26, 2024
@qxrein
Copy link
Contributor Author

qxrein commented Dec 26, 2024

can someone please suggest the fixes for these formatting issues

@xiaoxiangmoe
Copy link
Contributor

nix-shell --packages nixfmt-rfc-style 
nixfmt pkgs/development/python-modules/miniforge/default.nix 

@qxrein
Copy link
Contributor Author

qxrein commented Dec 26, 2024

Thank you for your suggestion, but I have already tried this, and it’s still not working.

qxrein and others added 2 commits December 27, 2024 01:04
Co-authored-by: Yohann Boniface <edhyjox@gmail.com>
Co-authored-by: Yohann Boniface <edhyjox@gmail.com>
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.

You will need to add the package within pkgs/top-level/python-package.nix in order for your derivation to be accessible through nix-build -A python3Packages.miniforge

@qxrein
Copy link
Contributor Author

qxrein commented Dec 26, 2024

@Sigmanificient help

@Sigmanificient
Copy link
Member

Sigmanificient commented Dec 27, 2024

After looking a little closer at the miniforge repository, it doesn't seem like a traditional python package you would install through pip (or a similar tool), which means you will have to move it to pkgs/by-name/mi/miniforge/package.nix.

However, the project seems to only contain some installations scripts. The first one uses seems to invoke scripts/build.sh through docker, which is not what we want. That build script fetch dependencies using mamba, meaning that it isn't compatible to declarative nix builder nature.

In the current state, this derivation does not build properly. The symlink is not right and you are copying the repository source into the output:

[$] nix-build -A miniforge # after moving it to pkgs/by-name
/nix/store/bdcm48cc4mh6jhxns6sgca3b3qwvjgq1-miniforge-24.11.0-0
[$] tree result
result
├── bin
│   └── miniforge-conda -> ../miniforge3/bin/conda
├── build_miniforge_osx.sh
├── build_miniforge.sh
├── build_miniforge_win.sh
├── docs
│   ├── releases.py
│   ├── requirements.txt
│   └── templates
│       └── all-releases.html
├── LICENSE
├── Miniforge3
│   ├── construct.yaml
│   ├── mambaforge_deprecation.bat
│   ├── mambaforge_deprecation.sh
│   ├── pypy_deprecation.bat
│   └── pypy_deprecation.sh
├── README.md
└── scripts
    ├── build.sh
    └── test.sh

@qxrein
Copy link
Contributor Author

qxrein commented Dec 27, 2024

that makes sense thanks

@Sigmanificient
Copy link
Member

Sigmanificient commented Dec 27, 2024

Unfortunately, I am uncertain on how to port the distribution to nixpkgs. I invite you to seek for help within the official discourse, on the matrix channel or one of the community discord server.

I hope you will be able to find something!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: python 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.

Package request: miniforge
3 participants