mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-30 00:34:00 +00:00
Merge #245935: staging-next 2023-07-28
This commit is contained in:
commit
41c7605718
@ -1190,11 +1190,12 @@ following are specific to `buildPythonPackage`:
|
||||
variables which will be available when the binary is run. For example,
|
||||
`makeWrapperArgs = ["--set FOO BAR" "--set BAZ QUX"]`.
|
||||
* `namePrefix`: Prepends text to `${name}` parameter. In case of libraries, this
|
||||
defaults to `"python3.8-"` for Python 3.8, etc., and in case of applications
|
||||
to `""`.
|
||||
defaults to `"python3.8-"` for Python 3.8, etc., and in case of applications to `""`.
|
||||
* `pipInstallFlags ? []`: A list of strings. Arguments to be passed to `pip
|
||||
install`. To pass options to `python setup.py install`, use
|
||||
`--install-option`. E.g., `pipInstallFlags=["--install-option='--cpp_implementation'"]`.
|
||||
* `pipBuildFlags ? []`: A list of strings. Arguments to be passed to `pip wheel`.
|
||||
* `pypaBuildFlags ? []`: A list of strings. Arguments to be passed to `python -m build --wheel`.
|
||||
* `pythonPath ? []`: List of packages to be added into `$PYTHONPATH`. Packages
|
||||
in `pythonPath` are not propagated (contrary to `propagatedBuildInputs`).
|
||||
* `preShellHook`: Hook to execute commands before `shellHook`.
|
||||
@ -1249,6 +1250,27 @@ with import <nixpkgs> {};
|
||||
in python.withPackages(ps: [ ps.blaze ])).env
|
||||
```
|
||||
|
||||
The next example shows a non trivial overriding of the `blas` implementation to
|
||||
be used through out all of the Python package set:
|
||||
|
||||
```nix
|
||||
python3MyBlas = pkgs.python3.override {
|
||||
packageOverrides = self: super: {
|
||||
# We need toPythonModule for the package set to evaluate this
|
||||
blas = super.toPythonModule(super.pkgs.blas.override {
|
||||
blasProvider = super.pkgs.mkl;
|
||||
});
|
||||
lapack = super.toPythonModule(super.pkgs.lapack.override {
|
||||
lapackProvider = super.pkgs.mkl;
|
||||
});
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
This is particularly useful for numpy and scipy users who want to gain speed with other blas implementations.
|
||||
Note that using simply `scipy = super.scipy.override { blas = super.pkgs.mkl; };` will likely result in
|
||||
compilation issues, because scipy dependencies need to use the same blas implementation as well.
|
||||
|
||||
#### Optional extra dependencies {#python-optional-dependencies}
|
||||
|
||||
Some packages define optional dependencies for additional features. With
|
||||
@ -1468,6 +1490,10 @@ are used in `buildPythonPackage`.
|
||||
- `flitBuildHook` to build a wheel using `flit`.
|
||||
- `pipBuildHook` to build a wheel using `pip` and PEP 517. Note a build system
|
||||
(e.g. `setuptools` or `flit`) should still be added as `nativeBuildInput`.
|
||||
- `pypaBuildHook` to build a wheel using
|
||||
[`pypa/build`](https://pypa-build.readthedocs.io/en/latest/index.html) and
|
||||
PEP 517/518. Note a build system (e.g. `setuptools` or `flit`) should still
|
||||
be added as `nativeBuildInput`.
|
||||
- `pipInstallHook` to install wheels.
|
||||
- `pytestCheckHook` to run tests with `pytest`. See [example usage](#using-pytestcheckhook).
|
||||
- `pythonCatchConflictsHook` to check whether a Python package is not already existing.
|
||||
|
@ -26,10 +26,10 @@ buildPythonApplication {
|
||||
|
||||
nativeBuildInputs = [
|
||||
wrapGAppsHook
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gobject-introspection
|
||||
gtk3
|
||||
libappindicator
|
||||
libpulseaudio
|
||||
|
@ -1,16 +1,16 @@
|
||||
{ lib
|
||||
, python3
|
||||
, fetchPypi
|
||||
, python3
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonPackage rec {
|
||||
pname = "ledfx";
|
||||
version = "2.0.67";
|
||||
version = "2.0.69";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-lFxAMjglQZXCySr83PtvStU6hw2ucQu+rSjIHo1yZBk=";
|
||||
hash = "sha256-gkO6XYiPMkU/zRLvc0yd3jJXVcAgAkR1W1ELTSN461o=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
@ -52,7 +52,7 @@ python3.pkgs.buildPythonPackage rec {
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "LedFx is a network based LED effect controller with support for advanced real-time audio effects";
|
||||
description = "Network based LED effect controller with support for advanced real-time audio effects";
|
||||
homepage = "https://github.com/LedFx/LedFx";
|
||||
changelog = "https://github.com/LedFx/LedFx/blob/${version}/CHANGELOG.rst";
|
||||
license = licenses.gpl3Only;
|
||||
|
@ -34,9 +34,9 @@ python3Packages.buildPythonApplication rec {
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [ toml pygobject3 ];
|
||||
|
||||
nativeBuildInputs = [ wrapGAppsHook ];
|
||||
nativeBuildInputs = [ wrapGAppsHook gobject-introspection ];
|
||||
|
||||
buildInputs = [ gtk3 gobject-introspection sox ];
|
||||
buildInputs = [ gtk3 sox ];
|
||||
|
||||
dontWrapGApps = true;
|
||||
makeWrapperArgs = [
|
||||
|
@ -52,6 +52,7 @@ stdenv.mkDerivation rec {
|
||||
itstool
|
||||
wrapGAppsHook
|
||||
desktop-file-utils
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@ -72,7 +73,6 @@ stdenv.mkDerivation rec {
|
||||
brasero
|
||||
grilo
|
||||
|
||||
gobject-introspection
|
||||
python3.pkgs.pygobject3
|
||||
|
||||
gst_all_1.gstreamer
|
||||
|
@ -17,7 +17,6 @@ python3Packages.buildPythonApplication rec {
|
||||
buildInputs = [
|
||||
gtk3
|
||||
fdk-aac-encoder
|
||||
gobject-introspection
|
||||
gst_all_1.gst-libav
|
||||
gst_all_1.gst-plugins-base
|
||||
gst_all_1.gst-plugins-good
|
||||
@ -28,6 +27,7 @@ python3Packages.buildPythonApplication rec {
|
||||
nativeBuildInputs = [
|
||||
intltool
|
||||
wrapGAppsHook
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -70,11 +70,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
python3Packages.wrapPython
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
flac
|
||||
gobject-introspection
|
||||
gtk3
|
||||
libappindicator
|
||||
libnotify
|
||||
|
@ -24,9 +24,9 @@ in stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ meson ninja pkg-config desktop-file-utils
|
||||
appstream-glib wrapGAppsHook sassc ];
|
||||
appstream-glib wrapGAppsHook sassc gobject-introspection ];
|
||||
|
||||
buildInputs = [ glib pythonEnv gobject-introspection gtk3
|
||||
buildInputs = [ glib pythonEnv gtk3
|
||||
gnome.adwaita-icon-theme webkitgtk gspell texlive
|
||||
glib-networking libhandy ];
|
||||
|
||||
|
@ -23,10 +23,10 @@ let
|
||||
docbook2x
|
||||
docbook-xsl-nons
|
||||
wrapGAppsHook
|
||||
gobject-introspection
|
||||
];
|
||||
buildInputs = [
|
||||
gtk3
|
||||
gobject-introspection
|
||||
vala gtk-doc
|
||||
];
|
||||
});
|
||||
@ -50,10 +50,10 @@ let
|
||||
python3
|
||||
glib
|
||||
wrapGAppsHook
|
||||
gobject-introspection
|
||||
];
|
||||
buildInputs = [
|
||||
gtk3
|
||||
gobject-introspection
|
||||
vala
|
||||
gtk-doc
|
||||
gst_all_1.gstreamer
|
||||
|
@ -1075,9 +1075,8 @@ self: super: {
|
||||
svedbackend = stdenv.mkDerivation {
|
||||
name = "svedbackend-${super.sved.name}";
|
||||
inherit (super.sved) src;
|
||||
nativeBuildInputs = [ wrapGAppsHook ];
|
||||
nativeBuildInputs = [ wrapGAppsHook gobject-introspection ];
|
||||
buildInputs = [
|
||||
gobject-introspection
|
||||
glib
|
||||
(python3.withPackages (ps: with ps; [ pygobject3 pynvim dbus-python ]))
|
||||
];
|
||||
|
@ -49,7 +49,6 @@ python3.pkgs.buildPythonApplication rec {
|
||||
buildInputs = [
|
||||
glib
|
||||
gtk3
|
||||
gobject-introspection
|
||||
libhandy
|
||||
librsvg
|
||||
];
|
||||
|
@ -11,6 +11,11 @@ buildPythonApplication rec {
|
||||
sha256 = "1miabaxd5pwxn0va4drzj1d4ppxvyqsrrd4xw1j6qr52yci0lms8";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace imgp \
|
||||
--replace "Image.ANTIALIAS" "Image.Resampling.LANCZOS"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [ pillow ];
|
||||
|
||||
installFlags = [
|
||||
|
@ -47,7 +47,6 @@ python3.pkgs.buildPythonApplication rec {
|
||||
libadwaita
|
||||
libnotify
|
||||
webkitgtk_6_0
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
|
@ -31,11 +31,11 @@ stdenv.mkDerivation rec {
|
||||
intltool
|
||||
itstool
|
||||
libxml2
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gtk3
|
||||
gobject-introspection
|
||||
goocanvas2
|
||||
gtkspell3
|
||||
isocodes
|
||||
|
@ -26,6 +26,7 @@ mkDerivationWith python3Packages.buildPythonApplication rec {
|
||||
nativeBuildInputs = [
|
||||
file
|
||||
intltool
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
# Package has no generally usable unit tests.
|
||||
@ -37,13 +38,9 @@ mkDerivationWith python3Packages.buildPythonApplication rec {
|
||||
$out/bin/rapid-photo-downloader --detailed-version
|
||||
'';
|
||||
|
||||
# NOTE: Without gobject-introspection in buildInputs and strictDeps = false,
|
||||
# launching fails with:
|
||||
# "Namespace [Notify / GExiv2 / GUdev] not available"
|
||||
buildInputs = [
|
||||
gdk-pixbuf
|
||||
gexiv2
|
||||
gobject-introspection
|
||||
gst_all_1.gst-libav
|
||||
gst_all_1.gst-plugins-base
|
||||
gst_all_1.gst-plugins-good
|
||||
@ -54,6 +51,10 @@ mkDerivationWith python3Packages.buildPythonApplication rec {
|
||||
udisks
|
||||
];
|
||||
|
||||
# NOTE: Check if strictDeps can be renabled
|
||||
# at the time of writing this the dependency easygui fails to build
|
||||
# launching fails with:
|
||||
# "Namespace [Notify / GExiv2 / GUdev] not available"
|
||||
strictDeps = false;
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
|
@ -99,6 +99,7 @@ stdenv.mkDerivation (finalAttrs: rec {
|
||||
pkg-config
|
||||
makeWrapper
|
||||
wrapGAppsHook
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@ -106,7 +107,6 @@ stdenv.mkDerivation (finalAttrs: rec {
|
||||
cairo.dev
|
||||
dblatex
|
||||
gnumake
|
||||
gobject-introspection
|
||||
graphicsmagick
|
||||
gsettings-desktop-schemas
|
||||
gtk3
|
||||
|
@ -38,7 +38,6 @@ python3.pkgs.buildPythonApplication rec {
|
||||
buildInputs = [
|
||||
gtk3
|
||||
atk
|
||||
gobject-introspection
|
||||
libhandy
|
||||
libnotify
|
||||
pango
|
||||
|
@ -59,8 +59,6 @@ buildPythonApplication rec {
|
||||
buildInputs = [
|
||||
atk
|
||||
gdk-pixbuf
|
||||
# Needed to detect namespaces
|
||||
gobject-introspection
|
||||
gst-plugins-good
|
||||
libhandy
|
||||
networkmanager
|
||||
|
@ -32,10 +32,10 @@ stdenv.mkDerivation rec {
|
||||
ninja
|
||||
pkg-config
|
||||
wrapGAppsHook
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gobject-introspection
|
||||
gtk4
|
||||
libadwaita
|
||||
libnotify
|
||||
|
@ -45,7 +45,6 @@ python3.pkgs.buildPythonApplication rec {
|
||||
buildInputs = [
|
||||
gtk4
|
||||
glib
|
||||
gobject-introspection
|
||||
gst_all_1.gstreamer
|
||||
gst_all_1.gst-plugins-base
|
||||
libsoup_3
|
||||
|
@ -103,15 +103,21 @@ in mkDerivation rec {
|
||||
cp src/hidapi/libusb/.libs/*.so* $out/lib
|
||||
cp src/univalue/.libs/*.so* $out/lib
|
||||
|
||||
# [RPATH][patchelf] Avoid forbidden reference error
|
||||
rm -rf $PWD
|
||||
|
||||
# Provide udev rules as documented in https://digitalbitbox.com/start_linux
|
||||
mkdir -p "$out/etc/udev/rules.d"
|
||||
${copyUdevRuleToOutput "51-hid-digitalbox.rules" udevRule51}
|
||||
${copyUdevRuleToOutput "52-hid-digitalbox.rules" udevRule52}
|
||||
'';
|
||||
|
||||
# remove forbidden references to $TMPDIR
|
||||
preFixup = ''
|
||||
for f in "$out"/{bin,lib}/*; do
|
||||
if [ -f "$f" ] && isELF "$f"; then
|
||||
patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$f"
|
||||
fi
|
||||
done
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -12,8 +12,8 @@ in buildPythonApplication rec {
|
||||
version = "5.1.4";
|
||||
pname = "gramps";
|
||||
|
||||
nativeBuildInputs = [ wrapGAppsHook intltool gettext ];
|
||||
buildInputs = [ gtk3 gobject-introspection pango gexiv2 ]
|
||||
nativeBuildInputs = [ wrapGAppsHook intltool gettext gobject-introspection ];
|
||||
buildInputs = [ gtk3 pango gexiv2 ]
|
||||
# Map support
|
||||
++ lib.optionals enableOSM [ osm-gps-map glib-networking ]
|
||||
# Graphviz support
|
||||
|
@ -22,6 +22,7 @@ let
|
||||
inherit version;
|
||||
hash = "sha256-0rUlXHxjSbwb0eWeCM0SrLvWPOZJ8liHVXg6qU37axo=";
|
||||
};
|
||||
disabledTests = [ "test_bytes_args" ];
|
||||
});
|
||||
};
|
||||
};
|
||||
|
@ -17,10 +17,10 @@ stdenv.mkDerivation rec {
|
||||
|
||||
nativeBuildInputs = [
|
||||
desktop-file-utils glib gtk3 meson ninja pkg-config python3 vala
|
||||
wrapGAppsHook
|
||||
wrapGAppsHook gobject-introspection
|
||||
];
|
||||
buildInputs = [
|
||||
glib glib-networking gobject-introspection gtk3 json-glib libgee libhandy
|
||||
glib glib-networking gtk3 json-glib libgee libhandy
|
||||
libsoup
|
||||
];
|
||||
|
||||
|
@ -22,8 +22,8 @@ buildGoModule rec {
|
||||
|
||||
vendorHash = "sha256-RehZ86XuFs1kbm9V3cgPz1SPG3izK7/6fHQjPTHOYZs=";
|
||||
|
||||
buildInputs = [ cairo gobject-introspection gtk3 gtk-layer-shell ];
|
||||
nativeBuildInputs = [ pkg-config wrapGAppsHook ];
|
||||
buildInputs = [ cairo gtk3 gtk-layer-shell ];
|
||||
nativeBuildInputs = [ pkg-config wrapGAppsHook gobject-introspection ];
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
@ -103,6 +103,7 @@ let
|
||||
inherit version;
|
||||
hash = "sha256-0rUlXHxjSbwb0eWeCM0SrLvWPOZJ8liHVXg6qU37axo=";
|
||||
};
|
||||
disabledTests = [ "test_bytes_args" ]; # https://github.com/pallets/click/commit/6e05e1fa1c2804
|
||||
});
|
||||
# Now requires `lingua` as check input that requires a newer `click`,
|
||||
# however `click-7` is needed by the older flask we need here. Since it's just
|
||||
|
@ -33,6 +33,7 @@ let
|
||||
pkg-config
|
||||
wrapGAppsHook
|
||||
wrapPython
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
@ -47,7 +48,6 @@ let
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gobject-introspection
|
||||
gtk3
|
||||
python
|
||||
] ++ lib.optional withRandr libxcb
|
||||
|
@ -29,10 +29,10 @@ stdenv.mkDerivation rec {
|
||||
ninja
|
||||
pkg-config
|
||||
wrapGAppsHook
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gobject-introspection
|
||||
gtk3
|
||||
libhandy
|
||||
(python3.withPackages (ps: with ps; [
|
||||
|
@ -40,12 +40,12 @@ stdenv.mkDerivation rec {
|
||||
python3
|
||||
desktop-file-utils
|
||||
gtk3
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gtk3
|
||||
python3.pkgs.gatt
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
pythonPath = with python3.pkgs; [
|
||||
|
@ -20,7 +20,6 @@ python3Packages.buildPythonApplication rec {
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
gobject-introspection
|
||||
gtk3
|
||||
gtksourceview4
|
||||
# webkitgkt is used for rendering interactive statistics graph which
|
||||
|
@ -33,7 +33,6 @@ python3.pkgs.buildPythonApplication rec {
|
||||
|
||||
buildInputs = [
|
||||
glib
|
||||
gobject-introspection
|
||||
cinnamon.xapp
|
||||
gspell
|
||||
];
|
||||
|
@ -46,13 +46,13 @@ stdenv.mkDerivation rec {
|
||||
python3
|
||||
vala
|
||||
wrapGAppsHook
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
accountsservice
|
||||
dbus
|
||||
glib
|
||||
gobject-introspection
|
||||
gsettings-desktop-schemas
|
||||
gtk-layer-shell
|
||||
gtk3
|
||||
|
@ -34,9 +34,10 @@ python3Packages.buildPythonApplication rec {
|
||||
pkg-config meson ninja
|
||||
appstream-glib desktop-file-utils
|
||||
wrapGAppsHook
|
||||
gobject-introspection
|
||||
];
|
||||
buildInputs = [
|
||||
gtk3 gobject-introspection
|
||||
gtk3
|
||||
glib
|
||||
];
|
||||
nativeCheckInputs = with python3Packages; [ flake8 pytest ];
|
||||
|
@ -38,7 +38,6 @@ python3.pkgs.buildPythonApplication rec {
|
||||
|
||||
buildInputs = [
|
||||
gexiv2
|
||||
gobject-introspection
|
||||
gtk3
|
||||
hicolor-icon-theme
|
||||
libnotify
|
||||
|
@ -55,6 +55,7 @@ stdenv.mkDerivation rec {
|
||||
pkg-config
|
||||
wrapGAppsHook
|
||||
jinja2
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@ -62,7 +63,6 @@ stdenv.mkDerivation rec {
|
||||
libSM
|
||||
libXScrnSaver
|
||||
libXtst
|
||||
gobject-introspection
|
||||
glib
|
||||
glibmm
|
||||
gtkmm3
|
||||
|
@ -5,6 +5,7 @@
|
||||
enableGuile ? false, guile ? null
|
||||
, enablePython ? false, python ? null
|
||||
, enablePerl ? (!stdenv.isDarwin) && (stdenv.hostPlatform == stdenv.buildPlatform), perl ? null
|
||||
, fetchpatch
|
||||
# re-add javascript support when upstream supports modern spidermonkey
|
||||
}:
|
||||
|
||||
@ -22,6 +23,15 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-u6QGhfi+uWeIzSUFuYHAH3Xu0Fky0yw2h4NOKgYFLsM=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix build bug with perl 5.38.0. Backport of https://github.com/rkd77/elinks/pull/243 by gentoo:
|
||||
# https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=dfefaa456bd69bc14e3a1c2c6c1b0cc19c6b0869
|
||||
(fetchpatch {
|
||||
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/www-client/elinks/files/elinks-0.16.1.1-perl-5.38.patch?id=dfefaa456bd69bc14e3a1c2c6c1b0cc19c6b0869";
|
||||
hash = "sha256-bHP9bc/l7VEw7oXlkSUQhhuq8rT2QTahh9SM7ZJgK5w=";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
ncurses libX11 bzip2 zlib brotli zstd xz
|
||||
openssl libidn tre expat libev
|
||||
|
@ -28,7 +28,6 @@ python3.pkgs.buildPythonApplication rec {
|
||||
|
||||
buildInputs = with gst_all_1; [
|
||||
glib-networking
|
||||
gobject-introspection
|
||||
gst-libav
|
||||
gst-plugins-base
|
||||
gst-plugins-ugly
|
||||
|
@ -22,8 +22,10 @@ python3.pkgs.buildPythonApplication rec {
|
||||
sed 's/[~<>=][^;]*//' -i requirements.txt
|
||||
'';
|
||||
|
||||
# ~400 failures
|
||||
doCheck = false;
|
||||
nativeBuildInputs = with python3.pkgs; [
|
||||
setuptools
|
||||
wheel
|
||||
];
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
# See https://github.com/Flexget/Flexget/blob/master/requirements.txt
|
||||
@ -42,6 +44,7 @@ python3.pkgs.buildPythonApplication rec {
|
||||
packaging
|
||||
psutil
|
||||
pynzb
|
||||
pyrsistent
|
||||
pyrss2gen
|
||||
python-dateutil
|
||||
pyyaml
|
||||
@ -73,6 +76,9 @@ python3.pkgs.buildPythonApplication rec {
|
||||
"flexget.plugins.clients.transmission"
|
||||
];
|
||||
|
||||
# ~400 failures
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://flexget.com/";
|
||||
changelog = "https://github.com/Flexget/Flexget/releases/tag/v${version}";
|
||||
|
@ -46,11 +46,11 @@ stdenv.mkDerivation rec {
|
||||
pkg-config
|
||||
wrapGAppsHook
|
||||
gettext
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
qrencode
|
||||
gobject-introspection
|
||||
glib
|
||||
glib-networking # required for TLS support
|
||||
libadwaita
|
||||
|
@ -31,7 +31,7 @@ python3.pkgs.buildPythonApplication rec {
|
||||
format = "pyproject";
|
||||
|
||||
buildInputs = [
|
||||
gobject-introspection gtk3 gnome.adwaita-icon-theme
|
||||
gtk3 gnome.adwaita-icon-theme
|
||||
gtksourceview4
|
||||
glib-networking
|
||||
] ++ lib.optionals enableJingle [ farstream gstreamer gst-plugins-base gst-libav gst-plugins-good libnice ]
|
||||
@ -41,7 +41,7 @@ python3.pkgs.buildPythonApplication rec {
|
||||
++ lib.optional enableAppIndicator libappindicator-gtk3;
|
||||
|
||||
nativeBuildInputs = [
|
||||
gettext wrapGAppsHook
|
||||
gettext wrapGAppsHook gobject-introspection
|
||||
];
|
||||
|
||||
dontWrapGApps = true;
|
||||
|
@ -23,10 +23,9 @@ buildGoModule rec {
|
||||
buildInputs = [
|
||||
gtk4
|
||||
glib
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
nativeBuildInputs = [ pkg-config gobject-introspection ];
|
||||
|
||||
# Checking requires a working display
|
||||
doCheck = false;
|
||||
|
@ -78,12 +78,11 @@ with mikutterPaths; stdenv.mkDerivation rec {
|
||||
sha256 = "05253nz4i1lmnq6czj48qdab2ny4vx2mznj6nsn2l1m2z6zqkwk3";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ copyDesktopItems wrapGAppsHook ]
|
||||
nativeBuildInputs = [ copyDesktopItems wrapGAppsHook gobject-introspection ]
|
||||
++ lib.optionals stdenv.isDarwin [ libicns ];
|
||||
buildInputs = [
|
||||
atk
|
||||
gtk2
|
||||
gobject-introspection
|
||||
libnotify
|
||||
which # some plugins use it at runtime
|
||||
wrappedRuby
|
||||
|
@ -41,13 +41,13 @@ python3Packages.buildPythonApplication rec {
|
||||
gst_all_1.gst-plugins-base
|
||||
gst_all_1.gst-plugins-good
|
||||
gst_all_1.gst-plugins-bad
|
||||
gobject-introspection
|
||||
libsecret
|
||||
] ++ pluginsDeps;
|
||||
|
||||
nativeBuildInputs = [
|
||||
gettext
|
||||
wrapGAppsHook
|
||||
gobject-introspection
|
||||
# To later add plugins to
|
||||
xorg.lndir
|
||||
];
|
||||
|
@ -16,8 +16,11 @@ python3Packages.buildPythonPackage rec {
|
||||
sha256 = "0bij6cy96nhq7xzslx0fnhmiac629h0x4wgy67k4i4npwqw10680";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
nativeBuildInputs = [
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gnome-online-accounts
|
||||
];
|
||||
|
||||
|
@ -36,6 +36,7 @@ stdenv.mkDerivation rec {
|
||||
python3Packages.wrapPython
|
||||
intltool
|
||||
pkg-config
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@ -49,7 +50,6 @@ stdenv.mkDerivation rec {
|
||||
libpeas
|
||||
gsettings-desktop-schemas
|
||||
json-glib
|
||||
gobject-introspection
|
||||
libsecret
|
||||
glib-networking
|
||||
libnotify
|
||||
|
@ -44,13 +44,13 @@ stdenv.mkDerivation rec {
|
||||
pkg-config
|
||||
vala
|
||||
wrapGAppsHook
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
appstream
|
||||
desktop-file-utils
|
||||
glib
|
||||
gobject-introspection
|
||||
gtk3
|
||||
html2text
|
||||
libgee
|
||||
|
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-Pr2YA2MHXD4W7lyCxGAVLKyoZarZ8t92RSkWle3LNuc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ meson ninja python3 wrapGAppsHook ];
|
||||
nativeBuildInputs = [ meson ninja python3 wrapGAppsHook gobject-introspection ];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs build-aux/meson/postinstall.py
|
||||
@ -32,7 +32,6 @@ stdenv.mkDerivation rec {
|
||||
gtk3
|
||||
webkitgtk
|
||||
desktop-file-utils
|
||||
gobject-introspection
|
||||
gsettings-desktop-schemas
|
||||
];
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
{ stdenv
|
||||
, fetchurl
|
||||
, fetchpatch
|
||||
, lib
|
||||
, substituteAll
|
||||
, pam
|
||||
@ -220,6 +221,12 @@ in
|
||||
# for 7.4.
|
||||
patches = lib.optionals (lib.versionAtLeast version "7.5") [
|
||||
./0001-Strip-away-BUILDCONFIG.patch
|
||||
] ++ [
|
||||
(fetchpatch {
|
||||
name = "fix-curl-8.2.patch";
|
||||
url = "https://github.com/LibreOffice/core/commit/2a68dc02bd19a717d3c86873206fabed1098f228.diff";
|
||||
hash = "sha256-C+kts+oaLR3+GbnX/wrFguF7SzgerNataxP0SPxhyY8=";
|
||||
})
|
||||
];
|
||||
|
||||
# libreoffice tries to reference the BUILDCONFIG (e.g. PKG_CONFIG_PATH)
|
||||
|
@ -1,7 +1,6 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, perl
|
||||
, gmp
|
||||
, mpfr
|
||||
, flint
|
||||
@ -15,10 +14,14 @@
|
||||
, ninja
|
||||
, ant
|
||||
, openjdk
|
||||
, perlPackages
|
||||
, perl536Packages
|
||||
, makeWrapper
|
||||
}:
|
||||
|
||||
let
|
||||
# log says: polymake does not work with perl 5.37 or newer;
|
||||
perlPackages = perl536Packages;
|
||||
inherit (perlPackages) perl;
|
||||
in
|
||||
# polymake compiles its own version of sympol and atint because we
|
||||
# don't have those packages. other missing optional dependencies:
|
||||
# javaview, libnormaliz, scip, soplex, jreality.
|
||||
|
@ -0,0 +1,18 @@
|
||||
diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/graphique_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/graphique_doctest.py
|
||||
index aa153fd4cd..eebbe87aff 100644
|
||||
--- a/src/sage/tests/books/computational-mathematics-with-sagemath/graphique_doctest.py
|
||||
+++ b/src/sage/tests/books/computational-mathematics-with-sagemath/graphique_doctest.py
|
||||
@@ -134,11 +134,11 @@ Sage example in ./graphique.tex, line 1120::
|
||||
sage: t = srange(0, 5, 0.1); p = Graphics()
|
||||
sage: for k in srange(0, 10, 0.15):
|
||||
....: y = integrate.odeint(f, k, t)
|
||||
- ....: p += line(zip(t, flatten(y)))
|
||||
+ ....: p += line(zip(t, y.flatten()))
|
||||
sage: t = srange(0, -5, -0.1); q = Graphics()
|
||||
sage: for k in srange(0, 10, 0.15):
|
||||
....: y = integrate.odeint(f, k, t)
|
||||
- ....: q += line(zip(t, flatten(y)))
|
||||
+ ....: q += line(zip(t, y.flatten()))
|
||||
sage: y = var('y')
|
||||
sage: v = plot_vector_field((1, -cos(x*y)), (x,-5,5), (y,-2,11))
|
||||
sage: g = p + q + v; g.show()
|
@ -80,6 +80,23 @@ stdenv.mkDerivation rec {
|
||||
sha256 = "sha256-k8Oam+EiRcfXC7qCdLacCx+7vpUAw2K1wsjKcQbeGb4=";
|
||||
})
|
||||
|
||||
# https://github.com/sagemath/sage/pull/35826, landed in 10.1.beta5
|
||||
(fetchpatch {
|
||||
name = "numpy-1.25.0-upgrade.patch";
|
||||
url = "https://github.com/sagemath/sage/commit/ecfe06b8f1fe729b07e885f0de55244467e5c137.diff";
|
||||
sha256 = "sha256-G0xhl+LyNdDYPzRqSHK3fHaepcIzpuwmqRiussraDf0=";
|
||||
})
|
||||
|
||||
# https://github.com/sagemath/sage/pull/35826#issuecomment-1658569891
|
||||
./patches/numpy-1.25-deprecation.patch
|
||||
|
||||
# https://github.com/sagemath/sage/pull/35842, landed in 10.1.beta5
|
||||
(fetchpatch {
|
||||
name = "scipy-1.11-upgrade.patch";
|
||||
url = "https://github.com/sagemath/sage/commit/90ece168c3c61508baa36659b0027b7dd8b43add.diff";
|
||||
sha256 = "sha256-Y5TmuJcUJR+veb2AuSVODGs+xkVV+pTM8fWTm4q+NDs=";
|
||||
})
|
||||
|
||||
# https://github.com/sagemath/sage/pull/35825, landed in 10.1.beta6
|
||||
(fetchpatch {
|
||||
name = "singular-4.3.2p2-upgrade.patch";
|
||||
|
@ -4,14 +4,14 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xterm";
|
||||
version = "383";
|
||||
version = "384";
|
||||
|
||||
src = fetchurl {
|
||||
urls = [
|
||||
"ftp://ftp.invisible-island.net/xterm/${pname}-${version}.tgz"
|
||||
"https://invisible-mirror.net/archives/xterm/${pname}-${version}.tgz"
|
||||
];
|
||||
hash = "sha256-oGYTvNpQjCob/21CMIldp0p5h5mi45ojusggide5qZg=";
|
||||
hash = "sha256-Me+HB0DOrgIMPEtKlgHH9Hv9RmcsGq8tITpWXWTLw3M=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
@ -1,9 +1,8 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, libgit2
|
||||
, libgit2_1_6
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
@ -18,7 +17,10 @@ rustPlatform.buildRustPackage rec {
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ libgit2 ];
|
||||
|
||||
buildInputs = [
|
||||
libgit2_1_6
|
||||
];
|
||||
|
||||
cargoHash = "sha256-28sMY47LAdaGmPNmxeu/w1Pn6AV3JlWbxFcit5pLkI0";
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, libgit2
|
||||
, libgit2_1_6
|
||||
, zlib
|
||||
}:
|
||||
|
||||
@ -24,7 +24,7 @@ rustPlatform.buildRustPackage rec {
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libgit2
|
||||
libgit2_1_6
|
||||
zlib
|
||||
];
|
||||
|
||||
|
@ -24,6 +24,7 @@ let
|
||||
inherit version;
|
||||
hash = "sha256-0rUlXHxjSbwb0eWeCM0SrLvWPOZJ8liHVXg6qU37axo=";
|
||||
};
|
||||
disabledTests = [ "test_bytes_args" ]; # https://github.com/pallets/click/commit/6e05e1fa1c2804
|
||||
});
|
||||
|
||||
pychromecast = super.pychromecast.overridePythonAttrs (oldAttrs: rec {
|
||||
|
@ -70,6 +70,7 @@ stdenv.mkDerivation rec {
|
||||
python3 # for build scripts
|
||||
pkgconf
|
||||
wrapGAppsHook
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@ -79,7 +80,6 @@ stdenv.mkDerivation rec {
|
||||
elfutils
|
||||
gexiv2
|
||||
glib
|
||||
gobject-introspection
|
||||
gst-plugins-base
|
||||
gstreamer
|
||||
gtk3
|
||||
|
@ -15,7 +15,7 @@ stdenv.mkDerivation rec {
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
ffmpeg frei0r sox gtk3 gobject-introspection ladspaPlugins
|
||||
ffmpeg frei0r sox gtk3 ladspaPlugins
|
||||
(python3.withPackages (ps: with ps; [ mlt pygobject3 dbus-python numpy pillow ]))
|
||||
];
|
||||
|
||||
|
@ -44,12 +44,12 @@ python3.pkgs.buildPythonApplication rec {
|
||||
ninja
|
||||
pkg-config
|
||||
wrapGAppsHook
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libnotify
|
||||
librsvg
|
||||
gobject-introspection
|
||||
gtk3
|
||||
gst_all_1.gst-plugins-base
|
||||
gst_all_1.gst-plugins-good
|
||||
|
@ -67,13 +67,13 @@ stdenv.mkDerivation rec {
|
||||
itstool
|
||||
pkg-config
|
||||
yelp-tools
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
clutter-gst
|
||||
clutter-gtk
|
||||
glib
|
||||
gobject-introspection
|
||||
gst-plugins-bad
|
||||
gst-plugins-base
|
||||
gst-plugins-good
|
||||
|
@ -52,6 +52,7 @@ stdenv.mkDerivation rec {
|
||||
xmlto docbook_xml_dtd_45
|
||||
docbook_xsl findXMLCatalogs
|
||||
asciidoctor
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
outputs = [ "out" "doc" ];
|
||||
@ -59,7 +60,7 @@ stdenv.mkDerivation rec {
|
||||
FONTCONFIG_FILE = toString fontsConf;
|
||||
|
||||
propagatedUserEnvPkgs = [ hicolor-icon-theme ];
|
||||
buildInputs = [ cairo librsvg dbus gdk-pixbuf gobject-introspection
|
||||
buildInputs = [ cairo librsvg dbus gdk-pixbuf
|
||||
git luaEnv libpthreadstubs libstartup_notification
|
||||
libxdg_basedir lua nettools pango xcb-util-cursor
|
||||
xorg.libXau xorg.libXdmcp xorg.libxcb xorg.libxshmfence
|
||||
|
@ -19,7 +19,11 @@ python3Packages.buildPythonApplication rec {
|
||||
sha256 = "18ygvkl92yr69kxsym57k1mc90asdxpz4b943i61qr0s4fc5n4mq";
|
||||
};
|
||||
|
||||
buildInputs = [ libpulseaudio libnotify gobject-introspection ];
|
||||
nativeBuildInputs = [
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [ libpulseaudio libnotify ];
|
||||
|
||||
propagatedBuildInputs = with python3Packages; [
|
||||
keyring colour netifaces psutil basiciw pygobject3
|
||||
|
@ -81,8 +81,18 @@ for flag in "${!hardeningEnableMap[@]}"; do
|
||||
hardeningCFlags+=('-fPIC')
|
||||
;;
|
||||
strictoverflow)
|
||||
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling strictoverflow >&2; fi
|
||||
hardeningCFlags+=('-fno-strict-overflow')
|
||||
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling strictoverflow >&2; fi
|
||||
if (( @isClang@ )); then
|
||||
# In Clang, -fno-strict-overflow only serves to set -fwrapv and is
|
||||
# reported as an unused CLI argument if -fwrapv or -fno-wrapv is set
|
||||
# explicitly, so we side step that by doing the conversion here.
|
||||
#
|
||||
# See: https://github.com/llvm/llvm-project/blob/llvmorg-16.0.6/clang/lib/Driver/ToolChains/Clang.cpp#L6315
|
||||
#
|
||||
hardeningCFlags+=('-fwrapv')
|
||||
else
|
||||
hardeningCFlags+=('-fno-strict-overflow')
|
||||
fi
|
||||
;;
|
||||
format)
|
||||
if (( "${NIX_DEBUG:-0}" >= 1 )); then echo HARDENING: enabling format >&2; fi
|
||||
|
@ -609,6 +609,8 @@ stdenv.mkDerivation {
|
||||
|
||||
|
||||
env = {
|
||||
inherit isClang;
|
||||
|
||||
# for substitution in utils.bash
|
||||
expandResponseParams = "${expand-response-params}/bin/expand-response-params";
|
||||
shell = getBin shell + shell.shellPath or "";
|
||||
|
@ -1,5 +1,12 @@
|
||||
{ lib, stdenv, bintools-unwrapped, llvmPackages_13, coreutils }:
|
||||
{ lib, stdenv, bintools-unwrapped, llvmPackages, llvmPackages_13, coreutils }:
|
||||
|
||||
let
|
||||
# aarch64-darwin needs a clang that can build arm64e binaries, so make sure a version of LLVM
|
||||
# is used that can do that, but prefer the stdenv one if it is new enough.
|
||||
llvmPkgs = if (lib.versionAtLeast (lib.getVersion llvmPackages.clang) "13")
|
||||
then llvmPackages
|
||||
else llvmPackages_13;
|
||||
in
|
||||
if stdenv.hostPlatform.isStatic
|
||||
then throw ''
|
||||
libredirect is not available on static builds.
|
||||
@ -39,11 +46,11 @@ else stdenv.mkDerivation rec {
|
||||
# and the library search directory for libdl.
|
||||
# We can't build this on x86_64, because the libSystem we point to doesn't
|
||||
# like arm64(e).
|
||||
PATH=${bintools-unwrapped}/bin:${llvmPackages_13.clang-unwrapped}/bin:$PATH \
|
||||
PATH=${bintools-unwrapped}/bin:${llvmPkgs.clang-unwrapped}/bin:$PATH \
|
||||
clang -arch x86_64 -arch arm64 -arch arm64e \
|
||||
-isystem ${llvmPackages_13.clang.libc}/include \
|
||||
-isystem ${llvmPackages_13.libclang.lib}/lib/clang/*/include \
|
||||
-L${llvmPackages_13.clang.libc}/lib \
|
||||
-isystem ${llvmPkgs.clang.libc}/include \
|
||||
-isystem ${llvmPkgs.libclang.lib}/lib/clang/*/include \
|
||||
-L${llvmPkgs.clang.libc}/lib \
|
||||
-Wl,-install_name,$libName \
|
||||
-Wall -std=c99 -O3 -fPIC libredirect.c \
|
||||
-shared -o "$libName"
|
||||
|
@ -106,7 +106,7 @@ static int open_needs_mode(int flags)
|
||||
|
||||
WRAPPER(int, open)(const char * path, int flags, ...)
|
||||
{
|
||||
int (*open_real) (const char *, int, mode_t) = LOOKUP_REAL(open);
|
||||
int (*open_real) (const char *, int, ...) = LOOKUP_REAL(open);
|
||||
mode_t mode = 0;
|
||||
if (open_needs_mode(flags)) {
|
||||
va_list ap;
|
||||
@ -139,7 +139,7 @@ WRAPPER_DEF(open64)
|
||||
|
||||
WRAPPER(int, openat)(int dirfd, const char * path, int flags, ...)
|
||||
{
|
||||
int (*openat_real) (int, const char *, int, mode_t) = LOOKUP_REAL(openat);
|
||||
int (*openat_real) (int, const char *, int, ...) = LOOKUP_REAL(openat);
|
||||
mode_t mode = 0;
|
||||
if (open_needs_mode(flags)) {
|
||||
va_list ap;
|
||||
|
@ -193,8 +193,8 @@ in
|
||||
};
|
||||
|
||||
graphene-sys = attrs: {
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ graphene gobject-introspection ];
|
||||
nativeBuildInputs = [ pkg-config gobject-introspection ];
|
||||
buildInputs = [ graphene ];
|
||||
};
|
||||
|
||||
nettle-sys = attrs: {
|
||||
|
@ -24,8 +24,6 @@ maturinBuildHook() {
|
||||
${maturinBuildFlags-}
|
||||
)
|
||||
|
||||
runHook postBuild
|
||||
|
||||
if [ ! -z "${buildAndTestSubdir-}" ]; then
|
||||
popd
|
||||
fi
|
||||
@ -34,6 +32,9 @@ maturinBuildHook() {
|
||||
mkdir -p dist
|
||||
mv target/wheels/*.whl dist/
|
||||
|
||||
# These are python build hooks and may depend on ./dist
|
||||
runHook postBuild
|
||||
|
||||
echo "Finished maturinBuildHook"
|
||||
}
|
||||
|
||||
|
90
pkgs/build-support/setup-hooks/strip-tmp-aarch64.sh
Normal file
90
pkgs/build-support/setup-hooks/strip-tmp-aarch64.sh
Normal file
@ -0,0 +1,90 @@
|
||||
# This setup hook strips libraries and executables in the fixup phase.
|
||||
|
||||
fixupOutputHooks+=(_doStrip)
|
||||
|
||||
_doStrip() {
|
||||
# We don't bother to strip build platform code because it shouldn't make it
|
||||
# to $out anyways---if it does, that's a bigger problem that a lack of
|
||||
# stripping will help catch.
|
||||
local -ra flags=(dontStripHost dontStripTarget)
|
||||
local -ra debugDirs=(stripDebugList stripDebugListTarget)
|
||||
local -ra allDirs=(stripAllList stripAllListTarget)
|
||||
local -ra stripCmds=(STRIP STRIP_FOR_TARGET)
|
||||
local -ra ranlibCmds=(RANLIB RANLIB_FOR_TARGET)
|
||||
|
||||
# TODO(structured-attrs): This doesn't work correctly if one of
|
||||
# the items in strip*List or strip*Flags contains a space,
|
||||
# even with structured attrs enabled. This is OK for now
|
||||
# because very few packages set any of these, and it doesn't
|
||||
# affect any of them.
|
||||
#
|
||||
# After __structuredAttrs = true is universal, come back and
|
||||
# push arrays all the way through this logic.
|
||||
|
||||
# Strip only host paths by default. Leave targets as is.
|
||||
stripDebugList=${stripDebugList[*]:-lib lib32 lib64 libexec bin sbin}
|
||||
stripDebugListTarget=${stripDebugListTarget[*]:-}
|
||||
stripAllList=${stripAllList[*]:-}
|
||||
stripAllListTarget=${stripAllListTarget[*]:-}
|
||||
|
||||
local i
|
||||
for i in ${!stripCmds[@]}; do
|
||||
local -n flag="${flags[$i]}"
|
||||
local -n debugDirList="${debugDirs[$i]}"
|
||||
local -n allDirList="${allDirs[$i]}"
|
||||
local -n stripCmd="${stripCmds[$i]}"
|
||||
local -n ranlibCmd="${ranlibCmds[$i]}"
|
||||
|
||||
# `dontStrip` disables them all
|
||||
if [[ "${dontStrip-}" || "${flag-}" ]] || ! type -f "${stripCmd-}" 2>/dev/null 1>&2
|
||||
then continue; fi
|
||||
|
||||
stripDirs "$stripCmd" "$ranlibCmd" "$debugDirList" "${stripDebugFlags[*]:--S -p}"
|
||||
stripDirs "$stripCmd" "$ranlibCmd" "$allDirList" "${stripAllFlags[*]:--s -p}"
|
||||
done
|
||||
}
|
||||
|
||||
stripDirs() {
|
||||
local cmd="$1"
|
||||
local ranlibCmd="$2"
|
||||
local paths="$3"
|
||||
local stripFlags="$4"
|
||||
local pathsNew=
|
||||
|
||||
[ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1
|
||||
[ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1
|
||||
|
||||
local p
|
||||
for p in ${paths}; do
|
||||
if [ -e "$prefix/$p" ]; then
|
||||
pathsNew="${pathsNew} $prefix/$p"
|
||||
fi
|
||||
done
|
||||
paths=${pathsNew}
|
||||
|
||||
if [ -n "${paths}" ]; then
|
||||
echo "stripping (with command $cmd and flags $stripFlags) in $paths"
|
||||
local striperr
|
||||
striperr="$(mktemp 'striperr.XXXXXX')"
|
||||
# Do not strip lib/debug. This is a directory used by setup-hooks/separate-debug-info.sh.
|
||||
find $paths -type f -a '!' -path "$prefix/lib/debug/*" -print0 |
|
||||
# Make sure we process files under symlinks only once. Otherwise
|
||||
# 'strip` can corrupt files when writes to them in parallel:
|
||||
# https://github.com/NixOS/nixpkgs/issues/246147#issuecomment-1657072039
|
||||
xargs -r -0 -n1 -- realpath -z | sort -u -z |
|
||||
|
||||
xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2>"$striperr" || exit_code=$?
|
||||
# xargs exits with status code 123 if some but not all of the
|
||||
# processes fail. We don't care if some of the files couldn't
|
||||
# be stripped, so ignore specifically this code.
|
||||
[[ "$exit_code" = 123 || -z "$exit_code" ]] || (cat "$striperr" 1>&2 && exit 1)
|
||||
|
||||
rm "$striperr"
|
||||
# 'strip' does not normally preserve archive index in .a files.
|
||||
# This usually causes linking failures against static libs like:
|
||||
# ld: ...-i686-w64-mingw32-stage-final-gcc-13.0.0-lib/i686-w64-mingw32/lib/libstdc++.dll.a:
|
||||
# error adding symbols: archive has no index; run ranlib to add one
|
||||
# Restore the index by running 'ranlib'.
|
||||
find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2>/dev/null
|
||||
fi
|
||||
}
|
@ -51,6 +51,9 @@ stripDirs() {
|
||||
local stripFlags="$4"
|
||||
local pathsNew=
|
||||
|
||||
[ -z "$cmd" ] && echo "stripDirs: Strip command is empty" 1>&2 && exit 1
|
||||
[ -z "$ranlibCmd" ] && echo "stripDirs: Ranlib command is empty" 1>&2 && exit 1
|
||||
|
||||
local p
|
||||
for p in ${paths}; do
|
||||
if [ -e "$prefix/$p" ]; then
|
||||
@ -61,8 +64,17 @@ stripDirs() {
|
||||
|
||||
if [ -n "${paths}" ]; then
|
||||
echo "stripping (with command $cmd and flags $stripFlags) in $paths"
|
||||
local striperr
|
||||
striperr="$(mktemp 'striperr.XXXXXX')"
|
||||
# Do not strip lib/debug. This is a directory used by setup-hooks/separate-debug-info.sh.
|
||||
find $paths -type f -a '!' -wholename "$prefix/lib/debug/*" -exec $cmd $stripFlags '{}' \; 2>/dev/null
|
||||
find $paths -type f -a '!' -path "$prefix/lib/debug/*" -print0 |
|
||||
xargs -r -0 -n1 -P "$NIX_BUILD_CORES" -- $cmd $stripFlags 2>"$striperr" || exit_code=$?
|
||||
# xargs exits with status code 123 if some but not all of the
|
||||
# processes fail. We don't care if some of the files couldn't
|
||||
# be stripped, so ignore specifically this code.
|
||||
[[ "$exit_code" = 123 || -z "$exit_code" ]] || (cat "$striperr" 1>&2 && exit 1)
|
||||
|
||||
rm "$striperr"
|
||||
# 'strip' does not normally preserve archive index in .a files.
|
||||
# This usually causes linking failures against static libs like:
|
||||
# ld: ...-i686-w64-mingw32-stage-final-gcc-13.0.0-lib/i686-w64-mingw32/lib/libstdc++.dll.a:
|
||||
|
@ -30,7 +30,7 @@ let
|
||||
]));
|
||||
extraCertificatesBundle = writeText "cacert-extra-certificates-bundle.crt" (lib.concatStringsSep "\n\n" extraCertificateStrings);
|
||||
|
||||
srcVersion = "3.90";
|
||||
srcVersion = "3.92";
|
||||
version = if nssOverride != null then nssOverride.version else srcVersion;
|
||||
meta = with lib; {
|
||||
homepage = "https://curl.haxx.se/docs/caextract.html";
|
||||
@ -45,7 +45,7 @@ let
|
||||
|
||||
src = if nssOverride != null then nssOverride.src else fetchurl {
|
||||
url = "mirror://mozilla/security/nss/releases/NSS_${lib.replaceStrings ["."] ["_"] version}_RTM/src/nss-${version}.tar.gz";
|
||||
hash = "sha256-ms1lNMQdjq0Z/Kb8s//+0vnwnEN8PXn+5qTuZoqqk7Y=";
|
||||
hash = "sha256-PbGS1uiCA5rwKufq8yF+0RS7etg0FMZGdyq4Ah4kolQ=";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
|
@ -26,11 +26,11 @@ stdenv.mkDerivation rec {
|
||||
wrapGAppsHook
|
||||
gsettings-desktop-schemas
|
||||
gettext
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
(python3.withPackages (p: with p; [ pygobject3 magic setproctitle ]))
|
||||
gobject-introspection
|
||||
gsettings-desktop-schemas
|
||||
gtk3
|
||||
glib
|
||||
|
@ -41,7 +41,6 @@ stdenv.mkDerivation rec {
|
||||
xorg.libxkbfile
|
||||
xorg.libXext
|
||||
xorg.libXrandr
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -51,6 +50,7 @@ stdenv.mkDerivation rec {
|
||||
wrapGAppsHook
|
||||
intltool
|
||||
pkg-config
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
|
@ -22,7 +22,6 @@ stdenv.mkDerivation rec {
|
||||
|
||||
buildInputs = [
|
||||
glib
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
@ -30,6 +29,7 @@ stdenv.mkDerivation rec {
|
||||
ninja
|
||||
wrapGAppsHook
|
||||
pkg-config
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
|
@ -48,11 +48,11 @@ stdenv.mkDerivation rec {
|
||||
libtool
|
||||
meson
|
||||
ninja
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
# from meson.build
|
||||
gobject-introspection
|
||||
gtk3
|
||||
glib
|
||||
|
||||
|
@ -33,10 +33,10 @@ stdenv.mkDerivation rec {
|
||||
pkg-config
|
||||
which # for locale detection
|
||||
libxml2 # for xml-stripblanks
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gobject-introspection
|
||||
cairo
|
||||
readline
|
||||
spidermonkey_102
|
||||
|
@ -62,6 +62,7 @@ stdenv.mkDerivation rec {
|
||||
python3
|
||||
wrapGAppsHook
|
||||
xorgserver # for cvt command
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@ -69,7 +70,6 @@ stdenv.mkDerivation rec {
|
||||
cinnamon-desktop
|
||||
dbus
|
||||
glib
|
||||
gobject-introspection
|
||||
gtk3
|
||||
libcanberra
|
||||
libdrm
|
||||
|
@ -49,7 +49,6 @@ stdenv.mkDerivation rec {
|
||||
libexif
|
||||
exempi
|
||||
gvfs
|
||||
gobject-introspection
|
||||
libgsf
|
||||
];
|
||||
|
||||
@ -60,6 +59,7 @@ stdenv.mkDerivation rec {
|
||||
wrapGAppsHook
|
||||
intltool
|
||||
shared-mime-info
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
|
@ -44,10 +44,10 @@ stdenv.mkDerivation rec {
|
||||
python3
|
||||
vala
|
||||
wrapGAppsHook
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gobject-introspection
|
||||
(python3.withPackages (ps: with ps; [
|
||||
pygobject3
|
||||
setproctitle # mate applet
|
||||
|
@ -21,11 +21,11 @@ stdenv.mkDerivation rec {
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
go
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libgudev
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
makeFlags = [
|
||||
|
@ -58,7 +58,6 @@ python3.pkgs.buildPythonApplication rec {
|
||||
glib
|
||||
libmediaart
|
||||
gnome-online-accounts
|
||||
gobject-introspection
|
||||
gdk-pixbuf
|
||||
python3
|
||||
grilo
|
||||
|
@ -120,6 +120,7 @@ stdenv.mkDerivation rec {
|
||||
desktop-file-utils
|
||||
libxslt.bin
|
||||
asciidoc
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@ -153,7 +154,6 @@ stdenv.mkDerivation rec {
|
||||
ibus
|
||||
gnome-desktop
|
||||
gnome-settings-daemon
|
||||
gobject-introspection
|
||||
mesa
|
||||
|
||||
# recording
|
||||
|
@ -102,6 +102,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
wrapGAppsHook
|
||||
gi-docgen
|
||||
xorgserver
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@ -110,7 +111,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
glib
|
||||
gnome-desktop
|
||||
gnome-settings-daemon
|
||||
gobject-introspection
|
||||
gsettings-desktop-schemas
|
||||
gtk3
|
||||
libcanberra
|
||||
|
@ -108,6 +108,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
wrapGAppsHook4
|
||||
gi-docgen
|
||||
xorgserver
|
||||
gobject-introspection
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@ -116,7 +117,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
glib
|
||||
gnome-desktop
|
||||
gnome-settings-daemon
|
||||
gobject-introspection
|
||||
gsettings-desktop-schemas
|
||||
atk
|
||||
fribidi
|
||||
|
@ -32,7 +32,6 @@ buildPythonApplication rec {
|
||||
|
||||
buildInputs = [
|
||||
gnome.gnome-shell
|
||||
gobject-introspection # for Gio typelib
|
||||
];
|
||||
|
||||
pythonPath = [
|
||||
|
@ -45,8 +45,14 @@ stdenv.mkDerivation rec {
|
||||
|
||||
checkTarget = "test";
|
||||
|
||||
# Hack to avoid TMPDIR in RPATHs.
|
||||
preFixup = ''rm -rf "$(pwd)" '';
|
||||
# remove forbidden references to $TMPDIR
|
||||
preFixup = lib.optionalString stdenv.isLinux ''
|
||||
for f in "$out"/bin/*; do
|
||||
if isELF "$f"; then
|
||||
patchelf --shrink-rpath --allowed-rpath-prefixes "$NIX_STORE" "$f"
|
||||
fi
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Efficient Scheme compiler";
|
||||
|
@ -144,12 +144,10 @@ let majorVersion = "10";
|
||||
|
||||
in
|
||||
|
||||
lib.pipe (stdenv.mkDerivation ({
|
||||
lib.pipe ((callFile ../common/builder.nix {}) ({
|
||||
pname = "${crossNameAddon}${name}";
|
||||
inherit version;
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
|
||||
sha256 = "1wg4xdizkksmwi66mvv2v4pk3ja8x64m7v9gzhykzd3wrmdpsaf9";
|
||||
|
@ -157,12 +157,10 @@ let majorVersion = "11";
|
||||
|
||||
in
|
||||
|
||||
lib.pipe (stdenv.mkDerivation ({
|
||||
lib.pipe ((callFile ../common/builder.nix {}) ({
|
||||
pname = "${crossNameAddon}${name}";
|
||||
inherit version;
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
|
||||
hash = "sha256-Py2yIrAH6KSiPNW6VnJu8I6LHx6yBV7nLBQCzqc6jdk=";
|
||||
|
@ -201,12 +201,10 @@ let majorVersion = "12";
|
||||
|
||||
in
|
||||
|
||||
lib.pipe (stdenv.mkDerivation ({
|
||||
lib.pipe ((callFile ../common/builder.nix {}) ({
|
||||
pname = "${crossNameAddon}${name}";
|
||||
inherit version;
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
|
||||
sha256 = "sha256-lJpdT5nnhkIak7Uysi/6tVeN5zITaZdbka7Jet/ajDs=";
|
||||
|
@ -195,12 +195,10 @@ let majorVersion = "13";
|
||||
|
||||
in
|
||||
|
||||
lib.pipe (stdenv.mkDerivation ({
|
||||
lib.pipe ((callFile ../common/builder.nix {}) ({
|
||||
pname = "${crossNameAddon}${name}";
|
||||
inherit version;
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
|
||||
sha256 = "sha256-YdaE8Kpedqxlha2ImKJCeq3ol57V5/hUkihsTfwT7oY=";
|
||||
|
@ -193,12 +193,10 @@ in
|
||||
# We need all these X libraries when building AWT with GTK.
|
||||
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
|
||||
|
||||
lib.pipe (stdenv.mkDerivation ({
|
||||
lib.pipe ((callFile ../common/builder.nix {}) ({
|
||||
pname = "${crossNameAddon}${name}";
|
||||
inherit version;
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2";
|
||||
sha256 = "08yggr18v373a1ihj0rg2vd6psnic42b518xcgp3r9k81xz1xyr2";
|
||||
|
@ -210,12 +210,10 @@ in
|
||||
# We need all these X libraries when building AWT with GTK.
|
||||
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
|
||||
|
||||
lib.pipe (stdenv.mkDerivation ({
|
||||
lib.pipe ((callFile ../common/builder.nix {}) ({
|
||||
pname = "${crossNameAddon}${name}";
|
||||
inherit version;
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnu/gcc/gcc-${version}/gcc-${version}.tar.bz2";
|
||||
sha256 = "14l06m7nvcvb0igkbip58x59w3nq6315k6jcz3wr9ch1rn9d44bc";
|
||||
|
@ -199,12 +199,10 @@ in
|
||||
# We need all these X libraries when building AWT with GTK.
|
||||
assert x11Support -> (filter (x: x == null) ([ gtk2 libart_lgpl ] ++ xlibs)) == [];
|
||||
|
||||
lib.pipe (stdenv.mkDerivation ({
|
||||
lib.pipe ((callFile ../common/builder.nix {}) ({
|
||||
pname = "${crossNameAddon}${name}";
|
||||
inherit version;
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
src = if stdenv.targetPlatform.isVc4 then fetchFromGitHub {
|
||||
owner = "itszor";
|
||||
repo = "gcc-vc4";
|
||||
|
@ -149,12 +149,10 @@ let majorVersion = "7";
|
||||
|
||||
in
|
||||
|
||||
lib.pipe (stdenv.mkDerivation ({
|
||||
lib.pipe ((callFile ../common/builder.nix {}) ({
|
||||
pname = "${crossNameAddon}${name}";
|
||||
inherit version;
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
|
||||
sha256 = "0qg6kqc5l72hpnj4vr6l0p69qav0rh4anlkk3y55540zy3klc6dq";
|
||||
|
@ -130,12 +130,10 @@ let majorVersion = "8";
|
||||
|
||||
in
|
||||
|
||||
lib.pipe (stdenv.mkDerivation ({
|
||||
lib.pipe ((callFile ../common/builder.nix {}) ({
|
||||
pname = "${crossNameAddon}${name}";
|
||||
inherit version;
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
|
||||
sha256 = "0l7d4m9jx124xsk6xardchgy2k5j5l2b15q322k31f0va4d8826k";
|
||||
|
@ -144,12 +144,10 @@ let majorVersion = "9";
|
||||
|
||||
in
|
||||
|
||||
lib.pipe (stdenv.mkDerivation ({
|
||||
lib.pipe ((callFile ../common/builder.nix {}) ({
|
||||
pname = "${crossNameAddon}${name}";
|
||||
inherit version;
|
||||
|
||||
builder = ../builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gcc/releases/gcc-${version}/gcc-${version}.tar.xz";
|
||||
sha256 = "13ygjmd938m0wmy946pxdhz9i1wq7z4w10l6pvidak0xxxj9yxi7";
|
||||
|
@ -1,290 +0,0 @@
|
||||
if [ -e .attrs.sh ]; then source .attrs.sh; fi
|
||||
source $stdenv/setup
|
||||
|
||||
|
||||
oldOpts="$(shopt -po nounset)" || true
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
export NIX_FIXINC_DUMMY="$NIX_BUILD_TOP/dummy"
|
||||
mkdir "$NIX_FIXINC_DUMMY"
|
||||
|
||||
|
||||
if test "$staticCompiler" = "1"; then
|
||||
EXTRA_LDFLAGS="-static"
|
||||
else
|
||||
EXTRA_LDFLAGS="-Wl,-rpath,${!outputLib}/lib"
|
||||
fi
|
||||
|
||||
|
||||
# GCC interprets empty paths as ".", which we don't want.
|
||||
if test -z "${CPATH-}"; then unset CPATH; fi
|
||||
if test -z "${LIBRARY_PATH-}"; then unset LIBRARY_PATH; fi
|
||||
echo "\$CPATH is \`${CPATH-}'"
|
||||
echo "\$LIBRARY_PATH is \`${LIBRARY_PATH-}'"
|
||||
|
||||
if test "$noSysDirs" = "1"; then
|
||||
|
||||
declare \
|
||||
EXTRA_FLAGS_FOR_BUILD EXTRA_FLAGS EXTRA_FLAGS_FOR_TARGET \
|
||||
EXTRA_LDFLAGS_FOR_BUILD EXTRA_LDFLAGS_FOR_TARGET
|
||||
|
||||
# Extract flags from Bintools Wrappers
|
||||
for post in '_FOR_BUILD' ''; do
|
||||
curBintools="NIX_BINTOOLS${post}"
|
||||
|
||||
declare -a extraLDFlags=()
|
||||
if [[ -e "${!curBintools}/nix-support/orig-libc" ]]; then
|
||||
# Figure out what extra flags when linking to pass to the gcc
|
||||
# compilers being generated to make sure that they use our libc.
|
||||
extraLDFlags=($(< "${!curBintools}/nix-support/libc-ldflags") $(< "${!curBintools}/nix-support/libc-ldflags-before" || true))
|
||||
if [ -e ${!curBintools}/nix-support/ld-set-dynamic-linker ]; then
|
||||
extraLDFlags=-dynamic-linker=$(< ${!curBintools}/nix-support/dynamic-linker)
|
||||
fi
|
||||
|
||||
# The path to the Libc binaries such as `crti.o'.
|
||||
libc_libdir="$(< "${!curBintools}/nix-support/orig-libc")/lib"
|
||||
else
|
||||
# Hack: support impure environments.
|
||||
extraLDFlags=("-L/usr/lib64" "-L/usr/lib")
|
||||
libc_libdir="/usr/lib"
|
||||
fi
|
||||
extraLDFlags=("-L$libc_libdir" "-rpath" "$libc_libdir"
|
||||
"${extraLDFlags[@]}")
|
||||
for i in "${extraLDFlags[@]}"; do
|
||||
declare EXTRA_LDFLAGS${post}+=" -Wl,$i"
|
||||
done
|
||||
done
|
||||
|
||||
# Extract flags from CC Wrappers
|
||||
for post in '_FOR_BUILD' ''; do
|
||||
curCC="NIX_CC${post}"
|
||||
curFIXINC="NIX_FIXINC_DUMMY${post}"
|
||||
|
||||
declare -a extraFlags=()
|
||||
if [[ -e "${!curCC}/nix-support/orig-libc" ]]; then
|
||||
# Figure out what extra compiling flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our libc.
|
||||
extraFlags=($(< "${!curCC}/nix-support/libc-crt1-cflags") $(< "${!curCC}/nix-support/libc-cflags"))
|
||||
|
||||
# The path to the Libc headers
|
||||
libc_devdir="$(< "${!curCC}/nix-support/orig-libc-dev")"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated that
|
||||
# does not include Libc's limits.h (notably missing SSIZE_MAX,
|
||||
# which breaks the build).
|
||||
declare NIX_FIXINC_DUMMY${post}="$libc_devdir/include"
|
||||
else
|
||||
# Hack: support impure environments.
|
||||
extraFlags=("-isystem" "/usr/include")
|
||||
declare NIX_FIXINC_DUMMY${post}=/usr/include
|
||||
fi
|
||||
|
||||
extraFlags=("-I${!curFIXINC}" "${extraFlags[@]}")
|
||||
|
||||
# BOOT_CFLAGS defaults to `-g -O2'; since we override it below, make
|
||||
# sure to explictly add them so that files compiled with the bootstrap
|
||||
# compiler are optimized and (optionally) contain debugging information
|
||||
# (info "(gccinstall) Building").
|
||||
if test -n "${dontStrip-}"; then
|
||||
extraFlags=("-O2" "-g" "${extraFlags[@]}")
|
||||
else
|
||||
# Don't pass `-g' at all; this saves space while building.
|
||||
extraFlags=("-O2" "${extraFlags[@]}")
|
||||
fi
|
||||
|
||||
declare EXTRA_FLAGS${post}="${extraFlags[*]}"
|
||||
done
|
||||
|
||||
if test -z "${targetConfig-}"; then
|
||||
# host = target, so the flags are the same
|
||||
EXTRA_FLAGS_FOR_TARGET="$EXTRA_FLAGS"
|
||||
EXTRA_LDFLAGS_FOR_TARGET="$EXTRA_LDFLAGS"
|
||||
fi
|
||||
|
||||
# CFLAGS_FOR_TARGET are needed for the libstdc++ configure script to find
|
||||
# the startfiles.
|
||||
# FLAGS_FOR_TARGET are needed for the target libraries to receive the -Bxxx
|
||||
# for the startfiles.
|
||||
makeFlagsArray+=(
|
||||
"BUILD_SYSTEM_HEADER_DIR=$NIX_FIXINC_DUMMY_FOR_BUILD"
|
||||
"SYSTEM_HEADER_DIR=$NIX_FIXINC_DUMMY_FOR_BUILD"
|
||||
"NATIVE_SYSTEM_HEADER_DIR=$NIX_FIXINC_DUMMY"
|
||||
|
||||
"LDFLAGS_FOR_BUILD=$EXTRA_LDFLAGS_FOR_BUILD"
|
||||
#"LDFLAGS=$EXTRA_LDFLAGS"
|
||||
"LDFLAGS_FOR_TARGET=$EXTRA_LDFLAGS_FOR_TARGET"
|
||||
|
||||
"CFLAGS_FOR_BUILD=$EXTRA_FLAGS_FOR_BUILD $EXTRA_LDFLAGS_FOR_BUILD"
|
||||
"CXXFLAGS_FOR_BUILD=$EXTRA_FLAGS_FOR_BUILD $EXTRA_LDFLAGS_FOR_BUILD"
|
||||
"FLAGS_FOR_BUILD=$EXTRA_FLAGS_FOR_BUILD $EXTRA_LDFLAGS_FOR_BUILD"
|
||||
|
||||
# It seems there is a bug in GCC 5
|
||||
#"CFLAGS=$EXTRA_FLAGS $EXTRA_LDFLAGS"
|
||||
#"CXXFLAGS=$EXTRA_FLAGS $EXTRA_LDFLAGS"
|
||||
|
||||
"CFLAGS_FOR_TARGET=$EXTRA_FLAGS_FOR_TARGET $EXTRA_LDFLAGS_FOR_TARGET"
|
||||
"CXXFLAGS_FOR_TARGET=$EXTRA_FLAGS_FOR_TARGET $EXTRA_LDFLAGS_FOR_TARGET"
|
||||
"FLAGS_FOR_TARGET=$EXTRA_FLAGS_FOR_TARGET $EXTRA_LDFLAGS_FOR_TARGET"
|
||||
)
|
||||
|
||||
if test -z "${targetConfig-}"; then
|
||||
makeFlagsArray+=(
|
||||
"BOOT_CFLAGS=$EXTRA_FLAGS $EXTRA_LDFLAGS"
|
||||
"BOOT_LDFLAGS=$EXTRA_FLAGS_FOR_TARGET $EXTRA_LDFLAGS_FOR_TARGET"
|
||||
)
|
||||
fi
|
||||
|
||||
if test "$withoutTargetLibc" == 1; then
|
||||
# We don't want the gcc build to assume there will be a libc providing
|
||||
# limits.h in this stage
|
||||
makeFlagsArray+=(
|
||||
'LIMITS_H_TEST=false'
|
||||
)
|
||||
else
|
||||
makeFlagsArray+=(
|
||||
'LIMITS_H_TEST=true'
|
||||
)
|
||||
fi
|
||||
fi
|
||||
|
||||
eval "$oldOpts"
|
||||
|
||||
providedPreConfigure="$preConfigure";
|
||||
preConfigure() {
|
||||
if test -n "$newlibSrc"; then
|
||||
tar xvf "$newlibSrc" -C ..
|
||||
ln -s ../newlib-*/newlib newlib
|
||||
# Patch to get armvt5el working:
|
||||
sed -i -e 's/ arm)/ arm*)/' newlib/configure.host
|
||||
fi
|
||||
|
||||
# Bug - they packaged zlib
|
||||
if test -d "zlib"; then
|
||||
# This breaks the build without-headers, which should build only
|
||||
# the target libgcc as target libraries.
|
||||
# See 'configure:5370'
|
||||
rm -Rf zlib
|
||||
fi
|
||||
|
||||
if test -n "$crossMingw" -a -n "$withoutTargetLibc"; then
|
||||
mkdir -p ../mingw
|
||||
# --with-build-sysroot expects that:
|
||||
cp -R $libcCross/include ../mingw
|
||||
configureFlags="$configureFlags --with-build-sysroot=`pwd`/.."
|
||||
fi
|
||||
|
||||
# Eval the preConfigure script from nix expression.
|
||||
eval "$providedPreConfigure"
|
||||
|
||||
# Perform the build in a different directory.
|
||||
mkdir ../build
|
||||
cd ../build
|
||||
configureScript=../$sourceRoot/configure
|
||||
}
|
||||
|
||||
|
||||
postConfigure() {
|
||||
# Avoid store paths when embedding ./configure flags into gcc.
|
||||
# Mangled arguments are still useful when reporting bugs upstream.
|
||||
sed -e "/TOPLEVEL_CONFIGURE_ARGUMENTS=/ s|$NIX_STORE/[a-z0-9]\{32\}-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" -i Makefile
|
||||
}
|
||||
|
||||
|
||||
preInstall() {
|
||||
mkdir -p "$out/${targetConfig}/lib"
|
||||
mkdir -p "${!outputLib}/${targetConfig}/lib"
|
||||
# Make ‘lib64’ symlinks to ‘lib’.
|
||||
if [ -n "$linkLib64toLib" ]; then
|
||||
ln -s lib "$out/${targetConfig}/lib64"
|
||||
ln -s lib "${!outputLib}/${targetConfig}/lib64"
|
||||
fi
|
||||
# Make ‘lib32’ symlinks to ‘lib’.
|
||||
if [ -n "$linkLib32toLib" ]; then
|
||||
ln -s lib "$out/${targetConfig}/lib32"
|
||||
ln -s lib "${!outputLib}/${targetConfig}/lib32"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
postInstall() {
|
||||
# Move runtime libraries to lib output.
|
||||
moveToOutput "${targetConfig+$targetConfig/}lib/lib*.so*" "${!outputLib}"
|
||||
moveToOutput "${targetConfig+$targetConfig/}lib/lib*.la" "${!outputLib}"
|
||||
moveToOutput "${targetConfig+$targetConfig/}lib/lib*.dylib" "${!outputLib}"
|
||||
moveToOutput "${targetConfig+$targetConfig/}lib/lib*.dll.a" "${!outputLib}"
|
||||
moveToOutput "share/gcc-*/python" "${!outputLib}"
|
||||
|
||||
if [ -z "$enableShared" ]; then
|
||||
moveToOutput "${targetConfig+$targetConfig/}lib/lib*.a" "${!outputLib}"
|
||||
fi
|
||||
|
||||
for i in "${!outputLib}/${targetConfig}"/lib/*.{la,py}; do
|
||||
substituteInPlace "$i" --replace "$out" "${!outputLib}"
|
||||
done
|
||||
|
||||
if [ -n "$enableMultilib" ]; then
|
||||
moveToOutput "${targetConfig+$targetConfig/}lib64/lib*.so*" "${!outputLib}"
|
||||
moveToOutput "${targetConfig+$targetConfig/}lib64/lib*.la" "${!outputLib}"
|
||||
moveToOutput "${targetConfig+$targetConfig/}lib64/lib*.dylib" "${!outputLib}"
|
||||
|
||||
for i in "${!outputLib}/${targetConfig}"/lib64/*.{la,py}; do
|
||||
substituteInPlace "$i" --replace "$out" "${!outputLib}"
|
||||
done
|
||||
fi
|
||||
|
||||
# Remove `fixincl' to prevent a retained dependency on the
|
||||
# previous gcc.
|
||||
rm -rf $out/libexec/gcc/*/*/install-tools
|
||||
rm -rf $out/lib/gcc/*/*/install-tools
|
||||
|
||||
# More dependencies with the previous gcc or some libs (gccbug stores the build command line)
|
||||
rm -rf $out/bin/gccbug
|
||||
|
||||
if type "install_name_tool"; then
|
||||
for i in "${!outputLib}"/lib/*.*.dylib "${!outputLib}"/lib/*.so.[0-9]; do
|
||||
install_name_tool -id "$i" "$i" || true
|
||||
for old_path in $(otool -L "$i" | grep "$out" | awk '{print $1}'); do
|
||||
new_path=`echo "$old_path" | sed "s,$out,${!outputLib},"`
|
||||
install_name_tool -change "$old_path" "$new_path" "$i" || true
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
||||
# Cross-compiler specific:
|
||||
# --with-headers=$dir option triggers gcc to make a private copy
|
||||
# of $dir headers and use it later as `-isysroot`. This prevents
|
||||
# cc-wrapper from overriding libc headers with `-idirafter`.
|
||||
# It should be safe to drop it and rely solely on the cc-wrapper.
|
||||
local sysinc_dir=$out/${targetConfig+$targetConfig/}sys-include
|
||||
if [ -d "$sysinc_dir" ]; then
|
||||
chmod -R u+w "$out/${targetConfig+$targetConfig/}sys-include"
|
||||
rm -rfv "$out/${targetConfig+$targetConfig/}sys-include"
|
||||
fi
|
||||
|
||||
# Get rid of some "fixed" header files
|
||||
rm -rfv $out/lib/gcc/*/*/include-fixed/{root,linux,sys/mount.h,bits/statx.h}
|
||||
|
||||
# Replace hard links for i686-pc-linux-gnu-gcc etc. with symlinks.
|
||||
for i in $out/bin/*-gcc*; do
|
||||
if cmp -s $out/bin/gcc $i; then
|
||||
ln -sfn gcc $i
|
||||
fi
|
||||
done
|
||||
|
||||
for i in $out/bin/c++ $out/bin/*-c++* $out/bin/*-g++*; do
|
||||
if cmp -s $out/bin/g++ $i; then
|
||||
ln -sfn g++ $i
|
||||
fi
|
||||
done
|
||||
|
||||
# Two identical man pages are shipped (moving and compressing is done later)
|
||||
for i in "$out"/share/man/man1/*g++.1; do
|
||||
if test -e "$i"; then
|
||||
man_prefix=`echo "$i" | sed "s,.*/\(.*\)g++.1,\1,"`
|
||||
ln -sf "$man_prefix"gcc.1 "$i"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
genericBuild
|
278
pkgs/development/compilers/gcc/common/builder.nix
Normal file
278
pkgs/development/compilers/gcc/common/builder.nix
Normal file
@ -0,0 +1,278 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, enableMultilib
|
||||
}:
|
||||
|
||||
originalAttrs: (stdenv.mkDerivation (finalAttrs: originalAttrs // {
|
||||
preUnpack = ''
|
||||
oldOpts="$(shopt -po nounset)" || true
|
||||
set -euo pipefail
|
||||
|
||||
export NIX_FIXINC_DUMMY="$NIX_BUILD_TOP/dummy"
|
||||
mkdir "$NIX_FIXINC_DUMMY"
|
||||
|
||||
if test "$staticCompiler" = "1"; then
|
||||
EXTRA_LDFLAGS="-static"
|
||||
else
|
||||
EXTRA_LDFLAGS="-Wl,-rpath,''${!outputLib}/lib"
|
||||
fi
|
||||
|
||||
# GCC interprets empty paths as ".", which we don't want.
|
||||
if test -z "''${CPATH-}"; then unset CPATH; fi
|
||||
if test -z "''${LIBRARY_PATH-}"; then unset LIBRARY_PATH; fi
|
||||
echo "\$CPATH is \`''${CPATH-}'"
|
||||
echo "\$LIBRARY_PATH is \`''${LIBRARY_PATH-}'"
|
||||
|
||||
if test "$noSysDirs" = "1"; then
|
||||
|
||||
declare -g \
|
||||
EXTRA_FLAGS_FOR_BUILD EXTRA_FLAGS EXTRA_FLAGS_FOR_TARGET \
|
||||
EXTRA_LDFLAGS_FOR_BUILD EXTRA_LDFLAGS_FOR_TARGET
|
||||
|
||||
# Extract flags from Bintools Wrappers
|
||||
for post in '_FOR_BUILD' ""; do
|
||||
curBintools="NIX_BINTOOLS''${post}"
|
||||
|
||||
declare -a extraLDFlags=()
|
||||
if [[ -e "''${!curBintools}/nix-support/orig-libc" ]]; then
|
||||
# Figure out what extra flags when linking to pass to the gcc
|
||||
# compilers being generated to make sure that they use our libc.
|
||||
extraLDFlags=($(< "''${!curBintools}/nix-support/libc-ldflags") $(< "''${!curBintools}/nix-support/libc-ldflags-before" || true))
|
||||
if [ -e ''${!curBintools}/nix-support/ld-set-dynamic-linker ]; then
|
||||
extraLDFlags=-dynamic-linker=$(< ''${!curBintools}/nix-support/dynamic-linker)
|
||||
fi
|
||||
|
||||
# The path to the Libc binaries such as `crti.o'.
|
||||
libc_libdir="$(< "''${!curBintools}/nix-support/orig-libc")/lib"
|
||||
else
|
||||
# Hack: support impure environments.
|
||||
extraLDFlags=("-L/usr/lib64" "-L/usr/lib")
|
||||
libc_libdir="/usr/lib"
|
||||
fi
|
||||
extraLDFlags=("-L$libc_libdir" "-rpath" "$libc_libdir"
|
||||
"''${extraLDFlags[@]}")
|
||||
for i in "''${extraLDFlags[@]}"; do
|
||||
declare -g EXTRA_LDFLAGS''${post}+=" -Wl,$i"
|
||||
done
|
||||
done
|
||||
|
||||
# Extract flags from CC Wrappers
|
||||
for post in '_FOR_BUILD' ""; do
|
||||
curCC="NIX_CC''${post}"
|
||||
curFIXINC="NIX_FIXINC_DUMMY''${post}"
|
||||
|
||||
declare -a extraFlags=()
|
||||
if [[ -e "''${!curCC}/nix-support/orig-libc" ]]; then
|
||||
# Figure out what extra compiling flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our libc.
|
||||
extraFlags=($(< "''${!curCC}/nix-support/libc-crt1-cflags") $(< "''${!curCC}/nix-support/libc-cflags"))
|
||||
|
||||
# The path to the Libc headers
|
||||
libc_devdir="$(< "''${!curCC}/nix-support/orig-libc-dev")"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated that
|
||||
# does not include Libc's limits.h (notably missing SSIZE_MAX,
|
||||
# which breaks the build).
|
||||
declare -g NIX_FIXINC_DUMMY''${post}="$libc_devdir/include"
|
||||
else
|
||||
# Hack: support impure environments.
|
||||
extraFlags=("-isystem" "/usr/include")
|
||||
declare -g NIX_FIXINC_DUMMY''${post}=/usr/include
|
||||
fi
|
||||
|
||||
extraFlags=("-I''${!curFIXINC}" "''${extraFlags[@]}")
|
||||
|
||||
# BOOT_CFLAGS defaults to `-g -O2'; since we override it below, make
|
||||
# sure to explictly add them so that files compiled with the bootstrap
|
||||
# compiler are optimized and (optionally) contain debugging information
|
||||
# (info "(gccinstall) Building").
|
||||
if test -n "''${dontStrip-}"; then
|
||||
extraFlags=("-O2" "-g" "''${extraFlags[@]}")
|
||||
else
|
||||
# Don't pass `-g' at all; this saves space while building.
|
||||
extraFlags=("-O2" "''${extraFlags[@]}")
|
||||
fi
|
||||
|
||||
declare -g EXTRA_FLAGS''${post}="''${extraFlags[*]}"
|
||||
done
|
||||
|
||||
if test -z "''${targetConfig-}"; then
|
||||
# host = target, so the flags are the same
|
||||
EXTRA_FLAGS_FOR_TARGET="$EXTRA_FLAGS"
|
||||
EXTRA_LDFLAGS_FOR_TARGET="$EXTRA_LDFLAGS"
|
||||
fi
|
||||
|
||||
# CFLAGS_FOR_TARGET are needed for the libstdc++ configure script to find
|
||||
# the startfiles.
|
||||
# FLAGS_FOR_TARGET are needed for the target libraries to receive the -Bxxx
|
||||
# for the startfiles.
|
||||
makeFlagsArray+=(
|
||||
"BUILD_SYSTEM_HEADER_DIR=$NIX_FIXINC_DUMMY_FOR_BUILD"
|
||||
"SYSTEM_HEADER_DIR=$NIX_FIXINC_DUMMY_FOR_BUILD"
|
||||
"NATIVE_SYSTEM_HEADER_DIR=$NIX_FIXINC_DUMMY"
|
||||
|
||||
"LDFLAGS_FOR_BUILD=$EXTRA_LDFLAGS_FOR_BUILD"
|
||||
#"LDFLAGS=$EXTRA_LDFLAGS"
|
||||
"LDFLAGS_FOR_TARGET=$EXTRA_LDFLAGS_FOR_TARGET"
|
||||
|
||||
"CFLAGS_FOR_BUILD=$EXTRA_FLAGS_FOR_BUILD $EXTRA_LDFLAGS_FOR_BUILD"
|
||||
"CXXFLAGS_FOR_BUILD=$EXTRA_FLAGS_FOR_BUILD $EXTRA_LDFLAGS_FOR_BUILD"
|
||||
"FLAGS_FOR_BUILD=$EXTRA_FLAGS_FOR_BUILD $EXTRA_LDFLAGS_FOR_BUILD"
|
||||
|
||||
# It seems there is a bug in GCC 5
|
||||
#"CFLAGS=$EXTRA_FLAGS $EXTRA_LDFLAGS"
|
||||
#"CXXFLAGS=$EXTRA_FLAGS $EXTRA_LDFLAGS"
|
||||
|
||||
"CFLAGS_FOR_TARGET=$EXTRA_FLAGS_FOR_TARGET $EXTRA_LDFLAGS_FOR_TARGET"
|
||||
"CXXFLAGS_FOR_TARGET=$EXTRA_FLAGS_FOR_TARGET $EXTRA_LDFLAGS_FOR_TARGET"
|
||||
"FLAGS_FOR_TARGET=$EXTRA_FLAGS_FOR_TARGET $EXTRA_LDFLAGS_FOR_TARGET"
|
||||
)
|
||||
|
||||
if test -z "''${targetConfig-}"; then
|
||||
makeFlagsArray+=(
|
||||
"BOOT_CFLAGS=$EXTRA_FLAGS $EXTRA_LDFLAGS"
|
||||
"BOOT_LDFLAGS=$EXTRA_FLAGS_FOR_TARGET $EXTRA_LDFLAGS_FOR_TARGET"
|
||||
)
|
||||
fi
|
||||
|
||||
if test "$withoutTargetLibc" == 1; then
|
||||
# We don't want the gcc build to assume there will be a libc providing
|
||||
# limits.h in this stage
|
||||
makeFlagsArray+=(
|
||||
'LIMITS_H_TEST=false'
|
||||
)
|
||||
else
|
||||
makeFlagsArray+=(
|
||||
'LIMITS_H_TEST=true'
|
||||
)
|
||||
fi
|
||||
fi
|
||||
|
||||
eval "$oldOpts"
|
||||
'';
|
||||
|
||||
preConfigure = (originalAttrs.preConfigure or "") + ''
|
||||
if test -n "$newlibSrc"; then
|
||||
tar xvf "$newlibSrc" -C ..
|
||||
ln -s ../newlib-*/newlib newlib
|
||||
# Patch to get armvt5el working:
|
||||
sed -i -e 's/ arm)/ arm*)/' newlib/configure.host
|
||||
fi
|
||||
|
||||
# Bug - they packaged zlib
|
||||
if test -d "zlib"; then
|
||||
# This breaks the build without-headers, which should build only
|
||||
# the target libgcc as target libraries.
|
||||
# See 'configure:5370'
|
||||
rm -Rf zlib
|
||||
fi
|
||||
|
||||
if test -n "$crossMingw" -a -n "$withoutTargetLibc"; then
|
||||
mkdir -p ../mingw
|
||||
# --with-build-sysroot expects that:
|
||||
cp -R $libcCross/include ../mingw
|
||||
configureFlags="$configureFlags --with-build-sysroot=`pwd`/.."
|
||||
fi
|
||||
|
||||
# Perform the build in a different directory.
|
||||
mkdir ../build
|
||||
cd ../build
|
||||
configureScript=../$sourceRoot/configure
|
||||
'';
|
||||
|
||||
postConfigure = ''
|
||||
# Avoid store paths when embedding ./configure flags into gcc.
|
||||
# Mangled arguments are still useful when reporting bugs upstream.
|
||||
sed -e "/TOPLEVEL_CONFIGURE_ARGUMENTS=/ s|$NIX_STORE/[a-z0-9]\{32\}-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g" -i Makefile
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
mkdir -p "$out/''${targetConfig}/lib"
|
||||
mkdir -p "''${!outputLib}/''${targetConfig}/lib"
|
||||
'' +
|
||||
# Make `lib64` symlinks to `lib`.
|
||||
lib.optionalString (!enableMultilib && stdenv.hostPlatform.is64bit && !stdenv.hostPlatform.isMips64n32) ''
|
||||
ln -s lib "$out/''${targetConfig}/lib64"
|
||||
ln -s lib "''${!outputLib}/''${targetConfig}/lib64"
|
||||
'' +
|
||||
# On mips platforms, gcc follows the IRIX naming convention:
|
||||
#
|
||||
# $PREFIX/lib = mips32
|
||||
# $PREFIX/lib32 = mips64n32
|
||||
# $PREFIX/lib64 = mips64
|
||||
#
|
||||
# Make `lib32` symlinks to `lib`.
|
||||
lib.optionalString (!enableMultilib && stdenv.targetPlatform.isMips64n32) ''
|
||||
ln -s lib "$out/''${targetConfig}/lib32"
|
||||
ln -s lib "''${!outputLib}/''${targetConfig}/lib32"
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# Move runtime libraries to lib output.
|
||||
moveToOutput "''${targetConfig+$targetConfig/}lib/lib*.so*" "''${!outputLib}"
|
||||
moveToOutput "''${targetConfig+$targetConfig/}lib/lib*.la" "''${!outputLib}"
|
||||
moveToOutput "''${targetConfig+$targetConfig/}lib/lib*.dylib" "''${!outputLib}"
|
||||
moveToOutput "''${targetConfig+$targetConfig/}lib/lib*.dll.a" "''${!outputLib}"
|
||||
moveToOutput "share/gcc-*/python" "''${!outputLib}"
|
||||
|
||||
if [ -z "$enableShared" ]; then
|
||||
moveToOutput "''${targetConfig+$targetConfig/}lib/lib*.a" "''${!outputLib}"
|
||||
fi
|
||||
|
||||
for i in "''${!outputLib}/''${targetConfig}"/lib/*.{la,py}; do
|
||||
substituteInPlace "$i" --replace "$out" "''${!outputLib}"
|
||||
done
|
||||
|
||||
if [ -n "$enableMultilib" ]; then
|
||||
moveToOutput "''${targetConfig+$targetConfig/}lib64/lib*.so*" "''${!outputLib}"
|
||||
moveToOutput "''${targetConfig+$targetConfig/}lib64/lib*.la" "''${!outputLib}"
|
||||
moveToOutput "''${targetConfig+$targetConfig/}lib64/lib*.dylib" "''${!outputLib}"
|
||||
|
||||
for i in "''${!outputLib}/''${targetConfig}"/lib64/*.{la,py}; do
|
||||
substituteInPlace "$i" --replace "$out" "''${!outputLib}"
|
||||
done
|
||||
fi
|
||||
|
||||
# Remove `fixincl' to prevent a retained dependency on the
|
||||
# previous gcc.
|
||||
rm -rf $out/libexec/gcc/*/*/install-tools
|
||||
rm -rf $out/lib/gcc/*/*/install-tools
|
||||
|
||||
# More dependencies with the previous gcc or some libs (gccbug stores the build command line)
|
||||
rm -rf $out/bin/gccbug
|
||||
|
||||
if type "install_name_tool"; then
|
||||
for i in "''${!outputLib}"/lib/*.*.dylib "''${!outputLib}"/lib/*.so.[0-9]; do
|
||||
install_name_tool -id "$i" "$i" || true
|
||||
for old_path in $(otool -L "$i" | grep "$out" | awk '{print $1}'); do
|
||||
new_path=`echo "$old_path" | sed "s,$out,''${!outputLib},"`
|
||||
install_name_tool -change "$old_path" "$new_path" "$i" || true
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
||||
# Get rid of some "fixed" header files
|
||||
rm -rfv $out/lib/gcc/*/*/include-fixed/{root,linux,sys/mount.h,bits/statx.h}
|
||||
|
||||
# Replace hard links for i686-pc-linux-gnu-gcc etc. with symlinks.
|
||||
for i in $out/bin/*-gcc*; do
|
||||
if cmp -s $out/bin/gcc $i; then
|
||||
ln -sfn gcc $i
|
||||
fi
|
||||
done
|
||||
|
||||
for i in $out/bin/c++ $out/bin/*-c++* $out/bin/*-g++*; do
|
||||
if cmp -s $out/bin/g++ $i; then
|
||||
ln -sfn g++ $i
|
||||
fi
|
||||
done
|
||||
|
||||
# Two identical man pages are shipped (moving and compressing is done later)
|
||||
for i in "$out"/share/man/man1/*g++.1; do
|
||||
if test -e "$i"; then
|
||||
man_prefix=`echo "$i" | sed "s,.*/\(.*\)g++.1,\1,"`
|
||||
ln -sf "$man_prefix"gcc.1 "$i"
|
||||
fi
|
||||
done
|
||||
'';
|
||||
}))
|
@ -148,16 +148,3 @@ in lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
|
||||
echo 'SHLIB_LC=${SHLIB_LC}' >> libgcc/Makefile.in
|
||||
'')
|
||||
|
||||
+ lib.optionalString (!enableMultilib && hostPlatform.is64bit && !hostPlatform.isMips64n32) ''
|
||||
export linkLib64toLib=1
|
||||
''
|
||||
|
||||
# On mips platforms, gcc follows the IRIX naming convention:
|
||||
#
|
||||
# $PREFIX/lib = mips32
|
||||
# $PREFIX/lib32 = mips64n32
|
||||
# $PREFIX/lib64 = mips64
|
||||
#
|
||||
+ lib.optionalString (!enableMultilib && targetPlatform.isMips64n32) ''
|
||||
export linkLib32toLib=1
|
||||
''
|
||||
|
@ -73,12 +73,13 @@ let
|
||||
--replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang." \
|
||||
--replace "\''${_IMPORT_PREFIX}/lib/libclang-cpp." "$lib/lib/libclang-cpp."
|
||||
|
||||
mkdir -p $python/bin $python/share/clang/
|
||||
mkdir -p $python/bin $python/share/{clang,scan-view}
|
||||
mv $out/bin/{git-clang-format,scan-view} $python/bin
|
||||
if [ -e $out/bin/set-xcode-analyzer ]; then
|
||||
mv $out/bin/set-xcode-analyzer $python/bin
|
||||
fi
|
||||
mv $out/share/clang/*.py $python/share/clang
|
||||
mv $out/share/scan-view/*.py $python/share/scan-view
|
||||
rm $out/bin/c-index-test
|
||||
patchShebangs $python/bin
|
||||
|
||||
|
@ -78,12 +78,13 @@ let
|
||||
--replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang." \
|
||||
--replace "\''${_IMPORT_PREFIX}/lib/libclang-cpp." "$lib/lib/libclang-cpp."
|
||||
|
||||
mkdir -p $python/bin $python/share/clang/
|
||||
mkdir -p $python/bin $python/share/{clang,scan-view}
|
||||
mv $out/bin/{git-clang-format,scan-view} $python/bin
|
||||
if [ -e $out/bin/set-xcode-analyzer ]; then
|
||||
mv $out/bin/set-xcode-analyzer $python/bin
|
||||
fi
|
||||
mv $out/share/clang/*.py $python/share/clang
|
||||
mv $out/share/scan-view/*.py $python/share/scan-view
|
||||
rm $out/bin/c-index-test
|
||||
patchShebangs $python/bin
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user