Nix flake packaging for git-remote-s3 - a Git remote helper for AWS S3.
Add this flake as an input to use git-remote-s3 in your project:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
git-remote-s3.url = "github:sobelio/git-remote-s3-nix";
};
outputs = { self, nixpkgs, git-remote-s3, ... }:
let
system = "x86_64-linux"; # or your system
pkgs = nixpkgs.legacyPackages.${system};
in {
devShells.${system}.default = pkgs.mkShell {
buildInputs = [
git-remote-s3.packages.${system}.default
pkgs.git
];
};
};
}
# Install to current profile
nix profile install github:sobelio/git-remote-s3-nix
# Or run without installing
nix run github:sobelio/git-remote-s3-nix
# Build the package
nix build
# Check the result
./result/bin/git-remote-s3 --help
Once installed, you can use S3 as a Git remote:
# Clone from S3
git clone s3://mybucket/myrepo
# Add S3 remote to existing repo
git remote add s3 s3://mybucket/myrepo
git push s3 master
git-remote-s3 uses standard AWS SDK authentication methods:
- AWS credentials file (
~/.aws/credentials
) - Environment variables (
AWS_ACCESS_KEY_ID
,AWS_SECRET_ACCESS_KEY
) - IAM roles (when running on EC2)
The packaging is provided as-is. git-remote-s3 itself is licensed under Apache 2.0 by AWS Labs.