nixpkgs-suyu/pkgs/tools/backup/restic/default.nix
2017-11-27 08:55:37 +01:00

33 lines
762 B
Nix

{ stdenv, lib, buildGoPackage, fetchFromGitHub }:
buildGoPackage rec {
name = "restic-${version}";
version = "0.8.0";
goPackagePath = "github.com/restic/restic";
src = fetchFromGitHub {
owner = "restic";
repo = "restic";
rev = "v${version}";
sha256 = "10r2p4mkspkkzmj41jskqii02qkliwz2zfhvsabkg8clr8lzfkv9";
};
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 ];
};
}