Merge master into staging-next

This commit is contained in:
github-actions[bot] 2021-08-28 12:01:06 +00:00 committed by GitHub
commit dbad333a72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 1505 additions and 2165 deletions

View file

@ -89,7 +89,7 @@ rec {
=> "usr/local/bin"
*/
concatStringsSep = builtins.concatStringsSep or (separator: list:
concatStrings (intersperse separator list));
lib.foldl' (x: y: x + y) "" (intersperse separator list));
/* Maps a function over a list of strings and then concatenates the
result with the specified separator interspersed between

View file

@ -284,6 +284,9 @@ in
PATH = mkForce cfg.package.path;
PYTHONPATH = "${cfg.package.pythonPath}:${cfg.package}/lib/paperless-ng/src";
};
# Allow the web interface to access the private /tmp directory of the server.
# This is required to support uploading files via the web interface.
unitConfig.JoinsNamespaceOf = "paperless-ng-server.service";
# Bind to `paperless-ng-server` so that the web server never runs
# during migrations
bindsTo = [ "paperless-ng-server.service" ];

View file

@ -25,12 +25,22 @@ import ./make-test-python.nix ({ lib, ... }: {
# Wait until server accepts connections
machine.wait_until_succeeds("curl -fs localhost:28981")
with subtest("Document is consumed"):
with subtest("Create web test doc"):
machine.succeed(
"convert -size 400x40 xc:white -font 'DejaVu-Sans' -pointsize 20 -fill black "
"-annotate +5+20 'hello web 16-10-2005' /tmp/webdoc.png"
)
machine.wait_until_succeeds("curl -u admin:admin -F document=@/tmp/webdoc.png -fs localhost:28981/api/documents/post_document/")
with subtest("Documents are consumed"):
machine.wait_until_succeeds(
"(($(curl -u admin:admin -fs localhost:28981/api/documents/ | jq .count) == 1))"
"(($(curl -u admin:admin -fs localhost:28981/api/documents/ | jq .count) == 2))"
)
assert "2005-10-16" in machine.succeed(
"curl -u admin:admin -fs localhost:28981/api/documents/ | jq '.results | .[0] | .created'"
)
assert "2005-10-16" in machine.succeed(
"curl -u admin:admin -fs localhost:28981/api/documents/ | jq '.results | .[1] | .created'"
)
'';
})

View file

@ -21,13 +21,13 @@
mkDerivation rec {
pname = "nextcloud-client";
version = "3.3.1";
version = "3.3.2";
src = fetchFromGitHub {
owner = "nextcloud";
repo = "desktop";
rev = "v${version}";
sha256 = "sha256-2oX3V84ScUV08/WaWJQPLJIni7KvJa/YBRBTWVdRO2U=";
sha256 = "sha256-sqoOppq0QdLcA2IFZYnixMNnFWb3x83tqTp6hqqVU14=";
};
patches = [

View file

@ -300,7 +300,9 @@ clone_user_rev() {
local rev="${3:-HEAD}"
if [ -n "$fetchLFS" ]; then
HOME=$TMPDIR
tmpHomePath="$(mktemp -d -p nix-prefetch-git-tmp-home-XXXXXXXXXX)"
exit_handlers+=(remove_tmpHomePath)
HOME="$tmpHomePath"
git lfs install
fi
@ -396,6 +398,7 @@ print_results() {
"date": "$(json_escape "$commitDateStrict8601")",
"path": "$(json_escape "$finalPath")",
"$(json_escape "$hashType")": "$(json_escape "$hash")",
"fetchLFS": $([[ -n "$fetchLFS" ]] && echo true || echo false),
"fetchSubmodules": $([[ -n "$fetchSubmodules" ]] && echo true || echo false),
"deepClone": $([[ -n "$deepClone" ]] && echo true || echo false),
"leaveDotGit": $([[ -n "$leaveDotGit" ]] && echo true || echo false)
@ -408,6 +411,10 @@ remove_tmpPath() {
rm -rf "$tmpPath"
}
remove_tmpHomePath() {
rm -rf "$tmpHomePath"
}
if test -n "$QUIET"; then
quiet_mode
fi

View file

@ -0,0 +1,390 @@
{ lib, stdenv
, fetchurl, perl, gcc
, ncurses5
, ncurses6, gmp, libiconv, numactl
, llvmPackages
# minimal = true; will remove files that aren't strictly necessary for
# regular builds and GHC bootstrapping.
# This is "useful" for staying within hydra's output limits for at least the
# aarch64-linux architecture.
, minimal ? false
}:
# Prebuilt only does native
assert stdenv.targetPlatform == stdenv.hostPlatform;
let
downloadsUrl = "https://downloads.haskell.org/ghc";
version = "8.10.5";
# Information about available bindists that we use in the build.
#
# # Bindist library checking
#
# The field `archSpecificLibraries` also provides a way for us get notified
# early when the upstream bindist changes its dependencies (e.g. because a
# newer Debian version is used that uses a new `ncurses` version).
#
# Usage:
#
# * You can find the `fileToCheckFor` of libraries by running `readelf -d`
# on the compiler binary (`exePathForLibraryCheck`).
# * To skip library checking for an architecture,
# set `exePathForLibraryCheck = null`.
# * To skip file checking for a specific arch specfic library,
# set `fileToCheckFor = null`.
ghcBinDists = {
# Binary distributions for the default libc (e.g. glibc, or libSystem on Darwin)
# nixpkgs uses for the respective system.
defaultLibc = {
i686-linux = {
src = {
url = "${downloadsUrl}/${version}/ghc-${version}-i386-deb9-linux.tar.xz";
sha256 = "17cwmhhyz952psmp4j3pkdj0yrfxah3l2dawg5s4hdr228n5pjqc";
};
exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2";
archSpecificLibraries = [
# The i686-linux bindist provided by GHC HQ is currently built on Debian 9,
# which link it against `libtinfo.so.5` (ncurses 5).
# Other bindists are linked `libtinfo.so.6` (ncurses 6).
{ nixPackage = ncurses5; fileToCheckFor = "libtinfo.so.5"; }
];
};
x86_64-linux = {
src = {
url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-deb10-linux.tar.xz";
sha256 = "11v76wgljyszc6mgz6r16i6wkifgl15a26q7ablihp2cr8h3qqmw";
};
exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2";
archSpecificLibraries = [
{ nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; }
];
};
armv7l-linux = {
src = {
url = "${downloadsUrl}/${version}/ghc-${version}-armv7-deb10-linux.tar.xz";
sha256 = "0v5bvhb2z9j26yr0n9gc4xdq2lm37mr98g62p5z8pqahhhd0s5sn";
};
exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2";
archSpecificLibraries = [
{ nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; }
];
};
aarch64-linux = {
src = {
url = "${downloadsUrl}/${version}/ghc-${version}-aarch64-deb10-linux.tar.xz";
sha256 = "1p0dgyn1m2nd8ax1g25lchaz9z2nk9jvyzf63biarq7qlzc5q24s";
};
exePathForLibraryCheck = "ghc/stage2/build/tmp/ghc-stage2";
archSpecificLibraries = [
{ nixPackage = ncurses6; fileToCheckFor = "libtinfo.so.6"; }
{ nixPackage = numactl; fileToCheckFor = null; }
];
};
x86_64-darwin = {
src = {
url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-apple-darwin.tar.xz";
sha256 = "08javwfqd21kglbr1bnhnbjw2cggz1n668vi8kx5hbcnz3plf3zg";
};
exePathForLibraryCheck = null; # we don't have a library check for darwin yet
archSpecificLibraries = [
{ nixPackage = ncurses6; fileToCheckFor = null; }
{ nixPackage = libiconv; fileToCheckFor = null; }
];
};
aarch64-darwin = {
src = {
url = "${downloadsUrl}/${version}/ghc-${version}-aarch64-apple-darwin.tar.xz";
sha256 = "02fbcrzcc6m25z3ji867isml38jkg4blry70ljwl3l03zxq4ws03";
};
exePathForLibraryCheck = null; # we don't have a library check for darwin yet
archSpecificLibraries = [
{ nixPackage = ncurses6; fileToCheckFor = null; }
{ nixPackage = libiconv; fileToCheckFor = null; }
];
};
};
# Binary distributions for the musl libc for the respective system.
musl = {
x86_64-linux = {
src = {
url = "${downloadsUrl}/${version}/ghc-${version}-x86_64-alpine3.10-linux-integer-simple.tar.xz";
sha256 = "1ql2qxywbbv0b9syvrm9kyh5d8midnl676lw4698ajras6gcvmzl";
};
exePathForLibraryCheck = "bin/ghc";
archSpecificLibraries = [
# In contrast to glibc builds, the musl-bindist uses `libncursesw.so.*`
# instead of `libtinfo.so.*.`
{ nixPackage = ncurses6; fileToCheckFor = "libncursesw.so.6"; }
];
};
};
};
distSetName = if stdenv.hostPlatform.isMusl then "musl" else "defaultLibc";
binDistUsed = ghcBinDists.${distSetName}.${stdenv.hostPlatform.system}
or (throw "cannot bootstrap GHC on this platform ('${stdenv.hostPlatform.system}' with libc '${distSetName}')");
useLLVM = !stdenv.targetPlatform.isx86;
libPath =
lib.makeLibraryPath (
[
gmp
]
# Add arch-specific libraries.
++ map ({ nixPackage, ... }: nixPackage) binDistUsed.archSpecificLibraries
);
libEnvVar = lib.optionalString stdenv.hostPlatform.isDarwin "DY"
+ "LD_LIBRARY_PATH";
in
stdenv.mkDerivation rec {
inherit version;
name = "ghc-${version}-binary";
src = fetchurl binDistUsed.src;
nativeBuildInputs = [ perl ];
propagatedBuildInputs =
lib.optionals useLLVM [ llvmPackages.llvm ]
# Because musl bindists currently provide no way to tell where
# libgmp is (see not [musl bindists have no .buildinfo]), we need
# to propagate `gmp`, otherwise programs built by this ghc will
# fail linking with `cannot find -lgmp` errors.
# Also, as of writing, the release pages of musl bindists claim
# that they use `integer-simple` and do not require `gmp`; however
# that is incorrect, so `gmp` is required until a release has been
# made that includes https://gitlab.haskell.org/ghc/ghc/-/issues/20059.
# (Note that for packaging the `-binary` compiler, nixpkgs does not care
# about whether or not `gmp` is used; this comment is just here to explain
# why the `gmp` dependency exists despite what the release page says.)
++ lib.optionals stdenv.hostPlatform.isMusl [ gmp ]; # musl bindist needs this
# Set LD_LIBRARY_PATH or equivalent so that the programs running as part
# of the bindist installer can find the libraries they expect.
# Cannot patchelf beforehand due to relative RPATHs that anticipate
# the final install location.
${libEnvVar} = libPath;
postUnpack =
# Verify our assumptions of which `libtinfo.so` (ncurses) version is used,
# so that we know when ghc bindists upgrade that and we need to update the
# version used in `libPath`.
lib.optionalString
(binDistUsed.exePathForLibraryCheck != null)
# Note the `*` glob because some GHCs have a suffix when unpacked, e.g.
# the musl bindist has dir `ghc-VERSION-x86_64-unknown-linux/`.
# As a result, don't shell-quote this glob when splicing the string.
(let buildExeGlob = ''ghc-${version}*/"${binDistUsed.exePathForLibraryCheck}"''; in
lib.concatStringsSep "\n" [
(''
echo "Checking that ghc binary exists in bindist at ${buildExeGlob}"
if ! test -e ${buildExeGlob}; then
echo >&2 "GHC binary ${binDistUsed.exePathForLibraryCheck} could not be found in the bindist build directory (at ${buildExeGlob}) for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1;
fi
'')
(lib.concatMapStringsSep
"\n"
({ fileToCheckFor, nixPackage }:
lib.optionalString (fileToCheckFor != null) ''
echo "Checking bindist for ${fileToCheckFor} to ensure that is still used"
if ! readelf -d ${buildExeGlob} | grep "${fileToCheckFor}"; then
echo >&2 "File ${fileToCheckFor} could not be found in ${binDistUsed.exePathForLibraryCheck} for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1;
fi
echo "Checking that the nix package ${nixPackage} contains ${fileToCheckFor}"
if ! test -e "${lib.getLib nixPackage}/lib/${fileToCheckFor}"; then
echo >&2 "Nix package ${nixPackage} did not contain ${fileToCheckFor} for arch ${stdenv.hostPlatform.system}, please check that ghcBinDists correctly reflect the bindist dependencies!"; exit 1;
fi
''
)
binDistUsed.archSpecificLibraries
)
])
# GHC has dtrace probes, which causes ld to try to open /usr/lib/libdtrace.dylib
# during linking
+ lib.optionalString stdenv.isDarwin ''
export NIX_LDFLAGS+=" -no_dtrace_dof"
# not enough room in the object files for the full path to libiconv :(
for exe in $(find . -type f -executable); do
isScript $exe && continue
ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib
install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib -change /usr/local/lib/gcc/6/libgcc_s.1.dylib ${gcc.cc.lib}/lib/libgcc_s.1.dylib $exe
done
'' +
# Some scripts used during the build need to have their shebangs patched
''
patchShebangs ghc-${version}/utils/
patchShebangs ghc-${version}/configure
'' +
# We have to patch the GMP paths for the integer-gmp package.
# Note [musl bindists have no .buildinfo]
# Note that musl bindists do not contain them; unclear if that's intended;
# see: https://gitlab.haskell.org/ghc/ghc/-/issues/20073#note_363231
''
find . -name integer-gmp.buildinfo \
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${gmp.out}/lib@" {} \;
'' + lib.optionalString stdenv.isDarwin ''
find . -name base.buildinfo \
-exec sed -i "s@extra-lib-dirs: @extra-lib-dirs: ${libiconv}/lib@" {} \;
'' +
# aarch64 does HAVE_NUMA so -lnuma requires it in library-dirs in rts/package.conf.in
# FFI_LIB_DIR is a good indication of places it must be needed.
lib.optionalString (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) ''
find . -name package.conf.in \
-exec sed -i "s@FFI_LIB_DIR@FFI_LIB_DIR ${numactl.out}/lib@g" {} \;
'' +
# Rename needed libraries and binaries, fix interpreter
lib.optionalString stdenv.isLinux ''
find . -type f -executable -exec patchelf \
--interpreter ${stdenv.cc.bintools.dynamicLinker} {} \;
'';
# fix for `configure: error: Your linker is affected by binutils #16177`
preConfigure = lib.optionalString
stdenv.targetPlatform.isAarch32
"LD=ld.gold";
configurePlatforms = [ ];
configureFlags = [
"--with-gmp-includes=${lib.getDev gmp}/include"
# Note `--with-gmp-libraries` does nothing for GHC bindists:
# https://gitlab.haskell.org/ghc/ghc/-/merge_requests/6124
] ++ lib.optional stdenv.isDarwin "--with-gcc=${./gcc-clang-wrapper.sh}"
# From: https://github.com/NixOS/nixpkgs/pull/43369/commits
++ lib.optional stdenv.hostPlatform.isMusl "--disable-ld-override";
# No building is necessary, but calling make without flags ironically
# calls install-strip ...
dontBuild = true;
# Apparently necessary for the ghc Alpine (musl) bindist:
# When we strip, and then run the
# patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p
# below, running ghc (e.g. during `installCheckPhase)` gives some apparently
# corrupted rpath or whatever makes the loader work on nonsensical strings:
# running install tests
# Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: : symbol not found
# Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: ir6zf6c9f86pfx8sr30n2vjy-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/../lib/x86_64-linux-ghc-8.10.5/libHSexceptions-0.10.4-ghc8.10.5.so: symbol not found
# Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: y/lib/ghc-8.10.5/bin/../lib/x86_64-linux-ghc-8.10.5/libHStemplate-haskell-2.16.0.0-ghc8.10.5.so: symbol not found
# Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: 8.10.5/libHStemplate-haskell-2.16.0.0-ghc8.10.5.so: symbol not found
# Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: <20>: symbol not found
# Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: <20>?: symbol not found
# Error relocating /nix/store/...-ghc-8.10.2-binary/lib/ghc-8.10.5/bin/ghc: 64-linux-ghc-8.10.5/libHSexceptions-0.10.4-ghc8.10.5.so: symbol not found
# This is extremely bogus and should be investigated.
dontStrip = if stdenv.hostPlatform.isMusl then true else false; # `if` for explicitness
# On Linux, use patchelf to modify the executables so that they can
# find editline/gmp.
postFixup = lib.optionalString stdenv.isLinux
(if stdenv.hostPlatform.isAarch64 then
# Keep rpath as small as possible on aarch64 for patchelf#244. All Elfs
# are 2 directories deep from $out/lib, so pooling symlinks there makes
# a short rpath.
''
(cd $out/lib; ln -s ${ncurses6.out}/lib/libtinfo.so.6)
(cd $out/lib; ln -s ${gmp.out}/lib/libgmp.so.10)
(cd $out/lib; ln -s ${numactl.out}/lib/libnuma.so.1)
for p in $(find "$out/lib" -type f -name "*\.so*"); do
(cd $out/lib; ln -s $p)
done
for p in $(find "$out/lib" -type f -executable); do
if isELF "$p"; then
echo "Patchelfing $p"
patchelf --set-rpath "\$ORIGIN:\$ORIGIN/../.." $p
fi
done
''
else
''
for p in $(find "$out" -type f -executable); do
if isELF "$p"; then
echo "Patchelfing $p"
patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p
fi
done
'') + lib.optionalString stdenv.isDarwin ''
# not enough room in the object files for the full path to libiconv :(
for exe in $(find "$out" -type f -executable); do
isScript $exe && continue
ln -fs ${libiconv}/lib/libiconv.dylib $(dirname $exe)/libiconv.dylib
install_name_tool -change /usr/lib/libiconv.2.dylib @executable_path/libiconv.dylib -change /usr/local/lib/gcc/6/libgcc_s.1.dylib ${gcc.cc.lib}/lib/libgcc_s.1.dylib $exe
done
for file in $(find "$out" -name setup-config); do
substituteInPlace $file --replace /usr/bin/ranlib "$(type -P ranlib)"
done
'' +
lib.optionalString minimal ''
# Remove profiling files
find $out -type f -name '*.p_o' -delete
find $out -type f -name '*.p_hi' -delete
find $out -type f -name '*_p.a' -delete
# `-f` because e.g. musl bindist does not have this file.
rm -f $out/lib/ghc-*/bin/ghc-iserv-prof
# Hydra will redistribute this derivation, so we have to keep the docs for
# legal reasons (retaining the legal notices etc)
# As a last resort we could unpack the docs separately and symlink them in.
# They're in $out/share/{doc,man}.
'';
# In nixpkgs, musl based builds currently enable `pie` hardening by default
# (see `defaultHardeningFlags` in `make-derivation.nix`).
# But GHC cannot currently produce outputs that are ready for `-pie` linking.
# Thus, disable `pie` hardening, otherwise `recompile with -fPIE` errors appear.
# See:
# * https://github.com/NixOS/nixpkgs/issues/129247
# * https://gitlab.haskell.org/ghc/ghc/-/issues/19580
hardeningDisable = lib.optional stdenv.targetPlatform.isMusl "pie";
doInstallCheck = true;
installCheckPhase = ''
unset ${libEnvVar}
# Sanity check, can ghc create executables?
cd $TMP
mkdir test-ghc; cd test-ghc
cat > main.hs << EOF
{-# LANGUAGE TemplateHaskell #-}
module Main where
main = putStrLn \$([|"yes"|])
EOF
$out/bin/ghc --make main.hs || exit 1
echo compilation ok
[ $(./main) == "yes" ]
'';
passthru = {
targetPrefix = "";
enableShared = true;
# Our Cabal compiler name
haskellCompilerName = "ghc-${version}";
};
meta = rec {
homepage = "http://haskell.org/ghc";
description = "The Glasgow Haskell Compiler";
license = lib.licenses.bsd3;
# HACK: since we can't encode the libc / abi in platforms, we need
# to make the platform list dependent on the evaluation platform
# in order to avoid eval errors with musl which supports less
# platforms than the default libcs (i. e. glibc / libSystem).
# This is done for the benefit of Hydra, so `packagePlatforms`
# won't return any platforms that would cause an evaluation
# failure for `pkgsMusl.haskell.compiler.ghc8102Binary`, as
# long as the evaluator runs on a platform that supports
# `pkgsMusl`.
platforms = builtins.attrNames ghcBinDists.${distSetName};
hydraPlatforms = builtins.filter (p: minimal || p != "aarch64-linux") platforms;
maintainers = with lib.maintainers; [ lostnet ];
};
}

View file

@ -2,7 +2,8 @@
# build-tools
, bootPkgs
, autoconf, automake, coreutils, fetchpatch, fetchurl, perl, python3, m4, sphinx, xattr
, autoconf, automake, coreutils, fetchpatch, fetchurl, perl, python3, m4, sphinx
, xattr, autoSignDarwinBinariesHook
, bash
, libiconv ? null, ncurses
@ -250,6 +251,8 @@ stdenv.mkDerivation (rec {
nativeBuildInputs = [
perl autoconf automake m4 python3
ghc bootPkgs.alex bootPkgs.happy bootPkgs.hscolour
] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
autoSignDarwinBinariesHook
] ++ lib.optionals enableDocs [
sphinx
];

View file

@ -19,7 +19,7 @@
let
release_version = "13.0.0";
candidate = "rc1"; # empty or "rcN"
candidate = "rc2"; # empty or "rcN"
dash-candidate = lib.optionalString (candidate != "") "-${candidate}";
rev = ""; # When using a Git commit
rev-version = ""; # When using a Git commit
@ -30,7 +30,7 @@ let
owner = "llvm";
repo = "llvm-project";
rev = if rev != "" then rev else "llvmorg-${version}";
sha256 = "19x8yk9zkpdmn08r1jn3bk1l5ab7kgj9fi5v7lmkyahc19wxszy4";
sha256 = "06cy6v231w067g310bwpk6a654j6q9rcxa0y0wz5sc5rrh61zjrn";
};
llvm_meta = {

View file

@ -59,13 +59,6 @@ in stdenv.mkDerivation (rec {
sha256 = "18l6mrvm2vmwm77ckcnbjvh6ybvn72rhrb799d4qzwac4x2ifl7g";
stripLen = 1;
})
# Fix tests on non-x86 platforms: https://reviews.llvm.org/D107020
(fetchpatch {
url = "https://github.com/llvm/llvm-project/commit/5060224d9eed8b8359ed5090bb7c577b8575e9e7.patch";
sha256 = "1s2n3pqa11pmlifys1jkppmw858p5i64xszpc8ppc98middv19v1";
stripLen = 1;
})
] ++ lib.optional enablePolly ./gnu-install-dirs-polly.patch;
postPatch = optionalString stdenv.isDarwin ''

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, pkg-config, autoreconfHook, makeWrapper
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, autoreconfHook, makeWrapper
, ncurses, cpio, gperf, cdrkit, flex, bison, qemu, pcre, augeas, libxml2
, acl, libcap, libcap_ng, libconfig, systemd, fuse, yajl, libvirt, hivex, db
, gmp, readline, file, numactl, libapparmor, jansson
@ -12,41 +12,53 @@ assert javaSupport -> jdk != null;
stdenv.mkDerivation rec {
pname = "libguestfs";
version = "1.40.2";
version = "1.44.1";
src = fetchurl {
url = "https://libguestfs.org/download/1.40-stable/${pname}-${version}.tar.gz";
sha256 = "ad6562c48c38e922a314cb45a90996843d81045595c4917f66b02a6c2dfe8058";
url = "https://libguestfs.org/download/${lib.versions.majorMinor version}-stable/${pname}-${version}.tar.gz";
sha256 = "09dhmlbfdwirlmkasa28x69vqs5xndq0lnng6b4if76s6bfxrdvj";
};
nativeBuildInputs = [ autoreconfHook makeWrapper pkg-config ];
buildInputs = [
ncurses cpio gperf jansson
cdrkit flex bison qemu pcre augeas libxml2 acl libcap libcap_ng libconfig
systemd fuse yajl libvirt gmp readline file hivex db
numactl libapparmor getopt perlPackages.ModuleBuild
libtirpc
strictDeps = true;
nativeBuildInputs = [
autoreconfHook bison cdrkit cpio flex getopt gperf makeWrapper pkg-config qemu
] ++ (with perlPackages; [ perl libintl_perl GetoptLong SysVirt ])
++ (with ocamlPackages; [ ocaml findlib ocamlbuild ocaml_libvirt gettext-stub ounit ])
++ (with ocamlPackages; [ ocaml findlib ]);
buildInputs = [
ncurses jansson
pcre augeas libxml2 acl libcap libcap_ng libconfig
systemd fuse yajl libvirt gmp readline file hivex db
numactl libapparmor perlPackages.ModuleBuild
libtirpc
] ++ (with ocamlPackages; [ ocamlbuild ocaml_libvirt gettext-stub ounit ])
++ lib.optional javaSupport jdk;
prePatch = ''
# build-time scripts
substituteInPlace run.in --replace '#!/bin/bash' '#!${stdenv.shell}'
substituteInPlace ocaml-link.sh --replace '#!/bin/bash' '#!${stdenv.shell}'
substituteInPlace ocaml-link.sh.in --replace '#!/bin/bash' '#!${stdenv.shell}'
# $(OCAMLLIB) is read-only "${ocamlPackages.ocaml}/lib/ocaml"
substituteInPlace ocaml/Makefile.am --replace '$(DESTDIR)$(OCAMLLIB)' '$(out)/lib/ocaml'
substituteInPlace ocaml/Makefile.in --replace '$(DESTDIR)$(OCAMLLIB)' '$(out)/lib/ocaml'
substituteInPlace v2v/test-harness/Makefile.am --replace '$(DESTDIR)$(OCAMLLIB)' '$(out)/lib/ocaml'
substituteInPlace v2v/test-harness/Makefile.in --replace '$(DESTDIR)$(OCAMLLIB)' '$(out)/lib/ocaml'
# some scripts hardcore /usr/bin/env which is not available in the build env
patchShebangs .
'';
configureFlags = [ "--disable-appliance" "--disable-daemon" "--with-distro=NixOS" ]
++ lib.optionals (!javaSupport) [ "--disable-java" "--without-java" ];
patches = [ ./libguestfs-syms.patch ./ocaml-4.12.patch ];
configureFlags = [
"--disable-appliance"
"--disable-daemon"
"--with-distro=NixOS"
"--with-guestfs-path=${placeholder "out"}/lib/guestfs"
] ++ lib.optionals (!javaSupport) [ "--without-java" ];
patches = [
./libguestfs-syms.patch
# Set HAVE_RPM, HAVE_DPKG, HAVE_PACMAN
(fetchpatch {
url = "https://github.com/libguestfs/libguestfs/commit/210959cc344d6a4a1e3afa26d276b130651def74.patch";
sha256 = "121l58mk2mwhhqc3rcisdw3di7y729b30hyffc8a50mq5k7fvsdb";
})
];
NIX_CFLAGS_COMPILE="-I${libxml2.dev}/include/libxml2/";
installFlags = [ "REALLY_INSTALL=yes" ];
enableParallelBuilding = true;
@ -87,7 +99,7 @@ stdenv.mkDerivation rec {
meta = with lib; {
description = "Tools for accessing and modifying virtual machine disk images";
license = with licenses; [ gpl2 lgpl21 ];
license = with licenses; [ gpl2Plus lgpl21Plus ];
homepage = "https://libguestfs.org/";
maintainers = with maintainers; [offline];
platforms = platforms.linux;

View file

@ -1,11 +0,0 @@
--- a/common/mlstdutils/std_utils.ml 2019-02-07 15:45:56.516955598 +0100
+++ b/common/mlstdutils/std_utils.ml 2019-02-07 15:45:56.516955598 +0100
@@ -305,7 +305,7 @@
| x::xs, y::ys, z::zs -> (x, y, z) :: combine3 xs ys zs
| _ -> invalid_arg "combine3"
- let rec assoc_lbl ?(cmp = compare) ~default x = function
+ let rec assoc_lbl ?(cmp = Pervasives.compare) ~default x = function
| [] -> default
| (y, y') :: _ when cmp x y = 0 -> y'
| _ :: ys -> assoc_lbl ~cmp ~default x ys

View file

@ -6,6 +6,7 @@
, "@commitlint/cli"
, "@commitlint/config-conventional"
, "@hyperspace/cli"
, "@nerdwallet/shepherd"
, "@nestjs/cli"
, "@squoosh/cli"
, "@vue/cli"

File diff suppressed because it is too large Load diff

View file

@ -12,14 +12,14 @@
buildPythonPackage rec {
pname = "aiorecollect";
version = "1.0.7";
version = "1.0.8";
format = "pyproject";
src = fetchFromGitHub {
owner = "bachya";
repo = pname;
rev = version;
sha256 = "1s96zfrw8kdpmyxkiskz1ys8h23dx3b46psmlg1z6d4pkb611ijz";
sha256 = "sha256-5+v+TlLOgaIA8svpbgFSEWZAUVBRq3zqf8QbidKgygI=";
};
nativeBuildInputs = [

View file

@ -16,7 +16,7 @@
buildPythonPackage rec {
pname = "simplisafe-python";
version = "11.0.4";
version = "11.0.5";
format = "pyproject";
disabled = pythonOlder "3.7";
@ -24,7 +24,7 @@ buildPythonPackage rec {
owner = "bachya";
repo = pname;
rev = version;
sha256 = "0ad0f3xghp77kg0vdns5m1lj796ysk9jrgl5k5h80imnnh9mz9b8";
sha256 = "sha256-QLxp7WrYXJDGVG/MZ+GpvzYZ8gyLwconqikgs581voI=";
};
nativeBuildInputs = [ poetry-core ];

View file

@ -49,6 +49,9 @@ stdenv.mkDerivation rec {
./no-double-relative.patch
];
# 'path' is unavailable: introduced in macOS 10.15
CXXFLAGS = lib.optional (stdenv.hostPlatform.system == "x86_64-darwin") "-D_LIBCPP_DISABLE_AVAILABILITY";
meta = with lib; {
description = "Tool that generates a compilation database for clang tooling";
longDescription = ''
@ -60,7 +63,5 @@ stdenv.mkDerivation rec {
license = licenses.gpl3Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ babariviere qyliss ];
# ld: symbol(s) not found for architecture x86_64
broken = stdenv.isDarwin && stdenv.isx86_64;
};
}

View file

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "yq-go";
version = "4.12.0";
version = "4.12.1";
src = fetchFromGitHub {
owner = "mikefarah";
repo = "yq";
rev = "v${version}";
sha256 = "sha256-AyI3RwWuHH760jUCCWhlBUkYYQ553QOmjFkdnvqKBtk=";
sha256 = "sha256-3L4SM698SJvHw1eXxxxL9OehDqQ6Al1XBL2WRG49PZU=";
};
vendorSha256 = "sha256-u7elWOW/tz1ISM/KC1njkZmPi8AEEssZ5QtxK/+1/1I=";

View file

@ -1,4 +1,4 @@
fixupOutputHooks+=('signDarwinBinariesIn $prefix')
postFixupHooks+=(signDarwinBinariesInAllOutputs)
# Uses signingUtils, see definition of autoSignDarwinBinariesHook in
# darwin-packages.nix
@ -14,7 +14,18 @@ signDarwinBinariesIn() {
return 0
fi
echo "signing $dir"
while IFS= read -r -d $'\0' f; do
signIfRequired "$f"
done < <(find "$dir" -type f -print0)
}
# Apply fixup to each output.
signDarwinBinariesInAllOutputs() {
local output
for output in $outputs; do
signDarwinBinariesIn "${!output}"
done
}

View file

@ -1,4 +1,4 @@
{ cmake, fetchFromGitHub, makeWrapper, opencv3, lib, stdenv, ocl-icd, opencl-headers
{ cmake, fetchFromGitHub, makeWrapper, opencv3, lib, stdenv, ocl-icd, opencl-headers, OpenCL
, cudaSupport ? false, cudatoolkit ? null
}:
@ -13,18 +13,20 @@ stdenv.mkDerivation rec {
sha256 = "0rv8bnyxz89za6gwk9gmdbaf3j7c1j52mip7h81rir288j35m84x";
};
patchPhase = ''
# https://github.com/DeadSix27/waifu2x-converter-cpp/issues/123
sed -i 's:{"PNG", false},:{"PNG", true},:' src/main.cpp
'';
patches = [
# Remove the hard-coded compiler on Darwin and use the one in stdenv.
./waifu2x_darwin_build.diff
];
buildInputs = [
ocl-icd opencv3 opencl-headers
] ++ lib.optional cudaSupport cudatoolkit;
opencv3
] ++ lib.optional cudaSupport cudatoolkit
++ lib.optional stdenv.isDarwin OpenCL
++ lib.optionals stdenv.isLinux [ ocl-icd opencl-headers ];
nativeBuildInputs = [ cmake makeWrapper ];
preFixup = ''
preFixup = lib.optionalString stdenv.isLinux ''
wrapProgram $out/bin/waifu2x-converter-cpp --prefix LD_LIBRARY_PATH : "${ocl-icd}/lib"
'';
@ -33,6 +35,6 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/DeadSix27/waifu2x-converter-cpp";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.xzfc ];
platforms = lib.platforms.linux;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}

View file

@ -0,0 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8b728b5..dedf8b6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -71,10 +71,6 @@ message(STATUS "System is: ${CMAKE_SYSTEM_NAME} (${LOCAL_SYS_TYPE})")
### Get binary paths for APPLE users
if(APPLE AND CMAKE_CXX_COMPILER_ID MATCHES "^(Apple)?Clang$")
- set(CMAKE_C_COMPILER "/usr/local/opt/llvm/bin/clang")
- set(CMAKE_CXX_COMPILER "/usr/local/opt/llvm/bin/clang++")
- set(CMAKE_EXE_LINKER_FLAGS "-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib")
- set(CMAKE_SHARED_LINKER_FLAGS "-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9.0)
set(FILE_SYSTEM_LIB "c++fs")
endif()

View file

@ -1,5 +1,5 @@
{ lib, stdenv, makeWrapper, buildEnv
, breezy, coreutils, cvs, findutils, gawk, git, gnused, mercurial, nix, subversion
, breezy, coreutils, cvs, findutils, gawk, git, git-lfs, gnused, mercurial, nix, subversion
}:
let mkPrefetchScript = tool: src: deps:
@ -28,7 +28,7 @@ let mkPrefetchScript = tool: src: deps:
in rec {
nix-prefetch-bzr = mkPrefetchScript "bzr" ../../../build-support/fetchbzr/nix-prefetch-bzr [ breezy ];
nix-prefetch-cvs = mkPrefetchScript "cvs" ../../../build-support/fetchcvs/nix-prefetch-cvs [ cvs ];
nix-prefetch-git = mkPrefetchScript "git" ../../../build-support/fetchgit/nix-prefetch-git [ coreutils findutils gawk git ];
nix-prefetch-git = mkPrefetchScript "git" ../../../build-support/fetchgit/nix-prefetch-git [ coreutils findutils gawk git git-lfs ];
nix-prefetch-hg = mkPrefetchScript "hg" ../../../build-support/fetchhg/nix-prefetch-hg [ mercurial ];
nix-prefetch-svn = mkPrefetchScript "svn" ../../../build-support/fetchsvn/nix-prefetch-svn [ subversion ];

View file

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "exploitdb";
version = "2021-08-24";
version = "2021-08-28";
src = fetchFromGitHub {
owner = "offensive-security";
repo = pname;
rev = version;
sha256 = "sha256-+tmSnPICX8CoD7YBsph2k0AfEg/IhCyYMHkXyVTYaIQ=";
sha256 = "sha256-eLbRtsZYRCPh0FDecxjAt4P0mUZJaZKg6kg5/SSYP1A=";
};
installPhase = ''

View file

@ -9937,7 +9937,9 @@ with pkgs;
openssl = openssl_1_0_2;
};
waifu2x-converter-cpp = callPackage ../tools/graphics/waifu2x-converter-cpp { };
waifu2x-converter-cpp = callPackage ../tools/graphics/waifu2x-converter-cpp {
inherit (darwin.apple_sdk.frameworks) OpenCL;
};
wakatime = pythonPackages.callPackage ../tools/misc/wakatime { };
@ -13343,7 +13345,13 @@ with pkgs;
buildBazelPackage = callPackage ../build-support/build-bazel-package { };
bear = callPackage ../development/tools/build-managers/bear { };
bear = callPackage ../development/tools/build-managers/bear {
# error: no viable constructor or deduction guide for deduction of template arguments of 'map'
stdenv = if stdenv.hostPlatform.system == "x86_64-darwin" then
llvmPackages_11.stdenv
else
stdenv;
};
bin_replace_string = callPackage ../development/tools/misc/bin_replace_string { };
@ -24685,6 +24693,8 @@ with pkgs;
pmbootstrap = python3Packages.callPackage ../tools/misc/pmbootstrap/default.nix { };
shepherd = nodePackages."@nerdwallet/shepherd";
slack = callPackage ../applications/networking/instant-messengers/slack { };
slack-cli = callPackage ../tools/networking/slack-cli { };

View file

@ -6,6 +6,8 @@ let
"ghc865Binary"
"ghc8102Binary"
"ghc8102BinaryMinimal"
"ghc8105Binary"
"ghc8105BinaryMinimal"
"integer-simple"
"native-bignum"
"ghcHEAD"
@ -57,10 +59,22 @@ in {
minimal = true;
};
ghc8105Binary = callPackage ../development/compilers/ghc/8.10.5-binary.nix {
llvmPackages = pkgs.llvmPackages_11;
};
ghc8105BinaryMinimal = callPackage ../development/compilers/ghc/8.10.5-binary.nix {
llvmPackages = pkgs.llvmPackages_11;
minimal = true;
};
ghc884 = callPackage ../development/compilers/ghc/8.8.4.nix {
# aarch64 ghc865Binary gets SEGVs due to haskell#15449 or similar
# Musl bindists do not exist for ghc 8.6.5, so we use 8.10.* for them
bootPkgs = if stdenv.isAarch64 || stdenv.targetPlatform.isMusl then
# the oldest ghc with aarch64-darwin support is 8.10.5
bootPkgs = if stdenv.isDarwin && stdenv.isAarch64 then
packages.ghc8105BinaryMinimal
# aarch64 ghc865Binary gets SEGVs due to haskell#15449 or similar
# Musl bindists do not exist for ghc 8.6.5, so we use 8.10.* for them
else if stdenv.isAarch64 || stdenv.targetPlatform.isMusl then
packages.ghc8102BinaryMinimal
else
packages.ghc865Binary;
@ -69,9 +83,12 @@ in {
llvmPackages = pkgs.llvmPackages_7;
};
ghc8106 = callPackage ../development/compilers/ghc/8.10.6.nix {
# aarch64 ghc865Binary gets SEGVs due to haskell#15449 or similar
# Musl bindists do not exist for ghc 8.6.5, so we use 8.10.* for them
bootPkgs = if stdenv.isAarch64 || stdenv.isAarch32 || stdenv.targetPlatform.isMusl then
# the oldest ghc with aarch64-darwin support is 8.10.5
bootPkgs = if stdenv.isDarwin && stdenv.isAarch64 then
packages.ghc8105BinaryMinimal
# aarch64 ghc865Binary gets SEGVs due to haskell#15449 or similar
# Musl bindists do not exist for ghc 8.6.5, so we use 8.10.* for them
else if stdenv.isAarch64 || stdenv.isAarch32 || stdenv.targetPlatform.isMusl then
packages.ghc8102BinaryMinimal
else
packages.ghc865Binary;
@ -79,13 +96,16 @@ in {
# Need to use apple's patched xattr until
# https://github.com/xattr/xattr/issues/44 and
# https://github.com/xattr/xattr/issues/55 are solved.
inherit (buildPackages.darwin) xattr;
inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook;
buildLlvmPackages = buildPackages.llvmPackages_9;
llvmPackages = pkgs.llvmPackages_9;
};
ghc901 = callPackage ../development/compilers/ghc/9.0.1.nix {
# aarch64 ghc8102Binary exceeds max output size on hydra
bootPkgs = if stdenv.isAarch64 || stdenv.isAarch32 then
# the oldest ghc with aarch64-darwin support is 8.10.5
bootPkgs = if stdenv.isDarwin && stdenv.isAarch64 then
packages.ghc8105BinaryMinimal
# aarch64 ghc8102Binary exceeds max output size on hydra
else if stdenv.isAarch64 || stdenv.isAarch32 then
packages.ghc8102BinaryMinimal
else
packages.ghc8102Binary;
@ -146,6 +166,18 @@ in {
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.10.x.nix { };
packageSetConfig = bootstrapPackageSet;
};
ghc8105Binary = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc8105Binary;
ghc = bh.compiler.ghc8105Binary;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.10.x.nix { };
packageSetConfig = bootstrapPackageSet;
};
ghc8105BinaryMinimal = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc8105BinaryMinimal;
ghc = bh.compiler.ghc8105BinaryMinimal;
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.10.x.nix { };
packageSetConfig = bootstrapPackageSet;
};
ghc884 = callPackage ../development/haskell-modules {
buildHaskellPackages = bh.packages.ghc884;
ghc = bh.compiler.ghc884;