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

Added nix support #100

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Added nix support #100

wants to merge 3 commits into from

Conversation

faezs
Copy link

@faezs faezs commented Nov 27, 2024

Description

Added a nix flake for reproducible builds and easy devShells. I'm sure this is not high on your priority list but happy to fix any issues with the support if they ever come up.

Fixes # (issue)
N/A

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@@ -0,0 +1,56 @@
# An example package with dependencies defined via pyproject.toml
Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems to be a left over generic statement from a template or generator and should be adjusted

pyproject = lib.importTOML (config.mkDerivation.src + /pyproject.toml);
in {
imports = [
dream2nix.modules.dream2nix.pip
Copy link
Collaborator

Choose a reason for hiding this comment

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

dream2nix is according to their own webpages still heavily in development and not yet ready for productive use. Hence, I would want to avoid using it in ARTIST without further stabilization (c.f. https://github.com/nix-community/dream2nix)

"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since I have never worked with nix(-flake) myself, I do not know what these hashes refer to and whether they are valid or a security concern. How can I verify the integrity to which these resources are pointing?

@@ -0,0 +1,69 @@
{
# This example flake.nix is pretty generic and the same for all
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is again a generic header from some template or generator - adjustments for ARTIST would be necessary

"is_direct": false,
"sha256": "1c99d261bd2d5f6b59325c92c73df481e05e57f19837bdca8413b9eac4bd8028",
"type": "url",
"url": "https://files.pythonhosted.org/packages/e0/25/dd5c0f6ac1311e9b40f4af06c78efde0f3b5cbf02502f8ef9501294c425b/MarkupSafe-3.0.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Again, since we have not worked yet with nix, how are these URLs adjusted for the other platforms (e.g. darwin) that have been declared in the other files, while it is here hardcoded to be aarch64?

@Markus-Goetz
Copy link
Collaborator

Pull request seems stale @faezs. Are you intending to bring it up-to-date or answer the questions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants