Skip to content

Commit 7845645

Browse files
postprocessd: init at 0.3.0 (#338795)
2 parents cac168d + 07c8520 commit 7845645

File tree

3 files changed

+86
-0
lines changed

3 files changed

+86
-0
lines changed

pkgs/by-name/me/megapixels/package.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ stdenv.mkDerivation (finalAttrs: {
5454
zbar
5555
];
5656

57+
patches = [
58+
# In the settings menu of Megapixels the user can select a different postprocessing script. The path to the script is then stored in a dconf setting. If the path changes, for example because it is in the Nix store and a dependency of the postprocessor changes, Megapixels will try to use this now non-existing old path. This will cause Megapixels to not save any images that were taken until the user opens the settings again and selects a postprocessor again. Using a global path allows the setting to keep working.
59+
# Note that this patch only fixes the issue for external postprocessors like postprocessd but the postprocessor script that comes with Megapixels is still refered to by the Nix store path.
60+
./search-for-postprocessors-in-NixOS-specific-global-location.patch
61+
];
62+
5763
postInstall = ''
5864
glib-compile-schemas $out/share/glib-2.0/schemas
5965
'';
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
--- a/src/process_pipeline.c
2+
+++ b/src/process_pipeline.c
3+
@@ -179,10 +179,10 @@ mp_process_find_all_processors(GtkListStore *store)
4+
store, &iter, 0, buffer, 1, "(built-in) postprocess.sh", -1);
5+
}
6+
7+
- // Find extra packaged postprocessor scripts
8+
- // These should be packaged in
9+
- // /usr/share/megapixels/postprocessor.d/executable
10+
- sprintf(buffer, "%s/megapixels/postprocessor.d", DATADIR);
11+
+ // Find extra system postprocessor scripts
12+
+ // These should be accessible in
13+
+ // /run/current-system/sw/share/megapixels/postprocessor.d/executable
14+
+ sprintf(buffer, "/run/current-system/sw/share/megapixels/postprocessor.d");
15+
DIR *d;
16+
struct dirent *dir;
17+
d = opendir(buffer);
18+
@@ -192,8 +192,7 @@ mp_process_find_all_processors(GtkListStore *store)
19+
continue;
20+
}
21+
sprintf(buffer,
22+
- "%s/megapixels/postprocessor.d/%s",
23+
- DATADIR,
24+
+ "/run/current-system/sw/share/megapixels/postprocessor.d/%s",
25+
dir->d_name);
26+
gtk_list_store_insert(store, &iter, -1);
27+
gtk_list_store_set(
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
lib,
3+
fetchFromSourcehut,
4+
libexif,
5+
libraw,
6+
meson,
7+
ninja,
8+
opencv4,
9+
pkg-config,
10+
scdoc,
11+
stdenv,
12+
}:
13+
14+
stdenv.mkDerivation (finalAttrs: {
15+
pname = "postprocessd";
16+
version = "0.3.0";
17+
18+
src = fetchFromSourcehut {
19+
owner = "~martijnbraam";
20+
repo = "postprocessd";
21+
rev = finalAttrs.version;
22+
hash = "sha256-xqEjjAv27TUrEU/5j8Um7fTFjmIYZovyJCccbtHPuGo=";
23+
};
24+
25+
nativeBuildInputs = [
26+
meson
27+
ninja
28+
pkg-config
29+
scdoc
30+
];
31+
32+
depsBuildBuild = [
33+
pkg-config
34+
];
35+
36+
buildInputs = [
37+
libexif
38+
libraw
39+
opencv4
40+
];
41+
42+
strictDeps = true;
43+
44+
meta = {
45+
description = "Queueing megapixels post-processor";
46+
homepage = "https://git.sr.ht/~martijnbraam/postprocessd";
47+
changelog = "https://git.sr.ht/~martijnbraam/postprocessd/refs/${finalAttrs.version}";
48+
license = lib.licenses.gpl3Only;
49+
maintainers = with lib.maintainers; [ Luflosi ];
50+
platforms = lib.platforms.linux;
51+
mainProgram = "postprocess-single";
52+
};
53+
})

0 commit comments

Comments
 (0)