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

Problem defining nix package for igir 3.0.1 #1410

Open
docbobo opened this issue Jan 10, 2025 · 5 comments
Open

Problem defining nix package for igir 3.0.1 #1410

docbobo opened this issue Jan 10, 2025 · 5 comments
Labels
enhancement New feature or request

Comments

@docbobo
Copy link

docbobo commented Jan 10, 2025

Is your feature request related to a problem?

Yes - coming up with a nix package definition that will work on all platforms.

Describe the solution you'd like

Instead of using homebrew, I am using nix to manage packages installed on my MacOS systems. As it turns out, there is a nix package definition that would install 2.11.0 for linux systems, but it does not support Darwin as a target.

I set out to update that nix definition to a) support Darwin and b) upgrade igir to 3.0.1, but I am currently struggling with chdman and maxcso:

Due to the way that nix operates, path-based dependencies to dynamic libraries need to be updated via patchelf (linux) or install_name_tool (MacOS). This helps retargeting dependencies to e.g. /opt/homebrew/opt/lz4/lib/liblz4.1.dylibto the corresponding library in the local nix store. This works well for all the binary components that I've found to be part of igir: lza, chdman, and maxcso.

It also seems to work well for Linux build. However, for some reason unknown to me, the Linux build does not contain the module that contains maxcso, while the Darwin build does:

Linux (arm64)

$ find ./lib/node_modules/igir/node_modules/@emmercm
./lib/node_modules/igir/node_modules/@emmercm/
./lib/node_modules/igir/node_modules/@emmercm/chdman-linux-arm64
./lib/node_modules/igir/node_modules/@emmercm/chdman-linux-arm64/README.md
./lib/node_modules/igir/node_modules/@emmercm/chdman-linux-arm64/package.json
./lib/node_modules/igir/node_modules/@emmercm/chdman-linux-arm64/dist
./lib/node_modules/igir/node_modules/@emmercm/chdman-linux-arm64/dist/index.js.map
./lib/node_modules/igir/node_modules/@emmercm/chdman-linux-arm64/dist/index.js
./lib/node_modules/igir/node_modules/@emmercm/chdman-linux-arm64/dist/index.d.ts
./lib/node_modules/igir/node_modules/@emmercm/chdman-linux-arm64/chdman
./lib/node_modules/igir/node_modules/@emmercm/chdman-linux-arm64/LICENSE

Darwin (arm64)

$ find ./lib/node_modules/igir/node_modules/@emmercm
./lib/node_modules/igir/node_modules/@emmercm
./lib/node_modules/igir/node_modules/@emmercm/maxcso-darwin-arm64
./lib/node_modules/igir/node_modules/@emmercm/maxcso-darwin-arm64/LICENSE
./lib/node_modules/igir/node_modules/@emmercm/maxcso-darwin-arm64/dist
./lib/node_modules/igir/node_modules/@emmercm/maxcso-darwin-arm64/dist/maxcso
./lib/node_modules/igir/node_modules/@emmercm/maxcso-darwin-arm64/dist/index.js
./lib/node_modules/igir/node_modules/@emmercm/maxcso-darwin-arm64/dist/index.js.map
./lib/node_modules/igir/node_modules/@emmercm/maxcso-darwin-arm64/dist/index.d.ts
./lib/node_modules/igir/node_modules/@emmercm/maxcso-darwin-arm64/README.md
./lib/node_modules/igir/node_modules/@emmercm/maxcso-darwin-arm64/package.json
./lib/node_modules/igir/node_modules/@emmercm/chdman-darwin-arm64
./lib/node_modules/igir/node_modules/@emmercm/chdman-darwin-arm64/LICENSE
./lib/node_modules/igir/node_modules/@emmercm/chdman-darwin-arm64/dist
./lib/node_modules/igir/node_modules/@emmercm/chdman-darwin-arm64/dist/index.js
./lib/node_modules/igir/node_modules/@emmercm/chdman-darwin-arm64/dist/index.js.map
./lib/node_modules/igir/node_modules/@emmercm/chdman-darwin-arm64/dist/index.d.ts
./lib/node_modules/igir/node_modules/@emmercm/chdman-darwin-arm64/chdman
./lib/node_modules/igir/node_modules/@emmercm/chdman-darwin-arm64/README.md
./lib/node_modules/igir/node_modules/@emmercm/chdman-darwin-arm64/package.json

Initially, I thought this might be related to emmercm/homebrew-igir#22 though I am not so sure anymore. Anyway...

I've already tried a few things, but given that my understanding of the NodeJS eco-system is rather limited, I a) have no idea what's causing this and thus b) not the slightest idea how to fix it.

Does anything come to mind there?

Additional context

No response

@docbobo docbobo added the enhancement New feature or request label Jan 10, 2025
@docbobo
Copy link
Author

docbobo commented Jan 10, 2025

It's just the absence of the maxcso binary after build that I need to solve in order to finalize the nix package update.

@docbobo
Copy link
Author

docbobo commented Jan 10, 2025

I am wondering if that might actually be an Linux/arm64 issue...

@docbobo
Copy link
Author

docbobo commented Jan 11, 2025

The only obvious difference between chdman-js and macxso-js seems to be that chdman-js also contains a package called chdman-linux-arm while maxcso-js does not have any package for -arm. But I would've expected the arm64 package to be used in either case...

@docbobo
Copy link
Author

docbobo commented Jan 11, 2025

Lovely - just noticed that this got fixed in maxcso-js v0.1130.8, while v3.0.1 included v0.1130.7..

@docbobo
Copy link
Author

docbobo commented Jan 20, 2025

@emmercm any chance, we can get a 3.0.2 tag for ec6c184?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant