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

zigmod: init at 90 #217229

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

zigmod: init at 90 #217229

wants to merge 1 commit into from

Conversation

paveloom
Copy link
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
Member Author

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

1 package built:
  • zigmod

@nixos-discourse
Copy link

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

@SuperSandro2000
Copy link
Member

Please do not paste immediately on discourse.

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

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

@paveloom
Copy link
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
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.

@paveloom paveloom changed the title zigmod: init at r83 zigmod: init at 83 Mar 26, 2023
@nixos-discourse
Copy link

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

pkgs/development/tools/zigmod/buildZigmodPackage.nix Outdated Show resolved Hide resolved
pkgs/development/tools/zigmod/buildZigmodPackage.nix Outdated Show resolved Hide resolved
pkgs/development/tools/zigmod/buildZigmodPackage.nix Outdated Show resolved Hide resolved
pkgs/development/tools/zigmod/buildZigmodPackage.nix Outdated Show resolved Hide resolved
pkgs/development/tools/zigmod/buildZigmodPackage.nix Outdated Show resolved Hide resolved
pkgs/development/tools/zigmod/default.nix Outdated Show resolved Hide resolved
pkgs/development/tools/zigmod/default.nix Outdated Show resolved Hide resolved
@paveloom
Copy link
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.

src = ./.;

lockFile = fetchurl {
url = "file:///" + ./zigmod.lock;
Copy link
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
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
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
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
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Sep 27, 2024
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 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 1-10 10.rebuild-linux: 1 11.by: package-maintainer This PR was created by the maintainer of the package it changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants