Merge pull request #68244 from NixOS/staging-next

Staging next that includes gcc8
This commit is contained in:
Frederik Rietdijk 2019-09-09 08:09:36 +02:00 committed by GitHub
commit 731c82a447
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
148 changed files with 1477 additions and 1194 deletions

View File

@ -540,7 +540,8 @@ and the aliases
#### `buildPythonPackage` function
The `buildPythonPackage` function is implemented in
`pkgs/development/interpreters/python/build-python-package.nix`
`pkgs/development/interpreters/python/mk-python-derivation`
using setup hooks.
The following is an example:
```nix
@ -797,6 +798,22 @@ such as `ignoreCollisions = true` or `postBuild`. If you need them, you have to
Python 2 namespace packages may provide `__init__.py` that collide. In that case `python.buildEnv`
should be used with `ignoreCollisions = true`.
#### Setup hooks
The following are setup hooks specifically for Python packages. Most of these 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`.
- `pipInstallHook` to install wheels.
- `pytestCheckHook` to run tests with `pytest`.
- `pythonCatchConflictsHook` to check whether a Python package is not already existing.
- `pythonImportsCheckHook` to check whether importing the listed modules works.
- `pythonRemoveBinBytecode` to remove bytecode from the `/bin` folder.
- `setuptoolsBuildHook` to build a wheel using `setuptools`.
- `setuptoolsCheckHook` to run tests with `python setup.py test`.
- `wheelUnpackHook` to move a wheel to the correct folder so it can be installed with the `pipInstallHook`.
### Development mode
Development or editable mode is supported. To develop Python packages

View File

@ -95,6 +95,7 @@ in
gitlab = handleTest ./gitlab.nix {};
gitolite = handleTest ./gitolite.nix {};
gjs = handleTest ./gjs.nix {};
glib-networking = handleTest ./glib-networking.nix {};
glusterfs = handleTest ./glusterfs.nix {};
gnome3-xorg = handleTest ./gnome3-xorg.nix {};
gnome3 = handleTest ./gnome3.nix {};
@ -144,6 +145,7 @@ in
latestKernel.login = handleTest ./login.nix { latestKernel = true; };
ldap = handleTest ./ldap.nix {};
leaps = handleTest ./leaps.nix {};
libgdata = handleTest ./libgdata.nix {};
libxmlb = handleTest ./libxmlb.nix {};
lidarr = handleTest ./lidarr.nix {};
lightdm = handleTest ./lightdm.nix {};

View File

@ -0,0 +1,17 @@
# run installed tests
import ./make-test.nix ({ pkgs, ... }:
{
name = "glib-networking";
meta = {
maintainers = pkgs.glib-networking.meta.maintainers;
};
machine = { pkgs, ... }: {
environment.systemPackages = with pkgs; [ gnome-desktop-testing ];
};
testScript = ''
$machine->succeed("gnome-desktop-testing-runner -d '${pkgs.glib-networking.installedTests}/share'");
'';
})

21
nixos/tests/libgdata.nix Normal file
View File

@ -0,0 +1,21 @@
# run installed tests
import ./make-test.nix ({ pkgs, ... }:
{
name = "libgdata";
meta = {
maintainers = pkgs.libgdata.meta.maintainers;
};
machine = { pkgs, ... }: {
environment.systemPackages = with pkgs; [ gnome-desktop-testing ];
# # GLib-GIO-DEBUG: _g_io_module_get_default: Found default implementation dummy (GDummyTlsBackend) for gio-tls-backend
# Bail out! libgdata:ERROR:../gdata/tests/common.c:134:gdata_test_init: assertion failed (child_error == NULL): TLS support is not available (g-tls-error-quark, 0)
services.gnome3.glib-networking.enable = true;
};
testScript = ''
$machine->succeed("gnome-desktop-testing-runner -d '${pkgs.libgdata.installedTests}/share'");
'';
})

View File

@ -6,18 +6,18 @@
, curl, ffmpeg, gdk-pixbuf, libaio, libmtp, loudmouth, lzo, lz4, mysql57, pcre, snappy, taglib, taglib_extras
}:
mkDerivation {
mkDerivation rec {
pname = "amarok";
version = "2.9.0-20190731";
version = "2.9.0-20190824";
src = fetchgit {
# master has the Qt5 version as of April 2018 but a formal release has not
# yet been made so change this back to the proper upstream when such a
# release is out
url = git://anongit.kde.org/amarok.git;
# url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.CZ";
rev = "783da6d8e93737f5e41a3bc017906dc1f94bb94f";
sha256 = "08bypxk5kaay98hbwz9pj3hwgiyk3qmn9qw99bnjkkkw9wzsxiy6";
# url = "mirror://kde/stable/${pname}/${version}/src/${name}.tar.xz";
rev = "457fbda25a85a102bfda92aa7137e7ef5e4c8b00";
sha256 = "1ig2mg8pqany6m2zplkrvldcv4ibxwsypnyv5igm7nz7ax82cd5j";
};
nativeBuildInputs = [ extra-cmake-modules kdoctools ];

View File

@ -10,6 +10,8 @@ stdenv.mkDerivation rec {
sha256 = "0ka2kscpjff7gflsargv3r9fdaxhkf3nym9mfaln3pnq6q7fwdki";
};
NIX_CFLAGS_COMPILE = [ "-Wno-error=catch-value" ];
nativeBuildInputs = [ pkgconfig ];
meta = with stdenv.lib; {

View File

@ -9,12 +9,12 @@ stdenv.mkDerivation rec {
sha256 = "0ihwrx4gspj8l7fc8vxch6dpjrw1lvv9z3c19f0wxnmnxhv1cjvs";
};
NIX_CFLAGS_COMPILE = [ "-Wno-error=format-truncation" "-Wno-error=deprecated-declarations" ];
buildInputs = [ openssl ];
makeFlags = [ "PREFIX=$(out)" ];
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
meta = with stdenv.lib; {
description = "A collection of tools to download books from Google Books";
homepage = https://njw.me.uk/getxbook/;

View File

@ -20,6 +20,8 @@ stdenv.mkDerivation rec {
"NSSHARED=${buildsystem}/share/netsurf-buildsystem"
];
NIX_CFLAGS_COMPILE = "-Wno-error=cast-function-type";
meta = with stdenv.lib; {
homepage = http://www.netsurf-browser.org/;
description = "String internment library for netsurf browser";

View File

@ -61,6 +61,9 @@ in stdenv.mkDerivation rec {
propagatedBuildInputs = [
pythonProtobuf
];
NIX_CFLAGS_COMPILE = "-Wno-error=format-overflow -Wno-error=class-memaccess";
preConfigure = ''
# https://issues.apache.org/jira/browse/MESOS-6616
configureFlagsArray+=(

View File

@ -1,7 +1,7 @@
{ stdenv, fetchgit, pkgconfig, pidgin, libwebp, libgcrypt, gettext } :
let
version = "1.3.0";
version = "1.3.1";
in
stdenv.mkDerivation rec {
pname = "telegram-purple";
@ -9,10 +9,12 @@ stdenv.mkDerivation rec {
src = fetchgit {
url = "https://github.com/majn/telegram-purple";
rev = "0340e4f14b2480782db4e5b9242103810227c522";
sha256 = "1xb7hrgisbpx00dsrm5yz934bdd7nfzicd7k855iynk3hjzqj7k5";
rev = "v${version}";
sha256 = "0p93jpjpx7hszwffzgixw04zkrpsiyzz4za3gfr4j07krc4771fp";
};
NIX_CFLAGS_COMPILE = [ "-Wno-error=cast-function-type" ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ pidgin libwebp libgcrypt gettext ];

View File

@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
})
];
NIX_CFLAGS_COMPILE = [ "-Wno-error=unused-result" "-Wno-error=duplicate-decl-specifier" ];
NIX_CFLAGS_COMPILE = [ "-Wno-error=unused-result" "-Wno-error=duplicate-decl-specifier" "-Wno-error=format-truncation" ];
meta = {
description = "An IRC proxy (bouncer)";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, makeWrapper, itk, vtk }:
{ stdenv, fetchFromGitHub, fetchpatch, cmake, makeWrapper, itk, vtk }:
stdenv.mkDerivation rec {
_name = "ANTs";
@ -12,6 +12,14 @@ stdenv.mkDerivation rec {
sha256 = "1hrdwv3m9xh3yf7l0rm2ggxc2xzckfb8srs88g485ibfszx7i03q";
};
patches = [
# Fix build with gcc8
(fetchpatch {
url = "https://github.com/ANTsX/ANTs/commit/89af9b2694715bf8204993e032fa132f80cf37bd.patch";
sha256 = "1glkrwa1jmxxbmzihycxr576azjqby31jwpj165qc54c91pn0ams";
})
];
nativeBuildInputs = [ cmake makeWrapper ];
buildInputs = [ itk vtk ];

View File

@ -20,6 +20,8 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
NIX_CFLAGS_COMPILE = "-Wno-error=format-truncation";
/*
** We patch out a very annoying 'feature' in ./configure, which
** tries to use 'git' to update submodules.

View File

@ -26,6 +26,7 @@ edk2 = stdenv.mkDerivation {
buildInputs = [ libuuid pythonEnv ];
makeFlags = [ "-C BaseTools" ];
NIX_CFLAGS_COMPILE = "-Wno-return-type -Wno-error=stringop-truncation";
hardeningDisable = [ "format" "fortify" ];

View File

@ -373,6 +373,9 @@ stdenv.mkDerivation ({
stdenv.lib.platforms.freebsd ++
stdenv.lib.platforms.illumos ++
stdenv.lib.platforms.darwin;
# See #40038
broken = stdenv.isDarwin;
};
}

View File

@ -1,20 +1,28 @@
{stdenv, fetchurl, bison, flex}:
{stdenv, fetchurl, fetchpatch, bison, flex}:
stdenv.mkDerivation rec {
pname = "iasl";
version = "20181213";
version = "20190108";
src = fetchurl {
url = "https://acpica.org/sites/acpica/files/acpica-unix-${version}.tar.gz";
sha256 = "1vgqlv9pvxc52faxixpgz7hi1awqmj88bw5vqn3bldf6fmkh147w";
sha256 = "0bqhr3ndchvfhxb31147z8gd81dysyz5dwkvmp56832d0js2564q";
};
NIX_CFLAGS_COMPILE = "-O3";
NIX_CFLAGS_COMPILE = [
"-O3"
];
buildFlags = "iasl";
buildInputs = [ bison flex ];
patches = fetchpatch {
/* https://github.com/acpica/acpica/pull/389 */
url = "https://github.com/acpica/acpica/commit/935ca65f7806a3ef9bd02a947e50f3a1f586ac67.patch";
sha256 = "0jz4bakifphm425shbd1j99hldgy71m7scl8mwibm441d56l3ydf";
};
installPhase =
''
install -d $out/bin

View File

@ -1,60 +0,0 @@
commit eb92f5a745014532b83abfba04602fce87ca8393
Author: Chuang-Yu Cheng <cycheng@multicorewareinc.com>
Date: Fri Apr 8 12:04:32 2016 +0000
CXX_FAST_TLS calling convention: performance improvement for PPC64
This is the same change on PPC64 as r255821 on AArch64. I have even borrowed
his commit message.
The access function has a short entry and a short exit, the initialization
block is only run the first time. To improve the performance, we want to
have a short frame at the entry and exit.
We explicitly handle most of the CSRs via copies. Only the CSRs that are not
handled via copies will be in CSR_SaveList.
Frame lowering and prologue/epilogue insertion will generate a short frame
in the entry and exit according to CSR_SaveList. The majority of the CSRs will
be handled by register allcoator. Register allocator will try to spill and
reload them in the initialization block.
We add CSRsViaCopy, it will be explicitly handled during lowering.
1> we first set FunctionLoweringInfo->SplitCSR if conditions are met (the target
supports it for the given machine function and the function has only return
exits). We also call TLI->initializeSplitCSR to perform initialization.
2> we call TLI->insertCopiesSplitCSR to insert copies from CSRsViaCopy to
virtual registers at beginning of the entry block and copies from virtual
registers to CSRsViaCopy at beginning of the exit blocks.
3> we also need to make sure the explicit copies will not be eliminated.
Author: Tom Jablin (tjablin)
Reviewers: hfinkel kbarton cycheng
http://reviews.llvm.org/D17533
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265781 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/TargetFrameLoweringImpl.cpp b/lib/CodeGen/TargetFrameLoweringImpl.cpp
index 679ade1..0a0e079 100644
--- a/lib/CodeGen/TargetFrameLoweringImpl.cpp
+++ b/lib/CodeGen/TargetFrameLoweringImpl.cpp
@@ -63,12 +63,15 @@ void TargetFrameLowering::determineCalleeSaves(MachineFunction &MF,
const TargetRegisterInfo &TRI = *MF.getSubtarget().getRegisterInfo();
const MCPhysReg *CSRegs = TRI.getCalleeSavedRegs(&MF);
+ // Resize before the early returns. Some backends expect that
+ // SavedRegs.size() == TRI.getNumRegs() after this call even if there are no
+ // saved registers.
+ SavedRegs.resize(TRI.getNumRegs());
+
// Early exit if there are no callee saved registers.
if (!CSRegs || CSRegs[0] == 0)
return;
- SavedRegs.resize(TRI.getNumRegs());
-
// In Naked functions we aren't going to save any registers.
if (MF.getFunction()->hasFnAttribute(Attribute::Naked))
return;

View File

@ -1,81 +0,0 @@
{ stdenv, fetch, cmake, libxml2, llvm, version, clang-tools-extra_src, python }:
let
gcc = if stdenv.cc.isGNU then stdenv.cc.cc else stdenv.cc.cc.gcc;
self = stdenv.mkDerivation {
pname = "clang";
inherit version;
src = fetch "cfe" "1prc72xmkgx8wrzmrr337776676nhsp1qd3mw2bvb22bzdnq7lsc";
unpackPhase = ''
unpackFile $src
mv cfe-${version}.src clang
sourceRoot=$PWD/clang
unpackFile ${clang-tools-extra_src}
mv clang-tools-extra-* $sourceRoot/tools/extra
'';
nativeBuildInputs = [ cmake ];
buildInputs = [ libxml2 llvm python ];
cmakeFlags = [
"-DCMAKE_CXX_FLAGS=-std=c++11"
] ++
# Maybe with compiler-rt this won't be needed?
(stdenv.lib.optional stdenv.isLinux "-DGCC_INSTALL_PREFIX=${gcc}") ++
(stdenv.lib.optional (stdenv.cc.libc != null) "-DC_INCLUDE_DIRS=${stdenv.cc.libc}/include");
patches = [ ./purity.patch ];
postPatch = ''
sed -i -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/Tools.cpp
sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/ToolChains.cpp
'' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
sed -i -e 's/lgcc_s/lgcc_eh/' lib/Driver/Tools.cpp
'';
outputs = [ "out" "lib" "python" ];
# Clang expects to find LLVMgold in its own prefix
# Clang expects to find sanitizer libraries in its own prefix
postInstall = ''
if [ -e ${llvm}/lib/LLVMgold.so ]; then
ln -sv ${llvm}/lib/LLVMgold.so $out/lib
fi
ln -sv ${llvm}/lib/clang/${version}/lib $out/lib/clang/${version}/
ln -sv $out/bin/clang $out/bin/cpp
# Move libclang to 'lib' output
moveToOutput "lib/libclang.*" "$lib"
substituteInPlace $out/share/clang/cmake/ClangTargets-release.cmake \
--replace "\''${_IMPORT_PREFIX}/lib/libclang." "$lib/lib/libclang."
mkdir -p $python/bin $python/share/clang/
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
rm $out/bin/c-index-test
'';
enableParallelBuilding = true;
passthru = {
isClang = true;
inherit llvm;
} // stdenv.lib.optionalAttrs stdenv.isLinux {
inherit gcc;
};
meta = {
description = "A c, c++, objective-c, and objective-c++ frontend for the llvm compiler";
homepage = http://llvm.org/;
license = stdenv.lib.licenses.ncsa;
platforms = stdenv.lib.platforms.all;
};
};
in self

View File

@ -1,17 +0,0 @@
--- a/lib/Driver/Tools.cpp 2016-02-12 15:51:41.000000000 -0700
+++ b/lib/Driver/Tools.cpp 2016-03-08 15:39:06.790111122 -0700
@@ -8833,15 +8833,6 @@
CmdArgs.push_back("-shared");
}
- if (Arch == llvm::Triple::arm || Arch == llvm::Triple::armeb ||
- Arch == llvm::Triple::thumb || Arch == llvm::Triple::thumbeb ||
- (!Args.hasArg(options::OPT_static) &&
- !Args.hasArg(options::OPT_shared))) {
- CmdArgs.push_back("-dynamic-linker");
- CmdArgs.push_back(Args.MakeArgString(
- D.DyldPrefix + getLinuxDynamicLinker(Args, ToolChain)));
- }
-
CmdArgs.push_back("-o");
CmdArgs.push_back(Output.getFilename());

View File

@ -1,59 +0,0 @@
{ newScope, stdenv, libstdcxxHook, isl, fetchurl, overrideCC, wrapCCWith
, buildLlvmTools # tools, but from the previous stage, for cross
, targetLlvmLibraries # libraries, but from the next stage, for cross
}:
let
version = "3.8.1";
fetch = fetch_v version;
fetch_v = ver: name: sha256: fetchurl {
url = "https://releases.llvm.org/${ver}/${name}-${ver}.src.tar.xz";
inherit sha256;
};
compiler-rt_src = fetch "compiler-rt" "0p0y85c7izndbpg2l816z7z7558axq11d5pwkm4h11sdw7d13w0d";
clang-tools-extra_src = fetch "clang-tools-extra" "15n39r4ssphpaq4a0wzyjm7ilwxb0bch6nrapy8c5s8d49h5qjk6";
tools = stdenv.lib.makeExtensible (tools: let
callPackage = newScope (tools // { inherit stdenv isl version fetch; });
in {
llvm = callPackage ./llvm.nix {
inherit compiler-rt_src;
};
clang-unwrapped = callPackage ./clang {
inherit clang-tools-extra_src;
};
libclang = tools.clang-unwrapped.lib;
clang = if stdenv.cc.isGNU then tools.libstdcxxClang else tools.libcxxClang;
libstdcxxClang = wrapCCWith {
cc = tools.clang-unwrapped;
extraPackages = [ libstdcxxHook ];
};
libcxxClang = wrapCCWith {
cc = tools.clang-unwrapped;
extraPackages = [ targetLlvmLibraries.libcxx targetLlvmLibraries.libcxxabi ];
};
lldb = callPackage ./lldb.nix {};
});
libraries = stdenv.lib.makeExtensible (libraries: let
callPackage = newScope (libraries // buildLlvmTools // { inherit stdenv isl version fetch; });
in {
stdenv = overrideCC stdenv buildLlvmTools.clang;
libcxxStdenv = overrideCC stdenv buildLlvmTools.libcxxClang;
libcxx = callPackage ./libc++ {};
libcxxabi = callPackage ./libc++abi.nix {};
});
in { inherit tools libraries; } // libraries // tools

View File

@ -1,11 +0,0 @@
--- llvm.org/utils/llvm-build/llvmbuild/main.py 2015-10-07 00:24:35.000000000 +0100
+++ llvm/utils/llvm-build/llvmbuild/main.py 2017-06-16 17:08:39.866586578 +0100
@@ -413,7 +413,7 @@
if library_name is None:
library_name_as_cstr = 'nullptr'
else:
- library_name_as_cstr = '"lib%s.a"' % library_name
+ library_name_as_cstr = '"lib%s.so"' % library_name
if is_installed:
is_installed_as_cstr = 'true'
else:

View File

@ -1,39 +0,0 @@
--- libcxx-3.8.0.src.org/lib/CMakeLists.txt 2015-12-16 15:41:05.000000000 -0800
+++ libcxx-3.8.0.src/lib/CMakeLists.txt 2016-06-17 19:40:00.293394500 -0700
@@ -94,30 +94,30 @@
add_definitions(-D__STRICT_ANSI__)
add_link_flags(
"-compatibility_version 1"
"-current_version 1"
- "-install_name /usr/lib/libc++.1.dylib"
- "-Wl,-reexport_library,/usr/lib/libc++abi.dylib"
+ "-install_name ${LIBCXX_LIBCXXABI_LIB_PATH}/libc++.1.dylib"
+ "-Wl,-reexport_library,${LIBCXX_LIBCXXABI_LIB_PATH}/libc++abi.dylib"
"-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++unexp.exp"
"/usr/lib/libSystem.B.dylib")
else()
if ( ${CMAKE_OSX_SYSROOT} )
list(FIND ${CMAKE_OSX_ARCHITECTURES} "armv7" OSX_HAS_ARMV7)
if (OSX_HAS_ARMV7)
set(OSX_RE_EXPORT_LINE
- "${CMAKE_OSX_SYSROOT}/usr/lib/libc++abi.dylib"
+ "${CMAKE_OSX_SYSROOT}${LIBCXX_LIBCXXABI_LIB_PATH}/libc++abi.dylib"
"-Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++sjlj-abi.exp")
else()
set(OSX_RE_EXPORT_LINE
- "-Wl,-reexport_library,${CMAKE_OSX_SYSROOT}/usr/lib/libc++abi.dylib")
+ "-Wl,-reexport_library,${CMAKE_OSX_SYSROOT}${LIBCXX_LIBCXXABI_LIB_PATH}/libc++abi.dylib")
endif()
else()
- set(OSX_RE_EXPORT_LINE "/usr/lib/libc++abi.dylib -Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++abi${LIBCXX_LIBCPPABI_VERSION}.exp")
+ set(OSX_RE_EXPORT_LINE "${LIBCXX_LIBCXXABI_LIB_PATH}/libc++abi.dylib -Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++abi${LIBCXX_LIBCPPABI_VERSION}.exp")
endif()
add_link_flags(
"-compatibility_version 1"
- "-install_name /usr/lib/libc++.1.dylib"
+ "-install_name ${LIBCXX_LIBCXXABI_LIB_PATH}/libc++.1.dylib"
"-Wl,-unexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/libc++unexp.exp"
"${OSX_RE_EXPORT_LINE}"
"-Wl,-force_symbols_not_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/notweak.exp"
"-Wl,-force_symbols_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/weak.exp")

View File

@ -1,53 +0,0 @@
{ lib, stdenv, fetch, cmake, libcxxabi, fixDarwinDylibNames, version }:
stdenv.mkDerivation {
pname = "libc++";
inherit version;
src = fetch "libcxx" "1k7f9qk5bgwa02ksh6yr9hccwcbhmcdzl1fpbdw6s2c89iwg7mvp";
postUnpack = ''
unpackFile ${libcxxabi.src}
'';
preConfigure = ''
# Get headers from the cxxabi source so we can see private headers not installed by the cxxabi package
cmakeFlagsArray=($cmakeFlagsArray -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$NIX_BUILD_TOP/libcxxabi-${version}.src/include")
'';
patches = [
# glibc 2.26 fix
../../3.9/libc++/xlocale-glibc-2.26.patch
]
++ lib.optional stdenv.isDarwin ./darwin.patch
++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
../../libcxx-0001-musl-hacks.patch
../../libcxx-max_align_t.patch
];
nativeBuildInputs = [ cmake ];
buildInputs = [ libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
cmakeFlags = [
"-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
"-DLIBCXX_LIBCPPABI_VERSION=2"
"-DLIBCXX_CXX_ABI=libcxxabi"
] ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "-DLIBCXX_HAS_MUSL_LIBC=1";
enableParallelBuilding = true;
linkCxxAbi = stdenv.isLinux;
setupHooks = [
../../../../../build-support/setup-hooks/role.bash
./setup-hook.sh
];
meta = {
homepage = http://libcxx.llvm.org/;
description = "A new implementation of the C++ standard library, targeting C++11";
license = with stdenv.lib.licenses; [ ncsa mit ];
platforms = stdenv.lib.platforms.unix;
};
}

View File

@ -1,6 +0,0 @@
# See pkgs/build-support/setup-hooks/role.bash
getHostRole
linkCxxAbi="@linkCxxAbi@"
export NIX_${role_pre}CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
export NIX_${role_pre}CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"

View File

@ -1,52 +0,0 @@
{ stdenv, cmake, fetch, libcxx, libunwind, llvm, version }:
stdenv.mkDerivation {
pname = "libc++abi";
inherit version;
src = fetch "libcxxabi" "1qfs2iis1i0ppv11jndc98cvd7s25pj46pq2sfyldmzswdxmzdg1";
nativeBuildInputs = [ cmake ];
buildInputs = stdenv.lib.optional (!stdenv.isDarwin && !stdenv.isFreeBSD) libunwind;
postUnpack = ''
unpackFile ${libcxx.src}
unpackFile ${llvm.src}
export NIX_CFLAGS_COMPILE+=" -I$PWD/include"
export cmakeFlags="-DLLVM_PATH=$PWD/$(ls -d llvm-*) -DLIBCXXABI_LIBCXX_INCLUDES=$PWD/$(ls -d libcxx-*)/include"
'' + stdenv.lib.optionalString stdenv.isDarwin ''
export TRIPLE=x86_64-apple-darwin
'' + stdenv.lib.optionalString stdenv.hostPlatform.isMusl ''
patch -p1 -d $(ls -d libcxx-*) -i ${../libcxx-0001-musl-hacks.patch}
patch -p1 -d $(ls -d libcxx-*) -i ${../libcxx-max_align_t.patch}
'';
installPhase = if stdenv.isDarwin
then ''
for file in lib/*.dylib; do
# this should be done in CMake, but having trouble figuring out
# the magic combination of necessary CMake variables
# if you fancy a try, take a look at
# http://www.cmake.org/Wiki/CMake_RPATH_handling
install_name_tool -id $out/$file $file
done
make install
install -d 755 $out/include
install -m 644 ../include/*.h $out/include
''
else ''
install -d -m 755 $out/include $out/lib
install -m 644 lib/libc++abi.so.1.0 $out/lib
install -m 644 ../include/cxxabi.h $out/include
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
'';
meta = {
homepage = http://libcxxabi.llvm.org/;
description = "A new implementation of low level support for a standard C++ library";
license = with stdenv.lib.licenses; [ ncsa mit ];
maintainers = with stdenv.lib.maintainers; [ vlstill ];
platforms = stdenv.lib.platforms.unix;
};
}

View File

@ -1,51 +0,0 @@
{ stdenv
, fetch
, cmake
, zlib
, ncurses
, swig
, which
, libedit
, llvm
, clang-unwrapped
, python
, version
}:
stdenv.mkDerivation {
pname = "lldb";
inherit version;
src = fetch "lldb" "18z8vhfgh4m57hl66i83cp4d4mv3i86z2hjhbp5rvqs7d88li49l";
postUnpack = ''
# Hack around broken standalone builf as of 3.8
unpackFile ${llvm.src}
srcDir="$(ls -d lldb-*.src)"
mkdir -p "$srcDir/tools/lib/Support"
cp "$(ls -d llvm-*.src)/lib/Support/regex_impl.h" "$srcDir/tools/lib/Support/"
'';
buildInputs = [ cmake python which swig ncurses zlib libedit llvm ];
hardeningDisable = [ "format" ];
cmakeFlags = [
"-DLLDB_PATH_TO_LLVM_BUILD=${llvm}"
"-DLLVM_MAIN_INCLUDE_DIR=${llvm}/include"
"-DLLDB_PATH_TO_CLANG_BUILD=${clang-unwrapped}"
"-DCLANG_MAIN_INCLUDE_DIR=${clang-unwrapped}/include"
"-DPYTHON_VERSION_MAJOR=2"
"-DPYTHON_VERSION_MINOR=7"
"-DLLDB_DISABLE_LIBEDIT=1" # https://llvm.org/bugs/show_bug.cgi?id=28898
];
enableParallelBuilding = true;
meta = {
description = "A next-generation high-performance debugger";
homepage = http://llvm.org/;
license = stdenv.lib.licenses.ncsa;
platforms = stdenv.lib.platforms.all;
};
}

View File

@ -1,116 +0,0 @@
{ stdenv
, fetch
, fetchpatch
, perl
, groff
, cmake
, python
, libffi
, libbfd
, libxml2
, ncurses
, version
, zlib
, compiler-rt_src
, debugVersion ? false
, enableSharedLibraries ? true
}:
stdenv.mkDerivation {
pname = "llvm";
inherit version;
src = fetch "llvm" "1ybmnid4pw2hxn12ax5qa5kl1ldfns0njg8533y3mzslvd5cx0kf";
unpackPhase = ''
unpackFile $src
mv llvm-${version}.src llvm
sourceRoot=$PWD/llvm
unpackFile ${compiler-rt_src}
mv compiler-rt-* $sourceRoot/projects/compiler-rt
'';
buildInputs = [ perl groff cmake libxml2 python libffi ];
propagatedBuildInputs = [ ncurses zlib ];
# Fix a segfault in llc
# See http://lists.llvm.org/pipermail/llvm-dev/2016-October/106500.html
patches = [ ./D17533-1.patch ]
++ stdenv.lib.optional (!stdenv.isDarwin) ./fix-llvm-config.patch
++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
../TLI-musl.patch
../dynamiclibrary-musl.patch
];
# hacky fix: New LLVM releases require a newer macOS SDK than
# 10.9. This is a temporary measure until nixpkgs darwin support is
# updated.
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
sed -i 's/os_trace(\(.*\)");$/printf(\1\\n");/g' ./projects/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc
substituteInPlace CMakeLists.txt \
--replace 'set(CMAKE_INSTALL_NAME_DIR "@rpath")' "set(CMAKE_INSTALL_NAME_DIR "$out/lib")" \
--replace 'set(CMAKE_INSTALL_RPATH "@executable_path/../lib")' ""
''
+ ''
(
cd projects/compiler-rt
patch -p1 < ${
fetchpatch {
name = "sigaltstack.patch"; # for glibc-2.26
url = https://github.com/llvm-mirror/compiler-rt/commit/8a5e425a68d.diff;
sha256 = "0h4y5vl74qaa7dl54b1fcyqalvlpd8zban2d1jxfkxpzyi7m8ifi";
}
}
)
'';
# hacky fix: created binaries need to be run before installation
preBuild = ''
mkdir -p $out/
ln -sv $PWD/lib $out
'';
cmakeFlags = with stdenv; [
"-DCMAKE_BUILD_TYPE=${if debugVersion then "Debug" else "Release"}"
"-DLLVM_INSTALL_UTILS=ON" # Needed by rustc
"-DLLVM_BUILD_TESTS=ON"
"-DLLVM_ENABLE_FFI=ON"
"-DLLVM_ENABLE_RTTI=ON"
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}"
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}"
"-DTARGET_TRIPLE=${stdenv.hostPlatform.config}"
] ++ stdenv.lib.optional enableSharedLibraries [
"-DLLVM_LINK_LLVM_DYLIB=ON"
] ++ stdenv.lib.optional (!isDarwin)
"-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include"
++ stdenv.lib.optionals ( isDarwin) [
"-DLLVM_ENABLE_LIBCXX=ON"
"-DCAN_TARGET_i386=false"
] ++ stdenv.lib.optionals stdenv.hostPlatform.isMusl [
# Not yet supported
"-DCOMPILER_RT_BUILD_SANITIZERS=OFF"
"-DCOMPILER_RT_BUILD_XRAY=OFF"
];
postBuild = ''
rm -fR $out
'';
postInstall = stdenv.lib.optionalString (stdenv.isDarwin && enableSharedLibraries) ''
ln -s $out/lib/libLLVM.dylib $out/lib/libLLVM-${version}.dylib
'';
enableParallelBuilding = true;
meta = {
description = "Collection of modular and reusable compiler and toolchain technologies";
homepage = http://llvm.org/;
license = stdenv.lib.licenses.ncsa;
maintainers = with stdenv.lib.maintainers; [ lovek323 raskin ];
platforms = stdenv.lib.platforms.all;
};
}

View File

@ -46,6 +46,14 @@ stdenv.mkDerivation ({
propagatedBuildInputs = [ ncurses zlib ];
patches = [
(fetchpatch {
name = "0001-Fix-return-type-in-ORC-readMem-client-interface.patch";
url = "https://bugzilla.redhat.com/attachment.cgi?id=1389687";
sha256 = "0ga2123aclq3x9w72d0rm0az12m8c1i4r1106vh701hf4cghgbch";
})
];
# TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks
# to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra
# can build this. If we didn't do it, basically the entire nixpkgs on Darwin would have an unfree dependency and we'd

View File

@ -1,5 +1,6 @@
{ stdenv
, fetch
, fetchpatch
, cmake
, python
, libffi
@ -42,6 +43,13 @@ stdenv.mkDerivation ({
propagatedBuildInputs = [ ncurses zlib ];
patches = [
(fetchpatch {
url = "https://bugzilla.redhat.com/attachment.cgi?id=1389687";
name = "llvm-gcc8-type-mismatch.patch";
sha256 = "0ga2123aclq3x9w72d0rm0az12m8c1i4r1106vh701hf4cghgbch";
})
];
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace cmake/modules/AddLLVM.cmake \
--replace 'set(_install_name_dir INSTALL_NAME_DIR "@rpath")' "set(_install_name_dir)" \

View File

@ -20,6 +20,8 @@ stdenv.mkDerivation rec {
make golden && make test
'';
NIX_CFLAGS_COMPILE="-Wno-error=attributes";
meta = with stdenv.lib; {
homepage = https://www.nasm.us/;
description = "An 80x86 and x86-64 assembler designed for portability and modularity";

View File

@ -11,9 +11,13 @@ stdenv.mkDerivation rec {
buildInputs = [ readline gettext ncurses ];
# Needed with GCC 7
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isGNU "-Wno-error=int-in-bool-context"
+ stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error=null-dereference";
# Needed with GCC 8
NIX_CFLAGS_COMPILE = with stdenv.lib; (optionals stdenv.cc.isGNU [
"-Wno-error=int-in-bool-context"
"-Wno-error=class-memaccess"
"-Wno-error=restrict"
"-Wno-error=format-truncation"
]) ++ optional stdenv.cc.isClang "-Wno-error=null-dereference";
patchPhase = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace src/LApack.cc --replace "malloc.h" "malloc/malloc.h"

View File

@ -1,31 +0,0 @@
# This function provides generic bits to install a Python wheel.
{ python
}:
{ buildInputs ? []
# Additional flags to pass to "pip install".
, installFlags ? []
, ... } @ attrs:
attrs // {
buildInputs = buildInputs ++ [ python.pythonForBuild.pkgs.bootstrapped-pip ];
configurePhase = attrs.configurePhase or ''
runHook preConfigure
runHook postConfigure
'';
installPhase = attrs.installPhase or ''
runHook preInstall
mkdir -p "$out/${python.sitePackages}"
export PYTHONPATH="$out/${python.sitePackages}:$PYTHONPATH"
pushd dist
${python.pythonForBuild.pkgs.bootstrapped-pip}/bin/pip install *.whl --no-index --prefix=$out --no-cache ${toString installFlags} --build tmpbuild
popd
runHook postInstall
'';
}

View File

@ -1,22 +0,0 @@
# This function provides specific bits for building a flit-based Python package.
{ python
, flit
}:
{ ... } @ attrs:
attrs // {
nativeBuildInputs = [ flit ];
buildPhase = attrs.buildPhase or ''
runHook preBuild
flit build --format wheel
runHook postBuild
'';
# Flit packages, like setuptools packages, might have tests.
installCheckPhase = attrs.checkPhase or ''
${python.interpreter} -m unittest discover
'';
doCheck = attrs.doCheck or true;
}

View File

@ -1,56 +0,0 @@
# This function provides specific bits for building a setuptools-based Python package.
{ lib
, python
}:
{
# Global options passed to "python setup.py"
setupPyGlobalFlags ? []
# Build options passed to "build_ext"
# https://github.com/pypa/pip/issues/881
# Rename to `buildOptions` because it is not setuptools specific?
, setupPyBuildFlags ? []
# Execute before shell hook
, preShellHook ? ""
# Execute after shell hook
, postShellHook ? ""
, ... } @ attrs:
let
pipGlobalFlagsString = lib.concatMapStringsSep " " (option: "--global-option ${option}") setupPyGlobalFlags;
pipBuildFlagsString = lib.concatMapStringsSep " " (option: "--build-option ${option}") setupPyBuildFlags;
in attrs // {
buildPhase = attrs.buildPhase or ''
runHook preBuild
mkdir -p dist
echo "Creating a wheel..."
${python.pythonForBuild.interpreter} -m pip wheel --no-index --no-deps --no-clean --no-build-isolation --wheel-dir dist ${pipGlobalFlagsString} ${pipBuildFlagsString} .
echo "Finished creating a wheel..."
runHook postBuild
'';
installCheckPhase = ''
runHook preCheck
echo "No checkPhase defined. Either provide a checkPhase or disable tests in case tests are not available."; exit 1
runHook postCheck
'';
# With Python it's a common idiom to run the tests
# after the software has been installed.
doCheck = attrs.doCheck or true;
shellHook = attrs.shellHook or ''
${preShellHook}
# Long-term setup.py should be dropped.
if [ -e pyproject.toml ]; then
tmp_path=$(mktemp -d)
export PATH="$tmp_path/bin:$PATH"
export PYTHONPATH="$tmp_path/${python.pythonForBuild.sitePackages}:$PYTHONPATH"
mkdir -p $tmp_path/${python.pythonForBuild.sitePackages}
${python.pythonForBuild.pkgs.bootstrapped-pip}/bin/pip install -e . --prefix $tmp_path >&2
fi
${postShellHook}
'';
}

View File

@ -1,60 +0,0 @@
# This function provides specific bits for building a setuptools-based Python package.
{ lib
, python
}:
{
# Global options passed to "python setup.py"
setupPyGlobalFlags ? []
# Build options passed to "python setup.py build_ext"
# https://github.com/pypa/pip/issues/881
, setupPyBuildFlags ? []
# Execute before shell hook
, preShellHook ? ""
# Execute after shell hook
, postShellHook ? ""
, ... } @ attrs:
let
# use setuptools shim (so that setuptools is imported before distutils)
# pip does the same thing: https://github.com/pypa/pip/pull/3265
setuppy = ./run_setup.py;
setupPyGlobalFlagsString = lib.concatStringsSep " " setupPyGlobalFlags;
setupPyBuildExtString = lib.optionalString (setupPyBuildFlags != []) ("build_ext " + (lib.concatStringsSep " " setupPyBuildFlags));
in attrs // {
# we copy nix_run_setup over so it's executed relative to the root of the source
# many project make that assumption
buildPhase = attrs.buildPhase or ''
runHook preBuild
cp ${setuppy} nix_run_setup
${python.pythonForBuild.interpreter} nix_run_setup ${setupPyGlobalFlagsString} ${setupPyBuildExtString} bdist_wheel
runHook postBuild
'';
installCheckPhase = attrs.checkPhase or ''
runHook preCheck
${python.pythonForBuild.interpreter} nix_run_setup test
runHook postCheck
'';
# Python packages that are installed with setuptools
# are typically distributed with tests.
# With Python it's a common idiom to run the tests
# after the software has been installed.
doCheck = attrs.doCheck or true;
shellHook = attrs.shellHook or ''
${preShellHook}
if test -e setup.py; then
tmp_path=$(mktemp -d)
export PATH="$tmp_path/bin:$PATH"
export PYTHONPATH="$tmp_path/${python.pythonForBuild.sitePackages}:$PYTHONPATH"
mkdir -p $tmp_path/${python.pythonForBuild.sitePackages}
${python.pythonForBuild.pkgs.bootstrapped-pip}/bin/pip install -e . --prefix $tmp_path >&2
fi
${postShellHook}
'';
}

View File

@ -1,20 +0,0 @@
# This function provides specific bits for building a wheel-based Python package.
{
}:
{ ... } @ attrs:
attrs // {
unpackPhase = ''
mkdir dist
cp "$src" "dist/$(stripHash "$src")"
'';
# Wheels are pre-compiled
buildPhase = attrs.buildPhase or ":";
installCheckPhase = attrs.checkPhase or ":";
# Wheels don't have any checks to run
doCheck = attrs.doCheck or false;
}

View File

@ -1,48 +0,0 @@
# This function provides a generic Python package builder,
# and can build packages that use distutils, setuptools or flit.
{ lib
, config
, python
, wrapPython
, setuptools
, unzip
, ensureNewerSourcesForZipFilesHook
, toPythonModule
, namePrefix
, flit
, writeScript
, update-python-libraries
}:
let
setuptools-specific = import ./build-python-package-setuptools.nix { inherit lib python; };
pyproject-specific = import ./build-python-package-pyproject.nix { inherit lib python; };
flit-specific = import ./build-python-package-flit.nix { inherit python flit; };
wheel-specific = import ./build-python-package-wheel.nix { };
common = import ./build-python-package-common.nix { inherit python; };
mkPythonDerivation = import ./mk-python-derivation.nix {
inherit lib config python wrapPython setuptools unzip ensureNewerSourcesForZipFilesHook;
inherit toPythonModule namePrefix update-python-libraries;
};
in
{
# Several package formats are supported.
# "setuptools" : Install a common setuptools/distutils based package. This builds a wheel.
# "wheel" : Install from a pre-compiled wheel.
# "flit" : Install a flit package. This builds a wheel.
# "other" : Provide your own buildPhase and installPhase.
format ? "setuptools"
, ... } @ attrs:
let
formatspecific =
if format == "pyproject" then common (pyproject-specific attrs)
else if format == "setuptools" then common (setuptools-specific attrs)
else if format == "flit" then common (flit-specific attrs)
else if format == "wheel" then common (wheel-specific attrs)
else if format == "other" then {}
else throw "Unsupported format ${format}";
in mkPythonDerivation ( attrs // formatspecific )

View File

@ -0,0 +1,95 @@
# Hooks for building Python packages.
{ python
, callPackage
, makeSetupHook
}:
let
pythonInterpreter = python.pythonForBuild.interpreter;
pythonSitePackages = python.sitePackages;
pythonCheckInterpreter = python.interpreter;
setuppy = ../run_setup.py;
in rec {
flitBuildHook = callPackage ({ flit }:
makeSetupHook {
name = "flit-build-hook";
deps = [ flit ];
substitutions = {
inherit pythonInterpreter;
};
} ./flit-build-hook.sh) {};
pipBuildHook = callPackage ({ pip }:
makeSetupHook {
name = "pip-build-hook.sh";
deps = [ pip ];
substitutions = {
inherit pythonInterpreter pythonSitePackages;
};
} ./pip-build-hook.sh) {};
pipInstallHook = callPackage ({ pip }:
makeSetupHook {
name = "pip-install-hook";
deps = [ pip ];
substitutions = {
inherit pythonInterpreter pythonSitePackages;
};
} ./pip-install-hook.sh) {};
pytestCheckHook = callPackage ({ pytest }:
makeSetupHook {
name = "pytest-check-hook";
deps = [ pytest ];
substitutions = {
inherit pythonCheckInterpreter;
};
} ./pytest-check-hook.sh) {};
pythonCatchConflictsHook = callPackage ({ setuptools }:
makeSetupHook {
name = "python-catch-conflicts-hook";
deps = [ setuptools ];
substitutions = {
inherit pythonInterpreter;
catchConflicts=../catch_conflicts/catch_conflicts.py;
};
} ./python-catch-conflicts-hook.sh) {};
pythonImportsCheckHook = callPackage ({}:
makeSetupHook {
name = "python-imports-check-hook.sh";
substitutions = {
inherit pythonCheckInterpreter;
};
} ./python-imports-check-hook.sh) {};
pythonRemoveBinBytecodeHook = callPackage ({ }:
makeSetupHook {
name = "python-remove-bin-bytecode-hook";
} ./python-remove-bin-bytecode-hook.sh) {};
setuptoolsBuildHook = callPackage ({ setuptools, wheel }:
makeSetupHook {
name = "setuptools-setup-hook";
deps = [ setuptools wheel ];
substitutions = {
inherit pythonInterpreter pythonSitePackages setuppy;
};
} ./setuptools-build-hook.sh) {};
setuptoolsCheckHook = callPackage ({ setuptools }:
makeSetupHook {
name = "setuptools-check-hook";
deps = [ setuptools ];
substitutions = {
inherit pythonCheckInterpreter setuppy;
};
} ./setuptools-check-hook.sh) {};
wheelUnpackHook = callPackage ({ }:
makeSetupHook {
name = "wheel-unpack-hook.sh";
} ./wheel-unpack-hook.sh) {};
}

View File

@ -0,0 +1,15 @@
# Setup hook for flit
echo "Sourcing flit-build-hook"
flitBuildPhase () {
echo "Executing flitBuildPhase"
preBuild
@pythonInterpreter@ -m flit build --format wheel
postBuild
echo "Finished executing flitBuildPhase"
}
if [ -z "$dontUseFlitBuild" ] && [ -z "$buildPhase" ]; then
echo "Using flitBuildPhase"
buildPhase=flitBuildPhase
fi

View File

@ -0,0 +1,42 @@
# Setup hook to use for pip projects
echo "Sourcing pip-build-hook"
pipBuildPhase() {
echo "Executing pipBuildPhase"
runHook preBuild
mkdir -p dist
echo "Creating a wheel..."
@pythonInterpreter@ -m pip wheel --no-index --no-deps --no-clean --no-build-isolation --wheel-dir dist "$options" .
echo "Finished creating a wheel..."
runHook postBuild
echo "Finished executing pipBuildPhase"
}
pipShellHook() {
echo "Executing pipShellHook"
runHook preShellHook
# Long-term setup.py should be dropped.
if [ -e pyproject.toml ]; then
tmp_path=$(mktemp -d)
export PATH="$tmp_path/bin:$PATH"
export PYTHONPATH="$tmp_path/@pythonSitePackages@:$PYTHONPATH"
mkdir -p "$tmp_path/@pythonSitePackages@"
@pythonInterpreter@ -m pip install -e . --prefix "$tmp_path" >&2
fi
runHook postShellHook
echo "Finished executing pipShellHook"
}
if [ -z "$dontUsePipBuild" ] && [ -z "$buildPhase" ]; then
echo "Using pipBuildPhase"
buildPhase=pipBuildPhase
fi
if [ -z "$shellHook" ]; then
echo "Using pipShellHook"
shellHook=pipShellHook
fi

View File

@ -0,0 +1,24 @@
# Setup hook for pip.
echo "Sourcing pip-install-hook"
declare -a pipInstallFlags
pipInstallPhase() {
echo "Executing pipInstallPhase"
runHook preInstall
mkdir -p "$out/@pythonSitePackages@"
export PYTHONPATH="$out/@pythonSitePackages@:$PYTHONPATH"
pushd dist || return 1
@pythonInterpreter@ -m pip install ./*.whl --no-index --prefix="$out" --no-cache $pipInstallFlags --build tmpbuild
popd || return 1
runHook postInstall
echo "Finished executing pipInstallPhase"
}
if [ -z "$dontUsePipInstall" ] && [ -z "$installPhase" ]; then
echo "Using pipInstallPhase"
installPhase=pipInstallPhase
fi

View File

@ -0,0 +1,49 @@
# Setup hook for pytest
echo "Sourcing pytest-check-hook"
declare -ar disabledTests
function _concatSep {
local result
local sep="$1"
local -n arr=$2
for index in ${!arr[*]}; do
if [ $index -eq 0 ]; then
result="${arr[index]}"
else
result+=" $sep ${arr[index]}"
fi
done
echo "$result"
}
function _pytestComputeDisabledTestsString () {
declare -a tests
local tests=($1)
local prefix="not "
prefixed=( "${tests[@]/#/$prefix}" )
result=$(_concatSep "and" prefixed)
echo "$result"
}
function pytestCheckPhase() {
echo "Executing pytestCheckPhase"
runHook preCheck
# Compose arguments
args=" -m pytest"
if [ -n "$disabledTests" ]; then
disabledTestsString=$(_pytestComputeDisabledTestsString "${disabledTests[@]}")
args+=" -k \""$disabledTestsString"\""
fi
args+=" ${pytestFlagsArray[@]}"
eval "@pythonCheckInterpreter@ $args"
runHook postCheck
echo "Finished executing pytestCheckPhase"
}
if [ -z "$dontUsePytestCheck" ] && [ -z "$installCheckPhase" ]; then
echo "Using pytestCheckPhase"
preDistPhases+=" pytestCheckPhase"
fi

View File

@ -0,0 +1,10 @@
# Setup hook for detecting conflicts in Python packages
echo "Sourcing python-catch-conflicts-hook.sh"
pythonCatchConflictsPhase() {
@pythonInterpreter@ @catchConflicts@
}
if [ -z "$dontUsePythonCatchConflicts" ]; then
preDistPhases+=" pythonCatchConflictsPhase"
fi

View File

@ -0,0 +1,16 @@
# Setup hook for checking whether Python imports succeed
echo "Sourcing python-imports-check-hook.sh"
pythonImportsCheckPhase () {
echo "Executing pythonImportsCheckPhase"
if [ -n "$pythonImportsCheck" ]; then
echo "Check whether the following modules can be imported: $pythonImportsCheck"
cd $out && eval "@pythonCheckInterpreter@ -c 'import os; import importlib; list(map(lambda mod: importlib.import_module(mod), os.environ[\"pythonImportsCheck\"].split()))'"
fi
}
if [ -z "$dontUsePythonImportsCheck" ]; then
echo "Using pythonImportsCheckPhase"
preDistPhases+=" pythonImportsCheckPhase"
fi

View File

@ -0,0 +1,17 @@
# Setup hook for detecting conflicts in Python packages
echo "Sourcing python-remove-bin-bytecode-hook.sh"
# Check if we have two packages with the same name in the closure and fail.
# If this happens, something went wrong with the dependencies specs.
# Intentionally kept in a subdirectory, see catch_conflicts/README.md.
pythonRemoveBinBytecodePhase () {
if [ -d "$out/bin" ]; then
rm -rf "$out/bin/__pycache__" # Python 3
find "$out/bin" -type f -name "*.pyc" -delete # Python 2
fi
}
if [ -z "$dontUsePythonRemoveBinBytecode" ]; then
preDistPhases+=" pythonRemoveBinBytecodePhase"
fi

View File

@ -0,0 +1,47 @@
# Setup hook for setuptools.
echo "Sourcing setuptools-build-hook"
setuptoolsBuildPhase() {
echo "Executing setuptoolsBuildPhase"
local args
runHook preBuild
cp -f @setuppy@ nix_run_setup
args=""
if [ -n "$setupPyGlobalFlags" ]; then
args+="$setupPyGlobalFlags"
fi
if [ -n "$setupPyBuildFlags" ]; then
args+="build_ext $setupPyBuildFlags"
fi
eval "@pythonInterpreter@ nix_run_setup $args bdist_wheel"
runHook postBuild
echo "Finished executing setuptoolsInstallPhase"
}
setuptoolsShellHook() {
echo "Executing setuptoolsShellHook"
runHook preShellHook
if test -e setup.py; then
tmp_path=$(mktemp -d)
export PATH="$tmp_path/bin:$PATH"
export PYTHONPATH="@pythonSitePackages@:$PYTHONPATH"
mkdir -p "$tmp_path/@pythonSitePackages@"
eval "@pythonInterpreter@ -m pip -e . --prefix $tmp_path >&2"
fi
runHook postShellHook
echo "Finished executing setuptoolsShellHook"
}
if [ -z "$dontUseSetuptoolsBuild" ] && [ -z "$buildPhase" ]; then
echo "Using setuptoolsBuildPhase"
buildPhase=setuptoolsBuildPhase
fi
if [ -z "$dontUseSetuptoolsShellHook" ] && [ -z "$shellHook" ]; then
echo "Using setuptoolsShellHook"
shellHook=setuptoolsShellHook
fi

View File

@ -0,0 +1,18 @@
# Setup hook for setuptools.
echo "Sourcing setuptools-check-hook"
setuptoolsCheckPhase() {
echo "Executing setuptoolsCheckPhase"
runHook preCheck
cp -f @setuppy@ nix_run_setup
@pythonCheckInterpreter@ nix_run_setup test
runHook postCheck
echo "Finished executing setuptoolsCheckPhase"
}
if [ -z "$dontUseSetuptoolsCheck" ] && [ -z "$installCheckPhase" ]; then
echo "Using setuptoolsCheckPhase"
preDistPhases+=" setuptoolsCheckPhase"
fi

View File

@ -0,0 +1,18 @@
# Setup hook to use in case a wheel is fetched
echo "Sourcing wheel setup hook"
wheelUnpackPhase(){
echo "Executing wheelUnpackPhase"
runHook preUnpack
mkdir -p dist
cp "$src" "dist/$(stripHash "$src")"
# runHook postUnpack # Calls find...?
echo "Finished executing wheelUnpackPhase"
}
if [ -z "$dontUseWheelUnpack" ] && [ -z "$unpackPhase" ]; then
echo "Using wheelUnpackPhase"
unpackPhase=wheelUnpackPhase
fi

View File

@ -4,13 +4,22 @@
, config
, python
, wrapPython
, setuptools
, unzip
, ensureNewerSourcesForZipFilesHook
# Whether the derivation provides a Python module or not.
, toPythonModule
, namePrefix
, update-python-libraries
, setuptools
, flitBuildHook
, pipBuildHook
, pipInstallHook
, pythonCatchConflictsHook
, pythonImportsCheckHook
, pythonRemoveBinBytecodeHook
, setuptoolsBuildHook
, setuptoolsCheckHook
, wheelUnpackHook
}:
{ name ? "${attrs.pname}-${attrs.version}"
@ -48,6 +57,11 @@
# Skip wrapping of python programs altogether
, dontWrapPythonPrograms ? false
# Don't use Pip to install a wheel
# Note this is actually a variable for the pipInstallPhase in pip's setupHook.
# It's included here to prevent an infinite recursion.
, dontUsePipInstall ? false
# Skip setting the PYTHONNOUSERSITE environment variable in wrapped programs
, permitUserSite ? false
@ -57,6 +71,13 @@
# However, some packages do provide executables with extensions, and thus bytecode is generated.
, removeBinBytecode ? true
# Several package formats are supported.
# "setuptools" : Install a common setuptools/distutils based package. This builds a wheel.
# "wheel" : Install from a pre-compiled wheel.
# "flit" : Install a flit package. This builds a wheel.
# "other" : Provide your own buildPhase and installPhase.
, format ? "setuptools"
, meta ? {}
, passthru ? {}
@ -71,26 +92,43 @@ if disabled
then throw "${name} not supported for interpreter ${python.executable}"
else
let self = toPythonModule (python.stdenv.mkDerivation (builtins.removeAttrs attrs [
"disabled" "checkInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts"
] // {
let
inherit (python) stdenv;
self = toPythonModule (stdenv.mkDerivation ((builtins.removeAttrs attrs [
"disabled" "checkPhase" "checkInputs" "doCheck" "doInstallCheck" "dontWrapPythonPrograms" "catchConflicts" "format"
]) // {
name = namePrefix + name;
nativeBuildInputs = [
python
wrapPython
ensureNewerSourcesForZipFilesHook
setuptools
# ++ lib.optional catchConflicts setuptools # If we no longer propagate setuptools
ensureNewerSourcesForZipFilesHook # move to wheel installer (pip) or builder (setuptools, flit, ...)?
] ++ lib.optionals catchConflicts [
setuptools pythonCatchConflictsHook
] ++ lib.optionals removeBinBytecode [
pythonRemoveBinBytecodeHook
] ++ lib.optionals (lib.hasSuffix "zip" (attrs.src.name or "")) [
unzip
] ++ lib.optionals (format == "setuptools") [
setuptoolsBuildHook
] ++ lib.optionals (format == "flit") [
flitBuildHook
] ++ lib.optionals (format == "pyproject") [
pipBuildHook
] ++ lib.optionals (format == "wheel") [
wheelUnpackHook
] ++ lib.optionals (!(format == "other") || dontUsePipInstall) [
pipInstallHook
] ++ lib.optionals (stdenv.buildPlatform == stdenv.hostPlatform) [
# This is a test, however, it should be ran independent of the checkPhase and checkInputs
pythonImportsCheckHook
] ++ nativeBuildInputs;
buildInputs = buildInputs ++ pythonPath;
# Propagate python and setuptools. We should stop propagating setuptools.
propagatedBuildInputs = propagatedBuildInputs ++ [ python setuptools ];
propagatedBuildInputs = propagatedBuildInputs ++ [ python ];
inherit strictDeps;
@ -98,21 +136,17 @@ let self = toPythonModule (python.stdenv.mkDerivation (builtins.removeAttrs attr
# Python packages don't have a checkPhase, only an installCheckPhase
doCheck = false;
doInstallCheck = doCheck;
installCheckInputs = checkInputs;
doInstallCheck = attrs.doCheck or true;
installCheckInputs = [
] ++ lib.optionals (format == "setuptools") [
# Longer-term we should get rid of this and require
# users of this function to set the `installCheckPhase` or
# pass in a hook that sets it.
setuptoolsCheckHook
] ++ checkInputs;
postFixup = lib.optionalString (!dontWrapPythonPrograms) ''
wrapPythonPrograms
'' + lib.optionalString removeBinBytecode ''
if [ -d "$out/bin" ]; then
rm -rf "$out/bin/__pycache__" # Python 3
find "$out/bin" -type f -name "*.pyc" -delete # Python 2
fi
'' + lib.optionalString catchConflicts ''
# Check if we have two packages with the same name in the closure and fail.
# If this happens, something went wrong with the dependencies specs.
# Intentionally kept in a subdirectory, see catch_conflicts/README.md.
${python.pythonForBuild.interpreter} ${./catch_conflicts}/catch_conflicts.py
'' + attrs.postFixup or '''';
# Python packages built through cross-compilation are always for the host platform.
@ -123,6 +157,10 @@ let self = toPythonModule (python.stdenv.mkDerivation (builtins.removeAttrs attr
platforms = python.meta.platforms;
isBuildPythonPackage = python.meta.platforms;
} // meta;
} // lib.optionalAttrs (attrs?checkPhase) {
# If given use the specified checkPhase, otherwise use the setup hook.
# Longer-term we should get rid of `checkPhase` and use `installCheckPhase`.
installCheckPhase = attrs.checkPhase;
}));
passthru.updateScript = let

View File

@ -10,6 +10,11 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ autoconf automake libtool freetype SDL libX11 ];
postPatch = ''
substituteInPlace include/agg_renderer_outline_aa.h \
--replace 'line_profile_aa& profile() {' 'const line_profile_aa& profile() {'
'';
# fix build with new automake, from Gentoo ebuild
preConfigure = ''
sed -i '/^AM_C_PROTOTYPES/d' configure.in

View File

@ -18,7 +18,11 @@ stdenv.mkDerivation rec {
buildInputs = [ zlib ];
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations";
NIX_CFLAGS_COMPILE = [
"-Wno-error=deprecated-declarations"
"-Wno-error=format-truncation"
"-Wno-error=cast-function-type"
];
propagatedBuildInputs = [ antlr3_4 libantlr3c polarssl bctoolbox ];
@ -26,7 +30,8 @@ stdenv.mkDerivation rec {
"--with-polarssl=${polarssl}"
];
enableParallelBuilding = true;
# Fails to build with lots of parallel jobs
enableParallelBuilding = false;
meta = with stdenv.lib; {
homepage = http://www.linphone.org/index.php/eng;

View File

@ -15,6 +15,8 @@ stdenv.mkDerivation rec {
buildInputs = [ bctoolbox sqlite ];
nativeBuildInputs = [ cmake ];
NIX_CFLAGS_COMPILE = "-Wno-error=cast-function-type";
meta = with stdenv.lib; {
description = "BZRTP is an opensource implementation of ZRTP keys exchange protocol";
homepage = https://github.com/BelledonneCommunications/bzrtp;

View File

@ -11,6 +11,8 @@ stdenv.mkDerivation rec {
owner = "puppetlabs";
};
NIX_CFLAGS_COMPILE = [ "-Wno-error=catch-value" ];
nativeBuildInputs = [ cmake ];
buildInputs = [ boost curl leatherman ];

View File

@ -1,21 +1,40 @@
{ stdenv, fetchurl, meson, ninja, pkgconfig, glib, gettext, python3, gnutls, p11-kit, libproxy, gnome3
, gsettings-desktop-schemas }:
{ stdenv
, fetchurl
, substituteAll
, meson
, ninja
, nixosTests
, pkgconfig
, glib
, gettext
, makeWrapper
, python3
, gnutls
, p11-kit
, libproxy
, gnome3
, gsettings-desktop-schemas
}:
let
stdenv.mkDerivation rec {
pname = "glib-networking";
version = "2.60.3";
in
stdenv.mkDerivation rec {
name = "${pname}-${version}";
outputs = [ "out" "installedTests" ];
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "1mfw44qpmwvz6yzj8c6spx6z357wrmkk15byrkc5byagd82860fm";
};
outputs = [ "out" "dev" ]; # to deal with propagatedBuildInputs
patches = [
(substituteAll {
src = ./hardcode-gsettings.patch;
gds_gsettings_path = glib.getSchemaPath gsettings-desktop-schemas;
})
PKG_CONFIG_GIO_2_0_GIOMODULEDIR = "${placeholder "out"}/lib/gio/modules";
./installed-tests-path.patch
];
postPatch = ''
chmod +x meson_post_install.py # patchShebangs requires executable file
@ -23,27 +42,52 @@ stdenv.mkDerivation rec {
'';
nativeBuildInputs = [
meson ninja pkgconfig gettext
python3 # install_script
meson
ninja
pkgconfig
gettext
makeWrapper
python3 # for install_script
];
propagatedBuildInputs = [ glib gnutls p11-kit libproxy gsettings-desktop-schemas ];
mesonFlags = [
# Default auto detection doesn't work
"-Dgnutls=enabled"
buildInputs = [
glib
gnutls
p11-kit
libproxy
gsettings-desktop-schemas
];
doCheck = false; # tests need to access the certificates (among other things)
mesonFlags = [
"-Dinstalled_tests=true"
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
];
postFixup = ''
find "$installedTests/libexec" "$out/libexec" -type f -executable -print0 \
| while IFS= read -r -d "" file; do
echo "Wrapping program '$file'"
wrapProgram "$file" --prefix GIO_EXTRA_MODULES : "$out/lib/gio/modules"
done
'';
passthru = {
updateScript = gnome3.updateScript {
packageName = pname;
};
tests = {
installedTests = nixosTests.glib-networking;
};
};
meta = with stdenv.lib; {
description = "Network-related giomodules for glib";
license = licenses.lgpl2Plus;
homepage = https://gitlab.gnome.org/GNOME/glib-networking;
license = licenses.lgpl21Plus;
maintainers = gnome3.maintainers;
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,341 @@
diff --git a/proxy/gnome/gproxyresolvergnome.c b/proxy/gnome/gproxyresolvergnome.c
index 50b63cd..4364116 100644
--- a/proxy/gnome/gproxyresolvergnome.c
+++ b/proxy/gnome/gproxyresolvergnome.c
@@ -156,23 +156,79 @@
resolver->base_resolver = g_simple_proxy_resolver_new (NULL, NULL);
- resolver->proxy_settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA,
+ FALSE);
+ resolver->proxy_settings = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_signal_connect (resolver->proxy_settings, "changed",
G_CALLBACK (gsettings_changed), resolver);
- resolver->http_settings = g_settings_get_child (resolver->proxy_settings,
- GNOME_PROXY_HTTP_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTP_CHILD_SCHEMA,
+ FALSE);
+ resolver->http_settings = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_signal_connect (resolver->http_settings, "changed",
G_CALLBACK (gsettings_changed), resolver);
- resolver->https_settings = g_settings_get_child (resolver->proxy_settings,
- GNOME_PROXY_HTTPS_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTPS_CHILD_SCHEMA,
+ FALSE);
+ resolver->https_settings = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_signal_connect (resolver->https_settings, "changed",
G_CALLBACK (gsettings_changed), resolver);
- resolver->ftp_settings = g_settings_get_child (resolver->proxy_settings,
- GNOME_PROXY_FTP_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_FTP_CHILD_SCHEMA,
+ FALSE);
+ resolver->ftp_settings = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_signal_connect (resolver->ftp_settings, "changed",
G_CALLBACK (gsettings_changed), resolver);
- resolver->socks_settings = g_settings_get_child (resolver->proxy_settings,
- GNOME_PROXY_SOCKS_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_SOCKS_CHILD_SCHEMA,
+ FALSE);
+ resolver->socks_settings = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_signal_connect (resolver->socks_settings, "changed",
G_CALLBACK (gsettings_changed), resolver);
diff --git a/proxy/tests/gnome.c b/proxy/tests/gnome.c
index f76b094..54751e3 100644
--- a/proxy/tests/gnome.c
+++ b/proxy/tests/gnome.c
@@ -55,26 +55,86 @@
{
GSettings *settings, *child;
- settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA,
+ FALSE);
+ settings = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_reset (settings, GNOME_PROXY_MODE_KEY);
g_settings_reset (settings, GNOME_PROXY_USE_SAME_PROXY_KEY);
- child = g_settings_get_child (settings, GNOME_PROXY_HTTP_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTP_CHILD_SCHEMA,
+ FALSE);
+ child = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_reset (child, GNOME_PROXY_HTTP_HOST_KEY);
g_settings_reset (child, GNOME_PROXY_HTTP_PORT_KEY);
g_object_unref (child);
- child = g_settings_get_child (settings, GNOME_PROXY_HTTPS_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTPS_CHILD_SCHEMA,
+ FALSE);
+ child = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_reset (child, GNOME_PROXY_HTTPS_HOST_KEY);
g_settings_reset (child, GNOME_PROXY_HTTPS_PORT_KEY);
g_object_unref (child);
- child = g_settings_get_child (settings, GNOME_PROXY_FTP_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_FTP_CHILD_SCHEMA,
+ FALSE);
+ child = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_reset (child, GNOME_PROXY_FTP_HOST_KEY);
g_settings_reset (child, GNOME_PROXY_FTP_PORT_KEY);
g_object_unref (child);
- child = g_settings_get_child (settings, GNOME_PROXY_SOCKS_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_SOCKS_CHILD_SCHEMA,
+ FALSE);
+ child = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_reset (child, GNOME_PROXY_SOCKS_HOST_KEY);
g_settings_reset (child, GNOME_PROXY_SOCKS_PORT_KEY);
g_object_unref (child);
@@ -88,21 +148,69 @@
{
GSettings *settings, *child;
- settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA,
+ FALSE);
+ settings = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_set_enum (settings, GNOME_PROXY_MODE_KEY, G_DESKTOP_PROXY_MODE_MANUAL);
g_settings_set_boolean (settings, GNOME_PROXY_USE_SAME_PROXY_KEY, TRUE);
- child = g_settings_get_child (settings, GNOME_PROXY_HTTP_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTP_CHILD_SCHEMA,
+ FALSE);
+ child = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_set_string (child, GNOME_PROXY_HTTP_HOST_KEY, "proxy.example.com");
g_settings_set_int (child, GNOME_PROXY_HTTP_PORT_KEY, 8080);
g_object_unref (child);
- child = g_settings_get_child (settings, GNOME_PROXY_HTTPS_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTPS_CHILD_SCHEMA,
+ FALSE);
+ child = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_set_string (child, GNOME_PROXY_HTTPS_HOST_KEY, "proxy-s.example.com");
g_settings_set_int (child, GNOME_PROXY_HTTPS_PORT_KEY, 7070);
g_object_unref (child);
- child = g_settings_get_child (settings, GNOME_PROXY_FTP_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_FTP_CHILD_SCHEMA,
+ FALSE);
+ child = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_set_string (child, GNOME_PROXY_FTP_HOST_KEY, "proxy-f.example.com");
g_settings_set_int (child, GNOME_PROXY_FTP_PORT_KEY, 6060);
g_object_unref (child);
@@ -119,12 +227,36 @@
GSettings *settings, *child;
const gchar *ignore_hosts[2] = { "127.0.0.1", NULL };
- settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA,
+ FALSE);
+ settings = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_set_enum (settings, GNOME_PROXY_MODE_KEY, G_DESKTOP_PROXY_MODE_MANUAL);
g_settings_set (settings, GNOME_PROXY_IGNORE_HOSTS_KEY,
"@as", g_variant_new_strv (ignore_hosts, -1));
- child = g_settings_get_child (settings, GNOME_PROXY_SOCKS_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_SOCKS_CHILD_SCHEMA,
+ FALSE);
+ child = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_set_string (child, GNOME_PROXY_SOCKS_HOST_KEY, "proxy.example.com");
g_settings_set_int (child, GNOME_PROXY_SOCKS_PORT_KEY, 1234);
g_object_unref (child);
@@ -139,12 +271,36 @@
{
GSettings *settings, *http;
- settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA,
+ FALSE);
+ settings = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_set_enum (settings, GNOME_PROXY_MODE_KEY, G_DESKTOP_PROXY_MODE_MANUAL);
g_settings_set (settings, GNOME_PROXY_IGNORE_HOSTS_KEY,
"@as", g_variant_new_strv (ignore_hosts, n_ignore_hosts));
- http = g_settings_get_child (settings, GNOME_PROXY_HTTP_CHILD_SCHEMA);
+ {
+ GSettingsSchemaSource *schema_source;
+ GSettingsSchema *schema;
+ schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
+ g_settings_schema_source_get_default(),
+ TRUE, NULL);
+ schema = g_settings_schema_source_lookup(schema_source,
+ GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTP_CHILD_SCHEMA,
+ FALSE);
+ http = g_settings_new_full(schema, NULL, NULL);
+ g_settings_schema_source_unref(schema_source);
+ g_settings_schema_unref(schema);
+ }
g_settings_set_string (http, GNOME_PROXY_HTTP_HOST_KEY, "localhost");
g_settings_set_int (http, GNOME_PROXY_HTTP_PORT_KEY, 8080);

View File

@ -0,0 +1,25 @@
diff --git a/meson.build b/meson.build
index 4d91677..aaaeb2b 100644
--- a/meson.build
+++ b/meson.build
@@ -12,8 +12,8 @@
libexecdir = join_paths(prefix, get_option('libexecdir'))
localedir = join_paths(prefix, get_option('localedir'))
-installed_tests_metadir = join_paths(datadir, 'installed-tests', meson.project_name())
-installed_tests_execdir = join_paths(libexecdir, 'installed-tests', meson.project_name())
+installed_tests_metadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', meson.project_name())
+installed_tests_execdir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', meson.project_name())
cc = meson.get_compiler('c')
host_system = host_machine.system()
diff --git a/meson_options.txt b/meson_options.txt
index 3a525dd..fc86302 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -3,4 +3,5 @@
option('libproxy', type: 'feature', value: 'auto', description: 'support for libproxy proxy configration')
option('gnome_proxy', type: 'feature', value: 'auto', description: 'support for GNOME desktop proxy configuration')
option('installed_tests', type: 'boolean', value: false, description: 'enable installed tests')
+option('installed_test_prefix', type: 'string', value: '', description: 'Prefix for installed tests')
option('static_modules', type: 'boolean', value: false, description: 'build static modules')

View File

@ -46,16 +46,15 @@ let
'';
binPrograms = optional (!stdenv.isDarwin) "gapplication" ++ [ "gdbus" "gio" "gsettings" ];
version = "2.60.6";
in
stdenv.mkDerivation rec {
pname = "glib";
inherit version;
version = "2.60.7";
src = fetchurl {
url = "mirror://gnome/sources/glib/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "0v7vpx2md1gn0wwiirn7g4bhf2csfvcr03y96q2zv97ain6sp3zz";
sha256 = "0433m0na8nc4cf0gidf4gfzz8k5d3dsssmh541qkpzcsaspw04lb";
};
patches = optional stdenv.isDarwin ./darwin-compilation.patch

View File

@ -40,6 +40,8 @@ callPackage ./common.nix { inherit stdenv; } {
# limit rebuilds by only disabling pie w/musl
++ stdenv.lib.optional stdenv.hostPlatform.isMusl "pie";
NIX_CFLAGS_COMPILE = if withGd then "-Wno-error=stringop-truncation" else null;
# When building glibc from bootstrap-tools, we need libgcc_s at RPATH for
# any program we run, because the gcc will have been placed at a new
# store path than that determined when built (as a source for the

View File

@ -8,7 +8,7 @@
}:
let
version = "2.6.0";
version = "2.6.1";
inherit (stdenv.lib) optional optionals optionalString;
in
@ -17,7 +17,7 @@ stdenv.mkDerivation {
src = fetchurl {
url = "https://www.freedesktop.org/software/harfbuzz/release/harfbuzz-${version}.tar.xz";
sha256 = "0rn9fvnrxds7f4812yx68myy3x7szb4z9ql4m1fgjrc2ahbx3xww";
sha256 = "0kw4c04jd8c8ili3j1glgv0wsr207313fs3jh2rawf53m8zznlf6";
};
postPatch = ''

View File

@ -11,7 +11,10 @@ stdenv.mkDerivation rec {
owner = "puppetlabs";
};
buildInputs = [ boost cmake curl ruby ];
NIX_CFLAGS_COMPILE = [ "-Wno-error=ignored-qualifiers" "-Wno-error=class-memaccess" "-Wno-error=catch-value" ];
nativeBuildInputs = [ cmake ];
buildInputs = [ boost curl ruby ];
enableParallelBuilding = true;

View File

@ -20,6 +20,9 @@ stdenv.mkDerivation {
NIX_CFLAGS_COMPILE = [
"-Wno-error=implicit-fallthrough"
"-Wno-error=nonnull"
"-Wno-error=tautological-compare"
"-Wno-error=class-memaccess"
"-Wno-error=parentheses"
];
buildInputs = [ cmake ];

View File

@ -15,6 +15,7 @@ stdenv.mkDerivation rec {
};
patches = [
./fix-gcc8-build.patch
# Fixes build with exiv2 0.27
(fetchpatch {
name = "libextractor-exiv2-0.27.patch";

View File

@ -0,0 +1,16 @@
diff --git a/src/plugins/ole2_extractor.c b/src/plugins/ole2_extractor.c
index 072ffc5..a105840 100644
--- a/src/plugins/ole2_extractor.c
+++ b/src/plugins/ole2_extractor.c
@@ -345,9 +345,8 @@ process_star_office (GsfInput *src,
gsf_input_read (src, size, (unsigned char*) buf);
if ( (buf[0] != 0x0F) ||
(buf[1] != 0x0) ||
- (0 != strncmp (&buf[2],
- "SfxDocumentInfo",
- strlen ("SfxDocumentInfo"))) ||
+ (0 != strcmp (&buf[2],
+ "SfxDocumentInfo")) ||
(buf[0x11] != 0x0B) ||
(buf[0x13] != 0x00) || /* pw protected! */
(buf[0x12] != 0x00) )

View File

@ -24,6 +24,8 @@ stdenv.mkDerivation rec {
PREFIX = placeholder "out";
LIBDIRNAME = "/lib";
NIX_CFLAGS_COMPILE = "-Wno-error=cast-function-type -Wno-error=format-truncation";
checkInputs = [ perl ];
meta = with stdenv.lib; {

View File

@ -1,9 +1,9 @@
{ stdenv
, fetchurl
, fetchpatch
, pkgconfig
, meson
, ninja
, nixosTests
, vala
, gettext
, libxml2
@ -22,32 +22,17 @@
stdenv.mkDerivation rec {
pname = "libgdata";
version = "0.17.10";
version = "0.17.11";
outputs = [ "out" "dev" "installedTests" ];
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "04mh2p5x2iidfx0d1cablxbi3hvna8cmlddc1mm4387n0grx3ly1";
sha256 = "11m99sh2k679rnsvqsi95s1l0r8lkvj61dmwg1pnxvsd5q91g6bb";
};
patches = [
./installed-tests-path.patch
(fetchpatch {
# Meson fixes
url = "https://gitlab.gnome.org/GNOME/libgdata/commit/f6d0e3f3b6fa8e8ee9569372c5709c1fb84af2c1.diff";
sha256 = "00yrppn0s21i41r9mwzvrrv7j5dida09kh7i44kv8hrbrlfag7bm";
})
(fetchpatch {
# Meson minor fixes
url = "https://gitlab.gnome.org/GNOME/libgdata/commit/b653f602b3c2b518101c5d909e1651534c22757a.diff";
sha256 = "1bn0rffsvkzjl59aw8dmq1wil58x1fshz0m6xabpn79ffvbjld8j";
})
(fetchpatch {
# Meson: Fix G_LOG_DOMAIN
url = "https://gitlab.gnome.org/GNOME/libgdata/commit/5d318e0bf905d0f1a8b3fe1e47ee7847739082e3.diff";
sha256 = "11i2blq811d53433kdq4hhsscgkrq5f50d9ih4ixgs3j47hg7b1w";
})
];
nativeBuildInputs = [
@ -87,6 +72,10 @@ stdenv.mkDerivation rec {
packageName = pname;
versionPolicy = "none"; # Stable version has not been updated for a long time.
};
tests = {
installedTests = nixosTests.libgdata;
};
};
meta = with stdenv.lib; {

View File

@ -1,5 +1,5 @@
diff --git a/gdata/tests/meson.build b/gdata/tests/meson.build
index 52154e7a..1a44d1d8 100644
index 05184deb..3a9392d4 100644
--- a/gdata/tests/meson.build
+++ b/gdata/tests/meson.build
@@ -1,5 +1,12 @@
@ -17,17 +17,17 @@ index 52154e7a..1a44d1d8 100644
tests_sources = files(
'common.c',
@@ -48,7 +55,7 @@ foreach test_name, extra_args: tests
@@ -49,7 +56,7 @@ foreach test_name, extra_args: tests
dependencies: common_deps + extra_args.get('dependencies', []),
sources: tests_sources,
install: install_tests,
install: install_tests and not should_fail,
- install_dir: tests_execdir,
+ install_dir: tests_bindir,
)
test(
@@ -63,7 +70,7 @@ if install_tests
foreach test_name, extra_args: tests
@@ -65,7 +72,7 @@ if install_tests
should_fail = extra_args.get('should_fail', false)
tests_conf = {
'TEST_TYPE': 'session',
- 'TEST_ABS_PATH': gdata_prefix / tests_execdir / test_name,
@ -35,10 +35,10 @@ index 52154e7a..1a44d1d8 100644
}
configure_file (
@@ -71,13 +78,13 @@ if install_tests
@@ -73,13 +80,13 @@ if install_tests
output: test_name + '.test',
configuration: tests_conf,
install: true,
install: not should_fail,
- install_dir: tests_metadir,
+ install_dir: tests_datadir,
)
@ -51,7 +51,7 @@ index 52154e7a..1a44d1d8 100644
)
test_data = [
@@ -96,6 +103,6 @@ if install_tests
@@ -98,6 +105,6 @@ if install_tests
install_data(
test_data,
@ -60,7 +60,7 @@ index 52154e7a..1a44d1d8 100644
)
endif
diff --git a/meson.build b/meson.build
index 7d2f5254..bed3e189 100644
index 50441abb..5fc773b1 100644
--- a/meson.build
+++ b/meson.build
@@ -20,9 +20,9 @@ gdata_api_version_minor = 0

View File

@ -25,6 +25,8 @@ stdenv.mkDerivation rec {
"-UDEFAULT_EGL_VENDOR_CONFIG_DIRS"
# FHS paths are added so that non-NixOS applications can find vendor files.
"-DDEFAULT_EGL_VENDOR_CONFIG_DIRS=\"${addOpenGLRunpath.driverLink}/share/glvnd/egl_vendor.d:/etc/glvnd/egl_vendor.d:/usr/share/glvnd/egl_vendor.d\""
"-Wno-error=array-bounds"
] ++ lib.optional stdenv.cc.isClang "-Wno-error";
# Indirectly: https://bugs.freedesktop.org/show_bug.cgi?id=35268

View File

@ -3,11 +3,11 @@
stdenv.mkDerivation rec {
pname = "libjpeg-turbo";
version = "2.0.2";
version = "2.0.3";
src = fetchurl {
url = "mirror://sourceforge/${pname}/${pname}-${version}.tar.gz";
sha256 = "1v9gx1gdzgxf51nd55ncq7rghmj4x9x91rby50ag36irwngmkf5c";
sha256 = "1ds16bnj17v6hzd43w8pzijz3imd9am4hw75ir0fxm240m8dwij2";
};
patches =

View File

@ -16,6 +16,10 @@ stdenv.mkDerivation rec {
doCheck = false; # fails
# Fix for #40213, probably permanent, because upstream doesn't seem to be
# developed anymore. Alternatively, gcc7Stdenv could be used.
NIX_CFLAGS_COMPILE = "-Wno-error=array-bounds";
meta = with stdenv.lib; {
homepage = https://sourceforge.net/projects/omxil/;
description = "An opensource implementation of the Khronos OpenMAX Integration Layer API to access multimedia components";

View File

@ -8,6 +8,8 @@ stdenv.mkDerivation rec {
sha256 = "1n2wkmvw6n80ybdwkjq8ka43z2x8mvxq49byv61b52iyz69slf7b";
};
NIX_CFLAGS_COMPILE = [ "-Wno-error=format-truncation" ];
buildInputs = [ ncurses perl ];
configureFlags = stdenv.lib.optional (perl == null) "--with-perl-bindings=no";

View File

@ -1,6 +1,22 @@
{ stdenv, fetchFromGitHub, pkgconfig, cmake, zlib, fetchpatch
, dbus, networkmanager, spidermonkey_38, pcre, python2, python3
, SystemConfiguration, CoreFoundation, JavaScriptCore }:
{ stdenv
, fetchFromGitHub
, pkgconfig
, cmake
, zlib
, fetchpatch
, dbus
, networkmanager
, spidermonkey_38
, pcre
, gsettings-desktop-schemas
, glib
, makeWrapper
, python2
, python3
, SystemConfiguration
, CoreFoundation
, JavaScriptCore
}:
stdenv.mkDerivation rec {
pname = "libproxy";
@ -13,28 +29,47 @@ stdenv.mkDerivation rec {
sha256 = "10swd3x576pinx33iwsbd4h15fbh2snmfxzcmab4c56nb08qlbrs";
};
outputs = [ "out" "dev" ]; # to deal with propagatedBuildInputs
outputs = [ "out" "dev" "py2" "py3" ];
nativeBuildInputs = [ pkgconfig cmake ];
nativeBuildInputs = [
pkgconfig
cmake
makeWrapper
];
buildInputs = [ pcre python2 python3 zlib ]
++ (if stdenv.hostPlatform.isDarwin
then [ SystemConfiguration CoreFoundation JavaScriptCore ]
else [ spidermonkey_38 dbus networkmanager ]);
buildInputs = [
pcre
python2
python3
zlib
] ++ (if stdenv.hostPlatform.isDarwin then [
SystemConfiguration
CoreFoundation
JavaScriptCore
] else [
glib
spidermonkey_38
dbus
networkmanager
]);
preConfigure = ''
cmakeFlagsArray+=(
"-DWITH_MOZJS=ON"
"-DPYTHON2_SITEPKG_DIR=$out/${python2.sitePackages}"
"-DPYTHON3_SITEPKG_DIR=$out/${python3.sitePackages}"
)
'';
cmakeFlags = [
"-DWITH_MOZJS=ON"
"-DPYTHON2_SITEPKG_DIR=${placeholder "py2"}/${python2.sitePackages}"
"-DPYTHON3_SITEPKG_DIR=${placeholder "py3"}/${python3.sitePackages}"
];
patches = stdenv.lib.optional stdenv.isDarwin
patches = stdenv.lib.optionals stdenv.isDarwin [
(fetchpatch {
url = "https://github.com/libproxy/libproxy/commit/44158f03f8522116758d335688ed840dfcb50ac8.patch";
sha256 = "0axfvb6j7gcys6fkwi9dkn006imhvm3kqr83gpwban8419n0q5v1";
});
})
];
postFixup = ''
# config_gnome3 uses the helper to find GNOME proxy settings
wrapProgram $out/libexec/pxgsettings --prefix XDG_DATA_DIRS : "${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}"
'';
doCheck = false; # fails 1 out of 10 tests

View File

@ -5,14 +5,14 @@
let
pname = "librsvg";
version = "2.44.14";
version = "2.44.15";
in
stdenv.mkDerivation rec {
name = "${pname}-${version}";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${stdenv.lib.versions.majorMinor version}/${name}.tar.xz";
sha256 = "00z3qimpk909pcqq0jlsis5sskc6kn7cqia20smd9k9rhs3ag1ba";
sha256 = "1p4cifnxppz2qwsk2wvn2a6c7dpvgfrsf5vlhdkmsd373czm9396";
};
outputs = [ "out" "dev" "installedTests" ];

View File

@ -1,11 +1,12 @@
{ stdenv, fetchurl, pkgconfig, systemd ? null, libobjc, IOKit, withStatic ? false }:
stdenv.mkDerivation (rec {
name = "libusb-1.0.22";
pname = "libusb";
version = "1.0.23";
src = fetchurl {
url = "mirror://sourceforge/libusb/${name}.tar.bz2";
sha256 = "0mw1a5ss4alg37m6bd4k44v35xwrcwp5qm4s686q1nsgkbavkbkm";
url = "https://github.com/${pname}/${pname}/releases/download/v${version}/${pname}-${version}.tar.bz2";
sha256 = "13dd2a9x290d1q8nb1lqiaf36grcvns5ripk5k2xm0lajmpc04fv";
};
outputs = [ "out" "dev" ]; # get rid of propagating systemd closure

View File

@ -11,8 +11,7 @@ stdenv.mkDerivation rec {
owner = "puppetlabs";
};
# post gcc7, upstream bug: https://tickets.puppetlabs.com/browse/FACT-1828
NIX_CFLAGS_COMPILE = "-Wno-error=deprecated";
NIX_CFLAGS_COMPILE = [ "-Wno-error=catch-value" ];
nativeBuildInputs = [ cmake ];

View File

@ -34,8 +34,12 @@ stdenv.mkDerivation rec {
openssl
];
NIX_CFLAGS_COMPILE = " -DGIT_VERSION=\"v2.14.0\" -Wno-error=deprecated-declarations ";
NIX_LDFLAGS = " -lXext -lssl ";
NIX_CFLAGS_COMPILE = [
"-DGIT_VERSION=\"v2.14.0\""
"-Wno-error=deprecated-declarations"
"-Wno-error=cast-function-type"
];
NIX_LDFLAGS = "-lXext -lssl";
meta = with stdenv.lib; {
description = "A powerful and lightweight streaming engine specialized for voice/video telephony applications";

View File

@ -2,15 +2,12 @@
stdenv.mkDerivation rec {
pname = "glu";
version = "9.0.0";
version = "9.0.1";
src = fetchurl {
url = "ftp://ftp.freedesktop.org/pub/mesa/glu/${pname}-${version}.tar.bz2";
sha256 = "04nzlil3a6fifcmb95iix3yl8mbxdl66b99s62yzq8m7g79x0yhz";
url = "ftp://ftp.freedesktop.org/pub/mesa/${pname}/${pname}-${version}.tar.xz";
sha256 = "1g2m634p73mixkzv1qz1d0flwm390ydi41bwmchiqvdssqnlqnpv";
};
postPatch = ''
echo 'Cflags: -I''${includedir}' >> glu.pc.in
'';
nativeBuildInputs = [ pkgconfig ];
propagatedBuildInputs = [ libGL ]

View File

@ -16,6 +16,7 @@ stdenv.mkDerivation rec {
NIX_CFLAGS_COMPILE = [
"-Wno-implicit-fallthrough"
"-Wno-error=clobbered"
"-Wno-error=cast-function-type"
];

View File

@ -48,6 +48,8 @@ stdenv.mkDerivation rec {
prePatch = ''
substituteInPlace configure --replace /bin/pwd pwd
substituteInPlace src/corelib/global/global.pri --replace /bin/ls ${coreutils}/bin/ls
substituteInPlace src/3rdparty/javascriptcore/JavaScriptCore/jit/JITStubs.cpp \
--replace 'asm volatile' 'asm'
sed -e 's@/\(usr\|opt\)/@/var/empty/@g' -i config.tests/*/*.test -i mkspecs/*/*.conf
'' + lib.optionalString stdenv.isDarwin ''
# remove impure reference to /usr/lib/libstdc++.6.dylib

View File

@ -11,7 +11,7 @@ stdenv.mkDerivation {
sha256 = "13mngf9kl0y2wfxqvkad0smdaag7k8fvw82b4312gx62nwhc1i6r";
};
buildInputs = [ stdenv ];
NIX_CFLAGS_COMPILE = [ "-Wno-error=format-truncation" ];
preConfigure = ''
cd src

View File

@ -13,6 +13,7 @@ stdenv.mkDerivation rec {
patches = [
./format.patch
./gcc6.patch
./libx11.patch
];
enableParallelBuilding = true;

View File

@ -0,0 +1,25 @@
Index: smpeg-0.4.5+cvs20030824/Makefile.am
===================================================================
--- smpeg-0.4.5+cvs20030824.orig/Makefile.am
+++ smpeg-0.4.5+cvs20030824/Makefile.am
@@ -74,7 +74,7 @@
# Sources for gtv
gtv_SOURCES = gtv.c gtv.h
-gtv_LDADD = @GTK_LIBS@ libsmpeg.la
+gtv_LDADD = @GTK_LIBS@ @X11_LIBS@ libsmpeg.la
# Sources for glmovie
glmovie_SOURCES = glmovie-tile.c glmovie.c glmovie.h
Index: smpeg-0.4.5+cvs20030824/configure.in
===================================================================
--- smpeg-0.4.5+cvs20030824.orig/configure.in
+++ smpeg-0.4.5+cvs20030824/configure.in
@@ -215,6 +215,7 @@
CFLAGS="$CFLAGS $GTK_CFLAGS"
fi
AC_SUBST(GTK_LIBS)
+ PKG_CHECK_MODULES([X11], [x11])
fi
AM_CONDITIONAL(HAVE_GTK, test x$have_gtk = xyes)

View File

@ -1,15 +1,18 @@
{ stdenv, fetchFromGitHub, cmake, doxygen }:
stdenv.mkDerivation {
name = "uri-2017-07-16";
stdenv.mkDerivation rec {
name = "uri-${version}";
version = "1.1.0";
src = fetchFromGitHub {
owner = "cpp-netlib";
repo = "uri";
rev = "ac30f19cc7a4745667a8ebd3eac68d5e70b9a4a6";
sha256 = "0ys295ij071rilwkk3xq1p3sdzgb0gyybvd3f0cahh67kh8hyk6n";
rev = "v${version}";
sha256 = "148361pixrm94q6v04k13s1msa04bx9yc3djb0lxpa7dlw19vhcd";
};
NIX_CFLAGS_COMPILE = [ "-Wno-error=parentheses" ];
nativeBuildInputs = [ cmake doxygen ];
cmakeFlags = [

View File

@ -8,8 +8,8 @@ with stdenv.lib;
let
os = stdenv.lib.optionalString;
majorVersion = "7.0";
minorVersion = "0";
majorVersion = "7.1";
minorVersion = "1";
version = "${majorVersion}.${minorVersion}";
in
@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
name = "vtk-${os (qtLib != null) "qvtk-"}${version}";
src = fetchurl {
url = "${meta.homepage}files/release/${majorVersion}/VTK-${version}.tar.gz";
sha256 = "1hrjxkcvs3ap0bdhk90vymz5pgvxmg7q6sz8ab3wsyddbshr1abq";
sha256 = "0nm7xwwj7rnsxjdv2ssviys8nhci4n9iiiqm2y14s520hl2dsp1d";
};
buildInputs = [ cmake ]

View File

@ -15,7 +15,7 @@ assert stdenv.isDarwin -> !enableGtk2Plugins;
with stdenv.lib;
stdenv.mkDerivation rec {
pname = "webkitgtk";
version = "2.24.3";
version = "2.24.4";
meta = {
description = "Web content rendering engine, GTK port";
@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://webkitgtk.org/releases/${pname}-${version}.tar.xz";
sha256 = "0lbcrw5axwrbrajxq7fqywfyh0djqi23ynzb5wi5ghw2grnp83cl";
sha256 = "1n3x5g1z6rg9n1ssna7wi0z6zlprjm4wzk544v14wqi6q0lv2s46";
};
patches = optionals stdenv.isDarwin [

View File

@ -32,6 +32,8 @@ in stdenv.mkDerivation rec {
buildInputs = [ zeroc_mcpp bzip2 expat openssl lmdb ]
++ lib.optionals stdenv.isDarwin [ darwin.cctools libiconv Security ];
NIX_CFLAGS_COMPILE = [ "-Wno-error=class-memaccess" ];
prePatch = lib.optional stdenv.isDarwin ''
substituteInPlace Make.rules.Darwin \
--replace xcrun ""

View File

@ -1,9 +0,0 @@
--- a/src/Makefile
+++ b/src/Makefile
@@ -77,4 +77,6 @@ FreezeScript: Freeze
Glacier2 IceGridLib Glacier2CryptPermissionsVerifier: Glacier2Lib
+Glacier2: IceSSL
+
IcePatch2: IcePatch2Lib

View File

@ -1,20 +1,21 @@
{ stdenv, zookeeper, bash }:
stdenv.mkDerivation {
name = "zookeeper_mt-${stdenv.lib.getVersion zookeeper}";
src = zookeeper.src;
setSourceRoot = "export sourceRoot=${zookeeper.name}/src/c";
stdenv.mkDerivation rec {
name = "zookeeper_mt-${stdenv.lib.getVersion zookeeper}";
buildInputs = [ zookeeper bash ];
src = zookeeper.src;
meta = with stdenv.lib; {
homepage = http://zookeeper.apache.org;
description = "Apache Zookeeper";
license = licenses.asl20;
maintainers = [ maintainers.boothead ];
platforms = platforms.unix;
};
setSourceRoot = "export sourceRoot=${zookeeper.name}/src/c";
NIX_CFLAGS_COMPILE = [ "-Wno-error=format-overflow" ];
buildInputs = [ zookeeper bash ];
meta = with stdenv.lib; {
homepage = http://zookeeper.apache.org;
description = "Apache Zookeeper";
license = licenses.asl20;
maintainers = [ maintainers.boothead ];
platforms = platforms.unix;
};
}

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, fetchurl
, ocaml, findlib, ocamlbuild, ocaml_oasis,
bitstring, camlzip, cmdliner, core_kernel, ezjsonm, fileutils, ocaml_lwt, ocamlgraph, ocurl, re, uri, zarith, piqi, piqi-ocaml, uuidm, llvm_38, frontc, ounit, ppx_jane, parsexp,
utop,
bitstring, camlzip, cmdliner, core_kernel, ezjsonm, fileutils, ocaml_lwt, ocamlgraph, ocurl, re, uri, zarith, piqi, piqi-ocaml, uuidm, llvm, frontc, ounit, ppx_jane, parsexp,
utop, libxml2,
ppx_tools_versioned,
which, makeWrapper, writeText
}:
@ -31,8 +31,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ which makeWrapper ];
buildInputs = [ ocaml findlib ocamlbuild ocaml_oasis
llvm_38 ppx_tools_versioned
utop ];
llvm ppx_tools_versioned
utop libxml2 ];
propagatedBuildInputs = [ bitstring camlzip cmdliner ppx_jane core_kernel ezjsonm fileutils ocaml_lwt ocamlgraph ocurl re uri zarith piqi parsexp
piqi-ocaml uuidm frontc ounit ];
@ -51,7 +51,7 @@ stdenv.mkDerivation rec {
disableIda = "--disable-ida --disable-fsi-benchmark";
configureFlags = [ "--enable-everything ${disableIda}" "--with-llvm-config=${llvm_38}/bin/llvm-config" ];
configureFlags = [ "--enable-everything ${disableIda}" "--with-llvm-config=${llvm}/bin/llvm-config" ];
BAPBUILDFLAGS = "-j $(NIX_BUILD_CORES)";

View File

@ -11,18 +11,20 @@ stdenv.mkDerivation {
buildInputs = [ python cmake llvm ocaml findlib ctypes ];
patches = [ (fetchpatch {
url = https://raw.githubusercontent.com/ocaml/opam-repository/master/packages/llvm/llvm.3.9/files/cmake.patch;
sha256 = "1fcc6ylfiw1npdhx7mrsj7h0dx7cym7i9664kpr76zqazb52ikm9";
url = https://raw.githubusercontent.com/ocaml/opam-repository/2bdc193f5a9305ea93bf0f0dfc1fbc327c8b9306/packages/llvm/llvm.7.0.0/files/fix-shared.patch;
sha256 = "1p98j3b1vrryfn1xa7i50m6mmm4dyw5ldafq6kyh9sfmdihz4zsx";
})];
cmakeFlags = [ "-DLLVM_OCAML_OUT_OF_TREE=TRUE" ];
cmakeFlags = [
"-DLLVM_OCAML_OUT_OF_TREE=TRUE"
"-DLLVM_OCAML_INSTALL_PATH=${placeholder "out"}/ocaml"
];
buildFlags = "ocaml_all";
installFlags = "-C bindings/ocaml";
postInstall = ''
mv $out/lib/ocaml $out/ocaml
mkdir -p $OCAMLFIND_DESTDIR/
mv $out/ocaml $OCAMLFIND_DESTDIR/llvm
mv $OCAMLFIND_DESTDIR/llvm/META{.llvm,}

View File

@ -1,23 +0,0 @@
{ lib, buildPythonPackage, fetchPypi
, boto }:
buildPythonPackage rec {
pname = "Area53";
version = "0.94";
src = fetchPypi {
inherit pname version;
sha256 = "0v9b7f8b6v21y410anx5sr52k2ac8jrzdf19q6m6p0zsdsf9vr42";
};
# error: invalid command 'test'
doCheck = false;
propagatedBuildInputs = [ boto ];
meta = with lib; {
description = "Python Interface to Route53";
homepage = https://github.com/mariusv/Area53;
license = licenses.unfree; # unspecified
};
}

View File

@ -1,4 +1,4 @@
{ stdenv, buildPythonPackage, fetchPypi }:
{ stdenv, buildPythonPackage, fetchPypi, pytest }:
buildPythonPackage rec {
pname = "atomicwrites";
@ -9,6 +9,10 @@ buildPythonPackage rec {
sha256 = "75a9445bac02d8d058d5e1fe689654ba5a6556a1dfd8ce6ec55a0ed79866cfa6";
};
# Tests depend on pytest but atomicwrites is a dependency of pytest
doCheck = false;
checkInputs = [ pytest ];
meta = with stdenv.lib; {
description = "Atomic file writes on POSIX";
homepage = https://pypi.python.org/pypi/atomicwrites;

View File

@ -1,30 +1,43 @@
{ stdenv, python, fetchPypi, makeWrapper, unzip }:
{ stdenv, python, fetchPypi, makeWrapper, unzip, makeSetupHook
, pipInstallHook
, setuptoolsBuildHook
}:
let
wheel_source = fetchPypi {
pname = "wheel";
version = "0.33.4";
version = "0.33.6";
format = "wheel";
sha256 = "5e79117472686ac0c4aef5bad5172ea73a1c2d1646b808c35926bd26bdfb0c08";
sha256 = "f4da1763d3becf2e2cd92a14a7c920f0f00eca30fdde9ea992c836685b9faf28";
};
setuptools_source = fetchPypi {
pname = "setuptools";
version = "41.0.1";
version = "41.2.0";
format = "wheel";
sha256 = "c7769ce668c7a333d84e17fe8b524b1c45e7ee9f7908ad0a73e1eda7e6a5aebf";
sha256 = "4380abcf2a4ffd1a5ba22d687c6d690dce83b2b51c70e9c6d09f7e8c7e8040dc";
};
in stdenv.mkDerivation rec {
pname = "pip";
version = "19.1.1";
version = "19.2.3";
name = "${python.libPrefix}-bootstrapped-${pname}-${version}";
src = fetchPypi {
inherit pname version;
format = "wheel";
sha256 = "993134f0475471b91452ca029d4390dc8f298ac63a712814f101cd1b6db46676";
sha256 = "340a0ba40fdeb16413914c0fcd8e0b4ebb0bf39a900ec80e11c05d836c05103f";
};
dontUseSetuptoolsBuild = true;
# Should be propagatedNativeBuildInputs
propagatedBuildInputs = [
# Override to remove dependencies to prevent infinite recursion.
(pipInstallHook.override{pip=null;})
(setuptoolsBuildHook.override{setuptools=null; wheel=null;})
];
unpackPhase = ''
mkdir -p $out/${python.sitePackages}
unzip -d $out/${python.sitePackages} $src
@ -32,7 +45,7 @@ in stdenv.mkDerivation rec {
unzip -d $out/${python.sitePackages} ${wheel_source}
'';
patchPhase = ''
postPatch = ''
mkdir -p $out/bin
'';
@ -52,4 +65,5 @@ in stdenv.mkDerivation rec {
wrapProgram $f --prefix PYTHONPATH ":" $out/${python.sitePackages}/
done
'';
}

View File

@ -5,17 +5,20 @@
}:
buildPythonPackage rec {
pname = "EditorConfig";
version = "0.12.1";
pname = "editorconfig";
version = "0.12.2";
# fetchgit used to ensure test submodule is available
src = fetchgit {
url = "https://github.com/editorconfig/editorconfig-core-py";
rev = "refs/tags/v${version}";
sha256 = "0svk7id7ncygj2rnxhm7602xizljyidk4xgrl6i0xgq3829cz4bl";
rev = "596da5e06ebee05bdbdc6224203c79c4d3c6486a"; # Not tagged
sha256 = "05cbp971b0zix7kfxkk7ndxb4ax1l21frwc00d4g78mk4sdz6dig";
};
nativeBuildInputs = [ cmake ];
dontUseCmakeConfigure = true;
checkPhase = ''
cmake .
# utf_8_char fails with python3

View File

@ -6,11 +6,12 @@
}:
buildPythonPackage rec {
pname = "eggdeps";
pname = "tl-eggdeps";
version = "0.4";
src = fetchPypi {
inherit pname version;
inherit version;
pname = "tl.eggdeps";
sha256 = "a99de5e4652865224daab09b2e2574a4f7c1d0d9a267048f9836aa914a2caf3a";
};

View File

@ -36,6 +36,7 @@ buildPythonPackage rec {
NOSE_EXCLUDE = stdenv.lib.concatStringsSep "," [
"tests.functional.test_httplib2.test_callback_response"
"tests.functional.test_requests.test_streaming_responses"
"tests.functional.test_httplib2.test_callback_response"
];
meta = with stdenv.lib; {

View File

@ -1,10 +1,10 @@
{ lib, fetchPypi, buildPythonApplication, EditorConfig, pytest, six }:
{ lib, fetchPypi, buildPythonApplication, editorconfig, pytest, six }:
buildPythonApplication rec {
pname = "jsbeautifier";
version = "1.10.0";
propagatedBuildInputs = [ six EditorConfig ];
propagatedBuildInputs = [ six editorconfig ];
checkInputs = [ pytest ];
src = fetchPypi {

View File

@ -1,22 +1,24 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, python
, mock
}:
buildPythonPackage rec {
pname = "mpd2";
version = "0.5.5";
pname = "python-mpd2";
version = "1.0.0";
src = fetchPypi {
inherit pname version;
sha256 = "1gfrxf71xll1w6zb69znqg5c9j0g7036fsalkvqprh2id640cl3a";
extension = "tar.bz2";
sha256 = "772fa6861273bb9f363a97987c2c45ca3965eb770570f1f02566efec9c89fc5f";
};
buildInputs = [ mock ];
patchPhase = ''
sed -i -e '/tests_require/d' \
-e 's/cmdclass.*/test_suite="mpd_test",/' setup.py
checkPhase = ''
${python.interpreter} -m unittest mpd.tests
'';
meta = with stdenv.lib; {

View File

@ -3,11 +3,12 @@
}:
buildPythonPackage rec {
pname = "mrbob";
pname = "mr-bob";
version = "0.1.2";
src = fetchPypi {
inherit pname version;
inherit version;
pname = "mr.bob";
sha256 = "6737eaf98aaeae85e07ebef844ee5156df2f06a8b28d7c3dcb056f811c588121";
};

View File

@ -1,25 +1,32 @@
{ lib
, python
, buildPythonPackage
, bootstrapped-pip
, fetchPypi
, mock
, scripttest
, virtualenv
, pretend
, pytest
, setuptools
, wheel
}:
buildPythonPackage rec {
pname = "pip";
version = "19.1.1";
version = "19.2.3";
format = "other";
src = fetchPypi {
inherit pname version;
sha256 = "44d3d7d3d30a1eb65c7e5ff1173cdf8f7467850605ac7cc3707b6064bddd0958";
sha256 = "e7a31f147974362e6c82d84b91c7f2bdf57e4d3163d3d454e6c3e71944d67135";
};
nativeBuildInputs = [ bootstrapped-pip ];
# pip detects that we already have bootstrapped_pip "installed", so we need
# to force it a little.
installFlags = [ "--ignore-installed" ];
pipInstallFlags = [ "--ignore-installed" ];
checkInputs = [ mock scripttest virtualenv pretend pytest ];
# Pip wants pytest, but tests are not distributed

View File

@ -12,7 +12,11 @@ buildPythonPackage rec {
# Circular dependency on pytest
doCheck = false;
buildInputs = [ setuptools_scm ];
nativeBuildInputs = [ setuptools_scm ];
pythonImportsCheck = [
"py"
];
meta = with stdenv.lib; {
description = "Library with cross-python path, ini-parsing, io, code, log facilities";

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