btrfs-assistant: init at 1.8

This commit is contained in:
Austin Horstman 2023-07-28 14:10:31 -05:00
parent 7afbcd9bcc
commit 865b87200e
No known key found for this signature in database
2 changed files with 88 additions and 0 deletions

View file

@ -0,0 +1,86 @@
{ lib
, stdenv
, fetchFromGitLab
, bash
, btrfs-progs
, cmake
, coreutils
, git
, pkg-config
, qtbase
, qtsvg
, qttools
, snapper
, util-linux
, wrapQtAppsHook
}:
let
runtimeDeps = lib.makeBinPath [
coreutils
snapper
util-linux
];
in
stdenv.mkDerivation (finalAttrs: {
pname = "btrfs-assistant";
version = "1.8";
src = fetchFromGitLab {
owner = "btrfs-assistant";
repo = "btrfs-assistant";
rev = finalAttrs.version;
hash = "sha256-Ay2wxDVue+tG09RgAo4Zg2ktlq6dk7GdIwAlbuVULB4=";
};
nativeBuildInputs = [
cmake
git
pkg-config
];
buildInputs = [
btrfs-progs
qtbase
qtsvg
qttools
];
propagatedBuildInputs = [ wrapQtAppsHook ];
prePatch = ''
substituteInPlace src/util/System.cpp \
--replace '/bin/bash' "${bash}/bin/bash"
substituteInPlace src/main.cpp \
--replace '/usr/bin/snapper' "${snapper}/bin/snapper"
'';
postPatch = ''
substituteInPlace src/org.btrfs-assistant.pkexec.policy \
--replace '/usr/bin' "$out/bin"
substituteInPlace src/btrfs-assistant \
--replace 'btrfs-assistant-bin' "$out/bin/btrfs-assistant-bin"
substituteInPlace src/btrfs-assistant-launcher \
--replace 'btrfs-assistant' "$out/bin/btrfs-assistant"
substituteInPlace src/btrfs-assistant.conf \
--replace '/usr/bin/snapper' "${snapper}/bin/snapper"
'';
qtWrapperArgs = [
"--prefix PATH : ${runtimeDeps}"
];
meta = {
description = "A GUI management tool to make managing a Btrfs filesystem easier";
homepage = "https://gitlab.com/btrfs-assistant/btrfs-assistant";
license = lib.licenses.gpl3Only;
mainProgram = "btrfs-assistant-bin";
maintainers = with lib.maintainers; [ khaneliman ];
platforms = lib.platforms.linux;
};
})

View file

@ -3460,6 +3460,8 @@ with pkgs;
boulder = callPackage ../tools/admin/boulder { };
btrfs-assistant = libsForQt5.callPackage ../tools/misc/btrfs-assistant { };
btrfs-heatmap = callPackage ../tools/filesystems/btrfs-heatmap { };
bucklespring = bucklespring-x11;