BatteredBunny / brew-nix

Experimental nix expression to package all MacOS casks from homebrew automatically
180 stars 5 forks source link

SageMath does not install #1

Open idontgetoutmuch opened 5 months ago

idontgetoutmuch commented 5 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 4 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 4 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.