Skip to content

Commit e64e3d5

Browse files
committed
dovecot_pigeonhole: patch regarding permission error
This patch fixes a permission issue that occurs when saving compiled sieve scripts sourced from the nix store. Instead of reusing the read-only permission bits from the nix store, it explicitly uses `0700` for the directory in which compiled sieve scripts should be saved. Additional context: - NixOS#388463 (comment) - dovecot/pigeonhole#15
1 parent b325875 commit e64e3d5

File tree

9 files changed

+72
-39
lines changed

9 files changed

+72
-39
lines changed

pkgs/by-name/do/dovecot/2_3.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
callPackage,
33
fetchpatch,
44
dovecot_pigeonhole_2_3,
5+
dovecot_exporter_2_3,
56
}:
67
callPackage ./generic.nix { } {
78
version = "2.3.21.1";
@@ -22,4 +23,5 @@ callPackage ./generic.nix { } {
2223
];
2324

2425
dovecot_pigeonhole = dovecot_pigeonhole_2_3;
26+
dovecot_exporter = dovecot_exporter_2_3;
2527
}

pkgs/by-name/do/dovecot/generic.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
patches ? [ ],
4949
# Re-exported plugins for this version
5050
dovecot_pigeonhole,
51+
dovecot_exporter,
5152
}:
5253
stdenv.mkDerivation {
5354
pname = "dovecot";
@@ -217,5 +218,6 @@ stdenv.mkDerivation {
217218
};
218219

219220
pigeonhole = dovecot_pigeonhole;
221+
exporter = dovecot_exporter;
220222
};
221223
}

pkgs/by-name/do/dovecot/package.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
callPackage,
33
dovecot_pigeonhole,
4+
dovecot_exporter,
45
}:
56
callPackage ./generic.nix { } {
67
version = "2.4.2";
@@ -10,5 +11,5 @@ callPackage ./generic.nix { } {
1011
./load-extended-modules.patch
1112
];
1213

13-
inherit dovecot_pigeonhole;
14+
inherit dovecot_pigeonhole dovecot_exporter;
1415
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
callPackage,
3+
dovecot_2_3,
4+
}:
5+
callPackage ./generic.nix { } {
6+
dovecot = dovecot_2_3;
7+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
lib,
3+
buildGoModule,
4+
fetchFromGitHub,
5+
fetchpatch,
6+
nixosTests,
7+
}:
8+
{
9+
dovecot,
10+
}:
11+
buildGoModule {
12+
pname = "dovecot_exporter";
13+
version = "0.1.3-unstable-2019-07-19";
14+
15+
src = fetchFromGitHub {
16+
owner = "kumina";
17+
repo = "dovecot_exporter";
18+
rev = "7ef79118ba619ff078594837377189477a4d059f";
19+
hash = "sha256-qJbIBSfHYgFztuivuNjleDa+Bx0KC4OklCh3IvK2XFI=";
20+
};
21+
22+
vendorHash = "sha256-+B8sROL1h6ElBfAUBT286yJF9m9zoRvMOrf0z2SVCj0=";
23+
24+
patches = [
25+
# Migrate the project to Go modules
26+
# https://github.com/kumina/dovecot_exporter/pull/23
27+
(fetchpatch {
28+
url = "https://github.com/kumina/dovecot_exporter/commit/b5184dd99cf8c79facf20cea281828d302327665.patch";
29+
hash = "sha256-OcdI1fJ/wumDI/wk5PQVot9+Gw/PnsiwgJY7dcRyEsc=";
30+
})
31+
];
32+
33+
passthru.tests = { inherit (nixosTests.prometheus-exporters) dovecot; };
34+
35+
meta = {
36+
description = "Prometheus metrics exporter for Dovecot";
37+
homepage = "https://github.com/kumina/dovecot_exporter";
38+
mainProgram = "dovecot_exporter";
39+
license = lib.licenses.asl20;
40+
maintainers = with lib.maintainers; [
41+
globin
42+
];
43+
};
44+
}
Lines changed: 4 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,7 @@
11
{
2-
lib,
3-
buildGoModule,
4-
fetchFromGitHub,
5-
fetchpatch,
6-
nixosTests,
2+
callPackage,
3+
dovecot,
74
}:
8-
buildGoModule rec {
9-
pname = "dovecot_exporter";
10-
version = "0.1.3-unstable-2019-07-19";
11-
12-
src = fetchFromGitHub {
13-
owner = "kumina";
14-
repo = "dovecot_exporter";
15-
rev = "7ef79118ba619ff078594837377189477a4d059f";
16-
hash = "sha256-qJbIBSfHYgFztuivuNjleDa+Bx0KC4OklCh3IvK2XFI=";
17-
};
18-
19-
vendorHash = "sha256-+B8sROL1h6ElBfAUBT286yJF9m9zoRvMOrf0z2SVCj0=";
20-
21-
patches = [
22-
# Migrate the project to Go modules
23-
# https://github.com/kumina/dovecot_exporter/pull/23
24-
(fetchpatch {
25-
url = "https://github.com/kumina/dovecot_exporter/commit/b5184dd99cf8c79facf20cea281828d302327665.patch";
26-
hash = "sha256-OcdI1fJ/wumDI/wk5PQVot9+Gw/PnsiwgJY7dcRyEsc=";
27-
})
28-
];
29-
30-
passthru.tests = { inherit (nixosTests.prometheus-exporters) dovecot; };
31-
32-
meta = {
33-
inherit (src.meta) homepage;
34-
description = "Prometheus metrics exporter for Dovecot";
35-
mainProgram = "dovecot_exporter";
36-
license = lib.licenses.asl20;
37-
maintainers = with lib.maintainers; [
38-
globin
39-
];
40-
};
5+
callPackage ./generic.nix { } {
6+
inherit dovecot;
417
}

pkgs/by-name/do/dovecot_pigeonhole/generic.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
url,
1010
version,
1111
hash,
12+
patches ? [ ],
1213
dovecot,
1314
}:
1415
stdenv.mkDerivation rec {
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
{
22
lib,
33
callPackage,
4+
fetchpatch,
45
dovecot,
56
}:
67
callPackage ./generic.nix { } rec {
78
url = "https://pigeonhole.dovecot.org/releases/${lib.versions.majorMinor dovecot.version}/dovecot-pigeonhole-${version}.tar.gz";
89
version = "2.4.0";
910
hash = "sha256-DtCK4WOsOalEcgD7tC17OwXTXpHZmBjdD0r9etHbx1M=";
11+
patches = [
12+
(fetchpatch {
13+
url = "https://patch-diff.githubusercontent.com/raw/dovecot/pigeonhole/pull/15.patch";
14+
sha256 = "sha256-BLBz9ZhOGEIIitnXG0uM6bZBRNnQBy4K2IJlh1+Un50=";
15+
})
16+
];
1017

1118
inherit dovecot;
1219
}

pkgs/top-level/all-packages.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9144,6 +9144,9 @@ with pkgs;
91449144
dovecot_pigeonhole_2_3 = callPackage ../by-name/do/dovecot_pigeonhole/2_3.nix { };
91459145
dovecot_pigeonhole_2_4 = callPackage ../by-name/do/dovecot_pigeonhole/package.nix { };
91469146

9147+
dovecot_exporter_2_3 = callPackage ../by-name/do/dovecot_exporter/2_3.nix { };
9148+
dovecot_exporter_2_4 = callPackage ../by-name/do/dovecot_exporter/package.nix { };
9149+
91479150
prosody = callPackage ../servers/xmpp/prosody {
91489151
withExtraLibs = [ ];
91499152
withExtraLuaPackages = _: [ ];

0 commit comments

Comments
 (0)