From 72a89d124337d0567d68074dce860824fb41f31c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Fri, 29 Mar 2024 17:56:35 -0700 Subject: [PATCH 1/2] borgbackup: 1.2.7 -> 1.2.8 Changelog: https://github.com/borgbackup/borg/blob/1.2.8/docs/changes.rst --- pkgs/tools/backup/borgbackup/default.nix | 32 ++++++++---------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/pkgs/tools/backup/borgbackup/default.nix b/pkgs/tools/backup/borgbackup/default.nix index d7853d0506f6..de4b83b2fb11 100644 --- a/pkgs/tools/backup/borgbackup/default.nix +++ b/pkgs/tools/backup/borgbackup/default.nix @@ -2,41 +2,31 @@ , stdenv , acl , e2fsprogs +, fetchFromGitHub , libb2 , lz4 , openssh , openssl -, python3Packages +, python3 , xxHash , zstd , installShellFiles , nixosTests -, fetchPypi }: let - python = python3Packages.python.override { - packageOverrides = self: super: { - msgpack = super.msgpack.overrideAttrs (oldAttrs: rec { - version ="1.0.4"; - - src = fetchPypi { - pname = "msgpack"; - inherit version; - hash = "sha256-9dhpwY8DAgLrQS8Iso0q/upVPWYTruieIA16yn7wH18="; - }; - }); - }; - }; + python = python3; in python.pkgs.buildPythonApplication rec { pname = "borgbackup"; - version = "1.2.7"; - format = "pyproject"; + version = "1.2.8"; + pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-9j8oozg8BBlxzsh7BhyjmoFbX9RF2ySqgXLKxBfZQRo="; + src = fetchFromGitHub { + owner = "borgbackup"; + repo = "borg"; + rev = "refs/tags/${version}"; + hash = "sha256-+FHqOVuHlY9QUjCrYVnrMBZPMFH9Z2U7eZ6eUSINSrw="; }; postPatch = '' @@ -130,7 +120,7 @@ python.pkgs.buildPythonApplication rec { outputs = [ "out" "doc" "man" ]; meta = with lib; { - changelog = "https://github.com/borgbackup/borg/blob/${version}/docs/changes.rst"; + changelog = "https://github.com/borgbackup/borg/blob/${src.rev}/docs/changes.rst"; description = "Deduplicating archiver with compression and encryption"; homepage = "https://www.borgbackup.org"; license = licenses.bsd3; From cc2adde5315640763dd3507f08672d8a8f462c88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 30 Mar 2024 11:49:14 -0700 Subject: [PATCH 2/2] borgbackup: modernize --- pkgs/tools/backup/borgbackup/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/backup/borgbackup/default.nix b/pkgs/tools/backup/borgbackup/default.nix index de4b83b2fb11..778f5a5aad9f 100644 --- a/pkgs/tools/backup/borgbackup/default.nix +++ b/pkgs/tools/backup/borgbackup/default.nix @@ -32,14 +32,16 @@ python.pkgs.buildPythonApplication rec { postPatch = '' # sandbox does not support setuid/setgid/sticky bits substituteInPlace src/borg/testsuite/archiver.py \ - --replace "0o4755" "0o0755" + --replace-fail "0o4755" "0o0755" ''; - nativeBuildInputs = with python.pkgs; [ + build-system = with python.pkgs; [ cython setuptools-scm pkgconfig + ]; + nativeBuildInputs = with python.pkgs; [ # docs sphinxHook guzzle-sphinx-theme @@ -60,7 +62,7 @@ python.pkgs.buildPythonApplication rec { acl ]; - propagatedBuildInputs = with python.pkgs; [ + dependencies = with python.pkgs; [ msgpack packaging (if stdenv.isLinux then pyfuse3 else llfuse)