about summary refs log tree commit diff
path: root/pkgs/by-name/bt
diff options
context:
space:
mode:
authorAustin Horstman <khaneliman12@gmail.com>2024-06-13 19:08:23 -0500
committerAustin Horstman <khaneliman12@gmail.com>2024-06-13 19:08:23 -0500
commit976a8edb68d1450a2b1503aa430454c8702384d5 (patch)
tree0241f6168f171fff3d7e94d47304d080b2a6854b /pkgs/by-name/bt
parentdc2ccabad299702aac8c9b53798669f5651f60f6 (diff)
btrfs-assistant: cleanup
Diffstat (limited to 'pkgs/by-name/bt')
-rw-r--r--pkgs/by-name/bt/btrfs-assistant/package.nix88
1 files changed, 39 insertions, 49 deletions
diff --git a/pkgs/by-name/bt/btrfs-assistant/package.nix b/pkgs/by-name/bt/btrfs-assistant/package.nix
index 3be7b54d5e8c1..fce0bd8fc6eb7 100644
--- a/pkgs/by-name/bt/btrfs-assistant/package.nix
+++ b/pkgs/by-name/bt/btrfs-assistant/package.nix
@@ -1,17 +1,18 @@
-{ lib
-, stdenv
-, fetchFromGitLab
-, bash
-, btrfs-progs
-, cmake
-, coreutils
-, git
-, pkg-config
-, qt6
-, snapper
-, util-linux
-, enableSnapper ? true
-, nix-update-script
+{
+  lib,
+  stdenv,
+  fetchFromGitLab,
+  bash,
+  btrfs-progs,
+  cmake,
+  coreutils,
+  git,
+  pkg-config,
+  qt6,
+  snapper,
+  util-linux,
+  enableSnapper ? true,
+  nix-update-script,
 }:
 
 stdenv.mkDerivation (finalAttrs: {
@@ -42,45 +43,34 @@ stdenv.mkDerivation (finalAttrs: {
     util-linux
   ] ++ lib.optionals enableSnapper [ snapper ];
 
+  prePatch =
+    ''
+      substituteInPlace src/util/System.cpp \
+        --replace-fail '/bin/bash' "${lib.getExe bash}"
 
-  prePatch = ''
-    substituteInPlace src/util/System.cpp \
-      --replace '/bin/bash' "${lib.getExe bash}"
+      substituteInPlace src/main.cpp \
+        --replace-fail 'if (!qEnvironmentVariableIsEmpty("DISPLAY"))' ' if(!qEnvironmentVariableIsEmpty("DISPLAY") || !qEnvironmentVariableIsEmpty("WAYLAND_DISPLAY"))'
+    ''
+    + lib.optionalString enableSnapper ''
+      substituteInPlace src/main.cpp \
+        --replace-fail '/usr/bin/snapper' "${lib.getExe snapper}"
+    '';
 
-    substituteInPlace src/main.cpp \
-      --replace-fail 'if (!qEnvironmentVariableIsEmpty("DISPLAY"))' ' if(!qEnvironmentVariableIsEmpty("DISPLAY") || !qEnvironmentVariableIsEmpty("WAYLAND_DISPLAY"))'
-  ''
-  + lib.optionalString enableSnapper ''
-    substituteInPlace src/main.cpp \
-      --replace '/usr/bin/snapper' "${lib.getExe snapper}"
-  '';
+  postPatch =
+    ''
+      substituteInPlace src/org.btrfs-assistant.pkexec.policy \
+        --replace-fail '/usr/bin' "$out/bin"
 
-  postPatch = ''
-    substituteInPlace src/org.btrfs-assistant.pkexec.policy \
-      --replace '/usr/bin' "$out/bin"
+      substituteInPlace src/btrfs-assistant \
+        --replace-fail 'btrfs-assistant-bin' "$out/bin/btrfs-assistant-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"
-  ''
-  + lib.optionalString enableSnapper ''
-    substituteInPlace src/btrfs-assistant.conf \
-      --replace '/usr/bin/snapper' "${lib.getExe snapper}"
-  '';
-
-  qtWrapperArgs =
-    let
-      runtimeDeps = lib.makeBinPath ([
-        coreutils
-        util-linux
-      ]
-      ++ lib.optionals enableSnapper [ snapper ]);
-    in
-    [
-      "--prefix PATH : ${runtimeDeps}"
-    ];
+      substituteInPlace src/btrfs-assistant-launcher \
+        --replace-fail 'btrfs-assistant' "$out/bin/btrfs-assistant"
+    ''
+    + lib.optionalString enableSnapper ''
+      substituteInPlace src/btrfs-assistant.conf \
+        --replace-fail '/usr/bin/snapper' "${lib.getExe snapper}"
+    '';
 
   passthru.updateScript = nix-update-script { };