diff options
Diffstat (limited to 'pkgs/development/libraries/ada/gnatcoll')
-rw-r--r-- | pkgs/development/libraries/ada/gnatcoll/bindings.nix | 89 | ||||
-rw-r--r-- | pkgs/development/libraries/ada/gnatcoll/core.nix | 47 | ||||
-rw-r--r-- | pkgs/development/libraries/ada/gnatcoll/db.nix | 107 |
3 files changed, 0 insertions, 243 deletions
diff --git a/pkgs/development/libraries/ada/gnatcoll/bindings.nix b/pkgs/development/libraries/ada/gnatcoll/bindings.nix deleted file mode 100644 index c8896c14c32f..000000000000 --- a/pkgs/development/libraries/ada/gnatcoll/bindings.nix +++ /dev/null @@ -1,89 +0,0 @@ -{ stdenv -, lib -, fetchFromGitHub -, gnat -, gprbuild -, gnatcoll-core -, component -# component dependencies -, gmp -, libiconv -, xz -, gcc-unwrapped -, readline -, zlib -, python3 -, ncurses -, darwin -}: - -let - # omit python (2.7), no need to introduce a - # dependency on an EOL package for no reason - libsFor = { - iconv = [ libiconv ]; - gmp = [ gmp ]; - lzma = [ xz ]; - readline = [ readline ]; - python3 = [ python3 ncurses ]; - syslog = [ ]; - zlib = [ zlib ]; - }; -in - - -stdenv.mkDerivation rec { - pname = "gnatcoll-${component}"; - version = "24.0.0"; - - src = fetchFromGitHub { - owner = "AdaCore"; - repo = "gnatcoll-bindings"; - rev = "v${version}"; - sha256 = "00aakpmr67r72l1h3jpkaw83p1a2mjjvfk635yy5c1nss3ji1qjm"; - }; - - nativeBuildInputs = [ - gprbuild - gnat - python3 - ]; - - buildInputs = lib.optionals stdenv.isDarwin [ - darwin.apple_sdk.frameworks.CoreFoundation - ]; - - # propagate since gprbuild needs to find referenced .gpr files - # and all dependency C libraries when statically linking a - # downstream executable. - propagatedBuildInputs = [ - gnatcoll-core - ] ++ libsFor."${component}" or []; - - # explicit flag for GPL acceptance because upstreams - # allows a gcc runtime exception for all bindings - # except for readline (since it is GPL w/o exceptions) - buildFlags = lib.optionals (component == "readline") [ - "--accept-gpl" - ]; - - buildPhase = '' - runHook preBuild - ${python3.interpreter} ${component}/setup.py build --prefix $out $buildFlags - runHook postBuild - ''; - - installPhase = '' - runHook preInstall - ${python3.interpreter} ${component}/setup.py install --prefix $out - runHook postInstall - ''; - - meta = with lib; { - description = "GNAT Components Collection - Bindings to C libraries"; - homepage = "https://github.com/AdaCore/gnatcoll-bindings"; - license = licenses.gpl3Plus; - platforms = platforms.all; - maintainers = [ maintainers.sternenseemann ]; - }; -} diff --git a/pkgs/development/libraries/ada/gnatcoll/core.nix b/pkgs/development/libraries/ada/gnatcoll/core.nix deleted file mode 100644 index 7fdd4e99d550..000000000000 --- a/pkgs/development/libraries/ada/gnatcoll/core.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ stdenv -, lib -, gnat -, gprbuild -, fetchFromGitHub -, xmlada -, which -}: - -stdenv.mkDerivation rec { - pname = "gnatcoll-core"; - version = "24.0.0"; - - src = fetchFromGitHub { - owner = "AdaCore"; - repo = "gnatcoll-core"; - rev = "v${version}"; - sha256 = "1cks2w0inj9hvamsdxjriwxnx1igmx2khhr6kwxshsl30rs8nzvb"; - }; - - nativeBuildInputs = [ - gprbuild - which - gnat - ]; - - # propagate since gprbuild needs to find - # referenced GPR project definitions - propagatedBuildInputs = [ - gprbuild # libgpr - ]; - - makeFlags = [ - "prefix=${placeholder "out"}" - "PROCESSORS=$(NIX_BUILD_CORES)" - # confusingly, for gprbuild --target is autoconf --host - "TARGET=${stdenv.hostPlatform.config}" - ]; - - meta = with lib; { - homepage = "https://github.com/AdaCore/gnatcoll-core"; - description = "GNAT Components Collection - Core packages"; - license = licenses.gpl3Plus; - maintainers = [ maintainers.sternenseemann ]; - platforms = platforms.all; - }; -} diff --git a/pkgs/development/libraries/ada/gnatcoll/db.nix b/pkgs/development/libraries/ada/gnatcoll/db.nix deleted file mode 100644 index 6eacff1ddb82..000000000000 --- a/pkgs/development/libraries/ada/gnatcoll/db.nix +++ /dev/null @@ -1,107 +0,0 @@ -{ stdenv -, lib -, fetchFromGitHub -, gnat -, gprbuild -, which -, gnatcoll-core -, xmlada -, component -# components built by this derivation other components depend on -, gnatcoll-sql -, gnatcoll-sqlite -, gnatcoll-xref -# component specific extra dependencies -, gnatcoll-iconv -, gnatcoll-readline -, sqlite -, postgresql -}: - -let - libsFor = { - gnatcoll_db2ada = [ - gnatcoll-sql - ]; - gnatinspect = [ - gnatcoll-sqlite - gnatcoll-readline - gnatcoll-xref - ]; - postgres = [ - gnatcoll-sql - postgresql - ]; - sqlite = [ - gnatcoll-sql - sqlite - ]; - xref = [ - gnatcoll-iconv - gnatcoll-sqlite - ]; - }; - - # These components are just tools and don't install a library - onlyExecutable = builtins.elem component [ - "gnatcoll_db2ada" - "gnatinspect" - ]; -in - -stdenv.mkDerivation rec { - # executables don't adhere to the string gnatcoll-* scheme - pname = - if onlyExecutable - then builtins.replaceStrings [ "_" ] [ "-" ] component - else "gnatcoll-${component}"; - version = "24.0.0"; - - src = fetchFromGitHub { - owner = "AdaCore"; - repo = "gnatcoll-db"; - rev = "v${version}"; - sha256 = "0jq76s4s7q2x93jh8la6r0i3jkpvgsfj12vbbaqabh410xccyr3p"; - }; - - # Link executables dynamically unless specified by the platform, - # as we usually do in nixpkgs where possible - postPatch = lib.optionalString (!stdenv.hostPlatform.isStatic) '' - for f in gnatcoll_db2ada/Makefile gnatinspect/Makefile; do - substituteInPlace "$f" --replace "=static" "=relocatable" - done - ''; - - nativeBuildInputs = [ - gnat - gprbuild - which - ]; - - # Propagate since GPRbuild needs to find referenced .gpr files - # and other libraries to link against when static linking is used. - # For executables this is of course not relevant and we can reduce - # the closure size dramatically - ${if onlyExecutable then "buildInputs" else "propagatedBuildInputs"} = [ - gnatcoll-core - ] ++ libsFor."${component}" or []; - - makeFlags = [ - "-C" component - "PROCESSORS=$(NIX_BUILD_CORES)" - # confusingly, for gprbuild --target is autoconf --host - "TARGET=${stdenv.hostPlatform.config}" - "prefix=${placeholder "out"}" - ] ++ lib.optionals (component == "sqlite") [ - # link against packaged, not vendored libsqlite3 - "GNATCOLL_SQLITE=external" - ]; - - meta = with lib; { - description = "GNAT Components Collection - Database packages"; - homepage = "https://github.com/AdaCore/gnatcoll-db"; - license = licenses.gpl3Plus; - maintainers = [ maintainers.sternenseemann ]; - platforms = platforms.all; - }; -} |