Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

34 changes: 14 additions & 20 deletions pkgs/by-name/re/restic/package.nix
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
{
stdenv,
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
makeWrapper,
nixosTests,
rclone,
nixosTests,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why unnecessarily move this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to adhere to chronological usage ( bundle input for tests at the bottom ) . I can revert this change.

python3,
}:

buildGoModule rec {
buildGoModule (finalAttrs: {
pname = "restic";
version = "0.18.1";

src = fetchFromGitHub {
owner = "restic";
repo = "restic";
rev = "v${version}";
rev = "v${finalAttrs.version}";
hash = "sha256-lLinqZUOsZCPPybvVDB1f8o9Hl5qKYi0eHwJAaydsD8=";
};

patches = [
# The TestRestoreWithPermissionFailure test fails in Nix’s build sandbox
./0001-Skip-testing-restore-with-permission-failure.patch
];

vendorHash = "sha256-4GVhG1sjFiuKyDUAgmSmFww5bDKIoCjejkkoSqkvU4E=";

subPackages = [ "cmd/restic" ];
Expand All @@ -41,14 +36,10 @@ buildGoModule rec {
restic = nixosTests.restic;
};

postPatch = ''
rm cmd/restic/cmd_mount_integration_test.go
'';

postInstall = ''
wrapProgram $out/bin/restic --prefix PATH : '${rclone}/bin'
''
+ lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
$out/bin/restic generate \
--bash-completion restic.bash \
--fish-completion restic.fish \
Expand All @@ -58,17 +49,20 @@ buildGoModule rec {
installManPage *.1
'';

meta = with lib; {
# The TestRestoreWithPermissionFailure test fails in Nix’s build sandbox
checkFlags = [ "-skip=^TestRestoreWithPermissionFailure$|^TestMount$|^TestMountSameTimestamps$" ];

meta = {
homepage = "https://restic.net";
changelog = "https://github.com/restic/restic/blob/${src.rev}/CHANGELOG.md";
changelog = "https://github.com/restic/restic/blob/v${finalAttrs.version}/CHANGELOG.md";
description = "Backup program that is fast, efficient and secure";
platforms = platforms.linux ++ platforms.darwin;
license = licenses.bsd2;
maintainers = with maintainers; [
platforms = lib.platforms.linux ++ lib.platforms.darwin;
license = lib.licenses.bsd2;
maintainers = with lib.maintainers; [
mbrgm
dotlambda
ryan4yin
];
mainProgram = "restic";
};
}
})
Loading