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

miru: darwin support, add maintainer #321539

Merged
merged 1 commit into from
Jun 23, 2024
Merged

Conversation

matteo-pacini
Copy link
Contributor

@matteo-pacini matteo-pacini commented Jun 21, 2024

Description of changes

  • Split the package into linux and darwin
  • Kept linux as it is, and added relevant code for darwin
  • Added myself as maintainer for Darwin

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

@matteo-pacini matteo-pacini marked this pull request as draft June 21, 2024 15:07
@matteo-pacini matteo-pacini marked this pull request as ready for review June 21, 2024 15:09
@ofborg ofborg bot added 6.topic: darwin Running or building packages on Darwin labels Jun 21, 2024
Copy link
Member

@d4ilyrun d4ilyrun left a comment

Choose a reason for hiding this comment

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

I cannot test it myself but I'll trust you and the CI 😄
LGTM

pkgs/by-name/mi/miru/package.nix Show resolved Hide resolved
@ofborg ofborg bot added the 8.has: package (new) This PR adds a new package label Jun 21, 2024
@ofborg ofborg bot requested a review from d4ilyrun June 21, 2024 15:47
@ofborg ofborg bot added 11.by: package-maintainer This PR was created by the maintainer of the package it changes 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 0 This PR does not cause any packages to rebuild labels Jun 21, 2024
@matteo-pacini matteo-pacini added the 12.approvals: 1 This PR was reviewed and approved by one reputable person label Jun 22, 2024
@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-already-reviewed/2617/1768

@DontEatOreo
Copy link
Member

Result of nixpkgs-review pr 321539 run on aarch64-darwin 1

1 package built:
  • miru

@wegank wegank added 12.approvals: 2 This PR was reviewed and approved by two reputable people 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package and removed 12.approvals: 1 This PR was reviewed and approved by one reputable person labels Jun 23, 2024
Comment on lines 20 to 32
nativeBuildInputs = [ unzip ];

installPhase = ''
mkdir -p $out/{bin,Applications}
cp -r Miru.app $out/Applications/
ln -s $out/Applications/Miru.app/Contents/MacOS/Miru $out/bin/miru
'';
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
nativeBuildInputs = [ unzip ];
installPhase = ''
mkdir -p $out/{bin,Applications}
cp -r Miru.app $out/Applications/
ln -s $out/Applications/Miru.app/Contents/MacOS/Miru $out/bin/miru
'';
nativeBuildInputs = [
unzip
makeWrapper
];
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,Applications}
cp -r Miru.app $out/Applications/
makeWrapper $out/Applications/Miru.app/Contents/MacOS/Miru $out/bin/miru
runHook postInstall
'';

$out/bin/miru won't work as expected when created with ln -s.

@matteo-pacini
Copy link
Contributor Author

@wegank addressed your comments, and tested out "$out/bin/miru", works perfectly, thanks for the suggestion.

Ready for re-review 🙏🏻

@wegank wegank removed the 12.approvals: 2 This PR was reviewed and approved by two reputable people label Jun 23, 2024
@DontEatOreo
Copy link
Member

Result of nixpkgs-review pr 321539 run on aarch64-darwin 1

1 package built:
  • miru

@wegank wegank merged commit c14a7da into NixOS:master Jun 23, 2024
23 of 24 checks passed
@matteo-pacini matteo-pacini deleted the miru-darwin branch June 23, 2024 22:51
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 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-darwin: 1 10.rebuild-linux: 0 This PR does not cause any packages to rebuild 11.by: package-maintainer This PR was created by the maintainer of the package it changes 12.approved-by: package-maintainer This PR was reviewed and approved by a maintainer listed in the package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants