nixpkgs/pkgs/by-name/mo/mockoon/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

40 lines
1020 B
Nix
Raw Normal View History

2023-06-01 12:28:35 +00:00
{ lib
, appimageTools
, fetchurl
}:
let
pname = "mockoon";
2024-01-09 19:03:49 +00:00
version = "6.1.0";
2023-06-01 12:28:35 +00:00
src = fetchurl {
url = "https://github.com/mockoon/mockoon/releases/download/v${version}/mockoon-${version}.AppImage";
2024-01-09 19:03:49 +00:00
hash = "sha256-harZU3TTIzfJoY/jAQI0dm7YSOr24Y9xk9L5ZaBLdD8=";
2023-06-01 12:28:35 +00:00
};
appimageContents = appimageTools.extractType2 {
inherit pname version src;
};
in
appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
install -Dm 444 ${appimageContents}/${pname}.desktop -t $out/share/applications
cp -r ${appimageContents}/usr/share/icons $out/share
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
'';
meta = with lib; {
description = "Easiest and quickest way to run mock APIs locally";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
homepage = "https://mockoon.com";
license = licenses.mit;
maintainers = with maintainers; [ dit7ya ];
2024-02-11 02:19:15 +00:00
mainProgram = "mockoon";
2023-06-01 12:28:35 +00:00
};
}