zfs-replicate: patch path to lz4 binary (#370241)

authored by Gaétan Lepage and committed by GitHub 82314c39 4138c1b3

+60 -49
+60
pkgs/by-name/zf/zfs-replicate/package.nix
··· 1 + { 2 + lib, 3 + stdenv, 4 + python3Packages, 5 + fetchFromGitHub, 6 + lz4, 7 + }: 8 + 9 + python3Packages.buildPythonApplication rec { 10 + pname = "zfs_replicate"; 11 + version = "4.0.0"; 12 + pyproject = true; 13 + 14 + src = fetchFromGitHub { 15 + owner = "alunduil"; 16 + repo = "zfs-replicate"; 17 + tag = "v${version}"; 18 + hash = "sha256-VajMSoFZ4SQXpuF1Lo6S9IhxvspCfUwpNw5zg16uA3M="; 19 + }; 20 + 21 + # For compression to work, both local and remote systems must have lz4 installed. 22 + # This hard codes the path to the lz4 when running it on the local system. 23 + postPatch = '' 24 + substituteInPlace zfs/replicate/compress/command.py \ 25 + --replace-fail \ 26 + '("/usr/bin/env - lz4 | ", "/usr/bin/env - lz4 -d | ")' \ 27 + '("${lib.getExe lz4} | ", "/usr/bin/env - lz4 -d | ")' 28 + ''; 29 + 30 + build-system = with python3Packages; [ 31 + poetry-core 32 + ]; 33 + 34 + dependencies = with python3Packages; [ 35 + click 36 + stringcase 37 + ]; 38 + 39 + nativeCheckInputs = with python3Packages; [ 40 + pytestCheckHook 41 + hypothesis 42 + pytest-cov-stub 43 + ]; 44 + 45 + doCheck = true; 46 + 47 + disabledTestPaths = lib.optionals stdenv.isDarwin [ 48 + # AssertionError: Expected SystemExit or FileNotFoundError 49 + "zfs_test/replicate_test/cli_test/main_test.py" 50 + ]; 51 + 52 + meta = { 53 + description = "ZFS Snapshot Replication"; 54 + homepage = "https://github.com/alunduil/zfs-replicate"; 55 + changelog = "https://github.com/alunduil/zfs-replicate/blob/v${version}/CHANGELOG.md"; 56 + mainProgram = "zfs-replicate"; 57 + license = lib.licenses.bsd2; 58 + maintainers = with lib.maintainers; [ alunduil ]; 59 + }; 60 + }
-47
pkgs/tools/backup/zfs-replicate/default.nix
··· 1 - { 2 - buildPythonApplication, 3 - click, 4 - fetchPypi, 5 - hypothesis, 6 - lib, 7 - poetry-core, 8 - pytest-cov-stub, 9 - pytestCheckHook, 10 - stringcase, 11 - }: 12 - 13 - buildPythonApplication rec { 14 - pname = "zfs_replicate"; 15 - version = "4.0.0"; 16 - pyproject = true; 17 - 18 - src = fetchPypi { 19 - inherit pname version; 20 - hash = "sha256-9WD2IW7GRxMF7hOa8HTI/+cuOjVaYMT4OnrYU/xFgME="; 21 - }; 22 - 23 - nativeBuildInputs = [ 24 - poetry-core 25 - ]; 26 - 27 - nativeCheckInputs = [ 28 - pytestCheckHook 29 - hypothesis 30 - pytest-cov-stub 31 - ]; 32 - 33 - propagatedBuildInputs = [ 34 - click 35 - stringcase 36 - ]; 37 - 38 - doCheck = true; 39 - 40 - meta = with lib; { 41 - homepage = "https://github.com/alunduil/zfs-replicate"; 42 - description = "ZFS Snapshot Replication"; 43 - mainProgram = "zfs-replicate"; 44 - license = licenses.bsd2; 45 - maintainers = with maintainers; [ alunduil ]; 46 - }; 47 - }
-2
pkgs/top-level/all-packages.nix
··· 18564 18564 18565 18565 wfuzz = with python3Packages; toPythonApplication wfuzz; 18566 18566 18567 - zfs-replicate = python3Packages.callPackage ../tools/backup/zfs-replicate { }; 18568 - 18569 18567 kodelife = callPackage ../applications/graphics/kodelife { 18570 18568 inherit (gst_all_1) gstreamer gst-plugins-base; 18571 18569 };