HACKER Q&A
📣 weitzj

Something Like Git but for Binaries?


I am looking for something like Git but for binaries where I can prove the validity of binaries in some repository (artifactory,Nexus,…) or via it’s own repository that the binaries are valid artifacts and maybe also how they derived from other artifacts.

e.g. having a merkle tree of different binaries and their derivations.

Is this in some way possible? Is this what Git lfs will do? Or do I need Bazel for this? How does NixOS or Gnu Guix fit into this?


  👤 notemaker Accepted Answer ✓
NixOS does not fit into this, but Nix the package manager could.

> Nix is a purely functional package manager. This means that it treats packages like values in purely functional programming languages such as Haskell — they are built by functions that don’t have side-effects, and they never change after they have been built. Nix stores packages in the Nix store, usually the directory /nix/store, where each package has its own unique subdirectory such as

> /nix/store/b6gvzjyb2pg0kjfwrjmg1vfhh54ad73z-firefox-33.1/

> where b6gvzjyb2pg0… is a unique identifier for the package that captures all its dependencies (it’s a cryptographic hash of the package’s build dependency graph). This enables many powerful features.

https://nixos.org/guides/how-nix-works.html

Git LFS / Git Annex might be able to suit your needs, but they're essentially "just" Git with some modifications to make large files easy to work with.

One of the "powerful features" of Nix mentioned above is reproducible builds, which sounds like what you're looking for.