mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 11:53:27 +00:00
34 lines
762 B
Nix
34 lines
762 B
Nix
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
|
|
|
|
buildGoPackage rec {
|
|
name = "restic-${version}";
|
|
version = "0.7.1";
|
|
|
|
goPackagePath = "github.com/restic/restic";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "restic";
|
|
repo = "restic";
|
|
rev = "v${version}";
|
|
sha256 = "07614wp0b6kjl8lq3qir271g0s2h8wvpdh43wsz1k6bip60nmqbf";
|
|
};
|
|
|
|
buildPhase = ''
|
|
cd go/src/${goPackagePath}
|
|
go run build.go
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $bin/bin/
|
|
cp restic $bin/bin/
|
|
'';
|
|
|
|
meta = with stdenv.lib; {
|
|
homepage = https://restic.github.io;
|
|
description = "A backup program that is fast, efficient and secure";
|
|
platforms = platforms.linux ++ platforms.darwin;
|
|
license = licenses.bsd2;
|
|
maintainers = [ maintainers.mbrgm ];
|
|
};
|
|
}
|