From d70411a127cfd95aeb64f595de690384b229d05e Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 2 Jan 2025 14:37:16 +0100 Subject: [PATCH] zfs-replicate: clean derivation --- pkgs/by-name/zf/zfs-replicate/package.nix | 33 ++++++++++++----------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/pkgs/by-name/zf/zfs-replicate/package.nix b/pkgs/by-name/zf/zfs-replicate/package.nix index 9accd9234462..b787a02aaf65 100644 --- a/pkgs/by-name/zf/zfs-replicate/package.nix +++ b/pkgs/by-name/zf/zfs-replicate/package.nix @@ -1,7 +1,7 @@ { - python3Packages, - fetchPypi, lib, + python3Packages, + fetchFromGitHub, }: python3Packages.buildPythonApplication rec { @@ -9,33 +9,36 @@ python3Packages.buildPythonApplication rec { version = "4.0.0"; pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-9WD2IW7GRxMF7hOa8HTI/+cuOjVaYMT4OnrYU/xFgME="; + src = fetchFromGitHub { + owner = "alunduil"; + repo = "zfs-replicate"; + tag = "v${version}"; + hash = "sha256-VajMSoFZ4SQXpuF1Lo6S9IhxvspCfUwpNw5zg16uA3M="; }; - nativeBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ poetry-core ]; + dependencies = with python3Packages; [ + click + stringcase + ]; + nativeCheckInputs = with python3Packages; [ pytestCheckHook hypothesis pytest-cov-stub ]; - propagatedBuildInputs = with python3Packages; [ - click - stringcase - ]; - doCheck = true; - meta = with lib; { - homepage = "https://github.com/alunduil/zfs-replicate"; + meta = { description = "ZFS Snapshot Replication"; + homepage = "https://github.com/alunduil/zfs-replicate"; + changelog = "https://github.com/alunduil/zfs-replicate/blob/v${version}/CHANGELOG.md"; mainProgram = "zfs-replicate"; - license = licenses.bsd2; - maintainers = with maintainers; [ alunduil ]; + license = lib.licenses.bsd2; + maintainers = with lib.maintainers; [ alunduil ]; }; }