TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Brioche – A new Nix-like package manager

168 点作者 kylewlacy12 个月前
This is a project I&#x27;ve wanted to write for a long time now. I really love the ideas from Nix and I still have a ton of respect for the project, but Nix-the-language never felt intuitive to me and I wanted something with more approachable tooling (although this was circa 2016, so I&#x27;m sure Nix has improved a lot since then too-- that was before Flakes were around!)<p>Anyway, I started on the current iteration of Brioche about 6 months ago, and I finally cut an initial release. I&#x27;d still consider this a &quot;technical preview&quot; version (performance especially is pretty painful, so that&#x27;ll be a focus of mine in the coming weeks). But it&#x27;s finally at a point where it does work end-to-end and folks can take it for a test drive!

16 条评论

tombert12 个月前
Flakes definitely help with the giant megarepo annoyances of NixOS, though they&#x27;re still a little irritating. If you are writing in a languages that doesn&#x27;t hasn&#x27;t had its packages directly integrated into the build system (like Python&#x27;s has), it can be really irritating to do anything with them, since the `nix build` command disables network access and you therefore cannot use regular package manager.<p>I&#x27;m doing a project in Julia, and I&#x27;m using Nix Flakes to do it, but it&#x27;s been immensely annoying to actually get that working [1]. As a result, I&#x27;ve had avoid using the `nix build` command entirely (though the flakes are still useful for the `nix develop` command).<p>All that said, do you plan on having Brioche work with reproducible builds, and if so do you have a plan to make what I mentioned a bit less irritating?<p>[1] I know Julia2Nix exists, and I have never managed to actually get that working on any platform.
评论 #40566774 未加载
评论 #40567568 未加载
评论 #40571224 未加载
phlip912 个月前
Congrats on the release! I love the focus on devex w&#x2F; typescript and autocomplete. That&#x27;s probably one of my biggest pain points with Nix -- writing any non-trivial package always requires a ripgrep adventure through nixpkgs. Finding the right poorly documented and poorly discoverable derivation attributes is always such a chore.<p>What are your plans for cross-compilation or heavy package customization? One of nixpkgs coolest party tricks imo is that you can just change the stdenv and get a musl static binary or cross-compiled binary.
评论 #40566902 未加载
charlotte-fyi12 个月前
Very exciting. The ideas behind Nix are so good and everything else so bad. It seems like a lot of people are trying to solve this by building abstractions on top of Nix, but I&#x27;m really skeptical that is the solution. As crazy as a full rewrite is, I hope someone succeeds!
评论 #40566858 未加载
评论 #40569156 未加载
Zambyte12 个月前
I&#x27;m really happy to see more work on package managers in this space. I used Nix for a little bit, but I shared the frustration expressed by other commenters on the language itself. I have found my zen on GNU Guix, but more options are better :)
评论 #40576081 未加载
Aerbil31312 个月前
Beat me to it! It&#x27;s my dream to write a Nix replacement in a more approachable language. I can&#x27;t state enough how the choice of a bespoke DSL <i>that doesn&#x27;t immediately make sense to most developers</i> keeps Nix&#x2F;Nixos community from growing. And Nix is 18 years old now, it&#x27;s long overdue for a rewrite[1]. Don&#x27;t implement channels to start with. Focus on full reproducibility. (...getting into sci-fi territory...) Build in QEMU and KVM virtualization to be able to build and <i>run</i> most pieces of software ever published. No, Docker is a horribly leaky abstraction. Run a torrent network by default as cache.nixos.org equivalent, because you can&#x27;t keep up with the demand with centralized solutions, even nixpkgs gave up on it despite their free credits on AWS.<p>1: I believe all software without exception needs a full rewrite <i>at least</i> every 10 years.
评论 #40566970 未加载
tkz131212 个月前
Looks awesome! Congrats on the release. I would be curious to hear your thoughts on how this compares to garn [1], a typescript front end to the existing nixpkgs ecosystem.<p>1: <a href="https:&#x2F;&#x2F;garn.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;garn.io&#x2F;</a>
评论 #40582887 未加载
andrewla12 个月前
I&#x27;m very excited by all the attempts to replace Nix, but I don&#x27;t think I&#x27;ll be exploring this much deeper.<p>In my opinion the issue with Nix is that the data model is not crisply defined -- it&#x27;s there, but hidden under a lot of goop that is the Nix language itself and the various assumptions and baggage that goes with it.<p>What I want is a primarily declarative syntax supporting a rich set of data structures, ideally a non-Turing set of primitives, with a much more intuitive way of gluing things together. So basically bash (or even sh) with a well-defined way of transmitting environment variables and setting up the environment.<p>The idea of importing a language that has broader support (typescript) as an alternative to the Nix language seems appealing at first, but typescript is such a high-dependency system that it&#x27;s hard to get excited about it.
评论 #40567948 未加载
评论 #40567763 未加载
评论 #40567489 未加载
评论 #40567202 未加载
__MatrixMan__12 个月前
Some of the oddities of the nix language are pretty useful for its domain. Recursive attribute sets, for instance, save a lot of headaches if you&#x27;re trying to have only a single source of truth. Do you feel like these translate to typescript nicely?<p>As somebody who knows nix but doesn&#x27;t know typescript, I found myself looking for a rosetta stone page where I could look at two chunks of code that do the same thing, but in separate languages. This would let me use the familiar language to scrutinize the other.<p>I wouldn&#x27;t normally ask for such a thing, but if you&#x27;re putting &quot;Nix-like&quot; in the title then maybe it might be worth adding a comparison page to the docs.
评论 #40569417 未加载
评论 #40568571 未加载
评论 #40567876 未加载
doctor_phil12 个月前
I actually haven&#x27;t tried Nix (or other nix-alternatives) yet. I&#x27;ve seen a lot of complaints about the language, but a lot of praise and love of the idea. I though Guix was the &quot;main&quot; competitor to nix, using a more mainstream language (Scheme). Is that still the case? How would Brioche compare against Guix if you are OK with both Scheme and Typescript as languages?
评论 #40574024 未加载
评论 #40574315 未加载
zamalek12 个月前
I&#x27;m also exploring a post-Nix package manager, wip: <a href="https:&#x2F;&#x2F;github.com&#x2F;porkg&#x2F;porkg">https:&#x2F;&#x2F;github.com&#x2F;porkg&#x2F;porkg</a><p>My mantra has been to avoid &quot;getting bored&quot; and inventing DSLs for the longest time. I initially sought to use Nickel-lang, but it was missing some features that would make it an ideal candidate for this. I started writing my own (you may find this in the history) before realizing &quot;WTF are you doing writing another shitty DSL?&quot; I have subsequently decided that shell scripts (or anything you can shebang) are good enough, i.e. pkgbuild inspiration.<p>I also plan to avoid making a derivation the source of reproducibility. Instead, a lockfile will offer that. This should alleviate the issue whereby updating the like of glibc cascades into an entire rebuild.<p>Any *OS and home-manager would need to bring in a configuration language. I think Cue really makes the most sense, but that&#x27;s still a long way off.<p>Nice to see you used JS instead of yet another DSL :)
评论 #40567187 未加载
评论 #40570758 未加载
评论 #40567712 未加载
hisamafahri11 个月前
Wow, congrats for the release!!!<p>But, can we revisit the name? “Brioche” sounds cool but (at least for me) it’s so awkward to type on the terminal and pronounce
leoh12 个月前
I am not writing typescript -- heaven forbid -- so I can manage cargo, so I can write Rust.<p>Dropping the snark, though -- most times I have seen folks attempt to fold other build systems into some polyglot common one, it seems to create a lot of problems -- for at the end of the day, build tools (whether npm, cargo, gradle, docker, etc.) each have their issues. When these issues arise, they require understanding the original build tool. Bazel, for example, is a &quot;polyglot&quot; system which many try to use to manage npm. In my experience, when folks use bazel but have never used npm directly, they often get lost, because they now have to deal with two abstractions (bazel, npm) simultaneously neither have a way for bazel to do the thing they need, nor an understanding of how to get bazel to do that thing (nor npm itself to do the thing), also because they have never worked with npm directly.<p>Same goes for cargo, incidentally. Switching over to that build tool -- like any major build tool, it has an insane amount of well-honed documentation and thousands of answered questions online (not to mention LLMs trained somewhat well on it). Users when they need to do something with brioche or have an issue with it will not necessarily have the benefit of the massive collaborative support available for cargo.<p>Incidentally, I don&#x27;t think that nix is free of this problem, though it does attempt to manage these issues -- sometimes reasonably successfully -- by virtue of keeping interfaces to other build tools in simple, direct ways.<p>Even then, however, the best way I have seen nix used is as a system for declaring all binary dependencies or other dependencies that are either not manageable or especially competently managed by other build tools -- which nix allows for in a virtual environment by shipping a shell.nix or flake.<p>In other words -- bringing in the right version of java, gradle, node, etc. But then just directing users to the specific, native build tools that often have a massive number of contributors.<p>The closest thing to a tool that does this (guides developers to other build tools) is flox, which uses TOML, but uses nix for its backend via C API. I haven&#x27;t had a chance to use it much yet, but it looks very promising <a href="https:&#x2F;&#x2F;flox.dev" rel="nofollow">https:&#x2F;&#x2F;flox.dev</a>.<p>===<p>Okay, all this rambling aside -- building a tool like this for yourself or a small team, especially when you have the time to do it, it works well, and you&#x27;re having fun... well, there&#x27;s an insane amount to be said for that; and it will doubtlessly lead you to learning a ton about other build tools and likely offer you deep insights that are only possible when attempting to build something like brioche. So, on that count, major kudos to you.
amelius12 个月前
Can&#x27;t we have something Python based, since it is already the lingua franca and seems to be the language that people are least frustrated about?
raffraffraff12 个月前
Reading the comments makes me think I&#x27;m turning into my dad. He was a simple man in terms of education and career. He was a fire man on a stream train in 1950, a farmer, barman, handyman. Out in the sticks, he was everyone&#x27;s go-to guy when a vet couldn&#x27;t be found, because he kept a &quot;livestock first aid kit&quot; including penicillin &amp; syringes. He talked to vets and read books and knew about the most common ailments and how to treat them. He serviced his own car and tractor, including stripping the tractor engine down in his yard without proper tools, and getting cylinders bored and pistons sleeved, and putting it back together. He ran electric cable in farm building and sheds (after chatting to an electrician) and he did a ton of building work around the house. But at a certain age, maybe around 50, all new technology was out. Electricity was fine but electronics were out. Mechanical problems were fine because you could look straight at a thing and figure out how it clicked together, but once it had a microcontroller and a panel that abstracted away the actual working of the machine it just became some weird arbitrary &quot;thing&quot; that blocked his view of the machine. I&#x27;m sure if he was in his 20s when this stuff appeared he&#x27;d be all over it, but he was born in 1926, so I think the mighty micro was too late for him. He flatly refused to use the VCR, alarm systems, any type of computer. Show him a rubis cube, he&#x27;s interested. Show him a microwave oven with more than 5 buttons and he&#x27;ll make a sandwich instead.<p>This is me with nix. I&#x27;m ok with all the stuff that&#x27;s emerged in my field (infra&#x2F;sysadmin) since the 90s. But nix makes me instantly glaze over. Several times I tried, but it&#x27;s like my brain unplugs itself. I&#x27;m sure it does some wonderful stuff at an extremely high price that I&#x27;m not willing to pay.<p>Nix has a huge mindshare, which I don&#x27;t think you can win back if Nix keeps fixing the core issues mentored in these comments. Best of luck with this, though.
评论 #40574187 未加载
评论 #40571477 未加载
评论 #40575003 未加载
评论 #40574302 未加载
评论 #40574868 未加载
评论 #40575389 未加载
Gud12 个月前
I’ve always wondered why no one ports FreeBSDs pkg&#x2F;ports package management system. From all the operating systems I’ve used it’s the clear leader.
评论 #40585507 未加载
评论 #40575392 未加载
zarathustreal12 个月前
I’ve generally found the most interesting things are the ones that don’t feel intuitive at first. Familiarity bias can really hold you back. The language semantics of Nix are basically Haskell’s which.. is probably the One True Way to write correct code if we’re honest with ourselves.
评论 #40580641 未加载
评论 #40574195 未加载