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

dotnet: add initial support for arm64 #86037

Merged
merged 1 commit into from Apr 29, 2020
Merged

Conversation

purcell
Copy link
Member

@purcell purcell commented Apr 26, 2020

Motivation for this change

jellyfin appeared unsupported on aarch64 due to dotnet platform support in nixpkgs, but there are ARM64 downloads of the dotnet SDKs available. This change follows the kind of pattern used in the firecracker packaging to support selective x86_64/arm64 downloads.

With this change I can build jellyfin on a Raspberry Pi 4, but it wasn't obviously practical to go through all the SDK versions to fill in the ARM64 content hashes, so I have punted on those that were not immediately necessary.

I'd be very happy to receive guidance if this is a wrongheaded approach or if further work is needed. Thanks!

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Member

@cole-h cole-h left a comment

Choose a reason for hiding this comment

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

nixpkgs-review says nothing's changed, so this at least isn't detrimental. I don't have an aarch64 system to test with, though.

ETA: Diff LGTM ;)

Nothing changed
https://github.com/NixOS/nixpkgs/pull/86037

@purcell
Copy link
Member Author

purcell commented Apr 27, 2020

Thanks @cole-h, the time you have taken to look at this is appreciated!

@purcell
Copy link
Member Author

purcell commented Apr 27, 2020

Hey, I'm going to run through this and add download hashes for the other attributes too, so please hold off on merging. Will confirm when updated.

@purcell
Copy link
Member Author

purcell commented Apr 27, 2020

Amended and pushed. Now all the available ARM64 downloads have their correct hashes and at least build cleanly.

`jellyfin` appeared unsupported on `aarch64` due to `dotnet` platform
support in nixpkgs, but there are ARM64 downloads of the `dotnet` SDKs
available. This change follows the kind of pattern used in the
`firecracker` packaging to support selective x86_64/arm64 downloads.

With this change I can build `jellyfin` on a Raspberry Pi 4. The other
content hashes have been filled in, and all build successfully, but
they have not been further tested.
@Mic92
Copy link
Member

Mic92 commented Apr 28, 2020

@GrahamcOfBorg build dotnet

@Mic92
Copy link
Member

Mic92 commented Apr 28, 2020

@GrahamcOfBorg build dotnet-sdk_2 dotnet-sdk_3

@purcell
Copy link
Member Author

purcell commented Apr 28, 2020

Hey @Mic92, I'm not familiar with how the build bot works, but here are the relevant attributes, all available for both aarch64 and x86_64 unless otherwise noted:

dotnetCorePackages.aspnetcore_2_1   (x86_64 only)
dotnetCorePackages.netcore_2_1
dotnetCorePackages.sdk_2_1
dotnetCorePackages.aspnetcore_3_0
dotnetCorePackages.netcore_3_0
dotnetCorePackages.sdk_3_0
dotnetCorePackages.netcore_3_1
dotnetCorePackages.sdk_3_1

@Mic92
Copy link
Member

Mic92 commented Apr 29, 2020

@purcell It was able to build both.

@Mic92 Mic92 merged commit 6015d03 into NixOS:master Apr 29, 2020
@purcell
Copy link
Member Author

purcell commented Apr 29, 2020

Great, thanks for this!

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

Successfully merging this pull request may close these issues.

None yet

4 participants