Merge #186941: staging-next 2022-08-16

This commit is contained in:
Vladimír Čunát 2022-08-24 19:10:16 +02:00
commit b784c5ae63
No known key found for this signature in database
GPG Key ID: E747DF1F9575A3AA
237 changed files with 1371 additions and 2312 deletions

View File

@ -734,6 +734,16 @@ work in any of the formats supported by `buildPythonPackage` currently,
with the exception of `other` (see `format` in
[`buildPythonPackage` parameters](#buildpythonpackage-parameters) for more details).
### Using unittestCheckHook {#using-unittestcheckhook}
`unittestCheckHook` is a hook which will substitute the setuptools `test` command for a `checkPhase` which runs `python -m unittest discover`:
```
checkInputs = [ unittestCheckHook ];
unittestFlags = [ "-s" "tests" "-v" ];
```
### Develop local package {#develop-local-package}
As a Python developer you're likely aware of [development mode](http://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode)
@ -1270,6 +1280,7 @@ are used in `buildPythonPackage`.
with the `pipInstallHook`.
- `pythonRelaxDepsHook` will relax Python dependencies restrictions for the package.
See [example usage](#using-pythonrelaxdepshook).
- `unittestCheckHook` will run tests with `python -m unittest discover`. See [example usage](#using-unittestcheckhook).
### Development mode {#development-mode}

View File

@ -65,11 +65,17 @@ rec {
# is why we use the more obscure "bfd" and not "binutils" for this
# choice.
else "bfd";
extensions = {
extensions = rec {
sharedLibrary =
/**/ if final.isDarwin then ".dylib"
else if final.isWindows then ".dll"
else ".so";
staticLibrary =
/**/ if final.isWindows then ".lib"
else ".a";
library =
/**/ if final.isStatic then staticLibrary
else sharedLibrary;
executable =
/**/ if final.isWindows then ".exe"
else "";

View File

@ -37,6 +37,7 @@ in python3.pkgs.buildPythonApplication rec {
nativeBuildInputs = with python3.pkgs; [
setuptools-scm
docutils
setuptoolsCheckHook
];
propagatedBuildInputs = with python3.pkgs; [
@ -64,14 +65,12 @@ in python3.pkgs.buildPythonApplication rec {
export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
'';
checkPhase = ''
runHook preCheck
preCheck = ''
# disable tests that require internet access
# https://github.com/JoeLametta/whipper/issues/291
substituteInPlace whipper/test/test_common_accurip.py \
--replace "test_AccurateRipResponse" "dont_test_AccurateRipResponse"
HOME=$TMPDIR ${python3.interpreter} -m unittest discover
runHook postCheck
export HOME=$TMPDIR
'';
passthru.tests.version = testers.testVersion {

View File

@ -1,12 +1,12 @@
{ lib, fetchFromGitHub }:
rec {
version = "9.0.0135";
version = "9.0.0180";
src = fetchFromGitHub {
owner = "vim";
repo = "vim";
rev = "v${version}";
sha256 = "sha256-xAIfGNJIPO9XoSbAQTRa36Tjln3y+oWQk0lADCnL25g=";
hash = "sha256-38l97auTi6cue457bfRHme5fvsAmvk1MT2va1E/qguw=";
};
enableParallelBuilding = true;
@ -24,7 +24,7 @@ rec {
description = "The most popular clone of the VI editor";
homepage = "http://www.vim.org";
license = licenses.vim;
maintainers = with maintainers; [ lovek323 equirosa ];
maintainers = with maintainers; [ das_j equirosa ];
platforms = platforms.unix;
};
}

View File

@ -9,7 +9,7 @@ let
version = "3.1.14";
src = old.src.override {
inherit version;
sha256 = "72a4a5a136a214c39cf016ccdd6b69e2aa08c7479c66d93f3a9b5e4bb9d8a347";
hash = "sha256-cqSloTaiFMOc8BbM3Wtp4qoIx0ecZtk/OpteS7nYo0c=";
};
meta = old.meta // {
knownVulnerabilities = [

View File

@ -52,11 +52,9 @@ buildPythonApplication rec {
# will fail without pre-seeded config files
doCheck = false;
checkInputs = [ mock ];
checkInputs = [ unittestCheckHook mock ];
checkPhase = ''
${python.interpreter} -m unittest discover -s tests -v
'';
unittestFlagsArray = [ "-s" "tests" "-v" ];
meta = with lib; {
homepage = "https://github.com/donnemartin/haxor-news";

View File

@ -15,9 +15,7 @@ in buildPythonApplication rec {
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [ pyyaml six jinja2 cerberus_1_1 ];
checkPhase = ''
${python.interpreter} -m unittest discover
'';
checkInputs = [ unittestCheckHook ];
meta = with lib; {
homepage = "https://pythonhosted.org/pyditz/";

View File

@ -1,4 +1,4 @@
{ lib, python3Packages, fetchFromGitHub, glibcLocales }:
{ lib, python3Packages, fetchFromGitHub, glibcLocales, unittestCheckHook }:
with python3Packages;
@ -22,16 +22,15 @@ buildPythonApplication rec {
watchdog
];
checkInputs = [ mock freezegun pylint ];
checkInputs = [ unittestCheckHook mock freezegun pylint ];
# Skip test that has been reported multiple times upstream without result:
# bram85/topydo#271, bram85/topydo#274.
checkPhase = ''
preCheck = ''
substituteInPlace test/test_revert_command.py --replace 'test_revert_ls' 'dont_test_revert_ls'
python -m unittest discover
'';
LC_ALL="en_US.UTF-8";
LC_ALL = "en_US.UTF-8";
meta = with lib; {
description = "A cli todo application compatible with the todo.txt format";

View File

@ -531,7 +531,6 @@ buildStdenv.mkDerivation ({
header "separating debug info from $i (build ID $id)"
mkdir -p "$dst/''${id:0:2}"
$OBJCOPY --only-keep-debug "$i" "$dst/''${id:0:2}/''${id:2}.debug"
$STRIP --strip-debug "$i"
# Also a create a symlink <original-name>.debug.
ln -sfn ".build-id/''${id:0:2}/''${id:2}.debug" "$dst/../$(basename "$i")"

View File

@ -1,4 +1,4 @@
{ stdenv, lib, fetchgit, wrapGAppsHook, autoreconfHook, bison, flex
{ stdenv, lib, fetchgit, fetchurl, wrapGAppsHook, autoreconfHook, bison, flex
, curl, gtk3, pkg-config, python3, shared-mime-info
, glib-networking, gsettings-desktop-schemas
@ -110,6 +110,11 @@ in stdenv.mkDerivation rec {
patches = [
./mime.patch
# fix build with perl 5.36+
(fetchurl {
url = "https://raw.githubusercontent.com/archlinux/svntogit-packages/packages/claws-mail/trunk/20cope_with_fix_for_1009149.patch";
hash = "sha256-/WBslmoFvja2v2GEBntxvNtG0I3xtkUUqXO5gl5pqqs=";
})
];
preConfigure = ''

View File

@ -205,6 +205,8 @@ in
# Fix build with poppler 22.04
./poppler-22-04-0.patch
./gpgme-1.18.patch
];
### QT/KDE

View File

@ -0,0 +1,10 @@
The way this check mixes C and C++ started to cause issues since gpgme 1.18.0
But we can confidently skip the function check anyway.
--- a/configure.ac
+++ b/configure.ac
@@ -12302,4 +12302 @@
- # progress_callback is the only func with plain C linkage
- # checking for it also filters out older, KDE-dependent libgpgmepp versions
- AC_CHECK_LIB(gpgmepp, progress_callback, [ GPGMEPP_LIBS=-lgpgmepp ],
- [AC_MSG_ERROR(gpgmepp not found or not functional)], [])
+ GPGMEPP_LIBS=-lgpgmepp

View File

@ -16,6 +16,8 @@
mkDerivation rec {
pname = "audiotube";
postPatch = "sed '1i#include <iostream>' -i src/ytmusic.cpp";
nativeBuildInputs = [
extra-cmake-modules
gcc11 # doesn't build with GCC 9 from stdenv on aarch64

View File

@ -28,7 +28,7 @@ assert sendEmailSupport -> perlSupport;
assert svnSupport -> perlSupport;
let
version = "2.37.1";
version = "2.37.2";
svn = subversionClient.override { perlBindings = perlSupport; };
gitwebPerlLibs = with perlPackages; [ CGI HTMLParser CGIFast FCGI FCGIProcManager HTMLTagCloud ];
in
@ -41,7 +41,7 @@ stdenv.mkDerivation (finalAttrs: {
src = fetchurl {
url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz";
sha256 = "sha256-yBYsa4uPHF23BqsBtO4p4xBhGCE13CfEhgIkquwbNQA=";
sha256 = "sha256-HD2cghxFOOem2sMKSvi9jc/k9lH5VHTFJrUvg0BtsAM=";
};
outputs = [ "out" ] ++ lib.optional withManual "doc";

View File

@ -365,7 +365,7 @@ stdenv.mkDerivation {
##
+ extraBuildCommands;
inherit dynamicLinker expand-response-params;
inherit dynamicLinker;
# for substitution in utils.bash
expandResponseParams = "${expand-response-params}/bin/expand-response-params";

View File

@ -157,6 +157,8 @@ stdenv.mkDerivation {
'(${concatStringsSep " " (map (pkg: "\"${pkg}\"") pkgs)}))
'';
inherit expand-response-params;
inherit nixSupport;
};
@ -540,7 +542,6 @@ stdenv.mkDerivation {
(name: value: "echo ${toString value} >> $out/nix-support/${name}")
nixSupport);
inherit expand-response-params;
# for substitution in utils.bash
expandResponseParams = "${expand-response-params}/bin/expand-response-params";

View File

@ -75,11 +75,8 @@ in {
${lib.optionalString (stdenv.buildPlatform.config != stdenv.hostPlatform.config) ''
[target."${shortTarget}"]
"linker" = "${ccForHost}"
${# https://github.com/rust-lang/rust/issues/46651#issuecomment-433611633
lib.optionalString (stdenv.hostPlatform.isMusl && stdenv.hostPlatform.isAarch64) ''
"rustflags" = [ "-C", "target-feature=+crt-static", "-C", "link-arg=-lgcc" ]
''}
''}
"rustflags" = [ "-C", "target-feature=${if stdenv.hostPlatform.isStatic then "+" else "-"}crt-static" ]
'';
};
} ./cargo-setup-hook.sh) {};

View File

@ -2,7 +2,6 @@ export NIX_SET_BUILD_ID=1
export NIX_LDFLAGS+=" --compress-debug-sections=zlib"
export NIX_CFLAGS_COMPILE+=" -ggdb -Wa,--compress-debug-sections"
export RUSTFLAGS+=" -g"
dontStrip=1
fixupOutputHooks+=(_separateDebugInfo)
@ -35,7 +34,6 @@ _separateDebugInfo() {
# firmware blobs in QEMU.)
(
$OBJCOPY --only-keep-debug "$i" "$dst/${id:0:2}/${id:2}.debug"
$STRIP --strip-debug "$i"
# Also a create a symlink <original-name>.debug.
ln -sfn ".build-id/${id:0:2}/${id:2}.debug" "$dst/../$(basename "$i")"

View File

@ -38,26 +38,27 @@ _doStrip() {
stripDirs() {
local cmd="$1"
local ranlibCmd="$2"
local dirs="$3"
local paths="$3"
local stripFlags="$4"
local dirsNew=
local pathsNew=
local d
for d in ${dirs}; do
if [ -d "$prefix/$d" ]; then
dirsNew="${dirsNew} $prefix/$d "
local p
for p in ${paths}; do
if [ -e "$prefix/$p" ]; then
pathsNew="${pathsNew} $prefix/$p"
fi
done
dirs=${dirsNew}
paths=${pathsNew}
if [ -n "${dirs}" ]; then
echo "stripping (with command $cmd and flags $stripFlags) in$dirs"
find $dirs -type f -exec $cmd $stripFlags '{}' \; 2>/dev/null
if [ -n "${paths}" ]; then
echo "stripping (with command $cmd and flags $stripFlags) in $paths"
# 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
# '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 $dirs -name '*.a' -type f -exec $ranlibCmd '{}' \; 2>/dev/null
find $paths -name '*.a' -type f -exec $ranlibCmd '{}' \; 2>/dev/null
fi
}

View File

@ -2,18 +2,18 @@
stdenv.mkDerivation rec {
pname = "tzdata";
version = "2022a";
version = "2022b";
srcs =
[ (fetchurl {
url = "https://data.iana.org/time-zones/releases/tzdata${version}.tar.gz";
sha256 = "0r0nhwpk9nyxj5kkvjy58nr5d85568m04dcb69c4y3zmykczyzzg";
})
(fetchurl {
url = "https://data.iana.org/time-zones/releases/tzcode${version}.tar.gz";
sha256 = "1iysv8fdkm79k8wh8jizmjmq075q4qjhk090vxjy57my6dz5wmzq";
})
];
srcs = [
(fetchurl {
url = "https://data.iana.org/time-zones/releases/tzdata${version}.tar.gz";
hash = "sha256-9ZDq8Eo5UkVCbCvk+uccFDrqXOvBEIi3oKVwRGHfOX0=";
})
(fetchurl {
url = "https://data.iana.org/time-zones/releases/tzcode${version}.tar.gz";
hash = "sha256-urINlD5ZoyGENfSNhopOVS8Y1tfz3RKGYMVmDIC4oF8=";
})
];
sourceRoot = ".";

View File

@ -88,6 +88,7 @@ stdenv.mkDerivation rec {
};
meta = with lib; {
broken = true; # won't build with current meson; upstream is dead/archived
homepage = "https://wiki.gnome.org/Apps/Books";
description = "An e-book manager application for GNOME";
maintainers = teams.gnome.members;

View File

@ -188,7 +188,7 @@ stdenv.mkDerivation ({
preConfigure = import ../common/pre-configure.nix {
inherit lib;
inherit version targetPlatform hostPlatform gnatboot langAda langGo langJit crossStageStatic;
inherit version targetPlatform hostPlatform gnatboot langAda langGo langJit crossStageStatic enableMultilib;
};
dontDisableStatic = true;
@ -229,7 +229,7 @@ stdenv.mkDerivation ({
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
inherit
(import ../common/strip-attributes.nix { inherit stdenv; })
(import ../common/strip-attributes.nix { inherit lib stdenv langJit; })
stripDebugList
stripDebugListTarget
preFixup;
@ -268,8 +268,6 @@ stdenv.mkDerivation ({
enableParallelBuilding = true;
inherit enableMultilib enableShared;
inherit (stdenv) is64bit;
meta = {
homepage = "https://gcc.gnu.org/";
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+

View File

@ -74,8 +74,8 @@ let majorVersion = "11";
++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch
++ optional (stdenv.isDarwin && stdenv.isAarch64) (fetchpatch {
url = "https://github.com/fxcoudert/gcc/compare/releases/gcc-11.1.0...gcc-11.1.0-arm-20210504.diff";
sha256 = "sha256-JqCGJAfbOxSmkNyq49aFHteK/RFsCSLQrL9mzUCnaD0=";
url = "https://github.com/fxcoudert/gcc/compare/releases/gcc-11.2.0...gcc-11.2.0-arm-20211201.diff";
sha256 = "sha256-z62s/cXuH9Kgq/oD/OiiZ8LWnX1xl1D43sONnwaEW1w=";
})
# Obtain latest patch with ../update-mcfgthread-patches.sh
@ -196,7 +196,7 @@ stdenv.mkDerivation ({
preConfigure = import ../common/pre-configure.nix {
inherit lib;
inherit version targetPlatform hostPlatform gnatboot langAda langGo langJit crossStageStatic;
inherit version targetPlatform hostPlatform gnatboot langAda langGo langJit crossStageStatic enableMultilib;
};
dontDisableStatic = true;
@ -237,7 +237,7 @@ stdenv.mkDerivation ({
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
inherit
(import ../common/strip-attributes.nix { inherit stdenv; })
(import ../common/strip-attributes.nix { inherit lib stdenv langJit; })
stripDebugList
stripDebugListTarget
preFixup;
@ -276,8 +276,6 @@ stdenv.mkDerivation ({
enableParallelBuilding = true;
inherit enableShared enableMultilib;
inherit (stdenv) is64bit;
meta = {
homepage = "https://gcc.gnu.org/";
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+

View File

@ -191,7 +191,7 @@ stdenv.mkDerivation ({
preConfigure = import ../common/pre-configure.nix {
inherit lib;
inherit version targetPlatform hostPlatform gnatboot langAda langGo langJit crossStageStatic;
inherit version targetPlatform hostPlatform gnatboot langAda langGo langJit crossStageStatic enableMultilib;
};
dontDisableStatic = true;
@ -232,7 +232,7 @@ stdenv.mkDerivation ({
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
inherit
(import ../common/strip-attributes.nix { inherit stdenv; })
(import ../common/strip-attributes.nix { inherit lib stdenv langJit; })
stripDebugList
stripDebugListTarget
preFixup;
@ -271,8 +271,6 @@ stdenv.mkDerivation ({
enableParallelBuilding = true;
inherit enableShared enableMultilib;
inherit (stdenv) is64bit;
meta = {
homepage = "https://gcc.gnu.org/";
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+

View File

@ -195,7 +195,7 @@ stdenv.mkDerivation ({
preConfigure = import ../common/pre-configure.nix {
inherit lib;
inherit version targetPlatform hostPlatform langJava langGo crossStageStatic;
inherit version targetPlatform hostPlatform langJava langGo crossStageStatic enableMultilib;
};
dontDisableStatic = true;
@ -236,7 +236,7 @@ stdenv.mkDerivation ({
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
inherit
(import ../common/strip-attributes.nix { inherit stdenv; })
(import ../common/strip-attributes.nix { inherit lib stdenv langJit; })
stripDebugList
stripDebugListTarget
preFixup;
@ -291,8 +291,6 @@ stdenv.mkDerivation ({
enableParallelBuilding = true;
inherit enableShared enableMultilib;
inherit (stdenv) is64bit;
meta = {
homepage = "https://gcc.gnu.org/";
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+

View File

@ -215,7 +215,7 @@ stdenv.mkDerivation ({
preConfigure = import ../common/pre-configure.nix {
inherit lib;
inherit version targetPlatform hostPlatform langJava langGo crossStageStatic;
inherit version targetPlatform hostPlatform langJava langGo crossStageStatic enableMultilib;
};
dontDisableStatic = true;
@ -256,7 +256,7 @@ stdenv.mkDerivation ({
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
inherit
(import ../common/strip-attributes.nix { inherit stdenv; })
(import ../common/strip-attributes.nix { inherit lib stdenv langJit; })
stripDebugList
stripDebugListTarget
preFixup;
@ -310,8 +310,6 @@ stdenv.mkDerivation ({
enableParallelBuilding = true;
inherit enableShared enableMultilib;
inherit (stdenv) is64bit;
meta = {
homepage = "https://gcc.gnu.org/";
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+

View File

@ -227,7 +227,7 @@ stdenv.mkDerivation ({
preConfigure = import ../common/pre-configure.nix {
inherit lib;
inherit version targetPlatform hostPlatform gnatboot langJava langAda langGo crossStageStatic;
inherit version targetPlatform hostPlatform gnatboot langJava langAda langGo crossStageStatic enableMultilib;
};
dontDisableStatic = true;
@ -268,7 +268,7 @@ stdenv.mkDerivation ({
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
inherit
(import ../common/strip-attributes.nix { inherit stdenv; })
(import ../common/strip-attributes.nix { inherit lib stdenv langJit; })
stripDebugList
stripDebugListTarget
preFixup;
@ -322,8 +322,6 @@ stdenv.mkDerivation ({
enableParallelBuilding = true;
inherit enableShared enableMultilib;
inherit (stdenv) is64bit;
meta = {
homepage = "https://gcc.gnu.org/";
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+

View File

@ -194,7 +194,7 @@ stdenv.mkDerivation ({
preConfigure = import ../common/pre-configure.nix {
inherit lib;
inherit version targetPlatform hostPlatform langGo crossStageStatic;
inherit version targetPlatform hostPlatform langGo crossStageStatic enableMultilib;
};
dontDisableStatic = true;
@ -235,7 +235,7 @@ stdenv.mkDerivation ({
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
inherit
(import ../common/strip-attributes.nix { inherit stdenv; })
(import ../common/strip-attributes.nix { inherit lib stdenv langJit; })
stripDebugList
stripDebugListTarget
preFixup;
@ -276,8 +276,6 @@ stdenv.mkDerivation ({
enableParallelBuilding = true;
inherit enableShared enableMultilib;
inherit (stdenv) is64bit;
meta = {
homepage = "https://gcc.gnu.org/";
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+

View File

@ -177,7 +177,7 @@ stdenv.mkDerivation ({
preConfigure = import ../common/pre-configure.nix {
inherit lib;
inherit version targetPlatform hostPlatform langGo crossStageStatic;
inherit version targetPlatform hostPlatform langGo crossStageStatic enableMultilib;
};
dontDisableStatic = true;
@ -216,7 +216,7 @@ stdenv.mkDerivation ({
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
inherit
(import ../common/strip-attributes.nix { inherit stdenv; })
(import ../common/strip-attributes.nix { inherit lib stdenv langJit; })
stripDebugList
stripDebugListTarget
preFixup;
@ -255,8 +255,6 @@ stdenv.mkDerivation ({
enableParallelBuilding = true;
inherit enableShared enableMultilib;
inherit (stdenv) is64bit;
meta = {
homepage = "https://gcc.gnu.org/";
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+

View File

@ -190,7 +190,7 @@ stdenv.mkDerivation ({
preConfigure = import ../common/pre-configure.nix {
inherit lib;
inherit version targetPlatform hostPlatform gnatboot langAda langGo langJit crossStageStatic;
inherit version targetPlatform hostPlatform gnatboot langAda langGo langJit crossStageStatic enableMultilib;
};
dontDisableStatic = true;
@ -231,7 +231,7 @@ stdenv.mkDerivation ({
(if profiledCompiler then "profiledbootstrap" else "bootstrap");
inherit
(import ../common/strip-attributes.nix { inherit stdenv; })
(import ../common/strip-attributes.nix { inherit lib stdenv langJit; })
stripDebugList
stripDebugListTarget
preFixup;
@ -270,8 +270,6 @@ stdenv.mkDerivation ({
enableParallelBuilding = true;
inherit enableShared enableMultilib;
inherit (stdenv) is64bit;
meta = {
homepage = "https://gcc.gnu.org/";
license = lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+

View File

@ -193,10 +193,15 @@ preInstall() {
mkdir -p "$out/${targetConfig}/lib"
mkdir -p "${!outputLib}/${targetConfig}/lib"
# Make lib64 symlinks to lib.
if [ -n "$is64bit" -a -z "$enableMultilib" ]; then
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
}

View File

@ -5,6 +5,7 @@
, langJit ? false
, langGo
, crossStageStatic
, enableMultilib
}:
assert langJava -> lib.versionOlder version "7";
@ -78,3 +79,17 @@ in lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) ''
+ lib.optionalString (targetPlatform != hostPlatform && crossStageStatic) ''
export inhibit_libc=true
''
+ 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
''

View File

@ -1,4 +1,4 @@
{ stdenv }:
{ lib, stdenv, langJit }:
{
# Note [Cross-compiler stripping]
@ -8,7 +8,9 @@
# Example ARM breakage by x86_64 strip: https://bugs.gentoo.org/697428
#
# Let's recap the file layout for directories with object files for a
# cross-compiler (host != target):
# cross-compiler:
#
# $out (host != target)
# `- bin: HOST
# lib/*.{a,o}: HOST
# `- gcc/<TARGET>/<VERSION>/*.{a,o}: TARGET
@ -17,10 +19,16 @@
# `- libexec/: HOST
# `- <TARGET>/: TARGET
#
# (host == target) has identical directory layout.
# $out (host == target) has identical directory layout.
#
# $lib (host != target):
# `- <TARGET>/lib/*.{la,so}: TARGET
#
# $lib (host == target):
# `- lib/*.{la,so}: HOST
# The rest of stripDebugList{Host,Target} will be populated in
# postInstall.
# postInstall to disambiguate lib/ object files.
stripDebugList = [ "bin" "libexec" ];
stripDebugListTarget = [ stdenv.targetPlatform.config ];
@ -32,21 +40,30 @@
shopt -s nullglob
pushd $out
local -ar hostFiles=(
lib{,32,64}/*.{a.o}
local -ar outHostFiles=(
lib{,32,64}/*.{a,o,so*}
lib{,32,64}/gcc/${stdenv.targetPlatform.config}/*/plugin
)
local -ar targetFiles=(
lib{,32,64}/gcc/${stdenv.targetPlatform.config}/*/*.{a.o}
local -ar outTargetFiles=(
lib{,32,64}/gcc/${stdenv.targetPlatform.config}/*/*.{a,o,so*}
)
popd
'' + lib.optionalString (!langJit) ''
${/*keep indentation*/ ""}
pushd $lib
local -ar libHostFiles=(
lib{,32,64}/*.{a,o,so*}
)
local -ar libTargetFiles=(
lib{,32,64}/${stdenv.targetPlatform.config}/*.{a,o,so*}
)
stripDebugList="$stripDebugList ''${hostFiles[*]}"
stripDebugListTarget="$stripDebugListTarget ''${targetFiles[*]}"
popd
'' + ''
eval "$oldOpts"
stripDebugList="$stripDebugList ''${outHostFiles[*]} ''${libHostFiles[*]}"
stripDebugListTarget="$stripDebugListTarget ''${outTargetFiles[*]} ''${libTargetFiles[*]}"
}
updateDebugListPaths
'';

View File

@ -9,13 +9,13 @@
}:
stdenv.mkDerivation rec {
pname = "glslang";
version = "1.3.211.0";
version = "1.3.216.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "glslang";
rev = "sdk-${version}";
sha256 = "sha256-YLn/Mxuk6mXPGtBBgfwky5Nl1TCAW6i2g+AZLzqVz+A=";
hash = "sha256-sjidkiPtRADhyOEKDb2cHCBXnFjLwk2F5Lppv5/fwNQ=";
};
# These get set at all-packages, keep onto them for child drvs

View File

@ -3,7 +3,6 @@
, fetchurl
, tzdata
, iana-etc
, runCommand
, perl
, which
, pkg-config
@ -21,15 +20,7 @@
}:
let
go_bootstrap = buildPackages.callPackage ./bootstrap116.nix { };
goBootstrap = runCommand "go-bootstrap" { } ''
mkdir $out
cp -rf ${go_bootstrap}/* $out/
chmod -R u+w $out
find $out -name "*.c" -delete
cp -rf $out/bin/* $out/share/go/bin/
'';
goBootstrap = buildPackages.callPackage ./bootstrap116.nix { };
goarch = platform: {
"aarch64" = "arm64";
@ -277,6 +268,10 @@ stdenv.mkDerivation rec {
disallowedReferences = [ goBootstrap ];
passthru = {
inherit goBootstrap;
};
meta = with lib; {
description = "The Go Programming language";
homepage = "https://go.dev/";

View File

@ -2,34 +2,24 @@
, stdenv
, fetchurl
, tzdata
, substituteAll
, iana-etc
, runCommand
, perl
, which
, pkg-config
, procps
, pcre
, cacert
, Security
, Foundation
, xcbuild
, mailcap
, runtimeShell
, buildPackages
, pkgsBuildTarget
, threadsCross
, testers
, skopeo
, buildGo118Module
}:
let
go_bootstrap = buildPackages.callPackage ./bootstrap116.nix { };
goBootstrap = buildPackages.callPackage ./bootstrap116.nix { };
goBootstrap = runCommand "go-bootstrap" { } ''
mkdir $out
cp -rf ${go_bootstrap}/* $out/
chmod -R u+w $out
find $out -name "*.c" -delete
cp -rf $out/bin/* $out/share/go/bin/
'';
skopeoTest = skopeo.override { buildGoModule = buildGo118Module; };
goarch = platform: {
"aarch64" = "arm64";
@ -63,126 +53,41 @@ stdenv.mkDerivation rec {
};
strictDeps = true;
# perl is used for testing go vet
nativeBuildInputs = [ perl which pkg-config procps ];
buildInputs = [ cacert pcre ]
buildInputs = [ ]
++ lib.optionals stdenv.isLinux [ stdenv.cc.libc.out ]
++ lib.optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ];
propagatedBuildInputs = lib.optionals stdenv.isDarwin [ xcbuild ];
depsTargetTargetPropagated = lib.optionals stdenv.isDarwin [ Security Foundation ];
depsTargetTargetPropagated = lib.optionals stdenv.isDarwin [ Foundation Security xcbuild ];
depsBuildTarget = lib.optional isCross targetCC;
depsTargetTarget = lib.optional stdenv.targetPlatform.isWindows threadsCross;
hardeningDisable = [ "all" ];
prePatch = ''
patchShebangs ./ # replace /bin/bash
# This source produces shell script at run time,
# and thus it is not corrected by patchShebangs.
substituteInPlace misc/cgo/testcarchive/carchive_test.go \
--replace '#!/usr/bin/env bash' '#!${runtimeShell}'
# Patch the mimetype database location which is missing on NixOS.
# but also allow static binaries built with NixOS to run outside nix
sed -i 's,\"/etc/mime.types,"${mailcap}/etc/mime.types\"\,\n\t&,' src/mime/type_unix.go
# Disabling the 'os/http/net' tests (they want files not available in
# chroot builds)
rm src/net/{listen,parse}_test.go
rm src/syscall/exec_linux_test.go
# !!! substituteInPlace does not seems to be effective.
# The os test wants to read files in an existing path. Just don't let it be /usr/bin.
sed -i 's,/usr/bin,'"`pwd`", src/os/os_test.go
sed -i 's,/bin/pwd,'"`type -P pwd`", src/os/os_test.go
# Fails on aarch64
sed -i '/TestFallocate/aif true \{ return\; \}' src/cmd/link/internal/ld/fallocate_test.go
# Skip this test since ssl patches mess it up.
sed -i '/TestLoadSystemCertsLoadColonSeparatedDirs/aif true \{ return\; \}' src/crypto/x509/root_unix_test.go
# Disable another PIE test which breaks.
sed -i '/TestTrivialPIE/aif true \{ return\; \}' misc/cgo/testshared/shared_test.go
# Disable the BuildModePie test
sed -i '/TestBuildmodePIE/aif true \{ return\; \}' src/cmd/go/go_test.go
# Disable the unix socket test
sed -i '/TestShutdownUnix/aif true \{ return\; \}' src/net/net_test.go
# Disable the hostname test
sed -i '/TestHostname/aif true \{ return\; \}' src/os/os_test.go
# ParseInLocation fails the test
sed -i '/TestParseInSydney/aif true \{ return\; \}' src/time/format_test.go
# Remove the api check as it never worked
sed -i '/src\/cmd\/api\/run.go/ireturn nil' src/cmd/dist/test.go
# Remove the coverage test as we have removed this utility
sed -i '/TestCoverageWithCgo/aif true \{ return\; \}' src/cmd/go/go_test.go
# Remove the timezone naming test
sed -i '/TestLoadFixed/aif true \{ return\; \}' src/time/time_test.go
# Remove disable setgid test
sed -i '/TestRespectSetgidDir/aif true \{ return\; \}' src/cmd/go/internal/work/build_test.go
# Remove cert tests that conflict with NixOS's cert resolution
sed -i '/TestEnvVars/aif true \{ return\; \}' src/crypto/x509/root_unix_test.go
# TestWritevError hangs sometimes
sed -i '/TestWritevError/aif true \{ return\; \}' src/net/writev_test.go
# TestVariousDeadlines fails sometimes
sed -i '/TestVariousDeadlines/aif true \{ return\; \}' src/net/timeout_test.go
sed -i 's,/etc/protocols,${iana-etc}/etc/protocols,' src/net/lookup_unix.go
sed -i 's,/etc/services,${iana-etc}/etc/services,' src/net/port_unix.go
# Disable cgo lookup tests not works, they depend on resolver
rm src/net/cgo_unix_test.go
# prepend the nix path to the zoneinfo files but also leave the original value for static binaries
# that run outside a nix server
sed -i 's,\"/usr/share/zoneinfo/,"${tzdata}/share/zoneinfo/\"\,\n\t&,' src/time/zoneinfo_unix.go
'' + lib.optionalString stdenv.isAarch32 ''
echo '#!${runtimeShell}' > misc/cgo/testplugin/test.bash
'' + lib.optionalString stdenv.isDarwin ''
substituteInPlace src/race.bash --replace \
"sysctl machdep.cpu.extfeatures | grep -qv EM64T" true
sed -i 's,strings.Contains(.*sysctl.*,true {,' src/cmd/dist/util.go
sed -i 's,"/etc","'"$TMPDIR"'",' src/os/os_test.go
sed -i 's,/_go_os_test,'"$TMPDIR"'/_go_os_test,' src/os/path_test.go
sed -i '/TestChdirAndGetwd/aif true \{ return\; \}' src/os/os_test.go
sed -i '/TestCredentialNoSetGroups/aif true \{ return\; \}' src/os/exec/exec_posix_test.go
sed -i '/TestRead0/aif true \{ return\; \}' src/os/os_test.go
sed -i '/TestSystemRoots/aif true \{ return\; \}' src/crypto/x509/root_darwin_test.go
sed -i '/TestGoInstallRebuildsStalePackagesInOtherGOPATH/aif true \{ return\; \}' src/cmd/go/go_test.go
sed -i '/TestBuildDashIInstallsDependencies/aif true \{ return\; \}' src/cmd/go/go_test.go
sed -i '/TestDisasmExtld/aif true \{ return\; \}' src/cmd/objdump/objdump_test.go
sed -i 's/unrecognized/unknown/' src/cmd/link/internal/ld/lib.go
# TestCurrent fails because Current is not implemented on Darwin
sed -i 's/TestCurrent/testCurrent/g' src/os/user/user_test.go
sed -i 's/TestLookup/testLookup/g' src/os/user/user_test.go
touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd
postPatch = ''
patchShebangs .
'';
patches = [
(substituteAll {
src = ./iana-etc-1.17.patch;
iana = iana-etc;
})
# Patch the mimetype database location which is missing on NixOS.
# but also allow static binaries built with NixOS to run outside nix
(substituteAll {
src = ./mailcap-1.17.patch;
inherit mailcap;
})
# prepend the nix path to the zoneinfo files but also leave the original value for static binaries
# that run outside a nix server
(substituteAll {
src = ./tzdata-1.17.patch;
inherit tzdata;
})
./remove-tools-1.11.patch
./ssl-cert-file-1.16.patch
./remove-test-pie-1.15.patch
./creds-test.patch
./skip-chown-tests-1.16.patch
./skip-external-network-tests-1.16.patch
./skip-nohup-tests.patch
./skip-cgo-tests-1.15.patch
./go_no_vendor_checks-1.16.patch
];
postPatch = ''
find . -name '*.orig' -exec rm {} ';'
'';
GOOS = stdenv.targetPlatform.parsed.kernel.name;
GOARCH = goarch stdenv.targetPlatform;
# GOHOSTOS/GOHOSTARCH must match the building system, not the host system.
@ -207,16 +112,11 @@ stdenv.mkDerivation rec {
GOARM = toString (lib.intersectLists [ (stdenv.hostPlatform.parsed.cpu.version or "") ] [ "5" "6" "7" ]);
GO386 = "softfloat"; # from Arch: don't assume sse2 on i686
CGO_ENABLED = 1;
# Hopefully avoids test timeouts on Hydra
GO_TEST_TIMEOUT_SCALE = 3;
# Indicate that we are running on build infrastructure
# Some tests assume things like home directories and users exists
GO_BUILDER_NAME = "nix";
GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
postConfigure = ''
buildPhase = ''
runHook preBuild
export GOCACHE=$TMPDIR/go-cache
# this is compiled into the binary
export GOROOT_FINAL=$out/share/go
@ -229,18 +129,11 @@ stdenv.mkDerivation rec {
export CC=${buildPackages.stdenv.cc}/bin/cc
''}
ulimit -a
'';
postBuild = ''
(cd src && ./make.bash)
'';
doCheck = stdenv.hostPlatform == stdenv.targetPlatform && !stdenv.isDarwin;
checkPhase = ''
runHook preCheck
(cd src && HOME=$TMPDIR GOCACHE=$TMPDIR/go-cache ./run.bash --no-rebuild)
runHook postCheck
pushd src
./make.bash
popd
runHook postBuild
'';
preInstall = ''
@ -271,6 +164,13 @@ stdenv.mkDerivation rec {
disallowedReferences = [ goBootstrap ];
passthru = {
inherit goBootstrap skopeoTest;
tests = {
skopeo = testers.testVersion { package = skopeoTest; };
};
};
meta = with lib; {
description = "The Go Programming language";
homepage = "https://go.dev/";

View File

@ -2,34 +2,24 @@
, stdenv
, fetchurl
, tzdata
, substituteAll
, iana-etc
, runCommand
, perl
, which
, pkg-config
, procps
, pcre
, cacert
, Security
, Foundation
, xcbuild
, mailcap
, runtimeShell
, buildPackages
, pkgsBuildTarget
, threadsCross
, testers
, skopeo
, buildGo119Module
}:
let
go_bootstrap = buildPackages.callPackage ./bootstrap116.nix { };
goBootstrap = buildPackages.callPackage ./bootstrap116.nix { };
goBootstrap = runCommand "go-bootstrap" { } ''
mkdir $out
cp -rf ${go_bootstrap}/* $out/
chmod -R u+w $out
find $out -name "*.c" -delete
cp -rf $out/bin/* $out/share/go/bin/
'';
skopeoTest = skopeo.override { buildGoModule = buildGo119Module; };
goarch = platform: {
"aarch64" = "arm64";
@ -63,125 +53,41 @@ stdenv.mkDerivation rec {
};
strictDeps = true;
# perl is used for testing go vet
nativeBuildInputs = [ perl which pkg-config procps ];
buildInputs = [ cacert pcre ]
buildInputs = [ ]
++ lib.optionals stdenv.isLinux [ stdenv.cc.libc.out ]
++ lib.optionals (stdenv.hostPlatform.libc == "glibc") [ stdenv.cc.libc.static ];
propagatedBuildInputs = lib.optionals stdenv.isDarwin [ xcbuild ];
depsTargetTargetPropagated = lib.optionals stdenv.isDarwin [ Security Foundation ];
depsTargetTargetPropagated = lib.optionals stdenv.isDarwin [ Foundation Security xcbuild ];
depsBuildTarget = lib.optional isCross targetCC;
depsTargetTarget = lib.optional stdenv.targetPlatform.isWindows threadsCross;
hardeningDisable = [ "all" ];
prePatch = ''
patchShebangs ./ # replace /bin/bash
# This source produces shell script at run time,
# and thus it is not corrected by patchShebangs.
substituteInPlace misc/cgo/testcarchive/carchive_test.go \
--replace '#!/usr/bin/env bash' '#!${runtimeShell}'
# Patch the mimetype database location which is missing on NixOS.
# but also allow static binaries built with NixOS to run outside nix
sed -i 's,\"/etc/mime.types,"${mailcap}/etc/mime.types\"\,\n\t&,' src/mime/type_unix.go
# Disabling the 'os/http/net' tests (they want files not available in
# chroot builds)
rm src/net/{listen,parse}_test.go
rm src/syscall/exec_linux_test.go
# !!! substituteInPlace does not seems to be effective.
# The os test wants to read files in an existing path. Just don't let it be /usr/bin.
sed -i 's,/usr/bin,'"`pwd`", src/os/os_test.go
sed -i 's,/bin/pwd,'"`type -P pwd`", src/os/os_test.go
# Fails on aarch64
sed -i '/TestFallocate/aif true \{ return\; \}' src/cmd/link/internal/ld/fallocate_test.go
# Skip this test since ssl patches mess it up.
sed -i '/TestLoadSystemCertsLoadColonSeparatedDirs/aif true \{ return\; \}' src/crypto/x509/root_unix_test.go
# Disable another PIE test which breaks.
sed -i '/TestTrivialPIE/aif true \{ return\; \}' misc/cgo/testshared/shared_test.go
# Disable the BuildModePie test
sed -i '/TestBuildmodePIE/aif true \{ return\; \}' src/cmd/go/go_test.go
# Disable the unix socket test
sed -i '/TestShutdownUnix/aif true \{ return\; \}' src/net/net_test.go
# Disable the hostname test
sed -i '/TestHostname/aif true \{ return\; \}' src/os/os_test.go
# ParseInLocation fails the test
sed -i '/TestParseInSydney/aif true \{ return\; \}' src/time/format_test.go
# Remove the api check as it never worked
sed -i '/src\/cmd\/api\/run.go/ireturn nil' src/cmd/dist/test.go
# Remove the coverage test as we have removed this utility
sed -i '/TestCoverageWithCgo/aif true \{ return\; \}' src/cmd/go/go_test.go
# Remove the timezone naming test
sed -i '/TestLoadFixed/aif true \{ return\; \}' src/time/time_test.go
# Remove disable setgid test
sed -i '/TestRespectSetgidDir/aif true \{ return\; \}' src/cmd/go/internal/work/build_test.go
# Remove cert tests that conflict with NixOS's cert resolution
sed -i '/TestEnvVars/aif true \{ return\; \}' src/crypto/x509/root_unix_test.go
# TestWritevError hangs sometimes
sed -i '/TestWritevError/aif true \{ return\; \}' src/net/writev_test.go
# TestVariousDeadlines fails sometimes
sed -i '/TestVariousDeadlines/aif true \{ return\; \}' src/net/timeout_test.go
sed -i 's,/etc/protocols,${iana-etc}/etc/protocols,' src/net/lookup_unix.go
sed -i 's,/etc/services,${iana-etc}/etc/services,' src/net/port_unix.go
# Disable cgo lookup tests not works, they depend on resolver
rm src/net/cgo_unix_test.go
# prepend the nix path to the zoneinfo files but also leave the original value for static binaries
# that run outside a nix server
sed -i 's,\"/usr/share/zoneinfo/,"${tzdata}/share/zoneinfo/\"\,\n\t&,' src/time/zoneinfo_unix.go
'' + lib.optionalString stdenv.isAarch32 ''
echo '#!${runtimeShell}' > misc/cgo/testplugin/test.bash
'' + lib.optionalString stdenv.isDarwin ''
substituteInPlace src/race.bash --replace \
"sysctl machdep.cpu.extfeatures | grep -qv EM64T" true
sed -i 's,strings.Contains(.*sysctl.*,true {,' src/cmd/dist/util.go
sed -i 's,"/etc","'"$TMPDIR"'",' src/os/os_test.go
sed -i 's,/_go_os_test,'"$TMPDIR"'/_go_os_test,' src/os/path_test.go
sed -i '/TestChdirAndGetwd/aif true \{ return\; \}' src/os/os_test.go
sed -i '/TestCredentialNoSetGroups/aif true \{ return\; \}' src/os/exec/exec_posix_test.go
sed -i '/TestRead0/aif true \{ return\; \}' src/os/os_test.go
sed -i '/TestSystemRoots/aif true \{ return\; \}' src/crypto/x509/root_darwin_test.go
sed -i '/TestGoInstallRebuildsStalePackagesInOtherGOPATH/aif true \{ return\; \}' src/cmd/go/go_test.go
sed -i '/TestBuildDashIInstallsDependencies/aif true \{ return\; \}' src/cmd/go/go_test.go
sed -i '/TestDisasmExtld/aif true \{ return\; \}' src/cmd/objdump/objdump_test.go
sed -i 's/unrecognized/unknown/' src/cmd/link/internal/ld/lib.go
# TestCurrent fails because Current is not implemented on Darwin
sed -i 's/TestCurrent/testCurrent/g' src/os/user/user_test.go
sed -i 's/TestLookup/testLookup/g' src/os/user/user_test.go
touch $TMPDIR/group $TMPDIR/hosts $TMPDIR/passwd
postPatch = ''
patchShebangs .
'';
patches = [
(substituteAll {
src = ./iana-etc-1.17.patch;
iana = iana-etc;
})
# Patch the mimetype database location which is missing on NixOS.
# but also allow static binaries built with NixOS to run outside nix
(substituteAll {
src = ./mailcap-1.17.patch;
inherit mailcap;
})
# prepend the nix path to the zoneinfo files but also leave the original value for static binaries
# that run outside a nix server
(substituteAll {
src = ./tzdata-1.19.patch;
inherit tzdata;
})
./remove-tools-1.11.patch
./ssl-cert-file-1.16.patch
./remove-test-pie-1.15.patch
./skip-chown-tests-1.16.patch
./skip-external-network-tests-1.16.patch
./skip-nohup-tests.patch
./skip-cgo-tests-1.19.patch
./go_no_vendor_checks-1.16.patch
];
postPatch = ''
find . -name '*.orig' -exec rm {} ';'
'';
GOOS = stdenv.targetPlatform.parsed.kernel.name;
GOARCH = goarch stdenv.targetPlatform;
# GOHOSTOS/GOHOSTARCH must match the building system, not the host system.
@ -206,16 +112,11 @@ stdenv.mkDerivation rec {
GOARM = toString (lib.intersectLists [ (stdenv.hostPlatform.parsed.cpu.version or "") ] [ "5" "6" "7" ]);
GO386 = "softfloat"; # from Arch: don't assume sse2 on i686
CGO_ENABLED = 1;
# Hopefully avoids test timeouts on Hydra
GO_TEST_TIMEOUT_SCALE = 3;
# Indicate that we are running on build infrastructure
# Some tests assume things like home directories and users exists
GO_BUILDER_NAME = "nix";
GOROOT_BOOTSTRAP = "${goBootstrap}/share/go";
postConfigure = ''
buildPhase = ''
runHook preBuild
export GOCACHE=$TMPDIR/go-cache
# this is compiled into the binary
export GOROOT_FINAL=$out/share/go
@ -228,18 +129,11 @@ stdenv.mkDerivation rec {
export CC=${buildPackages.stdenv.cc}/bin/cc
''}
ulimit -a
'';
postBuild = ''
(cd src && ./make.bash)
'';
doCheck = stdenv.hostPlatform == stdenv.targetPlatform && !stdenv.isDarwin;
checkPhase = ''
runHook preCheck
(cd src && HOME=$TMPDIR GOCACHE=$TMPDIR/go-cache ./run.bash --no-rebuild)
runHook postCheck
pushd src
./make.bash
popd
runHook postBuild
'';
preInstall = ''
@ -270,6 +164,13 @@ stdenv.mkDerivation rec {
disallowedReferences = [ goBootstrap ];
passthru = {
inherit goBootstrap skopeoTest;
tests = {
skopeo = testers.testVersion { package = skopeoTest; };
};
};
meta = with lib; {
description = "The Go Programming language";
homepage = "https://go.dev/";

View File

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, version, hashes }:
{ lib, stdenv, fetchurl, version, hashes, autoPatchelfHook }:
let
toGoKernel = platform:
if platform.isDarwin then "darwin"
@ -25,19 +25,16 @@ stdenv.mkDerivation rec {
sha256 = hashes.${platform} or (throw "Missing Go bootstrap hash for platform ${platform}");
};
nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
# We must preserve the signature on Darwin
dontStrip = stdenv.hostPlatform.isDarwin;
installPhase = ''
runHook preInstall
mkdir -p $out/share/go $out/bin
mv bin/* $out/bin
cp -r . $out/share/go
${lib.optionalString stdenv.isLinux (''
patchelf \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
$out/bin/go
'')}
ln -s $out/share/go/bin/go $out/bin/go
runHook postInstall
'';
}

View File

@ -0,0 +1,26 @@
diff --git a/src/net/lookup_unix.go b/src/net/lookup_unix.go
index 8030e3d99e..5a7472d933 100644
--- a/src/net/lookup_unix.go
+++ b/src/net/lookup_unix.go
@@ -21,7 +21,7 @@ var onceReadProtocols sync.Once
// readProtocols loads contents of /etc/protocols into protocols map
// for quick access.
func readProtocols() {
- file, err := open("/etc/protocols")
+ file, err := open("@iana@/etc/protocols")
if err != nil {
return
}
diff --git a/src/net/port_unix.go b/src/net/port_unix.go
index a9a96a2323..0df6efe9e5 100644
--- a/src/net/port_unix.go
+++ b/src/net/port_unix.go
@@ -17,7 +17,7 @@ import (
var onceReadServices sync.Once
func readServices() {
- file, err := open("/etc/services")
+ file, err := open("@iana@/etc/services")
if err != nil {
return
}

View File

@ -0,0 +1,12 @@
diff --git a/src/mime/type_unix.go b/src/mime/type_unix.go
index f954bc8a1f..06d897bfbf 100644
--- a/src/mime/type_unix.go
+++ b/src/mime/type_unix.go
@@ -26,6 +26,7 @@ var mimeGlobs = []string{
// Common locations for mime.types files on unix.
var typeFiles = []string{
+ "@mailcap@/etc/mime.types",
"/etc/mime.types",
"/etc/apache2/mime.types",
"/etc/apache/mime.types",

View File

@ -1,13 +0,0 @@
diff --git a/src/cmd/dist/test.go b/src/cmd/dist/test.go
index e1cd4965c3..0980d044df 100644
--- a/src/cmd/dist/test.go
+++ b/src/cmd/dist/test.go
@@ -1136,7 +1136,7 @@ func (t *tester) cgoTest(dt *distTest) error {
t.addCmd(dt, "misc/cgo/test", t.goTest(), "-buildmode=pie", "-ldflags=-linkmode=internal")
}
t.addCmd(dt, "misc/cgo/testtls", t.goTest(), "-buildmode=pie", ".")
- t.addCmd(dt, "misc/cgo/nocgo", t.goTest(), "-buildmode=pie", ".")
+ //t.addCmd(dt, "misc/cgo/nocgo", t.goTest(), "-buildmode=pie", ".")
}
}
}

View File

@ -0,0 +1,12 @@
diff --git a/src/time/zoneinfo_unix.go b/src/time/zoneinfo_unix.go
index 4ea029dbde..af94a4d90b 100644
--- a/src/time/zoneinfo_unix.go
+++ b/src/time/zoneinfo_unix.go
@@ -20,6 +20,7 @@ import (
// Many systems use /usr/share/zoneinfo, Solaris 2 has
// /usr/share/lib/zoneinfo, IRIX 6 has /usr/lib/locale/TZ.
var zoneSources = []string{
+ "@tzdata@/share/zoneinfo/",
"/usr/share/zoneinfo/",
"/usr/share/lib/zoneinfo/",
"/usr/lib/locale/TZ/",

View File

@ -0,0 +1,12 @@
diff --git a/src/time/zoneinfo_unix.go b/src/time/zoneinfo_unix.go
index 67b8beb47b..5cd1fb1759 100644
--- a/src/time/zoneinfo_unix.go
+++ b/src/time/zoneinfo_unix.go
@@ -18,6 +18,7 @@ import (
// Many systems use /usr/share/zoneinfo, Solaris 2 has
// /usr/share/lib/zoneinfo, IRIX 6 has /usr/lib/locale/TZ.
var platformZoneSources = []string{
+ "@tzdata@/share/zoneinfo/",
"/usr/share/zoneinfo/",
"/usr/share/lib/zoneinfo/",
"/usr/lib/locale/TZ/",

View File

@ -20,8 +20,8 @@
} @ args:
import ./default.nix {
rustcVersion = "1.62.1";
rustcSha256 = "sha256-cqy+b/zZT1mDgqdDCw2F7o9nnm0LJ/P1Zu0cFsl4Ez8=";
rustcVersion = "1.63.0";
rustcSha256 = "1l4rrbzhxv88pnfq94nbyb9m6lfnjwixma3mwjkmvvs2aqlq158z";
llvmSharedForBuild = pkgsBuildBuild.llvmPackages_14.libllvm.override { enableSharedLibraries = true; };
llvmSharedForHost = pkgsBuildHost.llvmPackages_14.libllvm.override { enableSharedLibraries = true; };
@ -37,25 +37,25 @@ import ./default.nix {
# Note: the version MUST be one version prior to the version we're
# building
bootstrapVersion = "1.61.0";
bootstrapVersion = "1.62.1";
# fetch hashes by running `print-hashes.sh ${bootstrapVersion}`
bootstrapHashes = {
i686-unknown-linux-gnu = "b15eb0ad44b7253e0b5b1a8cd285feb10e9fb0402840dba9a13112c3349a4b39";
x86_64-unknown-linux-gnu = "066b324239d30787ce64142d7e04912f2e1850c07db3b2354d8654e02ff8b23a";
x86_64-unknown-linux-musl = "0904f6b769ae28c259e0e25a41e99290a4ae2a36bca63ae153790b2ebbc427bf";
arm-unknown-linux-gnueabihf = "cc32705cd1b583aaac74e6663f71392131dc0355a0f484cb56f0378b71ea7ebc";
armv7-unknown-linux-gnueabihf = "2782ec75ea4abb402513e2e57becc6c14e67b492d57228cddedef6db0853b165";
aarch64-unknown-linux-gnu = "261cd47bc3c98c9f97b601d1ad2a7d9b33c9ea63c9a351119c2f6d4e82f5d436";
aarch64-unknown-linux-musl = "feb79985cb161a10b252236852df8db3bf3593c78905b84c7e94cd4454327e47";
x86_64-apple-darwin = "d851f1a473926a5d8f111ed08002047a5dc4ad944a5b7f8d5d2f1f266b51e66a";
aarch64-apple-darwin = "2dbafd13d007543aada47179fa273f9a3865f27e0a07bd69be61801232a0819e";
powerpc64le-unknown-linux-gnu = "6d5cd579b68a2adc20384406c69a92beaaf4941056e126ff0ed1ec2f3a4e721f";
riscv64gc-unknown-linux-gnu = "3d0f3b1a8522e09fffdf920a061794ac3107410eb1fe8f5d62a7aae3c6dcb81e";
mips64el-unknown-linux-gnuabi64 = "6ed5b6492e68f45488108abd06dbcd4b89c46cdbd4715331bb11e88f18500815";
i686-unknown-linux-gnu = "1669163ffe01e252ffb62da7d84949378fc274931a65ac827d54059a5ffc542c";
x86_64-unknown-linux-gnu = "dd7d82b8fa8eae59729e1c31fe59a9de6ee61d08ab40ce016185653beebe04d2";
x86_64-unknown-linux-musl = "32bee487074b105e2582cddce35934a6019eec74bae3f9300fdc3edfcf5b66d4";
arm-unknown-linux-gnueabihf = "5c735e8174d394936d7b499c2d147ddadf3c4d77e652d1e0b0a72d9d09f81ea4";
armv7-unknown-linux-gnueabihf = "26fa731385f1a71211ba8e3c94f3bb3b1a82bde89f8d4dcf75b4b463b57b0f88";
aarch64-unknown-linux-gnu = "1311fa8204f895d054c23a3481de3b158a5cd3b3a6338761fee9cdf4dbf075a5";
aarch64-unknown-linux-musl = "73bbab4d8a9e3c416035d40406e656ab37e785df35fa069a33af52e931a24b12";
x86_64-apple-darwin = "0a04dcf2b521239826f3eaa66d77169d91e68087ccc3107b54e8aba7c02c9adf";
aarch64-apple-darwin = "6d1671ea31b05cab5e2587cc2b295b3e7232b0135f0977355618e2a01933ff0a";
powerpc64le-unknown-linux-gnu = "1d3248e1a673cda87cf443cd4334ff5fb53e6f87c72d3587b07e5c0cb507f3ae";
riscv64gc-unknown-linux-gnu = "fd378d0bf866689e8111aba0e2b020da87f32f70fb11d98a575d42dc05978c2a";
mips64el-unknown-linux-gnuabi64 = "b7c47dd94728161aa96762fb7bc51b6ab0feba7c5215d06eaea5b78649815a96";
};
selectRustPackage = pkgs: pkgs.rust_1_62;
selectRustPackage = pkgs: pkgs.rust_1_63;
rustcPatches = [
];

View File

@ -1,4 +1,5 @@
{ lib, stdenv, makeWrapper, bash, curl, darwin, zlib
, autoPatchelfHook, gcc
, version
, src
, platform
@ -31,7 +32,9 @@ rec {
license = [ licenses.mit licenses.asl20 ];
};
nativeBuildInputs = lib.optional (!stdenv.isDarwin) autoPatchelfHook;
buildInputs = [ bash ]
++ lib.optionals (!stdenv.isDarwin) [ gcc.cc.lib zlib ]
++ lib.optional stdenv.isDarwin Security;
postPatch = ''
@ -42,24 +45,6 @@ rec {
./install.sh --prefix=$out \
--components=${installComponents}
${optionalString (stdenv.isLinux && bootstrapping) (''
patchelf \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
"$out/bin/rustc"
'' + optionalString (lib.versionAtLeast version "1.46")
# rustc bootstrap needs libz starting from 1.46
''
ln -s ${zlib}/lib/libz.so.1 $out/lib/libz.so.1
ln -s ${zlib}/lib/libz.so $out/lib/libz.so
'' + ''
patchelf \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
"$out/bin/rustdoc"
patchelf \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
"$out/bin/cargo"
'')}
# Do NOT, I repeat, DO NOT use `wrapProgram` on $out/bin/rustc
# (or similar) here. It causes strange effects where rustc loads
# the wrong libraries in a bootstrap-build causing failures that
@ -83,8 +68,11 @@ rec {
license = [ licenses.mit licenses.asl20 ];
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ bash ] ++ lib.optional stdenv.isDarwin Security;
nativeBuildInputs = [ makeWrapper ]
++ lib.optional (!stdenv.isDarwin) autoPatchelfHook;
buildInputs = [ bash ]
++ lib.optional (!stdenv.isDarwin) gcc.cc.lib
++ lib.optional stdenv.isDarwin Security;
postPatch = ''
patchShebangs .
@ -95,12 +83,6 @@ rec {
./install.sh --prefix=$out \
--components=cargo
${optionalString (stdenv.isLinux && bootstrapping) ''
patchelf \
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
"$out/bin/cargo"
''}
wrapProgram "$out/bin/cargo" \
--suffix PATH : "${rustc}/bin"
'';

View File

@ -72,5 +72,7 @@ rustPlatform.buildRustPackage {
maintainers = with maintainers; [ retrry ];
license = [ licenses.mit licenses.asl20 ];
platforms = platforms.unix;
# weird segfault in a build script
broken = stdenv.targetPlatform.isMusl && !stdenv.targetPlatform.isStatic;
};
}

View File

@ -87,6 +87,10 @@ in stdenv.mkDerivation rec {
"${setBuild}.cxx=${cxxForBuild}"
"${setHost}.cxx=${cxxForHost}"
"${setTarget}.cxx=${cxxForTarget}"
"${setBuild}.crt-static=${lib.boolToString stdenv.buildPlatform.isStatic}"
"${setHost}.crt-static=${lib.boolToString stdenv.hostPlatform.isStatic}"
"${setTarget}.crt-static=${lib.boolToString stdenv.targetPlatform.isStatic}"
] ++ optionals (!withBundledLLVM) [
"--enable-llvm-link-shared"
"${setBuild}.llvm-config=${llvmSharedForBuild.dev}/bin/llvm-config"
@ -188,8 +192,5 @@ in stdenv.mkDerivation rec {
maintainers = with maintainers; [ madjar cstrahan globin havvy ];
license = [ licenses.mit licenses.asl20 ];
platforms = platforms.linux ++ platforms.darwin;
# rustc can't generate binaries for dynamically linked Musl.
# https://github.com/NixOS/nixpkgs/issues/179242
broken = stdenv.targetPlatform.isMusl && !stdenv.targetPlatform.isStatic;
};
}

View File

@ -3,16 +3,16 @@
rustPlatform.buildRustPackage rec {
pname = "evcxr";
version = "0.12.0";
version = "0.13.0";
src = fetchFromGitHub {
owner = "google";
repo = "evcxr";
rev = "v${version}";
sha256 = "sha256-sD/eykXoeJq43o3xyFx2VIoH+xZrMmb6vZKVt4CO7B4=";
sha256 = "sha256-n9wDO4HIWLINbqGVxaZyAEFVDLLnSpQLKlFf20jLq6o=";
};
cargoSha256 = "sha256-eySdhzavm9NGv2xjgdq/C2iv6lxdulhgYNs9ehnSzKQ=";
cargoSha256 = "sha256-zdIJb9fXRByyAJ32RL9lQh6oS1K78IlZfWdJyj+MMZM=";
RUST_SRC_PATH = "${rustPlatform.rustLibSrc}";

View File

@ -430,11 +430,6 @@ in with passthru; stdenv.mkDerivation {
# This allows build Python to import host Python's sysconfigdata
mkdir -p "$out/${sitePackages}"
ln -s "$out/lib/${libPrefix}/"_sysconfigdata*.py "$out/${sitePackages}/"
# debug info can't be separated from a static library and would otherwise be
# left in place by a separateDebugInfo build. force its removal here to save
# space in output.
$STRIP -S $out/lib/${libPrefix}/config-*/libpython*.a || true
'' + optionalString stripConfig ''
rm -R $out/bin/python*-config $out/lib/python*/config-*
'' + optionalString stripIdlelib ''

View File

@ -164,6 +164,14 @@ in rec {
};
} ./setuptools-check-hook.sh) {};
unittestCheckHook = callPackage ({ }:
makeSetupHook {
name = "unittest-check-hook";
substitutions = {
inherit pythonCheckInterpreter;
};
} ./unittest-check-hook.sh) {};
venvShellHook = disabledIf (!isPy3k) (callPackage ({ }:
makeSetupHook {
name = "venv-shell-hook";

View File

@ -0,0 +1,29 @@
# Setup hook for unittest.
echo "Sourcing unittest-check-hook"
unittestCheckPhase() {
echo "Executing unittestCheckPhase"
runHook preCheck
eval "@pythonCheckInterpreter@ -m unittest discover $unittestFlagsArray"
runHook postCheck
echo "Finished executing unittestCheckPhase"
}
if [ -z "${dontUseUnittestCheck-}" ] && [ -z "${installCheckPhase-}" ]; then
echo "Using unittestCheckPhase"
preDistPhases+=" unittestCheckPhase"
# It's almost always the case that setuptoolsCheckPhase should not be ran
# when the unittestCheckHook is being ran
if [ -z "${useSetuptoolsCheck-}" ]; then
dontUseSetuptoolsCheck=1
# Remove command if already injected into preDistPhases
if [[ "$preDistPhases" =~ "setuptoolsCheckPhase" ]]; then
echo "Removing setuptoolsCheckPhase"
preDistPhases=${preDistPhases/setuptoolsCheckPhase/}
fi
fi
fi

View File

@ -19,7 +19,6 @@ let
generic = { version, sha256 }: let
ver = version;
tag = ver.gitTag;
atLeast30 = lib.versionAtLeast ver.majMin "3.0";
self = lib.makeOverridable (
{ stdenv, buildPackages, lib
@ -225,8 +224,8 @@ let
++ op useBaseRuby baseRuby;
meta = with lib; {
description = "The Ruby language";
homepage = "http://www.ruby-lang.org/en/";
description = "An object-oriented language for quick and easy programming";
homepage = "https://www.ruby-lang.org/";
license = licenses.ruby;
maintainers = with maintainers; [ vrthra manveru marsam ];
platforms = platforms.all;
@ -248,11 +247,6 @@ let
ruby = self;
}) withPackages gems;
# deprecated 2016-09-21
majorVersion = ver.major;
minorVersion = ver.minor;
teenyVersion = ver.tiny;
patchLevel = ver.patchLevel;
} // lib.optionalAttrs useBaseRuby {
inherit baseRuby;
};

View File

@ -2,14 +2,19 @@
{
"2.7.6" = ops useRailsExpress [
"${patchSet}/patches/ruby/2.7/head/railsexpress/01-fix-broken-tests-caused-by-ad.patch"
"${patchSet}/patches/ruby/2.7/head/railsexpress/02-improve-gc-stats.patch"
"${patchSet}/patches/ruby/2.7/head/railsexpress/03-more-detailed-stacktrace.patch"
"${patchSet}/patches/ruby/2.7/head/railsexpress/01-fix-with-openssl-dir-option.patch"
"${patchSet}/patches/ruby/2.7/head/railsexpress/02-fix-broken-tests-caused-by-ad.patch"
"${patchSet}/patches/ruby/2.7/head/railsexpress/03-improve-gc-stats.patch"
"${patchSet}/patches/ruby/2.7/head/railsexpress/04-more-detailed-stacktrace.patch"
"${patchSet}/patches/ruby/2.7/head/railsexpress/05-malloc-trim.patch"
];
"3.0.4" = ops useRailsExpress [
"${patchSet}/patches/ruby/3.0/head/railsexpress/01-improve-gc-stats.patch"
"${patchSet}/patches/ruby/3.0/head/railsexpress/02-malloc-trim.patch"
"${patchSet}/patches/ruby/3.0/head/railsexpress/01-fix-with-openssl-dir-option.patch"
"${patchSet}/patches/ruby/3.0/head/railsexpress/02-improve-gc-stats.patch"
"${patchSet}/patches/ruby/3.0/head/railsexpress/03-malloc-trim.patch"
];
"3.1.2" = ops useRailsExpress [ # no patches yet (2021-12-25)
"3.1.2" = ops useRailsExpress [
"${patchSet}/patches/ruby/3.1/head/railsexpress/01-improve-gc-stats.patch"
"${patchSet}/patches/ruby/3.1/head/railsexpress/02-malloc-trim.patch"
];
}

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "rubygems";
version = "3.2.26";
version = "3.3.20";
src = fetchurl {
url = "https://rubygems.org/rubygems/rubygems-${version}.tgz";
sha256 = "sha256-9wa6lOWnua8zBblQKRgjjiTVPYp2TW0n7XOvgW7u1e8=";
sha256 = "sha256-VTUMZ2mqbszM7uXOYV6Grg7dkeGAGVXYjBX0hA/vOTg=";
};
patches = [

View File

@ -3,6 +3,6 @@
fetchFromGitHub {
owner = "skaes";
repo = "rvm-patchsets";
rev = "0251817e2b9d5f73370bbbb12fdf7f7089bd1ac3";
sha256 = "1biiq5xzzdfb4hr1sgmx14i2nr05xa9w21pc7dl8c5n4f2ilg8ss";
rev = "a6429bb1a7fb9b5798c22f43338739a6c192b42d";
sha256 = "sha256-NpSa+uGQA1rfHNcLzPNTK65J+Wk9ZlzhHFePDA4uuo0=";
}

View File

@ -1,5 +1,6 @@
{ stdenv
, lib
, fetchpatch
, fetchurl
, meson
, ninja

View File

@ -31,8 +31,6 @@ stdenv.mkDerivation rec {
nativeBuildInputs = lib.optionals stdenv.isDarwin [ fixDarwinDylibNames ];
buildInputs = [ xmlto docbook_xml_dtd_412 docbook_xsl libxml2 ];
passthru.tests.static = pkgsStatic.giflib;
meta = {

View File

@ -31,13 +31,13 @@ let
];
in stdenv.mkDerivation rec {
pname = "gjs";
version = "1.72.1";
version = "1.72.2";
outputs = [ "out" "dev" "installedTests" ];
src = fetchurl {
url = "mirror://gnome/sources/gjs/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "sha256-F8Cx7D8JZnH/i/q6bku/FBmMcBPGBL/Wd6mFjaB5wKs=";
sha256 = "sha256-3e43m9xafTA6XYlL4rKBvrisVFCGBOfT8geBqGnaOXc=";
};
patches = [

View File

@ -1,5 +1,5 @@
{ config, lib, stdenv, fetchurl, gettext, meson, ninja, pkg-config, perl, python3
, libiconv, zlib, libffi, pcre, libelf, gnome, libselinux, bash, gnum4, gtk-doc, docbook_xsl, docbook_xml_dtd_45
, libiconv, zlib, libffi, pcre, libelf, gnome, libselinux, bash, gnum4, gtk-doc, docbook_xsl, docbook_xml_dtd_45, libxslt
# use util-linuxMinimal to avoid circular dependency (util-linux, systemd, glib)
, util-linuxMinimal ? null
, buildPackages
@ -124,7 +124,7 @@ stdenv.mkDerivation rec {
(buildPackages.meson.override {
withDarwinFrameworksGtkDocPatch = stdenv.isDarwin;
})
ninja pkg-config perl python3 gettext gtk-doc docbook_xsl docbook_xml_dtd_45 libxml2
ninja pkg-config perl python3 gettext gtk-doc docbook_xsl docbook_xml_dtd_45 libxml2 libxslt
];
propagatedBuildInputs = [ zlib libffi gettext libiconv ];
@ -135,6 +135,8 @@ stdenv.mkDerivation rec {
"-Dgtk_doc=${boolToString (stdenv.hostPlatform == stdenv.buildPlatform)}"
"-Dnls=enabled"
"-Ddevbindir=${placeholder "dev"}/bin"
] ++ optionals (!stdenv.isDarwin) [
"-Dman=true" # broken on Darwin
];
NIX_CFLAGS_COMPILE = toString [
@ -167,10 +169,25 @@ stdenv.mkDerivation rec {
# This file is *included* in gtk3 and would introduce runtime reference via __FILE__.
sed '1i#line 1 "${pname}-${version}/include/glib-2.0/gobject/gobjectnotifyqueue.c"' \
-i "$dev"/include/glib-2.0/gobject/gobjectnotifyqueue.c
for i in $bin/bin/*; do
moveToOutput "share/bash-completion/completions/''${i##*/}" "$bin"
done
for i in $dev/bin/*; do
moveToOutput "share/bash-completion/completions/''${i##*/}" "$dev"
done
'' + optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
cp -r ${buildPackages.glib.devdoc} $devdoc
'';
# Move man pages to the same output as their binaries (needs to be
# done after preFixupHooks which moves man pages too - in
# _multioutDocs)
postFixup = ''
for i in $dev/bin/*; do
moveToOutput "share/man/man1/''${i##*/}.1.*" "$dev"
done
'';
checkInputs = [ tzdata desktop-file-utils shared-mime-info ];
preCheck = optionalString doCheck ''

View File

@ -131,15 +131,6 @@ callPackage ./common.nix { inherit stdenv; } {
ln -sf $out/lib/libdl.so.2 $out/lib/libdl.so
ln -sf $out/lib/libutil.so.1 $out/lib/libutil.so
touch $out/lib/libpthread.a
''
# For some reason these aren't stripped otherwise and retain reference
# to bootstrap-tools; on cross-arm this stripping would break objects.
+ lib.optionalString (stdenv.hostPlatform == stdenv.buildPlatform) ''
for i in "$out"/lib/*.a; do
[ "$i" = "$out/lib/libm.a" ] || $STRIP -S "$i"
done
'' + ''
# Put libraries for static linking in a separate output. Note
# that libc_nonshared.a and libpthread_nonshared.a are required

View File

@ -5,23 +5,13 @@ with lib;
stdenv.mkDerivation rec {
pname = "gnu-efi";
version = "3.0.14";
version = "3.0.15";
src = fetchurl {
url = "mirror://sourceforge/gnu-efi/${pname}-${version}.tar.bz2";
sha256 = "tztkOg1Wl9HzltdDFEjoht2AVmh4lXjj4aKCd8lShDU=";
sha256 = "sha256-kxole5xcG6Zf9Rnxg3PEOKJoJfLbeGaxY+ltGxaPIOo=";
};
patches = [
# Pull fix pending upstream inclusion for parallel builds
# https://sourceforge.net/p/gnu-efi/patches/84/
(fetchurl {
name = "parallel-build.patch";
url = "https://sourceforge.net/p/gnu-efi/patches/84/attachment/0001-lib-Makefile-add-.o-file-dependency-on-libsubdirs-ta.patch";
sha256 = "sha256-+2UwV2lopdB/tazib1BLzO1E3GgB1L8dZsSQKWVoLwA=";
})
];
buildInputs = [ pciutils ];
hardeningDisable = [ "stackprotector" ];

View File

@ -22,11 +22,11 @@ in
stdenv.mkDerivation rec {
pname = "gnutls";
version = "3.7.6";
version = "3.7.7";
src = fetchurl {
url = "mirror://gnupg/gnutls/v${lib.versions.majorMinor version}/gnutls-${version}.tar.xz";
sha256 = "1zv2097v9f6f4c66q7yn3c6gggjk9jz38095ma7v3gs5lccmf1kp";
sha256 = "sha256-vpFD0NWOq2TbqbdxFKqvrFKbbA1+gd5r3xybWQJ9IQY=";
};
outputs = [ "bin" "dev" "out" "man" "devdoc" ];

View File

@ -8,13 +8,13 @@
stdenv.mkDerivation rec {
pname = "gperftools";
version = "2.9.1";
version = "2.10";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = "${pname}-${version}";
sha256 = "sha256-loUlC6mtR3oyS5opSmicCnfUqcefSk8+kKDcHNmC/oo=";
sha256 = "sha256-lUX9T31cYZEi+0DgF52EDSL9yiSHa8ToMxhpQFKHOGk=";
};
patches = [
@ -28,8 +28,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook ];
# tcmalloc uses libunwind in a way that works correctly only on non-ARM linux
buildInputs = lib.optional (stdenv.isLinux && !stdenv.hostPlatform.isAarch) libunwind;
# tcmalloc uses libunwind in a way that works correctly only on non-ARM dynamically linked linux
buildInputs = lib.optional (stdenv.isLinux && !(stdenv.hostPlatform.isAarch || stdenv.hostPlatform.isStatic )) libunwind;
# Disable general dynamic TLS on AArch to support dlopen()'ing the library:
# https://bugzilla.redhat.com/show_bug.cgi?id=1483558

View File

@ -27,11 +27,11 @@ let
in
stdenv.mkDerivation rec {
pname = "gpgme";
version = "1.17.1";
version = "1.18.0";
src = fetchurl {
url = "mirror://gnupg/gpgme/${pname}-${version}.tar.bz2";
hash = "sha256-cR6r9d1mG5sEvp7cms4qe8Ax9r2dN6do0C0O/e8Qj18=";
hash = "sha256-Nh1OrkfOkl26DqVpr0DntSxkXEri5l5WIb8bbN2LDp4=";
};
patches = [

View File

@ -10,11 +10,11 @@ in
stdenv.mkDerivation rec {
pname = "gsm";
version = "1.0.19";
version = "1.0.20";
src = fetchurl {
url = "http://www.quut.com/gsm/${pname}-${version}.tar.gz";
sha256 = "1xkha9ss5g5qnfaybi8il0mcvp8knwg9plgh8404vh58d0pna0s9";
sha256 = "sha256-YxXDhRi4HomcP8LtRjzGI68pxcIxpIwTeyQwIjSukL8=";
};
patchPhase = ''

View File

@ -31,6 +31,6 @@ stdenv.mkDerivation rec {
description = "Small library for playing system sounds";
maintainers = teams.gnome.members;
license = licenses.gpl2;
platforms = platforms.linux;
platforms = platforms.unix;
};
}

View File

@ -98,13 +98,13 @@
stdenv.mkDerivation rec {
pname = "gst-plugins-bad";
version = "1.20.1";
version = "1.20.3";
outputs = [ "out" "dev" ];
src = fetchurl {
url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
sha256 = "0j1q89dl8369djibc5p27lyj8y8p4maplmdzlryvrw0ib77w5lq9";
sha256 = "sha256-ehHBO1XdHSOG3ZAiGeQcv83ajh4Ko+c4GGyVB0s12k8=";
};
nativeBuildInputs = [

View File

@ -41,13 +41,13 @@
stdenv.mkDerivation rec {
pname = "gst-plugins-base";
version = "1.20.1";
version = "1.20.3";
outputs = [ "out" "dev" ];
src = fetchurl {
url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
sha256 = "0162ly7pscymq6bsf1d5fva2k9s16zvfwyi1q6z4yfd97d0sdn4n";
sha256 = "sha256-fjCz3YGnA4D/dVT5mEcdaZb/drvm/FRHCW+FHiRHPJ8=";
};
strictDeps = true;

View File

@ -21,7 +21,7 @@
stdenv.mkDerivation rec {
pname = "gstreamer";
version = "1.20.1";
version = "1.20.3";
outputs = [
"bin"
@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
sha256 = "0cghi6n4nhdbajz3wqcgbh5xm94myvnqgsi9g2bz9n1s9904l2fy";
sha256 = "sha256-YH2vZLu9X7GK+dF+IcDSLE1wL//oOyPLItGxryyiOio=";
};
depsBuildBuild = [

View File

@ -6,6 +6,8 @@
, pkg-config
, gstreamer
, gst-plugins-base
, gst-plugins-bad
, gst-rtsp-server
, python3
, gobject-introspection
, json-glib
@ -13,11 +15,11 @@
stdenv.mkDerivation rec {
pname = "gst-devtools";
version = "1.20.1";
version = "1.20.3";
src = fetchurl {
url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
sha256 = "0asbapgf485h2gqq0sn9c4qknwi0ccpraf1685ixp2sv23pwgwc1";
sha256 = "sha256-u71F6tcDNn6o9L6bPAgte2K+9HskCjkIPyeETih1jEc=";
};
outputs = [
@ -50,6 +52,8 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [
gstreamer
gst-plugins-base
gst-plugins-bad
gst-rtsp-server
];
mesonFlags = [

View File

@ -16,7 +16,7 @@
stdenv.mkDerivation rec {
pname = "gst-editing-services";
version = "1.20.1";
version = "1.20.3";
outputs = [
"out"
@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
sha256 = "1ps887yyj6jkj8a2613n43b4fbvynxwryinxvavi00cfnlhipkka";
sha256 = "sha256-X9iW3mn74kQh62sP+NL4tMPLo/MCXOrNMCFy85qKuqI=";
};
nativeBuildInputs = [

View File

@ -49,13 +49,13 @@ assert raspiCameraSupport -> (stdenv.isLinux && stdenv.isAarch64);
stdenv.mkDerivation rec {
pname = "gst-plugins-good";
version = "1.20.1";
version = "1.20.3";
outputs = [ "out" "dev" ];
src = fetchurl {
url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
sha256 = "1al4f35mx41cy2h6agvmsqkjfchsyfs0iyxzpv6pnl0xh9pqfriw";
sha256 = "sha256-+PPCBr9c2rwAlTkgtHs1da8O8V6fhxwLaWb20KpYaLc=";
};
strictDeps = true;

View File

@ -16,11 +16,11 @@
stdenv.mkDerivation rec {
pname = "gst-libav";
version = "1.20.1";
version = "1.20.3";
src = fetchurl {
url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
sha256 = "1iwz7928yi48xia5kfkj54x5dfmhbj25g9125vainpmp6fv1z9wi";
sha256 = "sha256-P+3RBWD836obZGLL95o4xOe1fX85A1k5P8DO9tvyff4=";
};
outputs = [ "out" "dev" ];

View File

@ -13,11 +13,11 @@
stdenv.mkDerivation rec {
pname = "gst-rtsp-server";
version = "1.20.1";
version = "1.20.3";
src = fetchurl {
url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
sha256 = "028maajlvfn96v3gqk2ws1k6w9hjfk7dsxnm84d73pnpi99bqia7";
sha256 = "sha256-7kAnGL6bEn8OXmbKTBtPQuSSbsk7owe3zMpdxsyXlMo=";
};
outputs = [

View File

@ -24,13 +24,13 @@
stdenv.mkDerivation rec {
pname = "gst-plugins-ugly";
version = "1.20.1";
version = "1.20.3";
outputs = [ "out" "dev" ];
src = fetchurl {
url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
sha256 = "06fvgyjwcf4paqxgp1xmgd0d0glkxys7n818526k10wrw92m20s2";
sha256 = "sha256-jKogeJoJwwS0nPVj0zzKlCGxh1uE/MGH5KOF+gHWrv0=";
};
nativeBuildInputs = [

View File

@ -21,11 +21,11 @@
stdenv.mkDerivation rec {
pname = "gstreamer-vaapi";
version = "1.20.1";
version = "1.20.3";
src = fetchurl {
url = "https://gstreamer.freedesktop.org/src/${pname}/${pname}-${version}.tar.xz";
sha256 = "0dqiy8mhcpq3yla8dk69pkjid7hiv98ykvwskb4pk45g6z2zdyw7";
sha256 = "sha256-bumesxar3emtNwApFb2MOGeRj2/cdLfPKsTBrg1pC0U=";
};
outputs = [

View File

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, pkg-config
, glib
, freetype
@ -30,7 +31,7 @@
}:
let
version = "5.0.1";
version = "5.1.0";
inherit (lib) optional optionals optionalString;
mesonFeatureFlag = opt: b:
"-D${opt}=${if b then "enabled" else "disabled"}";
@ -44,9 +45,17 @@ stdenv.mkDerivation {
owner = "harfbuzz";
repo = "harfbuzz";
rev = version;
sha256 = "sha256-01hpSTesPpUO2T9v1sq3VvCSFEOMyaxbHhX0vS1ms/k=";
sha256 = "sha256-K6iScmg1vNfwb1UYqtXsnijLVpcC+am2ZL+W5bLFzsI=";
};
patches = [
(fetchpatch {
name = "aarch64-test-narrowing.diff";
url = "https://github.com/harfbuzz/harfbuzz/commit/04d28d94e576aab099891e6736fd0088dfac3366.diff";
sha256 = "sha256-099GP8t1G0kyYl79A6xJhfyrs3WXYitvn+He7sEz+Oo=";
})
];
postPatch = ''
patchShebangs src/*.py test
'' + lib.optionalString stdenv.isDarwin ''

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "iso-codes";
version = "4.9.0";
version = "4.11.0";
src = fetchurl {
url = "https://salsa.debian.org/iso-codes-team/iso-codes/-/archive/v${version}/${pname}-v${version}.tar.gz";
sha256 = "02lq602ghws423w04jsyjr92p0nmrfp59n1m5hbbi1c6fhxryghc";
sha256 = "sha256-QI95nfQTVGj6fKNetrBcQAS+pEPYHKWLibLkgkAagrs=";
};
patchPhase = ''

View File

@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, cmake
, vulkan-headers
, vulkan-loader
@ -20,6 +21,13 @@ stdenv.mkDerivation rec {
sha256 = "sha256-OkVGYh8QrD7JNqWFBLrDTYlk6IYHdvt4i7UtC4sQTzo=";
};
patches = [
(fetchpatch {
url = "https://github.com/KomputeProject/kompute/commit/9a791b161dd58ca927fe090f65fa2b0e5e85e7ca.diff";
sha256 = "OtFTN8sgPlyiMmVzUnqzCkVMKj6DWxbCXtYwkRdEprY=";
})
];
cmakeFlags = [
"-DKOMPUTE_OPT_INSTALL=1"
"-DRELEASE=1"

View File

@ -1,7 +1,7 @@
{ stdenv, lib, fetchurl, fetchpatch, pkg-config, libtool
, gtk2-x11, gtk3-x11 , gtkSupport ? null
, libpulseaudio, gst_all_1, libvorbis, libcap
, Carbon, CoreServices
, Carbon, CoreServices, AppKit
, withAlsa ? stdenv.isLinux, alsa-lib }:
stdenv.mkDerivation rec {
@ -21,7 +21,7 @@ stdenv.mkDerivation rec {
] ++ (with gst_all_1; [ gstreamer gst-plugins-base ])
++ lib.optional (gtkSupport == "gtk2") gtk2-x11
++ lib.optional (gtkSupport == "gtk3") gtk3-x11
++ lib.optionals stdenv.isDarwin [Carbon CoreServices]
++ lib.optionals stdenv.isDarwin [ Carbon CoreServices AppKit ]
++ lib.optional stdenv.isLinux libcap
++ lib.optional withAlsa alsa-lib;
@ -33,15 +33,19 @@ stdenv.mkDerivation rec {
url = "http://git.0pointer.net/libcanberra.git/patch/?id=c0620e432650e81062c1967cc669829dbd29b310";
sha256 = "0rc7zwn39yxzxp37qh329g7375r5ywcqcaak8ryd0dgvg8m5hcx9";
})
] ++ lib.optionals stdenv.isDarwin [
(fetchpatch {
url = "https://github.com/macports/macports-ports/raw/5a7965dfea7727d1ceedee46c7b0ccee9cb23468/audio/libcanberra/files/patch-configure.diff";
sha256 = "sha256-pEJy1krciUEg5BFIS8FJ4BubjfS/nt9aqi6BLnS1+4M=";
extraPrefix = "";
})
(fetchpatch {
url = "https://github.com/macports/macports-ports/raw/5a7965dfea7727d1ceedee46c7b0ccee9cb23468/audio/libcanberra/files/dynamic_lookup-11.patch";
sha256 = "sha256-nUjha2pKh5VZl0ZZzcr9NTo1TVuMqF4OcLiztxW+ofQ=";
extraPrefix = "";
})
];
postPatch = lib.optionalString stdenv.isDarwin ''
patch -p0 < ${fetchpatch {
url = "https://raw.githubusercontent.com/macports/macports-ports/master/audio/libcanberra/files/patch-configure.diff";
sha256 = "1f7h7ifpqvbfhqygn1b7klvwi80zmpv3538vbmq7ql7bkf1q8h31";
}}
'';
postInstall = ''
for f in $out/lib/*.la; do
sed 's|-lltdl|-L${libtool.lib}/lib -lltdl|' -i $f

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "libevdev";
version = "1.12.1";
version = "1.13.0";
src = fetchurl {
url = "https://www.freedesktop.org/software/${pname}/${pname}-${version}.tar.xz";
sha256 = "sha256-HbukG8UW08p6vA2luGLv4+qKcBj6bpuXzp05QBsiQmw=";
sha256 = "sha256-nt8gBsyGpQVSeWR8OOySPRGoIe5NwsMDPo0g6O4jfNk=";
};
nativeBuildInputs = [ python3 ];

View File

@ -17,31 +17,15 @@
};
in stdenv.mkDerivation (rec {
pname = "libgpg-error";
version = "1.42";
version = "1.45";
src = fetchurl {
url = "mirror://gnupg/${pname}/${pname}-${version}.tar.bz2";
sha256 = "sha256-/AfnD2xhX4xPWQqON6m43S4soelAj45gRZxnRSuSXiM=";
sha256 = "sha256-Vw+O5PtL/3t0lc/5IMJ1ACrqIUfpodIgwGghMmf4CiY=";
};
# 1.42 breaks (some?) cross-compilation (e.g. x86_64 -> aarch64).
# Backporting this fix (merged in upstream master but no release cut) by David Michael <fedora.dm0@gmail.com> https://dev.gnupg.org/rE33593864cd54143db594c4237bba41e14179061c
patches = [ ./fix-1.42-cross-compilation.patch ];
postPatch = ''
sed '/BUILD_TIMESTAMP=/s/=.*/=1970-01-01T00:01+0000/' -i ./configure
'' + lib.optionalString (stdenv.hostPlatform.isAarch32 && stdenv.buildPlatform != stdenv.hostPlatform) ''
ln -s lock-obj-pub.arm-unknown-linux-gnueabi.h src/syscfg/lock-obj-pub.linux-gnueabihf.h
ln -s lock-obj-pub.arm-unknown-linux-gnueabi.h src/syscfg/lock-obj-pub.linux-gnueabi.h
'' + lib.optionalString (stdenv.hostPlatform.isx86_64 && stdenv.hostPlatform.isMusl) ''
ln -s lock-obj-pub.x86_64-pc-linux-musl.h src/syscfg/lock-obj-pub.linux-musl.h
'' + lib.optionalString (stdenv.hostPlatform.isi686 && stdenv.hostPlatform.isMusl) ''
ln -s lock-obj-pub.i686-unknown-linux-gnu.h src/syscfg/lock-obj-pub.linux-musl.h
'' + lib.optionalString (stdenv.hostPlatform.isAarch32 && stdenv.hostPlatform.isMusl) ''
ln -s lock-obj-pub.arm-unknown-linux-gnueabi.h src/syscfg/lock-obj-pub.arm-unknown-linux-musleabihf.h
ln -s lock-obj-pub.arm-unknown-linux-gnueabi.h src/syscfg/lock-obj-pub.linux-musleabihf.h
'' + lib.optionalString (stdenv.hostPlatform.isAarch64 && stdenv.hostPlatform.isMusl) ''
ln -s lock-obj-pub.aarch64-unknown-linux-gnu.h src/syscfg/lock-obj-pub.linux-musl.h
'';
outputs = [ "out" "dev" "info" ];

View File

@ -1,142 +0,0 @@
diff --git a/src/gen-lock-obj.sh b/src/gen-lock-obj.sh
index a710f0c..258eec6 100755
--- a/src/gen-lock-obj.sh
+++ b/src/gen-lock-obj.sh
@@ -1,136 +1,136 @@
#! /bin/sh
#
# gen-lock-obj.sh - Build tool to construct the lock object.
#
# Copyright (C) 2020, 2021 g10 Code GmbH
#
# This file is part of libgpg-error.
#
# libgpg-error is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation; either version 2.1 of
# the License, or (at your option) any later version.
#
# libgpg-error is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <https://www.gnu.org/licenses/>.
#
#
# Following variables should be defined to invoke this script
#
# CC
# OBJDUMP
# AWK
# ac_ext
# ac_object
# host
# LOCK_ABI_VERSION
#
# An example:
#
# LOCK_ABI_VERSION=1 host=x86_64-pc-linux-gnu host_alias=x86_64-linux-gnu \
# CC=$host_alias-gcc OBJDUMP=$host_alias-objdump ac_ext=c ac_objext=o \
# AWK=gawk ./gen-lock-obj.sh
#
-if test -n `echo -n`; then
+if test -n "`echo -n`"; then
ECHO_C='\c'
ECHO_N=''
else
ECHO_C=''
ECHO_N='-n'
fi
if test "$1" = --disable-threads; then
cat <<EOF
## lock-obj-pub.$host.h - NO LOCK SUPPORT
## File created by gen-lock-obj.sh - DO NOT EDIT
## To be included by mkheader into gpg-error.h
/* Dummy object - no locking available. */
typedef struct
{
long _vers;
} gpgrt_lock_t;
#define GPGRT_LOCK_INITIALIZER {-1}
EOF
else
AWK_VERSION_OUTPUT=$($AWK 'BEGIN { print PROCINFO["version"] }')
if test -n "$AWK_VERSION_OUTPUT"; then
# It's GNU awk, which supports PROCINFO.
AWK_OPTION=--non-decimal-data
fi
cat <<'EOF' >conftest.$ac_ext
#include <pthread.h>
pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
EOF
if $CC -c conftest.$ac_ext; then :
ac_mtx_size=$($OBJDUMP -j .bss -t conftest.$ac_objext \
| $AWK $AWK_OPTION '
/mtx$/ { mtx_size = int("0x" $5) }
END { print mtx_size }')
else
echo "Can't determine mutex size"
exit 1
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cat <<EOF
## lock-obj-pub.$host.h
## File created by gen-lock-obj.sh - DO NOT EDIT
## To be included by mkheader into gpg-error.h
typedef struct
{
long _vers;
union {
volatile char _priv[$ac_mtx_size];
long _x_align;
long *_xp_align;
} u;
} gpgrt_lock_t;
EOF
# FIXME: Support different alignment conditions of:
#
# USE_16BYTE_ALIGNMENT
# USE_DOUBLE_FOR_ALIGNMENT
# USE_LONG_DOUBLE_FOR_ALIGNMENT
#
echo ${ECHO_N} "#define GPGRT_LOCK_INITIALIZER {$LOCK_ABI_VERSION,{{${ECHO_C}"
i=0
while test "$i" -lt $ac_mtx_size; do
if test "$i" -ne 0 -a "$(( $i % 8 ))" -eq 0; then
echo ' \'
echo ${ECHO_N} " ${ECHO_C}"
fi
echo ${ECHO_N} "0${ECHO_C}"
if test "$i" -lt $(($ac_mtx_size - 1)); then
echo ${ECHO_N} ",${ECHO_C}"
fi
i=$(( i + 1 ))
done
fi
cat <<'EOF'
}}}
##
## Local Variables:
## mode: c
## buffer-read-only: t
## End:
##
EOF
exit 0

View File

@ -23,16 +23,21 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake ninja ];
checkInputs = [ gtest ];
# Required for case-insensitive filesystems ("BUILD" exists)
dontUseCmakeBuildDir = true;
cmakeFlags = [
cmakeFlags = let
libExt = stdenv.hostPlatform.extensions.library;
in [
"-GNinja"
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
] ++ lib.optional doCheck "-DHWY_SYSTEM_GTEST:BOOL=ON";
] ++ lib.optionals doCheck [
"-DHWY_SYSTEM_GTEST:BOOL=ON"
"-DGTEST_INCLUDE_DIR=${lib.getDev gtest}/include"
"-DGTEST_LIBRARY=${lib.getLib gtest}/lib/libgtest${libExt}"
"-DGTEST_MAIN_LIBRARY=${lib.getLib gtest}/lib/libgtest_main${libExt}"
];
# hydra's darwin machines run into https://github.com/libjxl/libjxl/issues/408
doCheck = !stdenv.hostPlatform.isDarwin;

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "libidn";
version = "1.38";
version = "1.41";
src = fetchurl {
url = "mirror://gnu/libidn/${pname}-${version}.tar.gz";
sha256 = "sha256-3gC4QPdXzTuxTdmiDVk2RzI13cugbUvC2oBGVLi78PY=";
sha256 = "sha256-iE1wY2S4Gr3Re+6Whtj/KudDHFoUZRBHxorfizH9iUU=";
};
outputs = [ "bin" "dev" "out" "info" "devdoc" ];

View File

@ -31,13 +31,13 @@ assert !(enableJpeg7 && enableJpeg8); # pick only one or none, not both
stdenv.mkDerivation rec {
pname = "libjpeg-turbo";
version = "2.1.3";
version = "2.1.4";
src = fetchFromGitHub {
owner = "libjpeg-turbo";
repo = "libjpeg-turbo";
rev = version;
sha256 = "sha256-GbOYoCNAsOESXrEsBb6OHVB4TKhPUEU04PBp8qXVMug=";
sha256 = "sha256-1NRoVIL3zXX1D6iOf2FCrwBEcDW7TYFbdIbCTjY1m8Q=";
};
# This is needed by freeimage

View File

@ -23,6 +23,8 @@ stdenv.mkDerivation rec {
pname = "libjxl";
version = "0.6.1";
outputs = [ "out" "dev" ];
src = fetchFromGitHub {
owner = "libjxl";
repo = "libjxl";
@ -67,11 +69,14 @@ stdenv.mkDerivation rec {
pkg-config
] ++ lib.optionals buildDocs [
asciidoc
graphviz
doxygen
python3
];
depsBuildBuild = lib.optionals buildDocs [
graphviz
];
# Functionality not currently provided by this package
# that the cmake build can apparently use:
# OpenGL/GLUT (for Examples -> comparison with sjpeg)
@ -123,6 +128,8 @@ stdenv.mkDerivation rec {
# * the `gdk-pixbuf` one, which allows applications like `eog` to load jpeg-xl files
# * the `gimp` one, which allows GIMP to load jpeg-xl files
# "-DJPEGXL_ENABLE_PLUGINS=ON"
] ++ lib.optionals stdenv.hostPlatform.isStatic [
"-DJPEGXL_STATIC=ON"
];
LDFLAGS = lib.optionalString stdenv.hostPlatform.isRiscV "-latomic";

View File

@ -4,6 +4,8 @@ stdenv.mkDerivation rec {
pname = "liblqr-1";
version = "0.4.2";
outputs = [ "out" "dev" ];
src = fetchFromGitHub {
owner = "carlobaldassi";
repo = "liblqr";

View File

@ -1,12 +1,12 @@
{ lib, stdenv, fetchurl, pkg-config, libmnl }:
stdenv.mkDerivation rec {
version = "1.2.2";
version = "1.2.3";
pname = "libnftnl";
src = fetchurl {
url = "https://netfilter.org/projects/${pname}/files/${pname}-${version}.tar.bz2";
hash = "sha256-nvwAT50VkY1o+emOGU1V4DAWjzO7Z8PnpUW3QMntbQo=";
hash = "sha256-6Rbqm3n5UYVguaGHJRp8BCRCqey85/Nr55CIiGBdAlU=";
};
nativeBuildInputs = [ pkg-config ];

View File

@ -56,13 +56,13 @@ assert isCygwin -> unitTestsSupport && webmIOSupport && libyuvSupport;
stdenv.mkDerivation rec {
pname = "libvpx";
version = "1.11.0";
version = "1.12.0";
src = fetchFromGitHub {
owner = "webmproject";
repo = pname;
rev = "v${version}";
sha256 = "00f1jrclai2b6ys78dpsg6r1mvcyxlna93vxcz8zjyia24c2pjsb";
sha256 = "sha256-9SFFE2GfYYMgxp1dpmL3STTU2ea1R5vFKA1L0pZwIvQ=";
};
postPatch = ''

View File

@ -27,17 +27,15 @@
stdenv.mkDerivation rec {
pname = "libwebp";
version = "1.2.3";
version = "1.2.4";
src = fetchFromGitHub {
owner = "webmproject";
repo = pname;
rev = "v${version}";
hash = "sha256-t27d+eJR4iTHSLlI3J7RqHgsWACThjsI9O6R2Zb9F1g=";
hash = "sha256-XX6qOWlIl8TqOQMiGpmmDVKwQnM1taG6lrqq1ZFVk5s=";
};
prePatch = "patchShebangs .";
configureFlags = [
(lib.enableFeature threadingSupport "threading")
(lib.enableFeature openglSupport "gl")

View File

@ -34,8 +34,7 @@ with lib;
let
# Release calendar: https://www.mesa3d.org/release-calendar.html
# Release frequency: https://www.mesa3d.org/releasing.html#schedule
# 22.1 on darwin won't build: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6519
version = if stdenv.isDarwin then "22.0.4" else "22.1.4";
version = "22.1.6";
branch = versions.major version;
self = stdenv.mkDerivation {
@ -49,10 +48,7 @@ self = stdenv.mkDerivation {
"ftp://ftp.freedesktop.org/pub/mesa/${version}/mesa-${version}.tar.xz"
"ftp://ftp.freedesktop.org/pub/mesa/older-versions/${branch}.x/${version}/mesa-${version}.tar.xz"
];
sha256 = {
"22.1.4" = "0xhbcjqy3g5dfxhr4flmqncmsjnwljfqm9idx92jm43jifz8q3b7";
"22.0.4" = "1m0y8wgy48hmcidsr7sbk5hcw3v0qr8359fd2x34fvl2z9c1z5y7";
}.${version};
sha256 = "22ced061eb9adab8ea35368246c1995c09723f3f71653cd5050c5cec376e671a";
};
# TODO:
@ -63,11 +59,11 @@ self = stdenv.mkDerivation {
./musl.patch
(fetchpatch {
url = "https://raw.githubusercontent.com/void-linux/void-packages/b9f58f303ae23754c95d5d1fe87a98b5a2d8f271/srcpkgs/mesa/patches/musl-endian.patch";
sha256 = "sha256-eRc91qCaFlVzrxFrNUPpAHd1gsqKsLCCN0IW8pBQcqk=";
hash = "sha256-eRc91qCaFlVzrxFrNUPpAHd1gsqKsLCCN0IW8pBQcqk=";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/void-linux/void-packages/b9f58f303ae23754c95d5d1fe87a98b5a2d8f271/srcpkgs/mesa/patches/musl-stacksize.patch";
sha256 = "sha256-bEp0AWddsw1Pc3rxdKN8fsrX4x2TQEzMUa5afhLXGsg=";
hash = "sha256-bEp0AWddsw1Pc3rxdKN8fsrX4x2TQEzMUa5afhLXGsg=";
})
./opencl.patch
@ -76,6 +72,10 @@ self = stdenv.mkDerivation {
# Fix aarch64-darwin build, remove when upstreaam supports it out of the box.
# See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/1020
./aarch64-darwin.patch
] ++ optionals stdenv.isDarwin [
# 22.1 on darwin won't build: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6519
# (already in-tree for 22.2)
./drop-dri2.patch
];
postPatch = ''

View File

@ -0,0 +1,40 @@
diff --git a/a/src/gallium/frontends/dri/dri_util.c b/b/src/gallium/frontends/dri/dri_util.c
index 8d60526..782360d 100644
--- a/src/gallium/frontends/dri/dri_util.c
+++ b/src/gallium/frontends/dri/dri_util.c
@@ -808,35 +808,6 @@ const __DRIcoreExtension driCoreExtension = {
.unbindContext = driUnbindContext
};
-/** DRI2 interface */
-const __DRIdri2Extension driDRI2Extension = {
- .base = { __DRI_DRI2, 4 },
-
- .createNewScreen = dri2CreateNewScreen,
- .createNewDrawable = driCreateNewDrawable,
- .createNewContext = driCreateNewContext,
- .getAPIMask = driGetAPIMask,
- .createNewContextForAPI = driCreateNewContextForAPI,
- .allocateBuffer = dri2AllocateBuffer,
- .releaseBuffer = dri2ReleaseBuffer,
- .createContextAttribs = driCreateContextAttribs,
- .createNewScreen2 = driCreateNewScreen2,
-};
-
-const __DRIdri2Extension swkmsDRI2Extension = {
- .base = { __DRI_DRI2, 4 },
-
- .createNewScreen = swkmsCreateNewScreen,
- .createNewDrawable = driCreateNewDrawable,
- .createNewContext = driCreateNewContext,
- .getAPIMask = driGetAPIMask,
- .createNewContextForAPI = driCreateNewContextForAPI,
- .allocateBuffer = dri2AllocateBuffer,
- .releaseBuffer = dri2ReleaseBuffer,
- .createContextAttribs = driCreateContextAttribs,
- .createNewScreen2 = driCreateNewScreen2,
-};
-
const __DRIswrastExtension driSWRastExtension = {
.base = { __DRI_SWRAST, 4 },

View File

@ -27,14 +27,10 @@ stdenv.mkDerivation rec {
done
'';
nativeBuildInputs = [
cmake
];
cmakeFlags = lib.optional stdenv.hostPlatform.isStatic "-DCMAKE_SKIP_RPATH=ON";
propagatedBuildInputs = [
imath
zlib
];
nativeBuildInputs = [ cmake ];
propagatedBuildInputs = [ imath zlib ];
doCheck = true;

View File

@ -9,7 +9,7 @@
stdenv.mkDerivation rec {
pname = "openexr";
version = "2.5.7";
version = "2.5.8";
outputs = [ "bin" "dev" "out" "doc" ];
@ -17,15 +17,10 @@ stdenv.mkDerivation rec {
owner = "AcademySoftwareFoundation";
repo = "openexr";
rev = "v${version}";
sha256 = "1vja0rbilcd1wn184w8nbcmck00n7bfwlddwiaxw8dhj64nx4468";
sha256 = "sha256-N7XdDaDsYdx4TXvHplQDTvhHNUmW5rntdaTKua4C0es=";
};
patches = [
# Fix pkg-config paths
(fetchpatch {
url = "https://github.com/AcademySoftwareFoundation/openexr/commit/2f19a01923885fda75ec9d19332de080ec7102bd.patch";
sha256 = "1yxmrdzq1x1911wdzwnzr29jmg2r4wd4yx3vhjn0y5dpny0ri5y5";
})
(fetchpatch {
name = "CVE-2021-45942.patch";
url = "https://github.com/AcademySoftwareFoundation/openexr/commit/11cad77da87c4fa2aab7d58dd5339e254db7937e.patch";
@ -35,6 +30,8 @@ stdenv.mkDerivation rec {
})
];
cmakeFlags = lib.optional stdenv.hostPlatform.isStatic "-DCMAKE_SKIP_RPATH=ON";
nativeBuildInputs = [ cmake ];
propagatedBuildInputs = [ ilmbase zlib ];

View File

@ -57,14 +57,13 @@ stdenv.mkDerivation rec {
url = "https://gitlab.freedesktop.org/polkit/polkit/-/commit/7ba07551dfcd4ef9a87b8f0d9eb8b91fabcb41b3.patch";
sha256 = "ebbLILncq1hAZTBMsLm+vDGw6j0iQ0crGyhzyLZQgKA=";
})
] ++ lib.optionals stdenv.hostPlatform.isMusl [
# Make netgroup support optional (musl does not have it)
# Upstream MR: https://gitlab.freedesktop.org/polkit/polkit/merge_requests/10
# We use the version of the patch that Alpine uses successfully.
# NOTE: Remove after the next release
(fetchpatch {
name = "make-innetgr-optional.patch";
url = "https://git.alpinelinux.org/aports/plain/community/polkit/make-innetgr-optional.patch?id=424ecbb6e9e3a215c978b58c05e5c112d88dddfc";
sha256 = "0iyiksqk29sizwaa4623bv683px1fny67639qpb1him89hza00wy";
url = "https://gitlab.freedesktop.org/polkit/polkit/-/commit/b57deee8178190a7ecc75290fa13cf7daabc2c66.patch";
sha256 = "8te6gatT9Fp+fIT05fQBym5mEwHeHfaUNUNEMfSbtLc=";
})
];
@ -153,7 +152,7 @@ stdenv.mkDerivation rec {
--replace /bin/false ${coreutils}/bin/false
'';
postConfigure = ''
postConfigure = lib.optionalString (!stdenv.hostPlatform.isMusl) ''
# Unpacked by meson
chmod +x subprojects/mocklibc-1.0/bin/mocklibc
patchShebangs subprojects/mocklibc-1.0/bin/mocklibc

View File

@ -5,21 +5,20 @@
, pcre
, readline
, zlib
, writeScript
}:
stdenv.mkDerivation rec {
pname = "slang";
version = "2.3.2";
version = "2.3.3";
src = fetchurl {
url = "https://www.jedsoft.org/releases/slang/${pname}-${version}.tar.bz2";
sha256 = "sha256-/J47D8T2fDwfbUPJDBalxC0Re44oRXxbRoMbi1064xo=";
sha256 = "sha256-+RRQVK4TGXPGEgjqgkhtXdEOPFza0jt8SgYXdDyPWhg=";
};
outputs = [ "out" "dev" "man" "doc" ];
patches = [ ./terminfo-dirs.patch ];
# Fix some wrong hardcoded paths
preConfigure = ''
sed -ie "s|/usr/lib/terminfo|${ncurses.out}/lib/terminfo|" configure
@ -51,14 +50,27 @@ stdenv.mkDerivation rec {
makeFlagsArray+=(AR_CR="${stdenv.cc.targetPrefix}ar cr")
'';
# slang 2.3.2 does not support parallel building
enableParallelBuilding = false;
enableParallelBuilding = true;
postInstall = ''
find "$out"/lib/ -name '*.so' -exec chmod +x "{}" \;
sed '/^Libs:/s/$/ -lncurses/' -i "$dev"/lib/pkgconfig/slang.pc
'';
passthru = {
updateScript = writeScript "update-slang" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl pcre common-updater-scripts
set -eu -o pipefail
# Expect the text in format of 'Version 2.3.3</td>'
new_version="$(curl -s https://www.jedsoft.org/slang/ |
pcregrep -o1 'Version ([0-9.]+)</td>')"
update-source-version ${pname} "$new_version"
'';
};
meta = with lib; {
description = "A small, embeddable multi-platform programming library";
longDescription = ''

View File

@ -1,172 +0,0 @@
commit c7aa0c07b6522fbbb47ef47bd22f47f1611e7423
Author: John E. Davis <jed@jedsoft.org>
Date: Wed Nov 28 00:46:28 2018 -0500
pre2.3.3-5: Added support for TERMINFO_DIRS env var
Modified: removed changes to changelog and version number.
diff --git a/src/sltermin.c b/src/sltermin.c
index a06d0e4..65d3bbc 100644
--- a/src/sltermin.c
+++ b/src/sltermin.c
@@ -133,6 +133,9 @@ static FILE *open_terminfo (char *file, SLterminfo_Type *h)
unsigned char buf[12];
int magic;
+#ifdef SLANG_UNTIC
+ (void) fprintf (stdout,"# Trying %s\n", file);
+#endif
/* Alan Cox reported a security problem here if the application using the
* library is setuid. So, I need to make sure open the file as a normal
* user. Unfortunately, there does not appear to be a portable way of
@@ -269,10 +272,73 @@ static char *read_string_table (FILE *fp, SLterminfo_Type *t)
* are implemented by multiple links to the same compiled file.
*/
+static FILE *try_open_tidir (SLterminfo_Type *ti, const char *tidir, const char *term)
+{
+ char file[1024];
+
+ if (sizeof (file) > strlen (tidir) + 5 + strlen (term))
+ {
+ FILE *fp;
+
+ sprintf (file, "%s/%c/%s", tidir, *term, term);
+ if (NULL != (fp = open_terminfo (file, ti)))
+ return fp;
+
+ sprintf (file, "%s/%02x/%s", tidir, (unsigned char)*term, term);
+ if (NULL != (fp = open_terminfo (file, ti)))
+ return fp;
+ }
+
+ return NULL;
+}
+
+static FILE *try_open_env (SLterminfo_Type *ti, const char *term, const char *envvar)
+{
+ char *tidir;
+
+ if (NULL == (tidir = _pSLsecure_getenv (envvar)))
+ return NULL;
+
+ return try_open_tidir (ti, tidir, term);
+}
+
+static FILE *try_open_home (SLterminfo_Type *ti, const char *term)
+{
+ char home_ti[1024];
+ char *env;
+
+ if (NULL == (env = _pSLsecure_getenv ("HOME")))
+ return NULL;
+
+ strncpy (home_ti, env, sizeof (home_ti) - 11);
+ home_ti [sizeof(home_ti) - 11] = 0;
+ strcat (home_ti, "/.terminfo");
+
+ return try_open_tidir (ti, home_ti, term);
+}
+
+static FILE *try_open_env_path (SLterminfo_Type *ti, const char *term, const char *envvar)
+{
+ char tidir[1024];
+ char *env;
+ unsigned int i;
+
+ if (NULL == (env = _pSLsecure_getenv (envvar)))
+ return NULL;
+
+ i = 0;
+ while (-1 != SLextract_list_element (env, i, ':', tidir, sizeof(tidir)))
+ {
+ FILE *fp = try_open_tidir (ti, tidir, term);
+ if (fp != NULL) return fp;
+ i++;
+ }
+
+ return NULL;
+}
+
static SLCONST char *Terminfo_Dirs [] =
{
- "", /* $TERMINFO */
- "", /* $HOME/.terminfo */
#ifdef MISC_TERMINFO_DIRS
MISC_TERMINFO_DIRS,
#endif
@@ -287,6 +353,23 @@ static SLCONST char *Terminfo_Dirs [] =
NULL,
};
+static FILE *try_open_hardcoded (SLterminfo_Type *ti, const char *term)
+{
+ const char *tidir, **tidirs;
+
+ tidirs = Terminfo_Dirs;
+ while (NULL != (tidir = *tidirs++))
+ {
+ FILE *fp;
+
+ if ((*tidir != 0)
+ && (NULL != (fp = try_open_tidir (ti, tidir, term))))
+ return fp;
+ }
+
+ return NULL;
+}
+
void _pSLtt_tifreeent (SLterminfo_Type *t)
{
if (t == NULL)
@@ -305,11 +388,7 @@ void _pSLtt_tifreeent (SLterminfo_Type *t)
SLterminfo_Type *_pSLtt_tigetent (SLCONST char *term)
{
- SLCONST char **tidirs, *tidir;
FILE *fp = NULL;
- char file[1024];
- static char home_ti [1024];
- char *env;
SLterminfo_Type *ti;
if (
@@ -341,33 +420,10 @@ SLterminfo_Type *_pSLtt_tigetent (SLCONST char *term)
/* If we are on a termcap based system, use termcap */
if (0 == tcap_getent (term, ti)) return ti;
- if (NULL != (env = _pSLsecure_getenv ("TERMINFO")))
- Terminfo_Dirs[0] = env;
-
- if (NULL != (env = _pSLsecure_getenv ("HOME")))
- {
- strncpy (home_ti, env, sizeof (home_ti) - 11);
- home_ti [sizeof(home_ti) - 11] = 0;
- strcat (home_ti, "/.terminfo");
- Terminfo_Dirs [1] = home_ti;
- }
-
- tidirs = Terminfo_Dirs;
- while (NULL != (tidir = *tidirs++))
- {
- if (*tidir == 0)
- continue;
-
- if (sizeof (file) > strlen (tidir) + 5 + strlen (term))
- {
- sprintf (file, "%s/%c/%s", tidir, *term, term);
- if (NULL != (fp = open_terminfo (file, ti)))
- break;
- sprintf (file, "%s/%02x/%s", tidir, (unsigned char)*term, term);
- if (NULL != (fp = open_terminfo (file, ti)))
- break;
- }
- }
+ fp = try_open_env_path (ti, term, "TERMINFO_DIRS");
+ if (fp == NULL) fp = try_open_env (ti, term, "TERMINFO");
+ if (fp == NULL) fp = try_open_home (ti, term);
+ if (fp == NULL) fp = try_open_hardcoded (ti, term);
#ifdef SLANG_UNTIC
fp_open_label:

View File

@ -2,11 +2,11 @@
stdenv.mkDerivation rec {
pname = "speexdsp";
version = "1.2.0";
version = "1.2.1";
src = fetchurl {
url = "https://downloads.xiph.org/releases/speex/${pname}-${version}.tar.gz";
sha256 = "0wa7sqpk3x61zz99m7lwkgr6yv62ml6lfgs5xja65vlvdzy44838";
sha256 = "sha256-jHdzQ+SmOZVpxyq8OKlbJNtWiCyD29tsZCSl9K61TT0=";
};
patches = [ ./build-fix.patch ];

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "spirv-headers";
version = "1.3.211.0";
version = "1.3.216.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Headers";
rev = "sdk-${version}";
sha256 = "sha256-LkIrTFWYvZffLVJJW3152um5LTEsMJEDEsIhBAdhBlk=";
hash = "sha256-qYhFoRrQOlvYvVXhIFsa3dZuORDpZyVC5peeYmGNimw=";
};
nativeBuildInputs = [ cmake ];

Some files were not shown because too many files have changed in this diff Show More