python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / applications / graphics / antimony / default.nix
blob0b70d67b2719728610fcc2b1684131bf5cab71cf
1 { lib, stdenv, fetchFromGitHub, libpng, python3
2 , libGLU, libGL, qtbase, wrapQtAppsHook, ncurses
3 , cmake, flex, lemon
4 , makeDesktopItem, copyDesktopItems
5 }:
7 let
8   gitRev    = "8fb4b0929ce84cf375bfb83a9d522ccd80681eaf";
9   gitBranch = "develop";
10   gitTag    = "0.9.3";
12   stdenv.mkDerivation {
13     pname = "antimony";
14     version = "2020-03-28";
16     src = fetchFromGitHub {
17       owner  = "mkeeter";
18       repo   = "antimony";
19       rev    = gitRev;
20       sha256 = "1s0zmq5jmhmb1wcsyaxfmii448g6x8b41mzvb1awlljj85qj0k2s";
21     };
23     patches = [ ./paths-fix.patch ];
25     postPatch = ''
26        sed -i "s,/usr/local,$out,g" \
27        app/CMakeLists.txt app/app/app.cpp app/app/main.cpp
28        sed -i "s,python3,${python3.executable}," CMakeLists.txt
29     '';
31     postInstall = lib.optionalString stdenv.isLinux ''
32       install -Dm644 $src/deploy/icon.svg $out/share/icons/hicolor/scalable/apps/antimony.svg
33       install -Dm644 ${./mimetype.xml} $out/share/mime/packages/antimony.xml
34     '';
36     buildInputs = [
37       libpng python3 python3.pkgs.boost
38       libGLU libGL qtbase ncurses
39     ];
41     nativeBuildInputs = [ cmake flex lemon wrapQtAppsHook copyDesktopItems ];
43     desktopItems = [
44       (makeDesktopItem {
45         name = "antimony";
46         desktopName = "Antimony";
47         comment="Tree-based Modeler";
48         genericName = "CAD Application";
49         exec = "antimony %f";
50         icon = "antimony";
51         categories = [ "Graphics" "Science" "Engineering" ];
52         mimeTypes = [ "application/x-extension-sb" "application/x-antimony" ];
53         startupWMClass = "antimony";
54       })
55     ];
57     cmakeFlags= [
58       "-DGITREV=${gitRev}"
59       "-DGITTAG=${gitTag}"
60       "-DGITBRANCH=${gitBranch}"
61     ];
63     meta = with lib; {
64       description = "A computer-aided design (CAD) tool from a parallel universe";
65       homepage    = "https://github.com/mkeeter/antimony";
66       license     = licenses.mit;
67       maintainers = with maintainers; [ rnhmjoj ];
68       platforms   = platforms.linux;
69     };
70   }