diff options
Diffstat (limited to 'sysutils/nix/Makefile')
-rw-r--r-- | sysutils/nix/Makefile | 154 |
1 files changed, 38 insertions, 116 deletions
diff --git a/sysutils/nix/Makefile b/sysutils/nix/Makefile index 01b1d42b6995..dd632ae6af7d 100644 --- a/sysutils/nix/Makefile +++ b/sysutils/nix/Makefile @@ -1,6 +1,5 @@ PORTNAME= nix -DISTVERSION= 2.20.2 -PORTREVISION= 7 +DISTVERSION= 2.31.1 CATEGORIES= sysutils MAINTAINER= ashish@FreeBSD.org @@ -10,130 +9,70 @@ WWW= https://nixos.org/nix/ LICENSE= LGPL21 LICENSE_FILE= ${WRKSRC}/COPYING -BROKEN= Fails to build, error: field designator 'cols' does not refer to any field in type 'struct lowdown_opts' -DEPRECATED= Outdated version and broken for months -EXPIRATION_DATE=2025-03-31 - -BUILD_DEPENDS= ${LOCALBASE}/share/aclocal/ax_cxx_compile_stdcxx.m4:devel/autoconf-archive \ - gsed:textproc/gsed \ - bash:shells/bash \ - docbook-xsl-ns>=0:textproc/docbook-xsl-ns \ - gnustat:sysutils/coreutils \ - grealpath:sysutils/coreutils \ - xmllint:textproc/libxml2 \ - xsltproc:textproc/libxslt \ +BUILD_DEPENDS= bash:shells/bash \ jq:textproc/jq \ - nlohmann-json>=3.9:devel/nlohmann-json + nlohmann-json>=3.9:devel/nlohmann-json \ + toml11>=0:devel/toml11 LIB_DEPENDS= libaws-cpp-sdk-core.so:devel/aws-sdk-cpp \ libaws-crt-cpp.so:devel/aws-crt-cpp \ + libblake3.so:devel/libblake3 \ libboost_context.so:devel/boost-libs \ libbrotlienc.so:archivers/brotli \ + libcpuid.so:sysutils/libcpuid \ libcurl.so:ftp/curl \ libeditline.so:devel/editline \ - libgc.so:devel/boehm-gc \ - libsodium.so:security/libsodium \ - libcpuid.so:sysutils/libcpuid \ + libgc-threaded.so:devel/boehm-gc-threaded \ libgit2.so:devel/libgit2 \ - liblowdown.so:textproc/lowdown -TEST_DEPENDS= dot:graphics/graphviz \ - git:devel/git \ - gxargs:misc/findutils \ - hg:devel/mercurial - -USES= autoreconf bison compiler:c++17-lang cpe gmake localbase libarchive \ - pkgconfig sqlite:3 ssl + liblowdown.so:textproc/lowdown \ + libsodium.so:security/libsodium + +USES= bison cmake:indirect compiler:c++23-lang cpe libarchive localbase \ + meson ninja pkgconfig sqlite:3 ssl USE_GITHUB= yes GH_ACCOUNT= NixOS USE_LDCONFIG= yes CPE_VENDOR= nix_project -HAS_CONFIGURE= yes -# Workaround for bashisms in the configure script. -CONFIGURE_SHELL= ${_BASH} -CONFIGURE_ARGS= --disable-seccomp-sandboxing \ - --enable-gc \ - --disable-unit-tests -CONFIGURE_ENV= OPENSSL_CFLAGS="-I ${OPENSSLINC}" \ - OPENSSL_LIBS="-L ${OPENSSLLIB}" -# Workaround for: -# /usr/bin/ld: error: undefined symbol: SHA512_Update -MAKE_ARGS= libutil_ALLOW_UNDEFINED=yes V=s -# XXX: Tests require the port to be installed on the system. It is not enough -# to have the port staged. -TEST_ARGS= nix_tests="${_PASSING_TESTS}" -TEST_TARGET= installcheck - -# grealpath and gnustat are needed for tests. -BINARY_ALIAS= realpath=grealpath stat=gnustat sed=gsed +MESON_ARGS= -Dbenchmarks=false \ + -Dbindings=false \ + -Dunit-tests=false +LDFLAGS+= -L${LOCALBASE}/lib SUB_FILES= pkg-message GROUPS= nixbld -OPTIONS_DEFINE= DOCS - -DOCS_CONFIGURE_ENABLE= doc-gen -DOCS_BUILD_DEPENDS= mdbook>=0:textproc/mdbook \ - mdbook-linkcheck>=0:textproc/mdbook-linkcheck +OPTIONS_DEFINE= DOCS +DOCS_USES= python:build +DOCS_MESON_TRUE= doc-gen +DOCS_BUILD_DEPENDS= mdbook-linkcheck>=0:textproc/mdbook-linkcheck \ + mdbook>=0:textproc/mdbook \ + rsync:net/rsync -_BASH= ${LOCALBASE}/bin/bash _STRIP_TARGETS= bin/nix bin/nix-build bin/nix-channel bin/nix-collect-garbage \ bin/nix-copy-closure bin/nix-daemon bin/nix-env \ bin/nix-instantiate bin/nix-prefetch-url bin/nix-store \ lib/libnixexpr.so lib/libnixmain.so lib/libnixstore.so \ lib/libnixutil.so lib/libnixcmd.so lib/libnixfetchers.so -# Regenerate the list of all tests with: -# make patch && make -f $(make -V WRKSRC)/tests/local.mk -V nix_tests - -_ALL_TESTS= test-infra.sh init.sh flakes/flakes.sh flakes/develop.sh \ - flakes/run.sh flakes/mercurial.sh flakes/circular.sh \ - flakes/init.sh flakes/inputs.sh flakes/follow-paths.sh \ - flakes/bundle.sh flakes/check.sh flakes/unlocked-override.sh \ - flakes/absolute-paths.sh flakes/absolute-attr-paths.sh \ - flakes/build-paths.sh flakes/flake-in-submodule.sh gc.sh \ - nix-collect-garbage-d.sh remote-store.sh legacy-ssh-store.sh \ - lang.sh lang-test-infra.sh experimental-features.sh \ - fetchMercurial.sh gc-auto.sh user-envs.sh \ - user-envs-migration.sh binary-cache.sh multiple-outputs.sh \ - nix-build.sh gc-concurrent.sh repair.sh fixed.sh export-graph.sh \ - timeout.sh fetchGitRefs.sh gc-runtime.sh tarball.sh fetchGit.sh \ - fetchurl.sh fetchPath.sh fetchTree-file.sh simple.sh referrers.sh \ - optimise-store.sh substitute-with-invalid-ca.sh signing.sh hash.sh \ - gc-non-blocking.sh check.sh nix-shell.sh check-refs.sh \ - build-remote-input-addressed.sh secure-drv-outputs.sh restricted.sh \ - fetchGitSubmodules.sh fetchGitVerification.sh flakes/search-root.sh \ - readfile-context.sh nix-channel.sh recursive.sh dependencies.sh \ - check-reqs.sh build-remote-content-addressed-fixed.sh \ - build-remote-content-addressed-floating.sh \ - build-remote-trustless-should-pass-0.sh \ - build-remote-trustless-should-pass-1.sh \ - build-remote-trustless-should-pass-2.sh \ - build-remote-trustless-should-pass-3.sh \ - build-remote-trustless-should-fail-0.sh \ - build-remote-with-mounted-ssh-ng.sh \ - nar-access.sh impure-eval.sh pure-eval.sh eval.sh repl.sh \ - binary-cache-build-remote.sh search.sh logging.sh export.sh config.sh \ - add.sh local-store.sh filter-source.sh misc.sh dump-db.sh \ - linux-sandbox.sh supplementary-groups.sh build-dry.sh \ - structured-attrs.sh shell.sh brotli.sh zstd.sh compression-levels.sh \ - nix-copy-ssh.sh nix-copy-ssh-ng.sh post-hook.sh function-trace.sh \ - flakes/config.sh fmt.sh eval-store.sh why-depends.sh derivation-json.sh \ - import-derivation.sh nix_path.sh case-hack.sh placeholders.sh \ - ssh-relay.sh build.sh build-delete.sh output-normalization.sh \ - selfref-gc.sh db-migration.sh bash-profile.sh pass-as-file.sh \ - nix-profile.sh suggestions.sh store-info.sh fetchClosure.sh completions.sh \ - flakes/show.sh impure-derivations.sh path-from-hash-part.sh path-info.sh \ - toString-path.sh read-only-store.sh nested-sandboxing.sh impure-env.sh \ - compute-levels.sh test-libstoreconsumer.sh plugins.sh - -# Remove problematic tests from the list: -# - restricted.sh is hanging and never finishes. -_PASSING_TESTS= ${_ALL_TESTS:Nrestricted.sh} post-patch: - ${REINPLACE_CMD} -e 's,=/dummy,=${WRKDIR}/dummy,g' \ - ${WRKSRC}/doc/manual/local.mk + ${REINPLACE_CMD} -e "/seccomp-sandboxing/s/,$$/, value : 'disabled',/" \ + ${WRKSRC}/src/libstore/meson.options + ${REINPLACE_CMD} -e "/^bdw_gc/s/'bdw-gc'/'bdw-gc-threaded'/" \ + ${WRKSRC}/src/libexpr/meson.build + ${FIND} ${WRKSRC} -type f -name meson.build | \ + ${XARGS} ${GREP} -E -R -l 'Werror=(suggest-override|undef)|/dummy' | \ + ${XARGS} ${REINPLACE_CMD} -E -e '/Werror=(suggest-override|undef)/d' \ + -e 's,/dummy,/tmp/dummy,g' + +post-patch-DOCS-on: + ${REINPLACE_CMD} -E -e '/(internal|external)-api-docs/d' \ + ${WRKSRC}/meson.build + ${FIND} ${WRKSRC} -type f -name 'book.toml.in' | ${XARGS} \ + ${REINPLACE_CMD} -e "s,'python3','${PYTHON_CMD}'," \ + -e 's,"python3 ,"${PYTHON_CMD} ,' \ + ${WRKSRC}/src/nix-manual/meson.build post-install: @${MKDIR} ${STAGEDIR}${DATADIR} @@ -144,21 +83,4 @@ post-install: @cd ${STAGEDIR}${PREFIX} && ${STRIP_CMD} ${_STRIP_TARGETS} -pre-test: - ${MKDIR} /tmp/nix-test - - ${REINPLACE_CMD} -e 's| xargs | gxargs |g' ${WRKSRC}/tests/push-to-store.sh - ${REINPLACE_CMD} -e 's| touch | /usr/bin/touch |g' ${WRKSRC}/tests/timeout.nix - ${REINPLACE_CMD} -e 's| touch | /usr/bin/touch |g' ${WRKSRC}/tests/check-reqs.nix - ${REINPLACE_CMD} -e 's| touch | /usr/bin/touch |g' ${WRKSRC}/tests/nar-access.nix - ${REINPLACE_CMD} -e 's| touch | /usr/bin/touch |g' ${WRKSRC}/tests/pass-as-file.sh - ${REINPLACE_CMD} -e 's| date | ${LOCALBASE}/bin/gdate |g' ${WRKSRC}/tests/check.nix - - ${REINPLACE_CMD} -e 's| wc -l)| /usr/bin/grep -c .)|g' ${WRKSRC}/tests/gc-auto.sh - ${REINPLACE_CMD} -e 's| tar c tarball)| tar -cf - tarball)|' ${WRKSRC}/tests/tarball.sh - ${REINPLACE_CMD} -e 's|^grep |/usr/bin/grep |' ${WRKSRC}/tests/check.sh - -post-test: - ${RM} -r /tmp/nix-test - .include <bsd.port.mk> |