hraban / mac-app-util

Fix .app programs installed by Nix on Mac
GNU Affero General Public License v3.0
137 stars 5 forks source link

Package 'system-fare-quasiquote' broken #6

Closed fellnerse closed 1 week ago

fellnerse commented 1 week ago

Hey, thanks for the work, looks really cool!

I just have issue when adding mac-app-util to my flake that it fails to build:

error: Package ‘system-fare-quasiquote’ in /nix/store/7mil1q25150yzm8w1pm9j96bjgi54xwd-source/lisp-derivation.nix:301 is marked as broken, refusing to evaluate.

my flake looks like this:

{

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-24.05-darwin";
...
    mac-app-util.url = "github:hraban/mac-app-util";
    mac-app-util.inputs.nixpkgs.follows = "nixpkgs";
  };

  outputs = inputs@{ self, nix-darwin, nixpkgs, nixpkgs-unstable, home-manager, mac-app-util, ... }:
  let
      system = "aarch64-darwin";
...
    in
  {
    darwinConfigurations."foo" = nix-darwin.lib.darwinSystem {
      inherit system;
...
      specialArgs = { inherit self; };
      modules = [
...
        mac-app-util.darwinModules.default
        home-manager.darwinModules.home-manager
        ./hosts/mbp/configuration.nix
        ./hosts/mbp/home.nix
      ];
    };

    # Expose the package set, including overlays, for convenience.
    darwinPackages = self.darwinConfigurations."foo".pkgs;
  };
}

I already updated the lock file with nix flake update and I'm able to build a trampoline with:

nix run github:hraban/mac-app-util -- mktrampoline "/nix/store/pfm28jpyp52a60ygc57bwn7x1wx7isq4-iterm2-3.5.2/Applications/iTerm2.app" /Applications/MyApp.app

I'm a nix noob and any input would be super appreciated. do I need some kind of overlay from unstable to make it work?

hraban commented 1 week ago

Hi @fellnerse ! Yeah there was a specific minor release of SBCL that broke fare-utils a while ago, it was 2.4.4. Unfortunately that's the version stuck in nixpkgs-24.05-darwin 🤷 . I always make sure the nixpkgs version pinned in mac-app-util works for the application, so your best bet is to just let the mac-app-util pin do its job and not override nixpkgs :) i.e. remove this line:

    mac-app-util.inputs.nixpkgs.follows = "nixpkgs";

And you should be g2g! cl-nix-lite will bring its own copy of nixpkgs that it likes, including the sbcl it wants.

Good luck!

fellnerse commented 1 week ago

Thank you very much! that worked. I thought it would be best practice to use the follow to only have one version set of pkgs locally and save space, but makes sense!

hraban commented 1 week ago

It's a trade-off: you understood one side of it, and now you know the other side of the trade-off :)