Files
nixpkgs/pkgs/by-name/mo/mockoon/package.nix
bitbloxhub c831bab4ac appimageTools: warn on deprecated type-specific aliases
Also migrates away from them with these commands, using ast-grep 0.43.0
with these commands in bash (assisted by ChatGPT):
```bash
for old in extractType1 extractType2; do
  ast-grep \
    --lang nix \
    --pattern "\$TOOLS.$old" \
    --rewrite '$TOOLS.extract' \
    --update-all \
    pkgs
done

ast-grep \
  --lang nix \
  --pattern '$TOOLS.wrapType1' \
  --rewrite '$TOOLS.wrapType2' \
  --update-all \
  pkgs
```

Assisted-by: GPT-5.6-Sol Medium via ChatGPT
2026-07-30 00:21:21 +00:00

47 lines
1.3 KiB
Nix

{
lib,
appimageTools,
fetchurl,
}:
let
pname = "mockoon";
version = "9.6.1";
src = fetchurl {
url = "https://github.com/mockoon/mockoon/releases/download/v${version}/mockoon-${version}.x86_64.AppImage";
hash = "sha256-Y6DmoWGvNp0cvRYgDDMHul5K6CzhiWxMxVTR+W9PE5E=";
};
appimageContents = appimageTools.extract {
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 = {
description = "Easiest and quickest way to run mock APIs locally";
longDescription = ''
Mockoon is the easiest and quickest way to run mock APIs locally.
No remote deployment, no account required, free and open-source.
'';
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
homepage = "https://mockoon.com";
changelog = "https://github.com/mockoon/mockoon/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = [ ];
mainProgram = "mockoon";
platforms = [ "x86_64-linux" ];
};
}