Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a8340a301aab
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: fa4747c38ad9
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Apr 27, 2020

  1. Verified

    This commit was signed with the committer’s verified signature.
    colemickens Cole Mickens
    Copy the full SHA
    3e4f1e5 View commit details
  2. Copy the full SHA
    fa4747c View commit details
Showing with 11 additions and 15 deletions.
  1. +11 −15 pkgs/tools/backup/restic/default.nix
26 changes: 11 additions & 15 deletions pkgs/tools/backup/restic/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub, nixosTests}:
{ stdenv, lib, buildGoPackage, fetchFromGitHub, installShellFiles, nixosTests}:

buildGoPackage rec {
pname = "restic";
@@ -13,23 +13,19 @@ buildGoPackage rec {
sha256 = "0lydll93n1lcn1fl669b9cikmzz9d6vfpc8ky3ng5fi8kj3v1dz7";
};

subPackages = [ "cmd/restic" ];

nativeBuildInputs = [ installShellFiles ];

passthru.tests.restic = nixosTests.restic;

# Use a custom install phase here as by default the
# build-release-binaries and prepare-releases binaries are
# installed.
installPhase = ''
mkdir -p "$bin/bin"
cp go/bin/restic "$bin/bin"
'' + lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
mkdir -p \
$bin/etc/bash_completion.d \
$bin/share/zsh/vendor-completions \
$bin/share/man/man1
postInstall = lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
$bin/bin/restic generate \
--bash-completion $bin/etc/bash_completion.d/restic.sh \
--zsh-completion $bin/share/zsh/vendor-completions/_restic \
--man $bin/share/man/man1
--bash-completion restic.bash \
--zsh-completion restic.zsh \
--man .
installShellCompletion restic.{bash,zsh}
installManPage *.1
'';

meta = with lib; {