1{
2 lib,
3 appimageTools,
4 fetchurl,
5}:
6
7let
8 pname = "mockoon";
9 version = "9.2.0";
10
11 src = fetchurl {
12 url = "https://github.com/mockoon/mockoon/releases/download/v${version}/mockoon-${version}.x86_64.AppImage";
13 hash = "sha256-RG5TeqYfgYYJM492dAhObExf8Qmvk06HXgAQziYC3rY=";
14 };
15
16 appimageContents = appimageTools.extractType2 {
17 inherit pname version src;
18 };
19in
20
21appimageTools.wrapType2 {
22 inherit pname version src;
23
24 extraInstallCommands = ''
25 install -Dm 444 ${appimageContents}/${pname}.desktop -t $out/share/applications
26 cp -r ${appimageContents}/usr/share/icons $out/share
27
28 substituteInPlace $out/share/applications/${pname}.desktop \
29 --replace 'Exec=AppRun' 'Exec=${pname}'
30 '';
31
32 meta = {
33 description = "Easiest and quickest way to run mock APIs locally";
34 longDescription = ''
35 Mockoon is the easiest and quickest way to run mock APIs locally.
36 No remote deployment, no account required, free and open-source.
37 '';
38 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
39 homepage = "https://mockoon.com";
40 changelog = "https://github.com/mockoon/mockoon/releases/tag/v${version}";
41 license = lib.licenses.mit;
42 maintainers = with lib.maintainers; [ dit7ya ];
43 mainProgram = "mockoon";
44 platforms = [ "x86_64-linux" ];
45 };
46}