tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
ferretdb: use `versionCheckHook`, modernise, cleanup
Pol Dellaiera
8 months ago
1cb9626f
e547f4f2
+11
-11
1 changed file
expand all
collapse all
unified
split
pkgs
by-name
fe
ferretdb
package.nix
+11
-11
pkgs/by-name/fe/ferretdb/package.nix
···
3
3
buildGoModule,
4
4
fetchFromGitHub,
5
5
nixosTests,
6
6
+
versionCheckHook,
6
7
}:
7
8
8
8
-
buildGoModule rec {
9
9
+
buildGoModule (finalAttrs: {
9
10
pname = "ferretdb";
10
11
version = "1.24.0";
11
12
12
13
src = fetchFromGitHub {
13
14
owner = "FerretDB";
14
15
repo = "FerretDB";
15
15
-
rev = "v${version}";
16
16
+
tag = "v${finalAttrs.version}";
16
17
hash = "sha256-WMejspnk2PvJhvNGi4h+DF+fzipuOMcS1QWim5DnAhQ=";
17
18
};
18
19
19
20
postPatch = ''
20
20
-
echo v${version} > build/version/version.txt
21
21
+
echo v${finalAttrs.version} > build/version/version.txt
21
22
echo nixpkgs > build/version/package.txt
22
23
'';
23
24
···
32
33
33
34
# the binary panics if something required wasn't set during compilation
34
35
doInstallCheck = true;
35
35
-
installCheckPhase = ''
36
36
-
$out/bin/ferretdb --version | grep ${version}
37
37
-
'';
36
36
+
nativeInstallCheckInputs = [ versionCheckHook ];
37
37
+
versionCheckProgramArg = "--version";
38
38
39
39
passthru.tests = nixosTests.ferretdb;
40
40
41
41
-
meta = with lib; {
41
41
+
meta = {
42
42
description = "Truly Open Source MongoDB alternative";
43
43
mainProgram = "ferretdb";
44
44
-
changelog = "https://github.com/FerretDB/FerretDB/releases/tag/v${version}";
44
44
+
changelog = "https://github.com/FerretDB/FerretDB/releases/tag/v${finalAttrs.version}";
45
45
homepage = "https://www.ferretdb.com/";
46
46
-
license = licenses.asl20;
47
47
-
maintainers = with maintainers; [
46
46
+
license = lib.licenses.asl20;
47
47
+
maintainers = with lib.maintainers; [
48
48
dit7ya
49
49
noisersup
50
50
julienmalka
51
51
];
52
52
};
53
53
-
}
53
53
+
})