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

nc4nix: allow Darwin builds #391654

Merged
merged 1 commit into from
Mar 21, 2025
Merged

Conversation

LoganBarnett
Copy link
Contributor

nc4nix builds and runs on Darwin, so add it to the platforms list.

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.

Tests

Demonstration of a run:

~/dev/nixpkgs/pkgs/servers/nextcloud/packages on nc4nix-allow-darwin|✚1 logan@scandium 0 [12:52:14] 0s
$ ./generate.sh
this derivation will be built:
  /nix/store/i3cbf6npdx52g3x8mdhg3s5g1jrnidb5-nc4nix-0-unstable-2024-09-28.drv
these 72 paths will be fetched (196.36 MiB download, 1385.75 MiB unpacked):
  /nix/store/8vpszm9fnh00d6s8m5hi67xrpxnxdd5c-apple-sdk-11.3
  /nix/store/hmffg6n6ylbl4c30pqc9i71mwqzrd0iv-bash-5.2p37
  /nix/store/lilfrlzz6wch60mzq661nkgfc96anjld-bash-interactive-5.2p37
  /nix/store/5988q68ifr0plfhb5xm2vakhkhjvj6jd-bzip2-1.0.8
  /nix/store/9l7x0z8y92lxmnqgc2vlnmn9r1hd2f9z-bzip2-1.0.8-bin
<snip>
+ APPS=app_api,bookmarks,calendar,collectives,contacts,cookbook,cospend,deck,end_to_end_encryption,files_automatedtagging,files_markdown,files_mindmap,files_retention,files_texteditor,forms,gpoddersync,groupfolders,impersonate,integration_deepl,integration_openai,integration_paperless,mail,maps,memories,music,news,notes,onlyoffice,phonetrack,polls,previewgenerator,qownnotesapi,quota_warning,registration,richdocuments,sociallogin,spreed,tasks,twofactor_nextcloud_notification,twofactor_totp,twofactor_webauthn,unroundedcorners,unsplash,user_oidc,user_saml,whiteboard
+ nc4nix -apps app_api,bookmarks,calendar,collectives,contacts,cookbook,cospend,deck,end_to_end_encryption,files_automatedtagging,files_markdown,files_mindmap,files_retention,files_texteditor,forms,gpoddersync,groupfolders,impersonate,integration_deepl,integration_openai,integration_paperless,mail,maps,memories,music,news,notes,onlyoffice,phonetrack,polls,previewgenerator,qownnotesapi,quota_warning,registration,richdocuments,sociallogin,spreed,tasks,twofactor_nextcloud_notification,twofactor_totp,twofactor_webauthn,unroundedcorners,unsplash,user_oidc,user_saml,whiteboard
2025/03/20 12:52:47 Starting to process apps for version 29.0.14
2025/03/20 12:52:47 Querying API at https://apps.nextcloud.com//api/v1/platform/29.0.14/apps.json
2025/03/20 12:53:00 Loading 29.json
2025/03/20 12:53:00 Loaded 29.json
2025/03/20 12:53:00 Found app maps (1.4.0) at https://github.com/nextcloud/maps/releases/download/v1.4.0/maps-1.4.0.tar.gz
2025/03/20 12:53:00 Found app files_mindmap (0.0.33) at https://github.com/ACTom/files_mindmap/releases/download/v0.0.33/files_mindmap-0.0.33.tar.gz
2025/03/20 12:53:00 Skipping app files_archive () because it only has a compatible prerelease
<snip>

~/dev/nixpkgs/pkgs/servers/nextcloud/packages on nc4nix-allow-darwin|✚4 logan@scandium 0 [12:53:28] 69s
$ git status                           
On branch nc4nix-allow-darwin
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   ../../../by-name/nc/nc4nix/package.nix
	modified:   29.json
	modified:   30.json
	modified:   31.json

no changes added to commit (use "git add" and/or "git commit -a")

$ uname -a
Darwin scandium 23.4.0 Darwin Kernel Version 23.4.0: Wed Feb 21 21:44:43 PST 2024; root:xnu-10063.101.15~2/RELEASE_ARM64_T6000 arm64 arm Darwin

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Mar 20, 2025
@NixOSInfra NixOSInfra added the 12. first-time contribution This PR is the author's first one; please be gentle! label Mar 20, 2025
@github-actions github-actions bot added 10.rebuild-darwin: 1 10.rebuild-darwin: 1-10 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Mar 20, 2025
@nix-owners nix-owners bot requested a review from onny March 20, 2025 20:31
@onny
Copy link
Contributor

onny commented Mar 20, 2025

can we set platform unix (as far as i understand it should cover linux + darwin)

`nc4nix` builds and runs on Darwin, so add it to the platforms list.
@LoganBarnett
Copy link
Contributor Author

@onny right you are! I've seen this before but it just didn't click. Thanks! Applied with an amend commit.

@onny onny merged commit ffe7874 into NixOS:master Mar 21, 2025
26 of 27 checks passed
@onny
Copy link
Contributor

onny commented Mar 21, 2025

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 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.

3 participants