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

assetripper: init at 1.1.3 #337548

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

assetripper: init at 1.1.3 #337548

wants to merge 1 commit into from

Conversation

diadatp
Copy link

@diadatp diadatp commented Aug 26, 2024

Description of changes

AssetRipper is a tool for extracting assets from Unity serialized files (CAB-*, *.assets, *.sharedAssets, etc.) and asset bundles (*.unity3d, *.bundle, etc.) and converting them into the native Unity engine format.

https://github.com/AssetRipper/AssetRipper

The patch is is a temporary measure until AssetRipper/AssetRipper#1414 is resolved.

Closes #297634

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.

@UlyssesZh
Copy link
Member

Works for me. Thank you.

@YoshiRulz

This comment was marked as outdated.

@diadatp diadatp marked this pull request as ready for review November 26, 2024 19:07
@UlyssesZh UlyssesZh added the 9.needs: upstream fix This PR needs upstream to change something label Dec 6, 2024
src = fetchFromGitHub {
owner = "AssetRipper";
repo = "AssetRipper";
rev = "refs/tags/${finalAttrs.version}";
Copy link
Member

Choose a reason for hiding this comment

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

Please rebase on master branch and do this:

Suggested change
rev = "refs/tags/${finalAttrs.version}";
tag = finalAttrs.version;

See #355973.

Copy link
Contributor

Choose a reason for hiding this comment

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

I've tried rebasing locally and it doesn't build. I think something the fault is in Nixpkgs, but I haven't finished bisecting.

Copy link
Author

Choose a reason for hiding this comment

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

Could you share the build error you are receiving? If it is related to missing lib deps in two of the nuget precompiled libraries, then I have overcome that by including stdenv.cc.cc.lib in the buildInputs as a temporary fix. Would be interested in finding the breaking commit.

Copy link
Contributor

Choose a reason for hiding this comment

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

That was it, yeah.

searching for dependencies of /nix/store/y5y38bj32dd71ki3q1k0slnm2jals223-AssetRipper-1.1.3/lib/AssetRipper/libTexture2DDecoderNative.so
    libstdc++.so.6 -> not found!
    libgcc_s.so.1 -> not found!
auto-patchelf: 2 dependencies could not be satisfied
error: auto-patchelf could not satisfy dependency libstdc++.so.6 wanted by /nix/store/y5y38bj32dd71ki3q1k0slnm2jals223-AssetRipper-1.1.3/lib/AssetRipper/libTexture2DDecoderNative.so
error: auto-patchelf could not satisfy dependency libgcc_s.so.1 wanted by /nix/store/y5y38bj32dd71ki3q1k0slnm2jals223-AssetRipper-1.1.3/lib/AssetRipper/libTexture2DDecoderNative.so
auto-patchelf failed to find all the required dependencies.
Add the missing dependencies to --libs or use `--ignore-missing="foo.so.1 bar.so etc.so"`.

Culprit being 687371a (not sure how removing Python from propagated deps means removing libstdc++ but there you go).

pkgs/by-name/as/asset-ripper/package.nix Outdated Show resolved Hide resolved

buildDotnetModule (finalAttrs: {
pname = "AssetRipper";
version = "1.1.3";
Copy link
Member

Choose a reason for hiding this comment

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

AssetRipper has new releases:

Suggested change
version = "1.1.3";
version = "1.1.7";

Copy link
Contributor

Choose a reason for hiding this comment

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

Need to bump to .NET 9 for this by the way.

Copy link
Contributor

@YoshiRulz YoshiRulz Dec 7, 2024

Choose a reason for hiding this comment

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

I tried updating, but fetch-deps wasn't working, and in fact it's not working for 1.1.3 i.e. at cdfc970 without changes. How did you generate deps.nix?

edit: Opened #363497.

Copy link
Author

Choose a reason for hiding this comment

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

Good question. The passthru fetch-deps fails for me too. Looking through my shell history, I dropped into a dotnet sdk nix-shell within the project's source and ran approximately the following:

dotnet restore --packages out
nuget-to-nix out > deps.nix

Copy link
Member

Choose a reason for hiding this comment

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

Note that in comments. Failing to fetch deps automatically would mean that it cannot be updated properly with an update script, and people have to manually handle that, and they need to know how to do that manually by reading the relevant comments.

I am suspecting this be some bug of nuget-to-nix, but considering that currently there is work going on to retire nuget-to-nix (#362278), it may not worth digging into it. However, it would still be good if you can look into this.

Copy link
Contributor

@YoshiRulz YoshiRulz Dec 7, 2024

Choose a reason for hiding this comment

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

I got 1.1.7 1.1.8 building. YoshiRulz@2dc01fc

pkgs/by-name/as/asset-ripper/package.nix Outdated Show resolved Hide resolved
@UlyssesZh
Copy link
Member

Make sure your commit complies with the relevant conventions. To elaborate, the package name should be all lower-case, and remove the space between "Asset Ripper" in your commit message.

@diadatp
Copy link
Author

diadatp commented Dec 6, 2024

Took the following steps and squashed.

  • Used tag argument instead of rev as per fetchgit{,hub}: add tag argument #355973.
  • Included cc libs for autoPatchelf. This may need more consideration as some parts of the source use stdenv.cc.cc.libgcc or null and others use lib.getLib stdenv.cc.cc.
  • Added sourceProvenance to package's meta.
  • Fixed pname to follow conventions.
  • Added a symlink named AssetRipper in bin pointing to the main executable.

@diadatp diadatp changed the title Asset Ripper: init at 1.1.3 assetripper: init at 1.1.3 Dec 6, 2024
@diadatp
Copy link
Author

diadatp commented Dec 7, 2024

Above push does the following:

Updated meta.mainProgram to reflect symlink.
Fixed bug introduced in fixup due to pname change.
Moved symlink creation to postInstall.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: package (new) This PR adds a new package 9.needs: upstream fix This PR needs upstream to change something 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.

Package request: AssetRipper
3 participants