BatteredBunny / brew-nix

Experimental nix expression to package all MacOS casks from homebrew automatically
MIT License
193 stars 8 forks source link

SageMath does not install #1

Open idontgetoutmuch opened 7 months ago

idontgetoutmuch commented 7 months ago
nix build github:BatteredBunny/brew-nix#sage
warning: Ignoring setting 'auto-allocate-uids' because experimental feature 'auto-allocate-uids' is not enabled
error: builder for '/nix/store/m7hm7zgij0gj83f1zfpii6qfv8idkkdh-sage-10.3-2.3.2.drv' failed with exit code 1;
       last 2 log lines:
       > Running phase: unpackPhase
       > Error opening xar archive: /nix/store/b01wjzak42p22400ksq0nz78ys17jfff-SageMath-10.3_arm64.dmg
       For full logs, run 'nix log /nix/store/m7hm7zgij0gj83f1zfpii6qfv8idkkdh-sage-10.3-2.3.2.drv'.
BatteredBunny commented 6 months ago

Problem seems to be that the function should do unpack procedures based on what file the source actually returns instead of looking whats inside ´´artifacts´´. Then there's another issue of the .dmg containing .pkg files, so it should unpack pkg files in a for loop, making sure there are no pkg files left.

So for this program it would first download the dmg file, unpack it then unpack the .pkg file which contains another .pkg file, will look into fixing it soon.

pitkling commented 6 months ago

@BatteredBunny: Just a side note: For the second issue you mention above it might be helpful to use /usr/sbin/pkgutil --expand-full instead of the "manual" unpacking of pkg files via xar and zcat. The --expand-full flag is an undocumented flag that extracts the pkg file as well as all Payload/Scripts files of (contained) packages.