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] ".
|
# - 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,
|
# 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.
|
# 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 = {
|
sane.programs.megapixels-next = {
|
||||||
packageUnwrapped = pkgs.megapixels-next.overrideAttrs (base: {
|
packageUnwrapped = pkgs.megapixels-next.overrideAttrs (base: {
|
||||||
@@ -53,11 +56,15 @@
|
|||||||
"/sys/class/leds" #< for flash, presumably
|
"/sys/class/leds" #< for flash, presumably
|
||||||
];
|
];
|
||||||
sandbox.whitelistAvDev = true;
|
sandbox.whitelistAvDev = true;
|
||||||
gsettingsPersist = [
|
gsettings."me/gapixels/megapixels" = {
|
||||||
# pretty sure one of these is the new directory, one the old, not sure which
|
# **required** for it to find its postprocess script
|
||||||
"me/gapixels/megapixels" #< needs to set `postprocessor` else it will segfault during post-process
|
postprocessor = "${cfg.package}/share/megapixels/postprocess.sh";
|
||||||
"org/postmarketos/megapixels"
|
save-raw = false;
|
||||||
];
|
};
|
||||||
|
gsettings."org/sigxcpu/feedbackd/application/me-gapixels-megapixels" = {
|
||||||
|
# optional, to disable shutter sound
|
||||||
|
profile = "silent";
|
||||||
|
};
|
||||||
|
|
||||||
env.CAMERA = "me.gapixels.Megapixels.desktop";
|
env.CAMERA = "me.gapixels.Megapixels.desktop";
|
||||||
};
|
};
|
||||||
|
@@ -42,14 +42,12 @@
|
|||||||
];
|
];
|
||||||
sandbox.whitelistAvDev = true;
|
sandbox.whitelistAvDev = true;
|
||||||
gsettingsPersist = [
|
gsettingsPersist = [
|
||||||
# pretty sure one of these is the new directory, one the old, not sure which
|
"org/postmarketos/megapixels" #< needs to set `postprocessor` else it will segfault during post-process
|
||||||
"me/gapixels/megapixels" #< needs to set `postprocessor` else it will segfault during post-process
|
|
||||||
"org/postmarketos/megapixels"
|
|
||||||
];
|
];
|
||||||
# source code references /proc/device-tree/compatible, but it seems to be alright either way
|
# source code references /proc/device-tree/compatible, but it seems to be alright either way
|
||||||
# sandbox.keepPidsAndProc = true;
|
# 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";
|
env.CAMERA = lib.mkDefault "org.postmarketos.Megapixels.desktop";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -15,7 +15,14 @@
|
|||||||
wrapGAppsHook4,
|
wrapGAppsHook4,
|
||||||
xorg,
|
xorg,
|
||||||
zbar,
|
zbar,
|
||||||
|
# optional runtime dependencies, used for post-processing .dng -> .jpg
|
||||||
|
exiftool,
|
||||||
|
graphicsmagick,
|
||||||
|
libraw,
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
runtimePath = lib.makeBinPath [ libraw graphicsmagick exiftool ];
|
||||||
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "megapixels-next";
|
pname = "megapixels-next";
|
||||||
version = "1.6.1-unstable-2024-11-04";
|
version = "1.6.1-unstable-2024-11-04";
|
||||||
@@ -49,6 +56,12 @@ stdenv.mkDerivation {
|
|||||||
glib-compile-schemas $out/share/glib-2.0/schemas
|
glib-compile-schemas $out/share/glib-2.0/schemas
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
preFixup = ''
|
||||||
|
gappsWrapperArgs+=(
|
||||||
|
--suffix PATH : ${lib.escapeShellArg runtimePath}
|
||||||
|
)
|
||||||
|
'';
|
||||||
|
|
||||||
strictDeps = true;
|
strictDeps = true;
|
||||||
|
|
||||||
passthru.updateScript = unstableGitUpdater { };
|
passthru.updateScript = unstableGitUpdater { };
|
||||||
|
Reference in New Issue
Block a user