From 2a65628826d20fc21a2cc374fcc857f97eb87543 Mon Sep 17 00:00:00 2001 From: Marius Bergmann Date: Wed, 15 Mar 2017 23:44:09 +0100 Subject: [PATCH] restic: init at 0.5.0 --- pkgs/tools/backup/restic/default.nix | 32 ++++++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/tools/backup/restic/default.nix diff --git a/pkgs/tools/backup/restic/default.nix b/pkgs/tools/backup/restic/default.nix new file mode 100644 index 000000000000..b816aac99a1d --- /dev/null +++ b/pkgs/tools/backup/restic/default.nix @@ -0,0 +1,32 @@ +{ stdenv, lib, buildGoPackage, fetchFromGitHub }: + +buildGoPackage rec { + name = "restic-${version}"; + version = "0.5.0"; + + goPackagePath = "github.com/restic/restic"; + + src = fetchFromGitHub { + owner = "restic"; + repo = "restic"; + rev = "v${version}"; + sha256 = "0dj6zg4b00pwgs6nj7w5s0jxm6cfavd9kdcq0z4spypwdf211cgl"; + }; + + 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; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2f0ffdd7de2f..daa423830f33 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10851,6 +10851,8 @@ with pkgs; redstore = callPackage ../servers/http/redstore { }; + restic = callPackage ../tools/backup/restic { }; + restund = callPackage ../servers/restund {}; rethinkdb = callPackage ../servers/nosql/rethinkdb {