{"id":15715695,"url":"https://github.com/batteredbunny/brew-nix","last_synced_at":"2025-04-13T00:46:56.126Z","repository":{"id":238132246,"uuid":"795898620","full_name":"BatteredBunny/brew-nix","owner":"BatteredBunny","description":"Experimental nix expression to package all MacOS casks from homebrew automatically","archived":false,"fork":false,"pushed_at":"2025-03-13T07:59:28.000Z","size":29,"stargazers_count":225,"open_issues_count":3,"forks_count":11,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-13T00:46:52.146Z","etag":null,"topics":["brew","flake","homebrew","nix","nix-darwin","nix-flake"],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BatteredBunny.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-04T11:07:43.000Z","updated_at":"2025-04-11T10:16:39.000Z","dependencies_parsed_at":"2024-05-04T14:39:39.309Z","dependency_job_id":"7830be10-f1e4-4a82-9f7c-524e5bdf18be","html_url":"https://github.com/BatteredBunny/brew-nix","commit_stats":null,"previous_names":["batteredbunny/brew.nix"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BatteredBunny%2Fbrew-nix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BatteredBunny%2Fbrew-nix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BatteredBunny%2Fbrew-nix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BatteredBunny%2Fbrew-nix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BatteredBunny","download_url":"https://codeload.github.com/BatteredBunny/brew-nix/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650434,"owners_count":21139672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["brew","flake","homebrew","nix","nix-darwin","nix-flake"],"created_at":"2024-10-03T21:42:28.155Z","updated_at":"2025-04-13T00:46:56.107Z","avatar_url":"https://github.com/BatteredBunny.png","language":"Nix","funding_links":[],"categories":[],"sub_categories":[],"readme":"# brew-nix\n\nExperimental nix expression to package all MacOS casks from [homebrew](https://brew.sh/) automatically.\n\n## Benefits over nix-darwin's homebrew module\n1. No homebrew needed, packages are fully managed by nix.\n2. Fully nix package expressions, everything is type checked and it will give you an error when you specify an invalid package for example.\n\n## Limitations/flaws\n1. Running most programs with ``nix run`` wont work, so you should install them first.\n2. Some programs refuse to run from non standard locations, since this is automatic there isnt a good way to fix it.\n3. About 700 casks dont come with hashes, so you have to [override the package and provide the hash yourself](https://github.com/BatteredBunny/brew-nix?tab=readme-ov-file#overriding-casks-with-no-hash).\n4. Having multiple generations of this will take A LOT of space, so keep that in mind\n\n## Related projects\n- [mac-app-util](https://github.com/hraban/mac-app-util)\n- [nixcasks](https://github.com/jcszymansk/nixcasks)\n\n# Usage examples\n\n## Basic usage\n```bash\nnix build github:BatteredBunny/brew-nix#blender\n./result/Applications/Blender.app/Contents/MacOS/Blender\n```\n\n## Overriding casks with no hash\nMany casks come with no hash so you have to provide one yourself\n```nix\nhome.packages = with pkgs; [\n  (brewCasks.marta.overrideAttrs (oldAttrs: {\n    src = pkgs.fetchurl {\n      url = builtins.head oldAttrs.src.urls;\n      hash = lib.fakeHash; # Replace me with real hash after building once\n    };\n  }))\n];\n```\n\n## Using with nix-darwin\n\nSee [`examples/flake.nix`](examples/flake.nix).\n\n## Using with home-manager\n```nix\n# flake.nix\ninputs = {\n  brew-nix = {\n    url = \"github:BatteredBunny/brew-nix\";\n    inputs.brew-api.follows = \"brew-api\";\n  };\n  brew-api = {\n    url = \"github:BatteredBunny/brew-api\";\n    flake = false;\n  };\n};\n```\n```nix\n# home.nix\nnixpkgs = {\n  overlays = [\n    inputs.brew-nix.overlays.default\n  ];\n};\n\nhome.packages = with pkgs; [\n  brewCasks.marta\n  brewCasks.\"firefox@developer-edition\" # Casks with special characters in their name need to be defined in quotes\n];\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbatteredbunny%2Fbrew-nix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbatteredbunny%2Fbrew-nix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbatteredbunny%2Fbrew-nix/lists"}