[HN Gopher] Cachix 1.3: Uploads unleashed
       ___________________________________________________________________
        
       Cachix 1.3: Uploads unleashed
        
       Author : domenkozar
       Score  : 55 points
       Date   : 2023-03-08 10:12 UTC (12 hours ago)
        
 (HTM) web link (blog.cachix.org)
 (TXT) w3m dump (blog.cachix.org)
        
       | [deleted]
        
       | rkrzr wrote:
       | Great news!
       | 
       | > Starting with Cachix v1.3, we're enabling multipart uploads
       | directly to storage.
       | 
       | I would be interested to hear more about the design of the new
       | system.
       | 
       | E.g. does it make use of Cloudflare R2 for storage? How is
       | authentication handled?
       | 
       | Would be great to hear more, if you can share!
        
       | aerzen wrote:
       | Does anyone have some material recommendation about using nix for
       | building binary releases of packages / libraries?
       | 
       | We have a Rust library that has bindings for many languages, most
       | of which call the lib trough FFI. Is is worth investing time to
       | set up flakes / nix builds that would be able to produce Java,
       | dotnet, php packages for different platforms?
       | 
       | Also, does there exists a opensource plan for cachix?
        
         | rgoulter wrote:
         | I think for the goal of "produce Java, dotnet, php packages
         | (with a Rust dependency) for different platforms", this _as
         | such_ is something Nix isn 't geared towards.
         | 
         | Nix essentially relies on all its packages (and their linked
         | dependencies) ending up under /nix/store. -- I'm not sure how
         | easy it is to then take native shared libraries from
         | /nix/store, and then distribute these to systems which don't
         | have /nix/store.
         | 
         | Whereas, say, applications could be bundled using nix bundle.
         | https://nixos.org/manual/nix/unstable/command-ref/new-cli/ni...
         | 
         | That said, I think Nix could still otherwise make a useful
         | addition to the project. Something like https://devenv.sh/
         | would make setting up a development environment (especially for
         | multiple languages) much easier.
        
           | maxmcd wrote:
           | I mean I think part of the difficulty with
           | understanding/using Nix is that you can do anything with it.
           | 
           | You could set up a nix shell with all the dependencies you
           | need to build the libraries, then build them "outside" of nix
           | with something like `nix-shell --run`. You'd then at least
           | have a reproducible environment for running builds.
           | 
           | You could alternatively build out libraries to a /nix/store
           | with a derivation and then use nix's own tooling to ensure
           | that the outputted files had no runtime dependencies on other
           | nix dependencies. From there you could freely copy them from
           | the store.
           | 
           | In both situation I think you could take advantage of Nix's
           | various cross-compilation support.
        
         | ParetoOptimal wrote:
         | > Does anyone have some material recommendation about using nix
         | for building binary releases of packages / libraries?
         | 
         | Here's a very easy guide using Github actions:
         | 
         | https://nix.dev/tutorials/continuous-integration-github-acti...
         | 
         | See their other tutorials:
         | 
         | https://nix.dev/tutorials/#
        
         | rkangel wrote:
         | If you do go this route, this blog post might be useful:
         | https://xeiaso.net/blog/how-i-start-nix-2020-03-08
         | 
         | I found it yesterday (via another HN post), which shows the
         | steps needed for exactly your use case.
        
         | kaba0 wrote:
         | The more complex your build requirements are, the more it may
         | be worthy to switch to Nix, in my opinion. Managing that many
         | languages might be reason enough to consider it.
        
       | domenkozar wrote:
       | Hey folks,
       | 
       | Cachix founder here. Here are a few links for getting started:
       | 
       | - https://nix.dev Nix tutorials
       | 
       | - https://devenv.sh Fast, Declarative, Reproducible, and
       | Composable Developer Environments
       | 
       | Let me know if you have any questions. Domen
        
         | mkranjec wrote:
         | Domen, love the work you're doing.
         | 
         | You're more than welcome to share your wisdom about nix and
         | everything related to it at our meetup.
        
       | bfrog wrote:
       | cachix is a fantastic value add to nix CI flows, it made it
       | incredibly easy to add cached artifacts for a cross compile setup
       | I had going which required a custom toolchain with musl build.
       | 
       | It was super easy, and super fast. Well worth the $
        
       ___________________________________________________________________
       (page generated 2023-03-08 23:02 UTC)