Created
June 1, 2015 22:51
-
-
Save bendlas/7325e1ad122334105ede to your computer and use it in GitHub Desktop.
antimony nix packaging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, fetchgit, git, boost, python3, mesa, qt5, ncurses }: | |
let | |
boost_py3 = boost.override { python = python3; }; | |
in stdenv.mkDerivation { | |
name = "antimony"; | |
src = fetchgit { | |
url = "https://github.com/mkeeter/antimony"; | |
rev = "16629e0caefa595c532ae95f1822493e7d2d8ba3"; | |
sha256 = "0yild654gncykr7mv5078aimnpwr5y6v0z4k8fr7gqprrpdn3nj5"; | |
leaveDotGit = true; | |
}; | |
buildInputs = [ boost_py3 python3 mesa qt5.base git ncurses ]; | |
patches = [ ./antimony-nix.patch ]; | |
postPatch = '' | |
substituteAllInPlace qt/antimony.pro | |
''; | |
configurePhase = '' | |
cd qt | |
export sourceRoot=$sourceRoot/qt | |
qmake antimony.pro PREFIX=$out | |
''; | |
enableParallelBuilding = true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/qt/antimony.pro b/qt/antimony.pro | |
index 9d586f4..f298c0f 100644 | |
--- a/qt/antimony.pro | |
+++ b/qt/antimony.pro | |
@@ -125,11 +125,11 @@ macx { | |
} | |
linux { | |
- executable.path = /usr/local/bin | |
+ executable.path = @out@/bin | |
executable.files = antimony | |
- nodes_folder.path = /usr/local/bin/sb/nodes | |
+ nodes_folder.path = @out@/bin/sb/nodes | |
nodes_folder.files = ../py/nodes/* | |
- fab_folder.path = /usr/local/bin/sb/fab | |
+ fab_folder.path = @out@/bin/sb/fab | |
fab_folder.files = ../py/fab/* | |
INSTALLS += executable nodes_folder fab_folder | |
} | |
diff --git a/qt/fab.pri b/qt/fab.pri | |
index a54813b..b500536 100644 | |
--- a/qt/fab.pri | |
+++ b/qt/fab.pri | |
@@ -54,7 +54,7 @@ DEFINES += '_STATIC_= ' | |
linux { | |
QMAKE_CFLAGS += -std=gnu99 | |
- QMAKE_CXXFLAGS += $$system(/usr/bin/python3-config --includes) | |
+ QMAKE_CXXFLAGS += $$system(python3-config --includes) | |
LIBS += -lpng | |
} | |
diff --git a/qt/shared.pri b/qt/shared.pri | |
index 9cf2e06..026eae3 100644 | |
--- a/qt/shared.pri | |
+++ b/qt/shared.pri | |
@@ -39,15 +39,11 @@ macx { | |
} | |
linux { | |
- QMAKE_CXXFLAGS += $$system(/usr/bin/python3-config --includes) | |
- QMAKE_LFLAGS += $$system(/usr/bin/python3-config --ldflags) | |
+ QMAKE_CXXFLAGS += $$system(python3-config --includes) | |
+ QMAKE_LFLAGS += $$system(python3-config --ldflags) | |
# Even though this is in QMAKE_LFLAGS, the linker is picky about | |
# library ordering (so it needs to be here too). | |
LIBS += -lpython3.4m | |
- | |
- # Check for different boost::python naming schemes | |
- LDCONFIG = $$system(ldconfig -p|grep python) | |
- contains(LDCONFIG, libboost_python-py34.so): LIBS += -lboost_python-py34 | |
- contains(LDCONFIG, libboost_python3.so): LIBS += -lboost_python3 | |
+ LIBS += -lboost_python3 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment