From ea75af1af5e7ae2c21d13d6e6994e2561a3ef25f Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 24 Feb 2024 22:17:12 +0000 Subject: notepad-next: 0.6.4 -> 0.7 --- pkgs/applications/editors/notepad-next/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkgs/applications/editors') diff --git a/pkgs/applications/editors/notepad-next/default.nix b/pkgs/applications/editors/notepad-next/default.nix index 2f668a6fc526..2b6502023c9a 100644 --- a/pkgs/applications/editors/notepad-next/default.nix +++ b/pkgs/applications/editors/notepad-next/default.nix @@ -2,13 +2,13 @@ mkDerivation rec { pname = "notepad-next"; - version = "0.6.4"; + version = "0.7"; src = fetchFromGitHub { owner = "dail8859"; repo = "NotepadNext"; rev = "v${version}"; - sha256 = "sha256-m8+kM9uz3gJ3kvpgZdoonSvYlh/f1WiGZlB8JKMTXh4="; + sha256 = "sha256-I2bS8oT/TGf6fuXpTwOKo2MaUo0jLFIU/DfW9h1toOk="; # External dependencies - https://github.com/dail8859/NotepadNext/issues/135 fetchSubmodules = true; }; -- cgit 1.4.1 From ed75c1ad48689f52610bfe9f569245c8c03652b7 Mon Sep 17 00:00:00 2001 From: Raroh73 <96078496+Raroh73@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:05:57 +0100 Subject: vscode-extensions.continue.continue: init at 0.8.12 --- .../editors/vscode/extensions/default.nix | 48 ++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'pkgs/applications/editors') diff --git a/pkgs/applications/editors/vscode/extensions/default.nix b/pkgs/applications/editors/vscode/extensions/default.nix index 1c6d03d8ddfe..a002bc3ac197 100644 --- a/pkgs/applications/editors/vscode/extensions/default.nix +++ b/pkgs/applications/editors/vscode/extensions/default.nix @@ -903,6 +903,54 @@ let contextmapper.context-mapper-vscode-extension = callPackage ./contextmapper.context-mapper-vscode-extension { }; + continue.continue = buildVscodeMarketplaceExtension { + mktplcRef = + let + sources = { + "x86_64-linux" = { + arch = "linux-x64"; + sha256 = "05kh6sf3jv3510q33chf8s5n1kfp9wcm7650va7mcrdkfr9g8ysq"; + }; + "x86_64-darwin" = { + arch = "darwin-x64"; + sha256 = "0242h9kq47qvs1xynr5x8dzxkc5pwgb6km0iqpyy9kydg8ng1vp3"; + }; + "aarch64-linux" = { + arch = "linux-arm64"; + sha256 = "1qm3f2lh8mi3hnyp2bmx7j2lir6fmbbxkzh6b8zf579khhbapnaz"; + }; + "aarch64-darwin" = { + arch = "darwin-arm64"; + sha256 = "18w22z1c5qgkpw2zlwmi9gs9dx1pcm51f0r8my7ynnvgl6mp12sg"; + }; + }; + in + { + name = "continue"; + publisher = "Continue"; + version = "0.8.12"; + } // sources.${stdenv.system}; + nativeBuildInputs = [ + autoPatchelfHook + ]; + buildInputs = [ + stdenv.cc.cc.lib + ]; + postInstall = '' + cd "$out/$installPrefix" + substituteInPlace "out/extension.js" \ + --replace-fail 'await showTutorial();' '//await showTutorial();' + ''; + meta = { + description = "Open-source autopilot for software development - bring the power of ChatGPT to your IDE"; + downloadPage = "https://marketplace.visualstudio.com/items?itemName=Continue.continue"; + homepage = "https://github.com/continuedev/continue"; + license = lib.licenses.asl20; + maintainers = [ lib.maintainers.raroh73 ]; + platforms = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux" ]; + }; + }; + coolbear.systemd-unit-file = buildVscodeMarketplaceExtension { mktplcRef = { publisher = "coolbear"; -- cgit 1.4.1 From 63e129f793ccf07bad4631309812a6f8ba33e234 Mon Sep 17 00:00:00 2001 From: GaƩtan Lepage <33058747+GaetanLepage@users.noreply.github.com> Date: Sun, 25 Feb 2024 18:15:04 +0100 Subject: buildNeovimPlugin: set version accordingly to the manual guidelines (#289008) https://github.com/NixOS/nixpkgs/blob/master/pkgs/README.md#package-naming --- pkgs/applications/editors/neovim/build-neovim-plugin.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'pkgs/applications/editors') diff --git a/pkgs/applications/editors/neovim/build-neovim-plugin.nix b/pkgs/applications/editors/neovim/build-neovim-plugin.nix index 9f48d28a496a..9d9778c1fe3b 100644 --- a/pkgs/applications/editors/neovim/build-neovim-plugin.nix +++ b/pkgs/applications/editors/neovim/build-neovim-plugin.nix @@ -33,6 +33,7 @@ in nativeBuildInputs = oa.nativeBuildInputs or [] ++ [ lua.pkgs.luarocksMoveDataFolder ]; + version = "${originalLuaDrv.version}-unstable-${oa.version}"; })); in finalDrv -- cgit 1.4.1 From f2a142727cc0fbc92a9b420567418df9dd36e568 Mon Sep 17 00:00:00 2001 From: Thomas Heijligen Date: Mon, 19 Feb 2024 20:17:42 +0000 Subject: gnatPackages: Add scope for all ada packages Ada depencencies musst be build with the same gnat version as the project. Use a namespace as preperation to build with different gnat versions. gprbuild and gnatprove are still globaly visable. --- .../editors/emacs/elisp-packages/elpa-packages.nix | 2 +- pkgs/build-support/cc-wrapper/default.nix | 2 +- pkgs/development/ada-modules/gnatcoll/bindings.nix | 89 +++++++++++++++++ pkgs/development/ada-modules/gnatcoll/core.nix | 47 +++++++++ pkgs/development/ada-modules/gnatcoll/db.nix | 107 +++++++++++++++++++++ pkgs/development/ada-modules/gnatprove/default.nix | 96 ++++++++++++++++++ pkgs/development/ada-modules/gprbuild/boot.nix | 97 +++++++++++++++++++ pkgs/development/ada-modules/gprbuild/default.nix | 64 ++++++++++++ .../gprbuild/gpr-project-darwin-rpath-hook.sh | 10 ++ .../ada-modules/gprbuild/gpr-project-path-hook.sh | 8 ++ .../gprbuild/gprbuild-relocatable-build.patch | 13 +++ .../ada-modules/gprbuild/nixpkgs-gnat.xml | 56 +++++++++++ pkgs/development/ada-modules/xmlada/default.nix | 35 +++++++ .../libraries/ada/gnatcoll/bindings.nix | 89 ----------------- pkgs/development/libraries/ada/gnatcoll/core.nix | 47 --------- pkgs/development/libraries/ada/gnatcoll/db.nix | 107 --------------------- .../libraries/ada/gnatprove/default.nix | 96 ------------------ pkgs/development/libraries/ada/xmlada/default.nix | 35 ------- .../tools/build-managers/gprbuild/boot.nix | 97 ------------------- .../tools/build-managers/gprbuild/default.nix | 64 ------------ .../gprbuild/gpr-project-darwin-rpath-hook.sh | 10 -- .../gprbuild/gpr-project-path-hook.sh | 8 -- .../gprbuild/gprbuild-relocatable-build.patch | 13 --- .../tools/build-managers/gprbuild/nixpkgs-gnat.xml | 56 ----------- pkgs/top-level/ada-packages.nix | 45 +++++++++ pkgs/top-level/aliases.nix | 18 +++- pkgs/top-level/all-packages.nix | 42 +------- 27 files changed, 690 insertions(+), 663 deletions(-) create mode 100644 pkgs/development/ada-modules/gnatcoll/bindings.nix create mode 100644 pkgs/development/ada-modules/gnatcoll/core.nix create mode 100644 pkgs/development/ada-modules/gnatcoll/db.nix create mode 100644 pkgs/development/ada-modules/gnatprove/default.nix create mode 100644 pkgs/development/ada-modules/gprbuild/boot.nix create mode 100644 pkgs/development/ada-modules/gprbuild/default.nix create mode 100644 pkgs/development/ada-modules/gprbuild/gpr-project-darwin-rpath-hook.sh create mode 100644 pkgs/development/ada-modules/gprbuild/gpr-project-path-hook.sh create mode 100644 pkgs/development/ada-modules/gprbuild/gprbuild-relocatable-build.patch create mode 100644 pkgs/development/ada-modules/gprbuild/nixpkgs-gnat.xml create mode 100644 pkgs/development/ada-modules/xmlada/default.nix delete mode 100644 pkgs/development/libraries/ada/gnatcoll/bindings.nix delete mode 100644 pkgs/development/libraries/ada/gnatcoll/core.nix delete mode 100644 pkgs/development/libraries/ada/gnatcoll/db.nix delete mode 100644 pkgs/development/libraries/ada/gnatprove/default.nix delete mode 100644 pkgs/development/libraries/ada/xmlada/default.nix delete mode 100644 pkgs/development/tools/build-managers/gprbuild/boot.nix delete mode 100644 pkgs/development/tools/build-managers/gprbuild/default.nix delete mode 100644 pkgs/development/tools/build-managers/gprbuild/gpr-project-darwin-rpath-hook.sh delete mode 100644 pkgs/development/tools/build-managers/gprbuild/gpr-project-path-hook.sh delete mode 100644 pkgs/development/tools/build-managers/gprbuild/gprbuild-relocatable-build.patch delete mode 100644 pkgs/development/tools/build-managers/gprbuild/nixpkgs-gnat.xml create mode 100644 pkgs/top-level/ada-packages.nix (limited to 'pkgs/applications/editors') diff --git a/pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix b/pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix index 112445453abb..0b142281559a 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/elpa-packages.nix @@ -88,7 +88,7 @@ self: let ]; buildInputs = [ - pkgs.gnatcoll-xref + pkgs.gnatPackages.gnatcoll-xref ]; buildPhase = '' diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index 693c6e6fcfd4..9ff560b2286a 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -377,7 +377,7 @@ stdenv.mkDerivation { # this symlink points to the unwrapped gnat's output "out". It is used by # our custom gprconfig compiler description to find GNAT's ada runtime. See - # ../../development/tools/build-managers/gprbuild/{boot.nix, nixpkgs-gnat.xml} + # ../../development/ada-modules/gprbuild/{boot.nix, nixpkgs-gnat.xml} ln -sf ${cc} $out/nix-support/gprconfig-gnat-unwrapped '' diff --git a/pkgs/development/ada-modules/gnatcoll/bindings.nix b/pkgs/development/ada-modules/gnatcoll/bindings.nix new file mode 100644 index 000000000000..c8896c14c32f --- /dev/null +++ b/pkgs/development/ada-modules/gnatcoll/bindings.nix @@ -0,0 +1,89 @@ +{ 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/ada-modules/gnatcoll/core.nix b/pkgs/development/ada-modules/gnatcoll/core.nix new file mode 100644 index 000000000000..7fdd4e99d550 --- /dev/null +++ b/pkgs/development/ada-modules/gnatcoll/core.nix @@ -0,0 +1,47 @@ +{ 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/ada-modules/gnatcoll/db.nix b/pkgs/development/ada-modules/gnatcoll/db.nix new file mode 100644 index 000000000000..6eacff1ddb82 --- /dev/null +++ b/pkgs/development/ada-modules/gnatcoll/db.nix @@ -0,0 +1,107 @@ +{ 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; + }; +} diff --git a/pkgs/development/ada-modules/gnatprove/default.nix b/pkgs/development/ada-modules/gnatprove/default.nix new file mode 100644 index 000000000000..884406d3342e --- /dev/null +++ b/pkgs/development/ada-modules/gnatprove/default.nix @@ -0,0 +1,96 @@ +{ stdenv +, lib +, fetchFromGitHub +, gnat +, gnatcoll-core +, gprbuild +, python3 +, ocamlPackages +, makeWrapper +}: +let + gnat_version = lib.versions.major gnat.version; + + fetchSpark2014 = { rev, sha256 } : fetchFromGitHub { + owner = "AdaCore"; + repo = "spark2014"; + fetchSubmodules = true; + inherit rev sha256; + }; + + spark2014 = { + "12" = { + src = fetchSpark2014 { + rev = "ab34e07080a769b63beacc141707b5885c49d375"; # branch fsf-12 + sha256 = "sha256-7pe3eWitpxmqzjW6qEIEuN0qr2IR+kJ7Ssc9pTBcCD8="; + }; + commit_date = "2022-05-25"; + }; + "13" = { + src = fetchSpark2014 { + rev = "12db22e854defa9d1c993ef904af1e72330a68ca"; # branch fsf-13 + sha256 = "sha256-mZWP9yF1O4knCiXx8CqolnS+93bM+hTQy40cd0HZmwI="; + }; + commit_date = "2023-01-05"; + }; + }; + + thisSpark = spark2014.${gnat_version} or + (builtins.throw "GNATprove depend on a specific GNAT version and can't be built using GNAT ${gnat_version}."); + +in +stdenv.mkDerivation rec { + pname = "gnatprove"; + version = "fsf-${gnat_version}_${thisSpark.commit_date}"; + + src = thisSpark.src; + + nativeBuildInputs = [ + gnat + gprbuild + python3 + ocamlPackages.ocaml + makeWrapper + ]; + + buildInputs = [ + gnatcoll-core + ocamlPackages.camlzip + ocamlPackages.findlib + ocamlPackages.menhir + ocamlPackages.menhirLib + ocamlPackages.num + ocamlPackages.yojson + ocamlPackages.zarith + ]; + + propagatedBuildInputs = [ + gprbuild + ]; + + postPatch = '' + # gnat2why/gnat_src points to the GNAT sources + tar xf ${gnat.cc.src} gcc-${gnat.cc.version}/gcc/ada + mv gcc-${gnat.cc.version}/gcc/ada gnat2why/gnat_src + ''; + + configurePhase = '' + make setup + ''; + + installPhase = '' + make install-all + cp -a ./install/. $out + mkdir $out/share/gpr + ln -s $out/lib/gnat/* $out/share/gpr/ + ''; + + meta = with lib; { + description = "a software development technology specifically designed for engineering high-reliability applications"; + homepage = "https://github.com/AdaCore/spark2014"; + maintainers = [ maintainers.jiegec ]; + license = licenses.gpl3; + platforms = platforms.all; + }; +} + diff --git a/pkgs/development/ada-modules/gprbuild/boot.nix b/pkgs/development/ada-modules/gprbuild/boot.nix new file mode 100644 index 000000000000..4207b3649594 --- /dev/null +++ b/pkgs/development/ada-modules/gprbuild/boot.nix @@ -0,0 +1,97 @@ +{ stdenv +, lib +, fetchFromGitHub +, gnat +, which +, xmlada # for src +}: + +let + version = "24.0.0"; + + gprConfigKbSrc = fetchFromGitHub { + name = "gprconfig-kb-${version}-src"; + owner = "AdaCore"; + repo = "gprconfig_kb"; + rev = "v${version}"; + sha256 = "1vnjv2q63l8nq2w4wya75m40isvs78j5ss9b5ga3zx3cpdx3xh09"; + }; +in + +stdenv.mkDerivation { + pname = "gprbuild-boot"; + inherit version; + + src = fetchFromGitHub { + name = "gprbuild-${version}"; + owner = "AdaCore"; + repo = "gprbuild"; + rev = "v${version}"; + sha256 = "096a43453z2xknn6x4hyk2ldp2wh0qhfdfmzsrks50zqcvmkq4v7"; + }; + + nativeBuildInputs = [ + gnat + which + ]; + + postPatch = '' + # The Makefile uses gprbuild to build gprbuild which + # we can't do at this point, delete it to prevent the + # default phases from failing. + rm Makefile + + # make sure bootstrap script runs + patchShebangs --build bootstrap.sh + ''; + + # This setupHook populates GPR_PROJECT_PATH which is used by + # gprbuild to find dependencies. It works quite similar to + # the pkg-config setupHook in the sense that it also splits + # dependencies into GPR_PROJECT_PATH and GPR_PROJECT_PATH_FOR_BUILD, + # but gprbuild itself doesn't support this, so we'll need to + # introducing a wrapper for it in the future remains TODO. + # For the moment this doesn't matter since we have no situation + # were gprbuild is used to build something used at build time. + setupHooks = [ + ./gpr-project-path-hook.sh + ] ++ lib.optionals stdenv.targetPlatform.isDarwin [ + # This setupHook replaces the paths of shared libraries starting + # with @rpath with the absolute paths on Darwin, so that the + # binaries can be run without additional setup. + ./gpr-project-darwin-rpath-hook.sh + ]; + + installPhase = '' + runHook preInstall + + ./bootstrap.sh \ + --with-xmlada=${xmlada.src} \ + --with-kb=${gprConfigKbSrc} \ + --prefix=$out + + # Install custom compiler description which can detect nixpkgs' + # GNAT wrapper as a proper Ada compiler. The default compiler + # description expects the runtime library to be installed in + # the same prefix which isn't the case for nixpkgs. As a + # result, it would detect the unwrapped GNAT as a proper + # compiler which is unable to produce working binaries. + # + # Our compiler description is very similar to the upstream + # GNAT description except that we use a symlink in $out/nix-support + # created by the cc-wrapper to find the associated runtime + # libraries and use gnatmake instead of gnatls to find GNAT's + # bin directory. + install -m644 ${./nixpkgs-gnat.xml} $out/share/gprconfig/nixpkgs-gnat.xml + + runHook postInstall + ''; + + meta = with lib; { + description = "Multi-language extensible build tool"; + homepage = "https://github.com/AdaCore/gprbuild"; + license = licenses.gpl3Plus; + maintainers = [ maintainers.sternenseemann ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/development/ada-modules/gprbuild/default.nix b/pkgs/development/ada-modules/gprbuild/default.nix new file mode 100644 index 000000000000..aad115701263 --- /dev/null +++ b/pkgs/development/ada-modules/gprbuild/default.nix @@ -0,0 +1,64 @@ +{ lib +, stdenv +, fetchFromGitHub +, fetchpatch +, gprbuild-boot +, which +, gnat +, xmlada +}: + +stdenv.mkDerivation { + pname = "gprbuild"; + + # See ./boot.nix for an explanation of the gprbuild setupHook, + # our custom knowledge base entry and the situation wrt a + # (future) gprbuild wrapper. + inherit (gprbuild-boot) + version + src + setupHooks + meta + ; + + nativeBuildInputs = [ + gnat + gprbuild-boot + which + ]; + + propagatedBuildInputs = [ + xmlada + ]; + + makeFlags = [ + "ENABLE_SHARED=${if stdenv.hostPlatform.isStatic then "no" else "yes"}" + "PROCESSORS=$(NIX_BUILD_CORES)" + # confusingly, for gprbuild --target is autoconf --host + "TARGET=${stdenv.hostPlatform.config}" + "prefix=${placeholder "out"}" + ] ++ lib.optionals (!stdenv.hostPlatform.isStatic) [ + "LIBRARY_TYPE=relocatable" + ]; + + # Fixes gprbuild being linked statically always. Based on the AUR's patch: + # https://aur.archlinux.org/cgit/aur.git/plain/0001-Makefile-build-relocatable-instead-of-static-binary.patch?h=gprbuild&id=bac524c76cd59c68fb91ef4dfcbe427357b9f850 + patches = lib.optionals (!stdenv.hostPlatform.isStatic) [ + ./gprbuild-relocatable-build.patch + ]; + + buildFlags = [ "all" "libgpr.build" ]; + + installFlags = [ "all" "libgpr.install" ]; + + # link gprconfig_kb db from gprbuild-boot into build dir, + # the install process copies its contents to $out + preInstall = '' + ln -sf ${gprbuild-boot}/share/gprconfig share/gprconfig + ''; + + # no need for the install script + postInstall = '' + rm $out/doinstall + ''; +} diff --git a/pkgs/development/ada-modules/gprbuild/gpr-project-darwin-rpath-hook.sh b/pkgs/development/ada-modules/gprbuild/gpr-project-darwin-rpath-hook.sh new file mode 100644 index 000000000000..73be2eb5960a --- /dev/null +++ b/pkgs/development/ada-modules/gprbuild/gpr-project-darwin-rpath-hook.sh @@ -0,0 +1,10 @@ +fixGprProjectDarwinRpath() { + for f in $(find $out -type f -executable); do + install_name_tool -id $f $f || true + for rpath in $(otool -L $f | grep @rpath | awk '{print $1}'); do + install_name_tool -change $rpath ${!outputLib}/lib/$(basename $rpath) $f || true + done + done +} + +preFixupPhases+=" fixGprProjectDarwinRpath" diff --git a/pkgs/development/ada-modules/gprbuild/gpr-project-path-hook.sh b/pkgs/development/ada-modules/gprbuild/gpr-project-path-hook.sh new file mode 100644 index 000000000000..f98b2ab9e58d --- /dev/null +++ b/pkgs/development/ada-modules/gprbuild/gpr-project-path-hook.sh @@ -0,0 +1,8 @@ +addAdaObjectsPath() { + local role_post + getHostRoleEnvHook + + addToSearchPath "GPR_PROJECT_PATH${role_post}" "$1/share/gpr" +} + +addEnvHooks "$targetOffset" addAdaObjectsPath diff --git a/pkgs/development/ada-modules/gprbuild/gprbuild-relocatable-build.patch b/pkgs/development/ada-modules/gprbuild/gprbuild-relocatable-build.patch new file mode 100644 index 000000000000..f49478f6e38c --- /dev/null +++ b/pkgs/development/ada-modules/gprbuild/gprbuild-relocatable-build.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index 8c542078..e91cef5e 100644 +--- a/Makefile ++++ b/Makefile +@@ -82,7 +82,7 @@ LIB_INSTALLER=gprinstall -p -f --target=$(TARGET) $(RBD) "--prefix=${prefix}" + CLEANER=gprclean -q $(RBD) + + GPRBUILD_BUILDER=$(BUILDER) $(GPRBUILD_GPR) \ +- -XLIBRARY_TYPE=static -XXMLADA_BUILD=static ++ -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable + LIBGPR_BUILDER=$(BUILDER) $(GPR_GPR) $(LIBGPR_OS) + LIBGPR_INSTALLER=$(LIB_INSTALLER) $(GPR_GPR) $(LIBGPR_OS) -XBUILD=${BUILD} \ + --install-name=gpr \ diff --git a/pkgs/development/ada-modules/gprbuild/nixpkgs-gnat.xml b/pkgs/development/ada-modules/gprbuild/nixpkgs-gnat.xml new file mode 100644 index 000000000000..ead88dc365c1 --- /dev/null +++ b/pkgs/development/ada-modules/gprbuild/nixpkgs-gnat.xml @@ -0,0 +1,56 @@ + + + + + + GNAT + (.*-.*-.*)?gnatmake + + ${PREFIX}gnatmake -v + + + Ada + + ${PREFIX}gcc -v + + + + + readlink -n ${PATH}/../nix-support/gprconfig-gnat-unwrapped + + + $gnat_unwrapped/lib/gcc(-lib)?/$TARGET/$gcc_version/adalib/ + $gnat_unwrapped/lib/gcc(-lib)?/$TARGET/$gcc_version/ada_object_path + $gnat_unwrapped/lib/gcc(-lib)?/$TARGET/$gcc_version/rts-(.*)/adalib/ + $gnat_unwrapped/$TARGET/lib/gnat/(.*)/adalib/ + + + ${PREFIX}gcc -dumpmachine + + + + diff --git a/pkgs/development/ada-modules/xmlada/default.nix b/pkgs/development/ada-modules/xmlada/default.nix new file mode 100644 index 000000000000..77e8094277a7 --- /dev/null +++ b/pkgs/development/ada-modules/xmlada/default.nix @@ -0,0 +1,35 @@ +{ stdenv +, lib +, fetchFromGitHub +, gnat +# use gprbuild-boot since gprbuild proper depends +# on this xmlada derivation. +, gprbuild-boot +}: + +stdenv.mkDerivation rec { + pname = "xmlada"; + version = "24.0.0"; + + src = fetchFromGitHub { + name = "xmlada-${version}-src"; + owner = "AdaCore"; + repo = "xmlada"; + rev = "v${version}"; + sha256 = "sha256-vvM7bdf3dAa3zKgxbGeAGlBT6fvafzmleimJHyRdlvc="; + }; + + nativeBuildInputs = [ + gnat + gprbuild-boot + ]; + + meta = with lib; { + description = "XML/Ada: An XML parser for Ada"; + homepage = "https://github.com/AdaCore/xmlada"; + maintainers = [ maintainers.sternenseemann ]; + license = licenses.gpl3Plus; + platforms = platforms.all; + }; +} + 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; - }; -} diff --git a/pkgs/development/libraries/ada/gnatprove/default.nix b/pkgs/development/libraries/ada/gnatprove/default.nix deleted file mode 100644 index 884406d3342e..000000000000 --- a/pkgs/development/libraries/ada/gnatprove/default.nix +++ /dev/null @@ -1,96 +0,0 @@ -{ stdenv -, lib -, fetchFromGitHub -, gnat -, gnatcoll-core -, gprbuild -, python3 -, ocamlPackages -, makeWrapper -}: -let - gnat_version = lib.versions.major gnat.version; - - fetchSpark2014 = { rev, sha256 } : fetchFromGitHub { - owner = "AdaCore"; - repo = "spark2014"; - fetchSubmodules = true; - inherit rev sha256; - }; - - spark2014 = { - "12" = { - src = fetchSpark2014 { - rev = "ab34e07080a769b63beacc141707b5885c49d375"; # branch fsf-12 - sha256 = "sha256-7pe3eWitpxmqzjW6qEIEuN0qr2IR+kJ7Ssc9pTBcCD8="; - }; - commit_date = "2022-05-25"; - }; - "13" = { - src = fetchSpark2014 { - rev = "12db22e854defa9d1c993ef904af1e72330a68ca"; # branch fsf-13 - sha256 = "sha256-mZWP9yF1O4knCiXx8CqolnS+93bM+hTQy40cd0HZmwI="; - }; - commit_date = "2023-01-05"; - }; - }; - - thisSpark = spark2014.${gnat_version} or - (builtins.throw "GNATprove depend on a specific GNAT version and can't be built using GNAT ${gnat_version}."); - -in -stdenv.mkDerivation rec { - pname = "gnatprove"; - version = "fsf-${gnat_version}_${thisSpark.commit_date}"; - - src = thisSpark.src; - - nativeBuildInputs = [ - gnat - gprbuild - python3 - ocamlPackages.ocaml - makeWrapper - ]; - - buildInputs = [ - gnatcoll-core - ocamlPackages.camlzip - ocamlPackages.findlib - ocamlPackages.menhir - ocamlPackages.menhirLib - ocamlPackages.num - ocamlPackages.yojson - ocamlPackages.zarith - ]; - - propagatedBuildInputs = [ - gprbuild - ]; - - postPatch = '' - # gnat2why/gnat_src points to the GNAT sources - tar xf ${gnat.cc.src} gcc-${gnat.cc.version}/gcc/ada - mv gcc-${gnat.cc.version}/gcc/ada gnat2why/gnat_src - ''; - - configurePhase = '' - make setup - ''; - - installPhase = '' - make install-all - cp -a ./install/. $out - mkdir $out/share/gpr - ln -s $out/lib/gnat/* $out/share/gpr/ - ''; - - meta = with lib; { - description = "a software development technology specifically designed for engineering high-reliability applications"; - homepage = "https://github.com/AdaCore/spark2014"; - maintainers = [ maintainers.jiegec ]; - license = licenses.gpl3; - platforms = platforms.all; - }; -} - diff --git a/pkgs/development/libraries/ada/xmlada/default.nix b/pkgs/development/libraries/ada/xmlada/default.nix deleted file mode 100644 index 77e8094277a7..000000000000 --- a/pkgs/development/libraries/ada/xmlada/default.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ stdenv -, lib -, fetchFromGitHub -, gnat -# use gprbuild-boot since gprbuild proper depends -# on this xmlada derivation. -, gprbuild-boot -}: - -stdenv.mkDerivation rec { - pname = "xmlada"; - version = "24.0.0"; - - src = fetchFromGitHub { - name = "xmlada-${version}-src"; - owner = "AdaCore"; - repo = "xmlada"; - rev = "v${version}"; - sha256 = "sha256-vvM7bdf3dAa3zKgxbGeAGlBT6fvafzmleimJHyRdlvc="; - }; - - nativeBuildInputs = [ - gnat - gprbuild-boot - ]; - - meta = with lib; { - description = "XML/Ada: An XML parser for Ada"; - homepage = "https://github.com/AdaCore/xmlada"; - maintainers = [ maintainers.sternenseemann ]; - license = licenses.gpl3Plus; - platforms = platforms.all; - }; -} - diff --git a/pkgs/development/tools/build-managers/gprbuild/boot.nix b/pkgs/development/tools/build-managers/gprbuild/boot.nix deleted file mode 100644 index 4207b3649594..000000000000 --- a/pkgs/development/tools/build-managers/gprbuild/boot.nix +++ /dev/null @@ -1,97 +0,0 @@ -{ stdenv -, lib -, fetchFromGitHub -, gnat -, which -, xmlada # for src -}: - -let - version = "24.0.0"; - - gprConfigKbSrc = fetchFromGitHub { - name = "gprconfig-kb-${version}-src"; - owner = "AdaCore"; - repo = "gprconfig_kb"; - rev = "v${version}"; - sha256 = "1vnjv2q63l8nq2w4wya75m40isvs78j5ss9b5ga3zx3cpdx3xh09"; - }; -in - -stdenv.mkDerivation { - pname = "gprbuild-boot"; - inherit version; - - src = fetchFromGitHub { - name = "gprbuild-${version}"; - owner = "AdaCore"; - repo = "gprbuild"; - rev = "v${version}"; - sha256 = "096a43453z2xknn6x4hyk2ldp2wh0qhfdfmzsrks50zqcvmkq4v7"; - }; - - nativeBuildInputs = [ - gnat - which - ]; - - postPatch = '' - # The Makefile uses gprbuild to build gprbuild which - # we can't do at this point, delete it to prevent the - # default phases from failing. - rm Makefile - - # make sure bootstrap script runs - patchShebangs --build bootstrap.sh - ''; - - # This setupHook populates GPR_PROJECT_PATH which is used by - # gprbuild to find dependencies. It works quite similar to - # the pkg-config setupHook in the sense that it also splits - # dependencies into GPR_PROJECT_PATH and GPR_PROJECT_PATH_FOR_BUILD, - # but gprbuild itself doesn't support this, so we'll need to - # introducing a wrapper for it in the future remains TODO. - # For the moment this doesn't matter since we have no situation - # were gprbuild is used to build something used at build time. - setupHooks = [ - ./gpr-project-path-hook.sh - ] ++ lib.optionals stdenv.targetPlatform.isDarwin [ - # This setupHook replaces the paths of shared libraries starting - # with @rpath with the absolute paths on Darwin, so that the - # binaries can be run without additional setup. - ./gpr-project-darwin-rpath-hook.sh - ]; - - installPhase = '' - runHook preInstall - - ./bootstrap.sh \ - --with-xmlada=${xmlada.src} \ - --with-kb=${gprConfigKbSrc} \ - --prefix=$out - - # Install custom compiler description which can detect nixpkgs' - # GNAT wrapper as a proper Ada compiler. The default compiler - # description expects the runtime library to be installed in - # the same prefix which isn't the case for nixpkgs. As a - # result, it would detect the unwrapped GNAT as a proper - # compiler which is unable to produce working binaries. - # - # Our compiler description is very similar to the upstream - # GNAT description except that we use a symlink in $out/nix-support - # created by the cc-wrapper to find the associated runtime - # libraries and use gnatmake instead of gnatls to find GNAT's - # bin directory. - install -m644 ${./nixpkgs-gnat.xml} $out/share/gprconfig/nixpkgs-gnat.xml - - runHook postInstall - ''; - - meta = with lib; { - description = "Multi-language extensible build tool"; - homepage = "https://github.com/AdaCore/gprbuild"; - license = licenses.gpl3Plus; - maintainers = [ maintainers.sternenseemann ]; - platforms = platforms.all; - }; -} diff --git a/pkgs/development/tools/build-managers/gprbuild/default.nix b/pkgs/development/tools/build-managers/gprbuild/default.nix deleted file mode 100644 index aad115701263..000000000000 --- a/pkgs/development/tools/build-managers/gprbuild/default.nix +++ /dev/null @@ -1,64 +0,0 @@ -{ lib -, stdenv -, fetchFromGitHub -, fetchpatch -, gprbuild-boot -, which -, gnat -, xmlada -}: - -stdenv.mkDerivation { - pname = "gprbuild"; - - # See ./boot.nix for an explanation of the gprbuild setupHook, - # our custom knowledge base entry and the situation wrt a - # (future) gprbuild wrapper. - inherit (gprbuild-boot) - version - src - setupHooks - meta - ; - - nativeBuildInputs = [ - gnat - gprbuild-boot - which - ]; - - propagatedBuildInputs = [ - xmlada - ]; - - makeFlags = [ - "ENABLE_SHARED=${if stdenv.hostPlatform.isStatic then "no" else "yes"}" - "PROCESSORS=$(NIX_BUILD_CORES)" - # confusingly, for gprbuild --target is autoconf --host - "TARGET=${stdenv.hostPlatform.config}" - "prefix=${placeholder "out"}" - ] ++ lib.optionals (!stdenv.hostPlatform.isStatic) [ - "LIBRARY_TYPE=relocatable" - ]; - - # Fixes gprbuild being linked statically always. Based on the AUR's patch: - # https://aur.archlinux.org/cgit/aur.git/plain/0001-Makefile-build-relocatable-instead-of-static-binary.patch?h=gprbuild&id=bac524c76cd59c68fb91ef4dfcbe427357b9f850 - patches = lib.optionals (!stdenv.hostPlatform.isStatic) [ - ./gprbuild-relocatable-build.patch - ]; - - buildFlags = [ "all" "libgpr.build" ]; - - installFlags = [ "all" "libgpr.install" ]; - - # link gprconfig_kb db from gprbuild-boot into build dir, - # the install process copies its contents to $out - preInstall = '' - ln -sf ${gprbuild-boot}/share/gprconfig share/gprconfig - ''; - - # no need for the install script - postInstall = '' - rm $out/doinstall - ''; -} diff --git a/pkgs/development/tools/build-managers/gprbuild/gpr-project-darwin-rpath-hook.sh b/pkgs/development/tools/build-managers/gprbuild/gpr-project-darwin-rpath-hook.sh deleted file mode 100644 index 73be2eb5960a..000000000000 --- a/pkgs/development/tools/build-managers/gprbuild/gpr-project-darwin-rpath-hook.sh +++ /dev/null @@ -1,10 +0,0 @@ -fixGprProjectDarwinRpath() { - for f in $(find $out -type f -executable); do - install_name_tool -id $f $f || true - for rpath in $(otool -L $f | grep @rpath | awk '{print $1}'); do - install_name_tool -change $rpath ${!outputLib}/lib/$(basename $rpath) $f || true - done - done -} - -preFixupPhases+=" fixGprProjectDarwinRpath" diff --git a/pkgs/development/tools/build-managers/gprbuild/gpr-project-path-hook.sh b/pkgs/development/tools/build-managers/gprbuild/gpr-project-path-hook.sh deleted file mode 100644 index f98b2ab9e58d..000000000000 --- a/pkgs/development/tools/build-managers/gprbuild/gpr-project-path-hook.sh +++ /dev/null @@ -1,8 +0,0 @@ -addAdaObjectsPath() { - local role_post - getHostRoleEnvHook - - addToSearchPath "GPR_PROJECT_PATH${role_post}" "$1/share/gpr" -} - -addEnvHooks "$targetOffset" addAdaObjectsPath diff --git a/pkgs/development/tools/build-managers/gprbuild/gprbuild-relocatable-build.patch b/pkgs/development/tools/build-managers/gprbuild/gprbuild-relocatable-build.patch deleted file mode 100644 index f49478f6e38c..000000000000 --- a/pkgs/development/tools/build-managers/gprbuild/gprbuild-relocatable-build.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/Makefile b/Makefile -index 8c542078..e91cef5e 100644 ---- a/Makefile -+++ b/Makefile -@@ -82,7 +82,7 @@ LIB_INSTALLER=gprinstall -p -f --target=$(TARGET) $(RBD) "--prefix=${prefix}" - CLEANER=gprclean -q $(RBD) - - GPRBUILD_BUILDER=$(BUILDER) $(GPRBUILD_GPR) \ -- -XLIBRARY_TYPE=static -XXMLADA_BUILD=static -+ -XLIBRARY_TYPE=relocatable -XXMLADA_BUILD=relocatable - LIBGPR_BUILDER=$(BUILDER) $(GPR_GPR) $(LIBGPR_OS) - LIBGPR_INSTALLER=$(LIB_INSTALLER) $(GPR_GPR) $(LIBGPR_OS) -XBUILD=${BUILD} \ - --install-name=gpr \ diff --git a/pkgs/development/tools/build-managers/gprbuild/nixpkgs-gnat.xml b/pkgs/development/tools/build-managers/gprbuild/nixpkgs-gnat.xml deleted file mode 100644 index ead88dc365c1..000000000000 --- a/pkgs/development/tools/build-managers/gprbuild/nixpkgs-gnat.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - GNAT - (.*-.*-.*)?gnatmake - - ${PREFIX}gnatmake -v - - - Ada - - ${PREFIX}gcc -v - - - - - readlink -n ${PATH}/../nix-support/gprconfig-gnat-unwrapped - - - $gnat_unwrapped/lib/gcc(-lib)?/$TARGET/$gcc_version/adalib/ - $gnat_unwrapped/lib/gcc(-lib)?/$TARGET/$gcc_version/ada_object_path - $gnat_unwrapped/lib/gcc(-lib)?/$TARGET/$gcc_version/rts-(.*)/adalib/ - $gnat_unwrapped/$TARGET/lib/gnat/(.*)/adalib/ - - - ${PREFIX}gcc -dumpmachine - - - - diff --git a/pkgs/top-level/ada-packages.nix b/pkgs/top-level/ada-packages.nix new file mode 100644 index 000000000000..2d3d0c4dc3fa --- /dev/null +++ b/pkgs/top-level/ada-packages.nix @@ -0,0 +1,45 @@ +{ lib +, pkgs +, makeScopeWithSplicing' +, generateSplicesForMkScope +, gnat +}: +let + gnat_version = lib.versions.major gnat.version; +in +makeScopeWithSplicing' { + otherSplices = generateSplicesForMkScope ("gnat" + gnat_version + "Packages"); + f = (self: { + inherit gnat; + + gprbuild-boot = self.callPackage ../development/ada-modules/gprbuild/boot.nix { }; + gprbuild = self.callPackage ../development/ada-modules/gprbuild { }; + + xmlada = self.callPackage ../development/ada-modules/xmlada { }; + + gnatprove = self.callPackage ../development/ada-modules/gnatprove { + ocamlPackages = pkgs.ocaml-ng.ocamlPackages_4_14; + }; + + gnatcoll-core = self.callPackage ../development/ada-modules/gnatcoll/core.nix { }; + + # gnatcoll-bindings repository + gnatcoll-gmp = self.callPackage ../development/ada-modules/gnatcoll/bindings.nix { component = "gmp"; }; + gnatcoll-iconv = self.callPackage ../development/ada-modules/gnatcoll/bindings.nix { component = "iconv"; }; + gnatcoll-lzma = self.callPackage ../development/ada-modules/gnatcoll/bindings.nix { component = "lzma"; }; + gnatcoll-omp = self.callPackage ../development/ada-modules/gnatcoll/bindings.nix { component = "omp"; }; + gnatcoll-python3 = self.callPackage ../development/ada-modules/gnatcoll/bindings.nix { component = "python3"; python3 = pkgs.python39; }; + gnatcoll-readline = self.callPackage ../development/ada-modules/gnatcoll/bindings.nix { component = "readline"; }; + gnatcoll-syslog = self.callPackage ../development/ada-modules/gnatcoll/bindings.nix { component = "syslog"; }; + gnatcoll-zlib = self.callPackage ../development/ada-modules/gnatcoll/bindings.nix { component = "zlib"; }; + + # gnatcoll-db repository + gnatcoll-postgres = self.callPackage ../development/ada-modules/gnatcoll/db.nix { component = "postgres"; }; + gnatcoll-sql = self.callPackage ../development/ada-modules/gnatcoll/db.nix { component = "sql"; }; + gnatcoll-sqlite = self.callPackage ../development/ada-modules/gnatcoll/db.nix { component = "sqlite"; }; + gnatcoll-xref = self.callPackage ../development/ada-modules/gnatcoll/db.nix { component = "xref"; }; + gnatcoll-db2ada = self.callPackage ../development/ada-modules/gnatcoll/db.nix { component = "gnatcoll_db2ada"; }; + gnatinspect = self.callPackage ../development/ada-modules/gnatcoll/db.nix { component = "gnatinspect"; }; + }); +} + diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 445659c7e560..67933403e2f5 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -349,6 +349,21 @@ mapAliases ({ gnatboot11 = gnat-bootstrap11; gnatboot12 = gnat-bootstrap12; gnatboot = gnat-bootstrap; + gnatcoll-core = gnatPackages.gnatcoll-core; # Added 2024-02-25 + gnatcoll-gmp = gnatPackages.gnatcoll-gmp; # Added 2024-02-25 + gnatcoll-iconv = gnatPackages.gnatcoll-iconv; # Added 2024-02-25 + gnatcoll-lzma = gnatPackages.gnatcoll-lzma; # Added 2024-02-25 + gnatcoll-omp = gnatPackages.gnatcoll-omp; # Added 2024-02-25 + gnatcoll-python3 = gnatPackages.gnatcoll-python3; # Added 2024-02-25 + gnatcoll-readline = gnatPackages.gnatcoll-readline; # Added 2024-02-25 + gnatcoll-syslog = gnatPackages.gnatcoll-syslog; # Added 2024-02-25 + gnatcoll-zlib = gnatPackages.gnatcoll-zlib; # Added 2024-02-25 + gnatcoll-postgres = gnatPackages.gnatcoll-postgres; # Added 2024-02-25 + gnatcoll-sql = gnatPackages.gnatcoll-sql; # Added 2024-02-25 + gnatcoll-sqlite = gnatPackages.gnatcoll-sqlite; # Added 2024-02-25 + gnatcoll-xref = gnatPackages.gnatcoll-xref; # Added 2024-02-25 + gnatcoll-db2ada = gnatPackages.gnatcoll-db2ada; # Added 2024-02-25 + gnatinspect = gnatPackages.gnatinspect; # Added 2024-02-25 gnome-firmware-updater = gnome-firmware; # added 2022-04-14 gnome-passwordsafe = gnome-secrets; # added 2022-01-30 gnome-mpv = throw "'gnome-mpv' has been renamed to/replaced by 'celluloid'"; # Converted to throw 2023-09-10 @@ -393,7 +408,7 @@ mapAliases ({ gocode = throw "'gocode' has been removed as the upstream project was archived. 'gopls' is suggested as replacement"; # Added 2023-12-26 govendor = throw "'govendor' has been removed as it is no longer maintained upstream, please use Go modules instead"; # Added 2023-12-26 gometer = throw "gometer has been removed from nixpkgs because goLance stopped offering Linux support"; # Added 2023-02-10 - + gprbuild-boot = gnatPackages.gprbuild-boot; # Added 2024-02-25; graalvm11-ce = throw "graalvm11-ce has been removed because upstream dropped support to different JDK versions for each GraalVM release. Please use graalvm-ce instead"; # Added 2023-09-26 graalvm17-ce = throw "graalvm17-ce has been removed because upstream dropped support to different JDK versions for each GraalVM release. Please use graalvm-ce instead"; # Added 2023-09-26 graalvm19-ce = throw "graalvm19-ce has been removed because upstream dropped support to different JDK versions for each GraalVM release. Please use graalvm-ce instead"; # Added 2023-09-26 @@ -1174,6 +1189,7 @@ mapAliases ({ xdg_utils = xdg-utils; # Added 2021-02-01 xineLib = xine-lib; # Added 2021-04-27 xineUI = xine-ui; # Added 2021-04-27 + xmlada = gnatPackages.xmlada; # Added 2024-02-25 xonsh-unwrapped = throw "'xonsh-unwrapped' was incorporated into xonsh code; call xonsh directly instead."; # Added 2024-01-20 xtrt = throw "xtrt has been removed due to being abandoned"; # Added 2023-05-25 xulrunner = firefox-unwrapped; # Added 2023-11-03 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 05c3088fa5db..531f29a4ac0d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16075,9 +16075,10 @@ with pkgs; bintools = bintoolsDualAs; }); - gnatprove = callPackage ../development/libraries/ada/gnatprove { - ocamlPackages = ocaml-ng.ocamlPackages_4_14; - }; + gnatPackages = recurseIntoAttrs (callPackage ./ada-packages.nix { gnat = buildPackages.gnat; }); + inherit (gnatPackages) + gprbuild + gnatprove; gnu-smalltalk = callPackage ../development/compilers/gnu-smalltalk { }; @@ -19117,14 +19118,6 @@ with pkgs; global = callPackage ../development/tools/misc/global { }; - gnatcoll-db2ada = callPackage ../development/libraries/ada/gnatcoll/db.nix { - component = "gnatcoll_db2ada"; - }; - - gnatinspect = callPackage ../development/libraries/ada/gnatcoll/db.nix { - component = "gnatinspect"; - }; - gnome-doc-utils = callPackage ../development/tools/documentation/gnome-doc-utils { }; gnome-desktop-testing = callPackage ../development/tools/gnome-desktop-testing { }; @@ -19169,10 +19162,6 @@ with pkgs; gotty = callPackage ../servers/gotty { }; - gprbuild-boot = callPackage ../development/tools/build-managers/gprbuild/boot.nix { }; - - gprbuild = callPackage ../development/tools/build-managers/gprbuild { }; - gputils = callPackage ../development/embedded/gputils { }; gpuvis = callPackage ../development/tools/misc/gpuvis { }; @@ -21578,27 +21567,6 @@ with pkgs; gl3w = callPackage ../development/libraries/gl3w { }; - gnatcoll-core = callPackage ../development/libraries/ada/gnatcoll/core.nix { }; - - # gnatcoll-bindings repository - gnatcoll-gmp = callPackage ../development/libraries/ada/gnatcoll/bindings.nix { component = "gmp"; }; - gnatcoll-iconv = callPackage ../development/libraries/ada/gnatcoll/bindings.nix { component = "iconv"; }; - gnatcoll-lzma = callPackage ../development/libraries/ada/gnatcoll/bindings.nix { component = "lzma"; }; - gnatcoll-omp = callPackage ../development/libraries/ada/gnatcoll/bindings.nix { component = "omp"; }; - gnatcoll-python3 = callPackage ../development/libraries/ada/gnatcoll/bindings.nix { - component = "python3"; - python3 = python39; - }; - gnatcoll-readline = callPackage ../development/libraries/ada/gnatcoll/bindings.nix { component = "readline"; }; - gnatcoll-syslog = callPackage ../development/libraries/ada/gnatcoll/bindings.nix { component = "syslog"; }; - gnatcoll-zlib = callPackage ../development/libraries/ada/gnatcoll/bindings.nix { component = "zlib"; }; - - # gnatcoll-db repository - gnatcoll-postgres = callPackage ../development/libraries/ada/gnatcoll/db.nix { component = "postgres"; }; - gnatcoll-sql = callPackage ../development/libraries/ada/gnatcoll/db.nix { component = "sql"; }; - gnatcoll-sqlite = callPackage ../development/libraries/ada/gnatcoll/db.nix { component = "sqlite"; }; - gnatcoll-xref = callPackage ../development/libraries/ada/gnatcoll/db.nix { component = "xref"; }; - gns3Packages = dontRecurseIntoAttrs (callPackage ../applications/networking/gns3 { }); gns3-gui = gns3Packages.guiStable; gns3-server = gns3Packages.serverStable; @@ -25494,8 +25462,6 @@ with pkgs; xmake-core-sv = callPackage ../development/libraries/xmake-core-sv { }; - xmlada = callPackage ../development/libraries/ada/xmlada { }; - xmlrpc_c = callPackage ../development/libraries/xmlrpc-c { }; xmlsec = callPackage ../development/libraries/xmlsec { }; -- cgit 1.4.1