From 0e431818caf169d1eb24cd8772e814786a915747 Mon Sep 17 00:00:00 2001 From: Evils Date: Sat, 17 Apr 2021 23:09:59 +0200 Subject: [PATCH 1/2] python.pkgs.btrfs: 11 -> 12 and switch to fetchFromGithub as it's not published on pypi --- .../development/python-modules/btrfs/default.nix | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/btrfs/default.nix b/pkgs/development/python-modules/btrfs/default.nix index adaf1f610e3..ff21d5670d7 100644 --- a/pkgs/development/python-modules/btrfs/default.nix +++ b/pkgs/development/python-modules/btrfs/default.nix @@ -1,17 +1,23 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub }: buildPythonPackage rec { pname = "btrfs"; - version = "11"; + version = "12"; - src = fetchPypi { - inherit pname version; - sha256 = "1w92sj47wy53ygz725xr613k32pk5khi0g9lrpp6img871241hrx"; + src = fetchFromGitHub { + owner = "knorrie"; + repo = "python-btrfs"; + rev = "v${version}"; + sha256 = "sha256-ZQSp+pbHABgBTrCwC2YsUUXAf/StP4ny7MEhBgCRqgE="; }; + # no tests (in v12) + doCheck = false; + pythonImportsCheck = [ "btrfs" ]; + meta = with lib; { description = "Inspect btrfs filesystems"; homepage = "https://github.com/knorrie/python-btrfs"; From e49b28b77c79e000510c4ef90b86bd078616642c Mon Sep 17 00:00:00 2001 From: Evils Date: Sat, 17 Apr 2021 22:50:04 +0200 Subject: [PATCH 2/2] btrfs-heatmap: 8 -> 9 --- .../filesystems/btrfs-heatmap/default.nix | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/pkgs/tools/filesystems/btrfs-heatmap/default.nix b/pkgs/tools/filesystems/btrfs-heatmap/default.nix index 04d74d78cfd..9de91738e74 100644 --- a/pkgs/tools/filesystems/btrfs-heatmap/default.nix +++ b/pkgs/tools/filesystems/btrfs-heatmap/default.nix @@ -2,25 +2,17 @@ , fetchFromGitHub , python3 , installShellFiles -, fetchurl }: stdenv.mkDerivation rec { pname = "btrfs-heatmap"; - version = "8"; + version = "9"; src = fetchFromGitHub { owner = "knorrie"; repo = "btrfs-heatmap"; rev = "v${version}"; - sha256 = "035frvk3s7g18y81srssvm550nfq7jylr7w60nvixidxvrc0yrnh"; - }; - - # man page is currently only in the debian branch - # https://github.com/knorrie/btrfs-heatmap/issues/11 - msrc = fetchurl { - url = "https://raw.githubusercontent.com/knorrie/btrfs-heatmap/45d844e12d7f5842ebb99e65d7b968a5e1a89066/debian/man/btrfs-heatmap.8"; - sha256 = "1md7xc426sc8lq4w29gjd6gv7vjqhcwrqqcr6z39kihvi04d5f6q"; + sha256 = "sha256-yCkuZqWwxrs2eS7EXY6pAOVVVSq7dAMxJtf581gX8vg="; }; buildInputs = [ python3 ]; @@ -29,11 +21,15 @@ stdenv.mkDerivation rec { outputs = [ "out" "man" ]; installPhase = '' - install -Dm 0755 heatmap.py $out/sbin/btrfs-heatmap - installManPage ${msrc} + runHook preInstall + + install -Dm 0755 btrfs-heatmap $out/sbin/btrfs-heatmap + installManPage man/btrfs-heatmap.1 buildPythonPath ${python3.pkgs.btrfs} patchPythonScript $out/sbin/btrfs-heatmap + + runHook postInstall ''; meta = with lib; {