nixpkgs/pkgs/tools/backup/restic/default.nix

34 lines
742 B
Nix
Raw Normal View History

2017-03-15 23:44:09 +01:00
{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "restic-${version}";
2017-07-14 08:01:32 +02:00
version = "0.7.0";
2017-03-15 23:44:09 +01:00
goPackagePath = "github.com/restic/restic";
src = fetchFromGitHub {
owner = "restic";
repo = "restic";
rev = "v${version}";
2017-07-14 08:01:32 +02:00
sha256 = "1whzzma2c199i604qy1a807zhi8qgri1r9bbxl5l7wlfh7x0n6sd";
2017-03-15 23:44:09 +01:00
};
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;
license = licenses.bsd2;
2017-05-29 23:53:49 +02:00
maintainers = [ maintainers.mbrgm ];
2017-03-15 23:44:09 +01:00
};
}