summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorMostly Void <7rat13@gmail.com>2023-06-01 17:58:35 +0530
committerMostly Void <7rat13@gmail.com>2023-06-01 17:58:35 +0530
commitc214eb90a1586c6f99b281b700deda6b4b0a6a5a (patch)
tree822ee515a97312935c6ba88e775816f644e4a110 /pkgs/tools
parentb08b78b772a07f03fb338aa0bd3bfd27c6fe020c (diff)
downloadnixpkgs-c214eb90a1586c6f99b281b700deda6b4b0a6a5a.tar
nixpkgs-c214eb90a1586c6f99b281b700deda6b4b0a6a5a.tar.gz
nixpkgs-c214eb90a1586c6f99b281b700deda6b4b0a6a5a.tar.bz2
nixpkgs-c214eb90a1586c6f99b281b700deda6b4b0a6a5a.tar.lz
nixpkgs-c214eb90a1586c6f99b281b700deda6b4b0a6a5a.tar.xz
nixpkgs-c214eb90a1586c6f99b281b700deda6b4b0a6a5a.tar.zst
nixpkgs-c214eb90a1586c6f99b281b700deda6b4b0a6a5a.zip
mockoon: init at 3.0.0
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/networking/mockoon/default.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/tools/networking/mockoon/default.nix b/pkgs/tools/networking/mockoon/default.nix
new file mode 100644
index 00000000000..df151764501
--- /dev/null
+++ b/pkgs/tools/networking/mockoon/default.nix
@@ -0,0 +1,40 @@
+{ lib
+, appimageTools
+, fetchurl
+}:
+
+let
+  pname = "mockoon";
+  version = "3.0.0";
+
+  src = fetchurl {
+    url = "https://github.com/mockoon/mockoon/releases/download/v${version}/mockoon-${version}.AppImage";
+    hash = "sha256-YGcD/8h21fUoBEAcBVI5jo0UMCKdVRdC1zxDIrHjU+8=";
+  };
+
+  appimageContents = appimageTools.extractType2 {
+    inherit pname version src;
+  };
+in
+
+appimageTools.wrapType2 {
+  inherit pname version src;
+
+  extraInstallCommands = ''
+    mv $out/bin/${pname}-${version} $out/bin/${pname}
+
+    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 = "The easiest and quickest way to run mock APIs locally";
+    sourceProvenance = with sourceTypes; [ binaryNativeCode ];
+    homepage = "https://mockoon.com";
+    license = licenses.mit;
+    maintainers = with maintainers; [ dit7ya ];
+  };
+}