mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 07:23:20 +00:00
antimony: add desktop item
This commit is contained in:
parent
0d698e6186
commit
b80463f8d5
@ -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}"
|
||||
|
7
pkgs/applications/graphics/antimony/mimetype.xml
Normal file
7
pkgs/applications/graphics/antimony/mimetype.xml
Normal file
@ -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>
|
Loading…
Reference in New Issue
Block a user