Skip to content

zigmod: init at 90#217229

Closed
paveloom wants to merge 1 commit into
NixOS:masterfrom
paveloom:zigmod
Closed

zigmod: init at 90#217229
paveloom wants to merge 1 commit into
NixOS:masterfrom
paveloom:zigmod

Conversation

@paveloom
Copy link
Copy Markdown
Member

@paveloom paveloom commented Feb 19, 2023

Description of changes

A package manager for the Zig programming language (https://github.com/nektro/zigmod).

Note: it's gonna be broken on Darwin until Zig 0.10.1 is fixed.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • 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/)
  • 23.05 Release Notes (or backporting 22.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.

@paveloom
Copy link
Copy Markdown
Member Author

Result of nixpkgs-review pr 217229 run on x86_64-linux 1

1 package built:
  • zigmod

@nixos-discourse
Copy link
Copy Markdown

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

https://discourse.nixos.org/t/prs-ready-for-review/3032/1850

@ofborg ofborg Bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Feb 19, 2023
@SuperSandro2000
Copy link
Copy Markdown
Member

Please do not paste immediately on discourse.

Comment thread pkgs/development/tools/zigmod/default.nix Outdated
Comment thread pkgs/development/tools/zigmod/default.nix Outdated
Comment thread pkgs/development/tools/zigmod/default.nix Outdated
Comment thread pkgs/development/tools/zigmod/default.nix Outdated
Comment thread pkgs/development/tools/zigmod/default.nix Outdated
Comment thread pkgs/top-level/all-packages.nix Outdated
Comment thread pkgs/development/tools/zigmod/default.nix Outdated
Comment thread pkgs/development/tools/zigmod/default.nix Outdated
Comment thread pkgs/development/tools/zigmod/default.nix Outdated
Comment thread pkgs/development/tools/zigmod/default.nix Outdated
@paveloom paveloom force-pushed the zigmod branch 2 times, most recently from c661b2c to cc83dab Compare February 20, 2023 20:35
Comment thread pkgs/development/tools/zigmod/default.nix Outdated
Comment thread pkgs/development/tools/zigmod/default.nix Outdated
@paveloom
Copy link
Copy Markdown
Member Author

I've added a script that generates the list of dependencies.

@paveloom
Copy link
Copy Markdown
Member Author

paveloom commented Mar 2, 2023

I've rewritten the package to take advantage of fixed-output derivations. I've also added a function to build Zigmod packages and a test for it.

Copy link
Copy Markdown
Member

@AndersonTorres AndersonTorres left a comment

Choose a reason for hiding this comment

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

LGTM.
Very complex, but LGTM.

Comment thread pkgs/development/tools/zigmod/tests/clap/default.nix Outdated
Comment thread pkgs/development/tools/zigmod/default.nix Outdated
Comment thread pkgs/development/tools/zigmod/buildZigmodPackage.nix Outdated
Comment thread pkgs/development/tools/zigmod/buildZigmodPackage.nix Outdated
Comment thread pkgs/development/tools/zigmod/buildZigmodPackage.nix Outdated
@paveloom paveloom changed the title zigmod: init at r83 zigmod: init at 83 Mar 26, 2023
@nixos-discourse
Copy link
Copy Markdown

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

https://discourse.nixos.org/t/prs-ready-for-review/3032/2322

Comment thread pkgs/development/tools/zigmod/buildZigmodPackage.nix Outdated
Comment thread pkgs/development/tools/zigmod/buildZigmodPackage.nix Outdated
Comment thread pkgs/development/tools/zigmod/buildZigmodPackage.nix Outdated
Comment thread pkgs/development/tools/zigmod/buildZigmodPackage.nix Outdated
Comment thread pkgs/development/tools/zigmod/buildZigmodPackage.nix Outdated
Comment thread pkgs/development/tools/zigmod/default.nix Outdated
Comment thread pkgs/development/tools/zigmod/default.nix Outdated
Comment thread pkgs/development/tools/zigmod/default.nix Outdated
@paveloom
Copy link
Copy Markdown
Member Author

I've added a requirement to specify lockFile and manifestFile (as sources) in the buildZigmodPackage function. This way, we can avoid unnecessary builds of the fixed-output derivations for dependencies.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

that url scheme looks rather od. Is file:/// always there? Then we should move the logic into buildZigmodPackage

Copy link
Copy Markdown
Member Author

@paveloom paveloom Jul 11, 2023

Choose a reason for hiding this comment

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

No, it can be any scheme. I just use this one for the test. We separate updates of the package and the dependencies now, so the sources of lock and manifest files might be different. I imagine most of the time links to these files should be links to their blobs (contents of the file) from a specific commit.

@SuperSandro2000
Copy link
Copy Markdown
Member

I've added a requirement to specify lockFile and manifestFile (as sources) in the buildZigmodPackage function. This way, we can avoid unnecessary builds of the fixed-output derivations for dependencies.

but name still contains version, so the FOD hash would still be wrong, we just wouldn't notice it, right?

@paveloom
Copy link
Copy Markdown
Member Author

paveloom commented Jul 11, 2023

but name still contains version, so the FOD hash would still be wrong, we just wouldn't notice it, right?

Oh, right. I will just remove the version then.

@paveloom paveloom changed the title zigmod: init at 83 zigmod: init at 87 Aug 10, 2023
@paveloom paveloom changed the title zigmod: init at 87 zigmod: init at 88 Aug 27, 2023
@paveloom paveloom changed the title zigmod: init at 88 zigmod: init at 89 Nov 24, 2023
Comment thread pkgs/development/tools/zigmod/tests/clap/default.nix Outdated
@paveloom paveloom changed the title zigmod: init at 89 zigmod: init at 90 Jun 5, 2024
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 27, 2024
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 2, 2025
@nixpkgs-ci nixpkgs-ci Bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jun 25, 2025
@paveloom paveloom closed this Feb 8, 2026
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 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants