8 # component dependencies
21 # omit python (2.7), no need to introduce a
22 # dependency on an EOL package for no reason
27 readline = [ readline ];
28 python3 = [ python3 ncurses ];
35 stdenv.mkDerivation rec {
36 pname = "gnatcoll-${component}";
39 src = fetchFromGitHub {
41 repo = "gnatcoll-bindings";
43 sha256 = "00aakpmr67r72l1h3jpkaw83p1a2mjjvfk635yy5c1nss3ji1qjm";
52 buildInputs = lib.optionals stdenv.isDarwin [
53 darwin.apple_sdk.frameworks.CoreFoundation
56 # propagate since gprbuild needs to find referenced .gpr files
57 # and all dependency C libraries when statically linking a
58 # downstream executable.
59 propagatedBuildInputs = [
61 ] ++ libsFor."${component}" or [];
63 # explicit flag for GPL acceptance because upstreams
64 # allows a gcc runtime exception for all bindings
65 # except for readline (since it is GPL w/o exceptions)
66 buildFlags = lib.optionals (component == "readline") [
72 ${python3.interpreter} ${component}/setup.py build --prefix $out $buildFlags
78 ${python3.interpreter} ${component}/setup.py install --prefix $out
83 description = "GNAT Components Collection - Bindings to C libraries";
84 homepage = "https://github.com/AdaCore/gnatcoll-bindings";
85 license = licenses.gpl3Plus;
86 platforms = platforms.all;
87 maintainers = [ maintainers.sternenseemann ];