2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, libpng, python3
|
2020-04-24 23:36:52 +00:00
|
|
|
, libGLU, libGL, qtbase, wrapQtAppsHook, ncurses
|
|
|
|
, cmake, flex, lemon
|
2021-06-04 09:07:49 +00:00
|
|
|
, makeDesktopItem, copyDesktopItems
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
2022-11-27 09:42:12 +00:00
|
|
|
gitRev = "8b805c674adad536f9dd552b4be75fadcb3c7db6";
|
2020-04-24 23:36:52 +00:00
|
|
|
gitBranch = "develop";
|
|
|
|
gitTag = "0.9.3";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "antimony";
|
2022-11-27 09:42:12 +00:00
|
|
|
version = "2022-11-23";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mkeeter";
|
|
|
|
repo = "antimony";
|
|
|
|
rev = gitRev;
|
2022-11-27 09:42:12 +00:00
|
|
|
sha256 = "NmOuBewfHqtAim2cNP62LXgRjVWuVUGweV46sY1qjGk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./paths-fix.patch ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i "s,/usr/local,$out,g" \
|
|
|
|
app/CMakeLists.txt app/app/app.cpp app/app/main.cpp
|
|
|
|
sed -i "s,python3,${python3.executable}," CMakeLists.txt
|
|
|
|
'';
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
|
|
|
libpng python3 python3.pkgs.boost
|
|
|
|
libGLU libGL qtbase ncurses
|
|
|
|
];
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
nativeBuildInputs = [ cmake flex lemon wrapQtAppsHook copyDesktopItems ];
|
|
|
|
|
|
|
|
desktopItems = [
|
|
|
|
(makeDesktopItem {
|
|
|
|
name = "antimony";
|
|
|
|
desktopName = "Antimony";
|
|
|
|
comment="Tree-based Modeler";
|
|
|
|
genericName = "CAD Application";
|
|
|
|
exec = "antimony %f";
|
|
|
|
icon = "antimony";
|
2022-03-05 16:20:37 +00:00
|
|
|
categories = [ "Graphics" "Science" "Engineering" ];
|
|
|
|
mimeTypes = [ "application/x-extension-sb" "application/x-antimony" ];
|
|
|
|
startupWMClass = "antimony";
|
2021-06-04 09:07:49 +00:00
|
|
|
})
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
cmakeFlags= [
|
|
|
|
"-DGITREV=${gitRev}"
|
|
|
|
"-DGITTAG=${gitTag}"
|
|
|
|
"-DGITBRANCH=${gitBranch}"
|
|
|
|
];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Computer-aided design (CAD) tool from a parallel universe";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "antimony";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/mkeeter/antimony";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ rnhmjoj ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|