tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
antimony: 0.8.0b -> 0.9.2
Kranium Gikos Mendoza
9 years ago
a2a2b334
125ffff0
+34
-119
2 changed files
expand all
collapse all
unified
split
pkgs
applications
graphics
antimony
default.nix
paths-fix.patch
+16
-23
pkgs/applications/graphics/antimony/default.nix
···
1
-
{ stdenv, fetchgit, libpng, python3, boost, mesa, qtbase, qmakeHook, ncurses }:
2
3
let
4
-
gitRev = "745eca3a2d2657c495d5509e9083c884e021d09c";
5
gitBranch = "master";
6
-
gitTag = "0.8.0b";
7
in
8
stdenv.mkDerivation rec {
9
name = "antimony-${version}";
10
version = gitTag;
11
12
-
src = fetchgit {
13
-
url = "git://github.com/mkeeter/antimony.git";
14
-
rev = gitRev;
15
-
sha256 = "0azjdkbixz2pyk2yy7a0ya5xk60xgw3l2pd4pj4ijyqxx5jmh0sy";
0
16
};
17
18
patches = [ ./paths-fix.patch ];
19
-
# fix build with glibc-2.23
20
postPatch = ''
21
-
sed 's/\<isinf(/std::isinf(/g' -i \
22
-
src/export/export_heightmap.cpp \
23
-
src/fab/types/bounds.cpp \
24
-
src/graph/hooks/meta.cpp \
25
-
src/ui/dialogs/resolution_dialog.cpp \
26
-
src/render/render_task.cpp
27
'';
28
29
buildInputs = [
···
31
mesa qtbase ncurses
32
];
33
34
-
nativeBuildHooks = [ qmakeHook ];
35
36
-
preConfigure = ''
37
-
export GITREV=${gitRev}
38
-
export GITBRANCH=${gitBranch}
39
-
export GITTAG=${gitTag}
40
-
41
-
cd qt
42
-
'';
43
44
enableParallelBuilding = true;
45
···
48
homepage = "https://github.com/mkeeter/antimony";
49
license = licenses.mit;
50
platforms = platforms.linux;
51
-
broken = true;
52
};
53
}
···
1
+
{ stdenv, fetchFromGitHub, libpng, python3, boost, mesa, qtbase, ncurses, cmake, flex, lemon }:
2
3
let
4
+
gitRev = "e8480c718e8c49ae3cc2d7af10ea93ea4c2fff9a";
5
gitBranch = "master";
6
+
gitTag = "0.9.2";
7
in
8
stdenv.mkDerivation rec {
9
name = "antimony-${version}";
10
version = gitTag;
11
12
+
src = fetchFromGitHub {
13
+
owner = "mkeeter";
14
+
repo = "antimony";
15
+
rev = gitTag;
16
+
sha256 = "0fpgy5cb4knz2z9q078206k8wzxfs8b9g76mf4bz1ic77931ykjz";
17
};
18
19
patches = [ ./paths-fix.patch ];
20
+
21
postPatch = ''
22
+
sed -i "s,/usr/local,$out,g" app/CMakeLists.txt app/app/app.cpp app/app/main.cpp
0
0
0
0
0
23
'';
24
25
buildInputs = [
···
27
mesa qtbase ncurses
28
];
29
30
+
nativeBuildInputs = [ cmake flex lemon ];
31
32
+
cmakeFlags= [
33
+
"-DGITREV=${gitRev}"
34
+
"-DGITTAG=${gitTag}"
35
+
"-DGITBRANCH=${gitBranch}"
36
+
];
0
0
37
38
enableParallelBuilding = true;
39
···
42
homepage = "https://github.com/mkeeter/antimony";
43
license = licenses.mit;
44
platforms = platforms.linux;
0
45
};
46
}
+18
-96
pkgs/applications/graphics/antimony/paths-fix.patch
···
1
-
diff --git a/qt/antimony.pro b/qt/antimony.pro
2
-
index 9d586f4..b055a6d 100644
3
-
--- a/qt/antimony.pro
4
-
+++ b/qt/antimony.pro
5
-
@@ -12,14 +12,9 @@ QMAKE_CXXFLAGS_RELEASE += -O3
6
-
7
-
QMAKE_CXXFLAGS += -Werror=switch
8
-
9
-
-GITREV = $$system(git log --pretty=format:'%h' -n 1)
10
-
-GITDIFF = $$system(git diff --quiet --exit-code || echo "+")
11
-
-GITTAG = $$system(git describe --exact-match --tags 2> /dev/null)
12
-
-GITBRANCH = $$system(git rev-parse --abbrev-ref HEAD)
13
-
-
14
-
-QMAKE_CXXFLAGS += "-D'GITREV=\"$${GITREV}$${GITDIFF}\"'"
15
-
-QMAKE_CXXFLAGS += "-D'GITTAG=\"$${GITTAG}\"'"
16
-
-QMAKE_CXXFLAGS += "-D'GITBRANCH=\"$${GITBRANCH}\"'"
17
-
+QMAKE_CXXFLAGS += "-D'GITREV=\"$$(GITREV)\"'"
18
-
+QMAKE_CXXFLAGS += "-D'GITTAG=\"$$(GITTAG)\"'"
19
-
+QMAKE_CXXFLAGS += "-D'GITBRANCH=\"$$(GITBRANCH)\"'"
20
-
21
-
OLD_GL_SET = $$(OLD_GL)
22
-
equals(OLD_GL_SET, "true") {
23
-
@@ -125,11 +120,11 @@ macx {
24
-
}
25
-
26
-
linux {
27
-
- executable.path = /usr/local/bin
28
-
+ executable.path = $$(out)/bin
29
-
executable.files = antimony
30
-
- nodes_folder.path = /usr/local/bin/sb/nodes
31
-
+ nodes_folder.path = $$(out)/bin/sb/nodes
32
-
nodes_folder.files = ../py/nodes/*
33
-
- fab_folder.path = /usr/local/bin/sb/fab
34
-
+ fab_folder.path = $$(out)/bin/sb/fab
35
-
fab_folder.files = ../py/fab/*
36
-
INSTALLS += executable nodes_folder fab_folder
37
-
}
38
-
diff --git a/qt/fab.pri b/qt/fab.pri
39
-
index a54813b..b500536 100644
40
-
--- a/qt/fab.pri
41
-
+++ b/qt/fab.pri
42
-
@@ -54,7 +54,7 @@ DEFINES += '_STATIC_= '
43
-
44
-
linux {
45
-
QMAKE_CFLAGS += -std=gnu99
46
-
- QMAKE_CXXFLAGS += $$system(/usr/bin/python3-config --includes)
47
-
+ QMAKE_CXXFLAGS += $$system(python3-config --includes)
48
-
LIBS += -lpng
49
-
}
50
-
51
-
diff --git a/qt/shared.pri b/qt/shared.pri
52
-
index e7d0e3a..026eae3 100644
53
-
--- a/qt/shared.pri
54
-
+++ b/qt/shared.pri
55
-
@@ -39,41 +39,11 @@ macx {
56
-
}
57
58
-
linux {
59
-
- QMAKE_CXXFLAGS += $$system(/usr/bin/python3-config --includes)
60
-
- QMAKE_LFLAGS += $$system(/usr/bin/python3-config --ldflags)
61
-
+ QMAKE_CXXFLAGS += $$system(python3-config --includes)
62
-
+ QMAKE_LFLAGS += $$system(python3-config --ldflags)
63
64
-
# Even though this is in QMAKE_LFLAGS, the linker is picky about
65
-
# library ordering (so it needs to be here too).
66
-
LIBS += -lpython3.4m
0
0
0
0
0
0
67
-
68
-
- # ldconfig is being used to find libboost_python, but it's in a different
69
-
- # place in different distros (and is not in the default $PATH on Debian).
70
-
- # First, check to see if it's on the default $PATH.
71
-
- system(which ldconfig > /dev/null) {
72
-
- LDCONFIG_BIN = "ldconfig"
73
-
- }
74
-
- # If that failed, then search for it in its usual places.
75
-
- isEmpty(LDCONFIG_BIN) {
76
-
- for(p, $$list(/sbin/ldconfig /usr/bin/ldconfig)) {
77
-
- exists($$p): LDCONFIG_BIN = $$p
78
-
- }
79
-
- }
80
-
- # If that search failed too, then exit with an error.
81
-
- isEmpty(LDCONFIG_BIN) {
82
-
- error("Could not find ldconfig!")
83
-
- }
84
-
-
85
-
- # Check for different boost::python naming schemes
86
-
- LDCONFIG_OUT = $$system($$LDCONFIG_BIN -p|grep python)
87
-
- for (b, $$list(boost_python-py34 boost_python3)) {
88
-
- contains(LDCONFIG_OUT, "lib$${b}.so") {
89
-
- LIBS += "-l$$b"
90
-
- GOT_BOOST_PYTHON = True
91
-
- }
92
-
- }
93
-
-
94
-
- # If we couldn't find boost::python, exit with an error.
95
-
- isEmpty(GOT_BOOST_PYTHON) {
96
-
- error("Could not find boost::python3")
97
-
- }
98
-
+ LIBS += -lboost_python3
99
-
}
···
1
+
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
2
+
index ddc5c9b..d80728a 100644
3
+
--- a/app/CMakeLists.txt
4
+
+++ b/app/CMakeLists.txt
5
+
@@ -158,16 +158,6 @@ target_link_libraries(${ANTIMONY_APP}
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
6
7
+
################################################################################
0
0
0
0
8
9
+
-execute_process(COMMAND git log --pretty=format:'%h' -n 1
10
+
- OUTPUT_VARIABLE GITREV)
11
+
-execute_process(COMMAND bash -c "git diff --quiet --exit-code || echo +"
12
+
- OUTPUT_VARIABLE GITDIFF)
13
+
-execute_process(COMMAND git describe --exact-match --tags
14
+
- OUTPUT_VARIABLE GITTAG
15
+
- ERROR_QUIET)
16
+
-execute_process(COMMAND git rev-parse --abbrev-ref HEAD
17
+
- OUTPUT_VARIABLE GITBRANCH)
18
-
19
+
add_definitions(-D'GITREV="${GITREV}${GITDIFF}"'
20
+
-D'GITTAG="${GITTAG}"'
21
+
-D'GITBRANCH="${GITBRANCH}"')
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0