gpodder: fix to preserve GPODDER_HOME environment variables
This commit is contained in:
@@ -17,7 +17,7 @@ in {
|
||||
# - GPODDER_WRITE_LOGS ("yes" or "no")
|
||||
# - GPODDER_EXTENSIONS
|
||||
# - GPODDER_DISABLE_EXTENSIONS ("yes" or "no")
|
||||
extraMakeWrapperArgs = (base.extraMakeWrapperArgs or []) ++ [
|
||||
makeWrapperArgs = (base.makeWrapperArgs or []) ++ [
|
||||
"--set" "GPODDER_HOME" "~/.local/share/gPodder"
|
||||
# place downloads in a shared media directory to ensure sandboxed apps can read them
|
||||
"--set" "GPODDER_DOWNLOAD_DIR" "~/Videos/gPodder"
|
||||
|
@@ -6,9 +6,10 @@
|
||||
|
||||
{
|
||||
gpodder,
|
||||
lib,
|
||||
listparser,
|
||||
makeShellWrapper,
|
||||
static-nix-shell,
|
||||
symlinkJoin,
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -21,12 +22,22 @@ let
|
||||
};
|
||||
};
|
||||
in
|
||||
# we use a symlinkJoin so that we can inherit the .desktop and icon files from the original gPodder
|
||||
(symlinkJoin {
|
||||
name = "${gpodder.pname}-configured";
|
||||
paths = [ gpodder remove-extra ];
|
||||
gpodder.overrideAttrs (upstream: {
|
||||
# use `makeShellWrapper` here so that we can get expansion of env vars like `$HOME`, at runtime
|
||||
nativeBuildInputs = (upstream.nativeBuildInputs or []) ++ [
|
||||
makeShellWrapper
|
||||
];
|
||||
|
||||
passthru = {
|
||||
inherit gpodder remove-extra;
|
||||
};
|
||||
})
|
||||
dontWrapGApps = true;
|
||||
postFixup = (upstream.postFixup or "") + ''
|
||||
# XXX(2025-03-21): splat the makeWrapperArgs here because upstream gpodder specifies
|
||||
# `--suffix PATH ...` all as _one_ argument, but makeShellWrapper requires it to be multiple :(
|
||||
makeWrapperArgs=(''${makeWrapperArgs[*]} "''${gappsWrapperArgs[@]}")
|
||||
# makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
|
||||
|
||||
for f in $out/bin/*; do
|
||||
wrapProgramShell "$f" "''${makeWrapperArgs[@]}"
|
||||
done
|
||||
makeShellWrapper ${lib.getExe remove-extra} "$out/bin/${remove-extra.meta.mainProgram}" "''${makeWrapperArgs[@]}"
|
||||
'';
|
||||
})
|
||||
|
Reference in New Issue
Block a user