gnat16Packages.gprbuild{,-boot}: fix build
https://github.com/AdaCore/gprbuild/commit/6421e350274b3018a26bd058b1c90d033b053f71 https://github.com/AdaCore/gprbuild/commit/6b6be939d69d534beb7faca17664d7a1ffa9c81e Hydra: https://hydra.nixos.org/build/329281640
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
fetchpatch2,
|
||||
gnat,
|
||||
which,
|
||||
xmlada, # for src
|
||||
@@ -36,6 +37,20 @@ stdenv.mkDerivation {
|
||||
which
|
||||
];
|
||||
|
||||
# Fix compilation with GNAT 16
|
||||
patches = lib.optionals (lib.versionAtLeast gnat.version "16") [
|
||||
# gpr-compilation-process.adb:44:29: error: operator for type "String" is not declared in "Env_Maps"
|
||||
(fetchpatch2 {
|
||||
url = "https://github.com/AdaCore/gprbuild/commit/6421e350274b3018a26bd058b1c90d033b053f71.patch?full_index=1";
|
||||
hash = "sha256-u9bmr8abmthlyHoeqW5nS2CnaxXmbx6WVwhemxVtw+0=";
|
||||
})
|
||||
# gpr-compilation-protocol.adb:981:13: error: "time_t" is undefined
|
||||
(fetchpatch2 {
|
||||
url = "https://github.com/AdaCore/gprbuild/commit/6b6be939d69d534beb7faca17664d7a1ffa9c81e.patch?full_index=1";
|
||||
hash = "sha256-YUjBvA4bBsrCB46o5WVHOZR6qOf2bkMg+A9qlystDbc=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# The Makefile uses gprbuild to build gprbuild which
|
||||
# we can't do at this point, delete it to prevent the
|
||||
|
||||
@@ -47,11 +47,13 @@ stdenv.mkDerivation {
|
||||
NIX_LDFLAGS = "-headerpad_max_install_names";
|
||||
};
|
||||
|
||||
# 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
|
||||
];
|
||||
patches =
|
||||
gprbuild-boot.patches
|
||||
# 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
|
||||
++ lib.optionals (!stdenv.hostPlatform.isStatic) [
|
||||
./gprbuild-relocatable-build.patch
|
||||
];
|
||||
|
||||
buildFlags = [
|
||||
"all"
|
||||
|
||||
Reference in New Issue
Block a user