18 stdenv.mkDerivation (finalAttrs: {
19 pname = "btrfs-assistant";
22 src = fetchFromGitLab {
23 owner = "btrfs-assistant";
24 repo = "btrfs-assistant";
25 rev = finalAttrs.version;
26 hash = "sha256-I4nbQmHwk84qN1SngKzKnPtQN5Dz1QSSEpHJxV8wkJw=";
44 ] ++ lib.optionals enableSnapper [ snapper ];
48 substituteInPlace src/util/System.cpp \
49 --replace-fail '/bin/bash' "${lib.getExe bash}"
51 substituteInPlace src/main.cpp \
52 --replace-fail 'if (!qEnvironmentVariableIsEmpty("DISPLAY"))' ' if(!qEnvironmentVariableIsEmpty("DISPLAY") || !qEnvironmentVariableIsEmpty("WAYLAND_DISPLAY"))'
54 + lib.optionalString enableSnapper ''
55 substituteInPlace src/main.cpp \
56 --replace-fail '/usr/bin/snapper' "${lib.getExe snapper}"
61 substituteInPlace src/org.btrfs-assistant.pkexec.policy \
62 --replace-fail '/usr/bin' "$out/bin"
64 substituteInPlace src/btrfs-assistant \
65 --replace-fail 'btrfs-assistant-bin' "$out/bin/btrfs-assistant-bin"
67 substituteInPlace src/btrfs-assistant-launcher \
68 --replace-fail 'btrfs-assistant' "$out/bin/btrfs-assistant"
70 + lib.optionalString enableSnapper ''
71 substituteInPlace src/btrfs-assistant.conf \
72 --replace-fail '/usr/bin/snapper' "${lib.getExe snapper}"
75 passthru.updateScript = nix-update-script { };
78 description = "GUI management tool to make managing a Btrfs filesystem easier";
79 homepage = "https://gitlab.com/btrfs-assistant/btrfs-assistant";
80 license = lib.licenses.gpl3Only;
81 mainProgram = "btrfs-assistant-bin";
82 maintainers = with lib.maintainers; [ khaneliman ];
83 platforms = lib.platforms.linux;