megapixels-next: fix so it can save images as .jpg instead of just .dnf
This commit is contained in:
@@ -9,7 +9,10 @@
|
||||
# - when run against linux mainline: launch hangs at "[libmegapixels] ".
|
||||
# i seem to recall this from 2024-05-11: the patch i disabled during the megapixels-next update to 2024-09-03 was a memory safety issue,
|
||||
# which was causing a crash during the error message printing. so rebasing that would get me an error message, but still no fix.
|
||||
{ pkgs, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
cfg = config.sane.programs.megapixels-next;
|
||||
in
|
||||
{
|
||||
sane.programs.megapixels-next = {
|
||||
packageUnwrapped = pkgs.megapixels-next.overrideAttrs (base: {
|
||||
@@ -53,11 +56,15 @@
|
||||
"/sys/class/leds" #< for flash, presumably
|
||||
];
|
||||
sandbox.whitelistAvDev = true;
|
||||
gsettingsPersist = [
|
||||
# pretty sure one of these is the new directory, one the old, not sure which
|
||||
"me/gapixels/megapixels" #< needs to set `postprocessor` else it will segfault during post-process
|
||||
"org/postmarketos/megapixels"
|
||||
];
|
||||
gsettings."me/gapixels/megapixels" = {
|
||||
# **required** for it to find its postprocess script
|
||||
postprocessor = "${cfg.package}/share/megapixels/postprocess.sh";
|
||||
save-raw = false;
|
||||
};
|
||||
gsettings."org/sigxcpu/feedbackd/application/me-gapixels-megapixels" = {
|
||||
# optional, to disable shutter sound
|
||||
profile = "silent";
|
||||
};
|
||||
|
||||
env.CAMERA = "me.gapixels.Megapixels.desktop";
|
||||
};
|
||||
|
@@ -42,14 +42,12 @@
|
||||
];
|
||||
sandbox.whitelistAvDev = true;
|
||||
gsettingsPersist = [
|
||||
# pretty sure one of these is the new directory, one the old, not sure which
|
||||
"me/gapixels/megapixels" #< needs to set `postprocessor` else it will segfault during post-process
|
||||
"org/postmarketos/megapixels"
|
||||
"org/postmarketos/megapixels" #< needs to set `postprocessor` else it will segfault during post-process
|
||||
];
|
||||
# source code references /proc/device-tree/compatible, but it seems to be alright either way
|
||||
# sandbox.keepPidsAndProc = true;
|
||||
|
||||
mime.priority = 200; #< fallback
|
||||
mime.priority = 200; #< fallback; prefer `megapixels-next` if it's installed
|
||||
env.CAMERA = lib.mkDefault "org.postmarketos.Megapixels.desktop";
|
||||
};
|
||||
}
|
||||
|
@@ -15,7 +15,14 @@
|
||||
wrapGAppsHook4,
|
||||
xorg,
|
||||
zbar,
|
||||
# optional runtime dependencies, used for post-processing .dng -> .jpg
|
||||
exiftool,
|
||||
graphicsmagick,
|
||||
libraw,
|
||||
}:
|
||||
let
|
||||
runtimePath = lib.makeBinPath [ libraw graphicsmagick exiftool ];
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "megapixels-next";
|
||||
version = "1.6.1-unstable-2024-11-04";
|
||||
@@ -49,6 +56,12 @@ stdenv.mkDerivation {
|
||||
glib-compile-schemas $out/share/glib-2.0/schemas
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(
|
||||
--suffix PATH : ${lib.escapeShellArg runtimePath}
|
||||
)
|
||||
'';
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
passthru.updateScript = unstableGitUpdater { };
|
||||
|
Reference in New Issue
Block a user