diff options
| author | Michele Guerini Rocco <rnhmjoj@users.noreply.github.com> | 2021-06-02 11:38:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-02 11:38:05 +0200 |
| commit | 5bf359c593330e9648f57f5e82e4ef314304e987 (patch) | |
| tree | a902d130a68b1b113ee31c48b46decb85bff163d | |
| parent | Merge pull request #125338 from NixOS/backport-124494-to-release-21.05 (diff) | |
| parent | antimony: add desktop item (diff) | |
| download | nixpkgs-5bf359c593330e9648f57f5e82e4ef314304e987.tar.gz | |
Merge pull request #125343 from NixOS/backport-124891-to-release-21.05
[Backport release-21.05] antimony: add desktop item
| -rw-r--r-- | pkgs/applications/graphics/antimony/default.nix | 26 | ||||
| -rw-r--r-- | pkgs/applications/graphics/antimony/mimetype.xml | 7 |
2 files changed, 32 insertions, 1 deletions
diff --git a/pkgs/applications/graphics/antimony/default.nix b/pkgs/applications/graphics/antimony/default.nix index d92ad9998f2c..8b482626c91a 100644 --- a/pkgs/applications/graphics/antimony/default.nix +++ b/pkgs/applications/graphics/antimony/default.nix @@ -1,6 +1,7 @@ { lib, stdenv, fetchFromGitHub, libpng, python3 , libGLU, libGL, qtbase, wrapQtAppsHook, ncurses , cmake, flex, lemon +, makeDesktopItem, copyDesktopItems }: let @@ -27,12 +28,35 @@ in sed -i "s,python3,${python3.executable}," CMakeLists.txt ''; + postInstall = lib.optionalString stdenv.isLinux '' + install -Dm644 $src/deploy/icon.svg $out/share/icons/hicolor/scalable/apps/antimony.svg + install -Dm644 ${./mimetype.xml} $out/share/mime/packages/antimony.xml + ''; + buildInputs = [ libpng python3 python3.pkgs.boost libGLU libGL qtbase ncurses ]; - nativeBuildInputs = [ cmake flex lemon wrapQtAppsHook ]; + nativeBuildInputs = [ cmake flex lemon wrapQtAppsHook copyDesktopItems ]; + + desktopItems = [ + (makeDesktopItem { + name = "antimony"; + desktopName = "Antimony"; + comment="Tree-based Modeler"; + genericName = "CAD Application"; + exec = "antimony %f"; + icon = "antimony"; + terminal = "false"; + categories = "Graphics;Science;Engineering"; + mimeType = "application/x-extension-sb;application/x-antimony;"; + extraEntries = '' + StartupWMClass=antimony + Version=1.0 + ''; + }) + ]; cmakeFlags= [ "-DGITREV=${gitRev}" diff --git a/pkgs/applications/graphics/antimony/mimetype.xml b/pkgs/applications/graphics/antimony/mimetype.xml new file mode 100644 index 000000000000..c6960fba9abc --- /dev/null +++ b/pkgs/applications/graphics/antimony/mimetype.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> + <mime-type type="application/x-antimony"> + <comment xml:lang="en">Antimony model</comment> + <glob pattern="*.sb"/> + </mime-type> +</mime-info> |
