~ ๐ ~
batteredbunny / brew-nix Goto Github PK
View Code? Open in Web Editor NEWExperimental nix expression to package all MacOS casks from homebrew automatically
Experimental nix expression to package all MacOS casks from homebrew automatically
~ ๐ ~
Hi. I'd like to use brew-nix to install casks from repos other than https://github.com/Homebrew/homebrew-cask, like https://github.com/nikitabobko/homebrew-tap for example. I'm ignorant about all this, so I don't know if this is easy or hard or impossible to support ๐.
Thanks!
I was wondering on what the strategy is for handling packages with an @ in the name like https://formulae.brew.sh/cask/firefox@developer-edition ?
I tried parsing as a string but it seems that this breaks the flake.
error:
โฆ while calling the 'derivationStrict' builtin
at /derivation-internal.nix:9:12:
8|
9| strict = derivationStrict drvAttrs;
| ^
10|
โฆ while evaluating derivation 'darwin-system-24.11.20240804.f3834de+darwin4.f7142b8'
whose name attribute is located at /nix/store/f5ykynf933aab7nd1arqz6dm79hdh91q-source/pkgs/stdenv/generic/make-derivation.nix:334:7
โฆ while evaluating attribute 'activationScript' of derivation 'darwin-system-24.11.20240804.f3834de+darwin4.f7142b8'
at /nix/store/gja289s0jhbrz7kgypdq8p4x0pin5axg-source/modules/system/default.nix:95:7:
94|
95| activationScript = cfg.activationScripts.script.text;
| ^
96| activationUserScript = cfg.activationScripts.userScript.text;
(stack trace truncated; use '--show-trace' to show the full trace)
error: A definition for option `environment.systemPackages."[definition 10-entry 7]"' is not of type `package'. Definition values:
- In `/nix/store/awlw9r6cby3g0sw2y33981f4vdvzpxy1-source/brew-apps.nix': "firefox@developer-edition"
Best regards
Edit: I have updated the title after some feedback from another commenter below.
Firstly, thanks for making this interesting project. I haven't got it to work yet, but I am interested in the idea and think it could be valuable for many others.
I am encountering an issue with my flake.nix configuration. Here is, I think, a minimal example:
{
description = "My Home Manager Configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
brew-nix = {
url = "github:BatteredBunny/brew-nix";
inputs.brew-api.follows = "brew-api";
};
brew-api = {
url = "github:BatteredBunny/brew-api";
flake = false;
};
};
outputs = { nixpkgs, home-manager, brew-nix, ... }:
let
system = "aarch64-darwin";
pkgs = import nixpkgs {
inherit system;
overlays = [ brew-nix.overlays.default ];
};
in
{
homeConfigurations."my_user" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./home.nix
{
home.packages = with pkgs; [ brewCasks.marta ];
}
];
};
};
}
However, I get this error for any cask I try.
error: attribute 'marta' missing
at /nix/store/fq0lbkk91jzacx4240nqxbxqqsjadi7w-source/flake.nix:31:42:
30| {
31| home.packages = with pkgs; [ brewCasks.marta ];
| ^
32| }
If you have any ideas on how to resolve this issue, I would greatly appreciate your help!
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'.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.