2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, libpng, python3
|
2019-11-10 16:44:34 +00:00
|
|
|
, libGLU, libGL, qtbase, wrapQtAppsHook, ncurses
|
2018-09-10 20:17:00 +00:00
|
|
|
, cmake, flex, lemon
|
2021-05-29 19:52:57 +00:00
|
|
|
, makeDesktopItem, copyDesktopItems
|
2018-09-10 20:17:00 +00:00
|
|
|
}:
|
2015-05-31 19:18:17 +00:00
|
|
|
|
|
|
|
let
|
2022-11-23 10:43:20 +00:00
|
|
|
gitRev = "8b805c674adad536f9dd552b4be75fadcb3c7db6";
|
2018-09-10 20:17:00 +00:00
|
|
|
gitBranch = "develop";
|
2018-02-06 15:01:01 +00:00
|
|
|
gitTag = "0.9.3";
|
|
|
|
in
|
2019-08-13 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "antimony";
|
2022-11-23 10:43:20 +00:00
|
|
|
version = "2022-11-23";
|
2015-05-31 19:18:17 +00:00
|
|
|
|
2016-07-09 10:14:04 +00:00
|
|
|
src = fetchFromGitHub {
|
2018-09-10 20:17:00 +00:00
|
|
|
owner = "mkeeter";
|
|
|
|
repo = "antimony";
|
|
|
|
rev = gitRev;
|
2022-11-23 10:43:20 +00:00
|
|
|
sha256 = "NmOuBewfHqtAim2cNP62LXgRjVWuVUGweV46sY1qjGk=";
|
2015-05-31 19:18:17 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [ ./paths-fix.patch ];
|
2016-07-09 10:14:04 +00:00
|
|
|
|
2016-03-10 17:58:28 +00:00
|
|
|
postPatch = ''
|
2018-09-10 20:17:00 +00:00
|
|
|
sed -i "s,/usr/local,$out,g" \
|
|
|
|
app/CMakeLists.txt app/app/app.cpp app/app/main.cpp
|
2019-01-20 12:59:04 +00:00
|
|
|
sed -i "s,python3,${python3.executable}," CMakeLists.txt
|
2016-03-10 17:58:28 +00:00
|
|
|
'';
|
2015-05-31 19:18:17 +00:00
|
|
|
|
2021-05-29 19:52:57 +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
|
|
|
|
'';
|
|
|
|
|
2015-05-31 19:18:17 +00:00
|
|
|
buildInputs = [
|
2018-09-10 20:17:00 +00:00
|
|
|
libpng python3 python3.pkgs.boost
|
2020-03-28 08:17:34 +00:00
|
|
|
libGLU libGL qtbase ncurses
|
2015-05-31 19:18:17 +00:00
|
|
|
];
|
|
|
|
|
2021-05-29 19:52:57 +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-02-22 14:56:15 +00:00
|
|
|
categories = [ "Graphics" "Science" "Engineering" ];
|
|
|
|
mimeTypes = [ "application/x-extension-sb" "application/x-antimony" ];
|
|
|
|
startupWMClass = "antimony";
|
2021-05-29 19:52:57 +00:00
|
|
|
})
|
|
|
|
];
|
2015-05-31 19:18:17 +00:00
|
|
|
|
2016-07-09 10:14:04 +00:00
|
|
|
cmakeFlags= [
|
|
|
|
"-DGITREV=${gitRev}"
|
|
|
|
"-DGITTAG=${gitTag}"
|
|
|
|
"-DGITBRANCH=${gitBranch}"
|
|
|
|
];
|
2015-05-31 19:18:17 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2015-05-31 19:18:17 +00:00
|
|
|
description = "A computer-aided design (CAD) tool from a parallel universe";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/mkeeter/antimony";
|
2015-05-31 19:18:17 +00:00
|
|
|
license = licenses.mit;
|
2018-09-10 20:17:00 +00:00
|
|
|
maintainers = with maintainers; [ rnhmjoj ];
|
2015-05-31 19:18:17 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|