Conversation
|
+100. Let's merge this soon before it gets stale. |
|
nice :) |
|
I'm working on replacing all |
|
Should go2nix be patched to automatically generate the right thing ? |
|
I left changes in |
pkgs/top-level/all-packages.nix
Outdated
There was a problem hiding this comment.
Is it ok like this or maybe we want to produce every otutput? I couldn't figure it out and make 2 styles of it to make it consistent later.
|
strange thing happens on travis: I can't reproduce it on my machine :/ |
|
Most certainly a travis issue you don't have to care about See |
5c1ca7f to
73f47c5
Compare
|
So I leave travis as is. |
|
Trying again after @domenkozar fix |
|
Needs update after #16042 |
|
By getting rid of go-packages.nix, rclone has removed (introduced by #15852). I wanted to use |
|
It should be as easy as using |
|
@edolstra is there a way to use nix parser as a library? I can generate nix instead of json using text templates in Go but I can't automate package reuse in go2nix without parsing nix. |
|
@kamilchm I think we should drop the libs.json altogether. Then it's not a problem because you don't have to parse the nix code, you just generate new deps.nix files. Because of the content-addressable store, if two programs have the same dependency it will already result in the same derivation in the store. Git also has compression in the pack files so it won't make much difference to duplicate the dependencies on disk. And finally most users will just use the binary builds so it won't make any differences to them. |
|
You're right. I'll make a proposal PR with |
After NixOS#16017 there were a lot of comments saying that `nix` would be better than `JSON` for Go packages dependency sets. As said in NixOS#16017 (comment) > Because of the content-addressable store, if two programs have the > same dependency it will already result in the same derivation in the > store. Git also has compression in the pack files so it won't make > much difference to duplicate the dependencies on disk. And finally > most users will just use the binary builds so it won't make any > differences to them. This PR removes all `deps.json` and `libs.json` files by replacing it witth standard `deps.nix` dependecy set files that can be generated by `go2nix`.
After NixOS#16017 there were a lot of comments saying that `nix` would be better than `JSON` for Go packages dependency sets. As said in NixOS#16017 (comment) > Because of the content-addressable store, if two programs have the > same dependency it will already result in the same derivation in > the > store. Git also has compression in the pack files so it won't make > much difference to duplicate the dependencies on disk. And finally > most users will just use the binary builds so it won't make any > differences to them. This PR removes `libs.json` file and puts all package dependencies in theirs `deps.json`.
After NixOS#16017 there were a lot of comments saying that `nix` would be better than `JSON` for Go packages dependency sets. As said in NixOS#16017 (comment) > Because of the content-addressable store, if two programs have the > same dependency it will already result in the same derivation in > the > store. Git also has compression in the pack files so it won't make > much difference to duplicate the dependencies on disk. And finally > most users will just use the binary builds so it won't make any > differences to them. This PR removes `libs.json` file and puts all package dependencies in theirs `deps.json`.
|
@kamilchm did you lose all the |
|
@kamilchm @zimbatm I don't think sharing is a storage-level concern for most of us, so the content-addressable deduplication doesn't really address my concern with it. It's a human-level concern for me, where I want to make sure that if I find that I needed to patch some particular Go package for use with Nix (perhaps because it assumed silly things about an FHS filesystem), I don't have to do that every time I use it, but can do that once. Or that if a particular Go package ends up having a security vulnerability, that I don't need to go hunt down a thousand libs.json files to figure out who's vulnerable. So in some sense I'm kind of disappointed that this is now the approach, and wish I'd paid attention while this was happening. |
By getting rid of go-packages.nix (NixOS#16017), rclone has removed (introduced by NixOS#15852).
Introduced with NixOS#16017.
Motivation for this change
This is my try on better
goPackagesas I mentioned in #13819 (comment)I started with an assumption that there's no need to have
goPackagesthat aren't used in a compiled program. So I've created new derivations in proper program categories for allall-packages.nixthat comes fromgo-packages.nixusing prototype toolgo2nix.All program dependencies are extracted to json file than can include other json dependency files for better package reuse and making overrides possible.
libs.jsonanddeps.jsonfiles can be easily updated with tools like proposed in #13819 or generated from go native dependency managers.There are few more things to do, but I'm looking for feedback to proritize tasks. Let's make go packaging better.
CC: @edolstra @cstrahan @copumpkin @viric @hrdinka @wkennington @zimbatm
Things done
(nix.useSandbox on NixOS,
or option
build-use-sandboxinnix.confon non-NixOS)
nix-shell -p nox --run "nox-review wip"./result/bin/)