From edd8b0812f01987ae5df1417c906775b7725ff1a Mon Sep 17 00:00:00 2001 From: Mathieu Fenniak Date: Wed, 12 Apr 2023 11:57:56 -0600 Subject: [PATCH] plasma-vault: add gocryptfs support (#205519) --- .../plasma-5/plasma-vault/0004-gocryptfs-path.patch | 13 +++++++++++++ pkgs/desktops/plasma-5/plasma-vault/default.nix | 5 +++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 pkgs/desktops/plasma-5/plasma-vault/0004-gocryptfs-path.patch diff --git a/pkgs/desktops/plasma-5/plasma-vault/0004-gocryptfs-path.patch b/pkgs/desktops/plasma-5/plasma-vault/0004-gocryptfs-path.patch new file mode 100644 index 000000000000..8790f877ff07 --- /dev/null +++ b/pkgs/desktops/plasma-5/plasma-vault/0004-gocryptfs-path.patch @@ -0,0 +1,13 @@ +diff --git a/kded/engine/backends/gocryptfs/gocryptfsbackend.cpp b/kded/engine/backends/gocryptfs/gocryptfsbackend.cpp +index 2d6df94..3e8ec9a 100644 +--- a/kded/engine/backends/gocryptfs/gocryptfsbackend.cpp ++++ b/kded/engine/backends/gocryptfs/gocryptfsbackend.cpp +@@ -202,7 +202,7 @@ QProcess *GocryptfsBackend::gocryptfs(const QStringList &arguments) const + auto config = KSharedConfig::openConfig(PLASMAVAULT_CONFIG_FILE); + KConfigGroup backendConfig(config, "GocryptfsBackend"); + +- return process("gocryptfs", arguments + backendConfig.readEntry("extraMountOptions", QStringList{}), {}); ++ return process(NIXPKGS_GOCRYPTFS, arguments + backendConfig.readEntry("extraMountOptions", QStringList{}), {}); + } + + QString GocryptfsBackend::getConfigFilePath(const Device &device) const diff --git a/pkgs/desktops/plasma-5/plasma-vault/default.nix b/pkgs/desktops/plasma-5/plasma-vault/default.nix index ba1def530476..3bc432b0d509 100644 --- a/pkgs/desktops/plasma-5/plasma-vault/default.nix +++ b/pkgs/desktops/plasma-5/plasma-vault/default.nix @@ -9,6 +9,7 @@ , encfs , cryfs , fuse +, gocryptfs }: mkDerivation { @@ -19,6 +20,7 @@ mkDerivation { ./0001-encfs-path.patch ./0002-cryfs-path.patch ./0003-fusermount-path.patch + ./0004-gocryptfs-path.patch ]; buildInputs = [ @@ -32,10 +34,9 @@ mkDerivation { CXXFLAGS = [ ''-DNIXPKGS_ENCFS=\"${lib.getBin encfs}/bin/encfs\"'' ''-DNIXPKGS_ENCFSCTL=\"${lib.getBin encfs}/bin/encfsctl\"'' - ''-DNIXPKGS_CRYFS=\"${lib.getBin cryfs}/bin/cryfs\"'' - ''-DNIXPKGS_FUSERMOUNT=\"${lib.getBin fuse}/bin/fusermount\"'' + ''-DNIXPKGS_GOCRYPTFS=\"${lib.getBin gocryptfs}/bin/gocryptfs\"'' ]; }