Running nixpkgs-update (https://nix-community.org/update-bot/) with UPDATE_INFO: chicken 5.4.0 -> 6.0.0 https://repology.org/project/chicken/versions attrpath: chicken Checking auto update branch... No auto update branch exists Old version 5.4.0" not present in master derivation file with contents: { lib, stdenv, fetchurl, makeWrapper, darwin, replaceVars, testers, # Release-specific arguments, supplied by the per-release directory. version, hash, # The compiler's binary compatibility version, which is part of the egg # repository directory. binaryVersion, postPatch ? "", }: let # CHICKEN 5 is R5RS with extensions; CHICKEN 6 targets R7RS. standard = if lib.versionAtLeast version "6" then "R7RS" else "R5RS"; platform = with stdenv.hostPlatform; if isDarwin then "macosx" else if isCygwin then "cygwin" else if (isFreeBSD || isOpenBSD) then "bsd" else if isSunOS then "solaris" else "linux"; # Should be a sane default in stdenv.mkDerivation (finalAttrs: { pname = "chicken"; inherit version binaryVersion postPatch; src = fetchurl { url = "https://code.call-cc.org/releases/${finalAttrs.version}/chicken-${finalAttrs.version}.tar.gz"; inherit hash; }; setupHook = replaceVars ./setup-hook.sh { binaryVersion = toString binaryVersion; }; # CHICKEN 5 has no configure script at all, and the one CHICKEN 6 ships is # hand-written rather than generated by autoconf: it only writes the make # variables below into "config.make" and rejects any option it does not know # about (including the ones stdenv would pass, such as --build and --bindir). # Command line variables take precedence over "config.make", so passing them # to make directly is equivalent and avoids fighting the generic configure # phase. dontConfigure = true; makeFlags = [ "PLATFORM=${platform}" "PREFIX=$(out)" "C_COMPILER=$(CC)" "CXX_COMPILER=$(CXX)" ] ++ (lib.optionals stdenv.hostPlatform.isDarwin [ "XCODE_TOOL_PATH=${darwin.binutils.bintools}/bin" "LINKER_OPTIONS=-headerpad_max_install_names" "POSTINSTALL_PROGRAM=install_name_tool" ]) ++ (lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) [ "HOSTSYSTEM=${stdenv.hostPlatform.config}" "TARGET_C_COMPILER=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc" "TARGET_CXX_COMPILER=${stdenv.cc}/bin/${stdenv.cc.targetPrefix}c++" ]); nativeBuildInputs = [ makeWrapper ] ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [ darwin.autoSignDarwinBinariesHook ]; # Neither release's test suite survives the Darwin sandbox, for a different # reason each: CHICKEN 5's runtests.sh drives the compiler through # /usr/bin/env, which the sandbox denies, and CHICKEN 6's csc tests run # binaries whose install name install_name_tool has already rewritten to # $out/lib/libchicken.dylib, which does not exist until the install phase. doCheck = !stdenv.hostPlatform.isDarwin; # The generic check phase probes for a target with a bare `make check`, which # fails here because PLATFORM is only given in makeFlags, so the test suite # would be silently skipped. checkTarget = "check"; postCheck = '' ./csi -R chicken.pathname -R chicken.platform \ -p "(assert (equal? \"${toString finalAttrs.binaryVersion}\" (pathname-file (car (repository-path)))))" ''; passthru.tests.version = testers.testVersion { package = finalAttrs.finalPackage; command = "csi -version"; }; meta = { homepage = "https://call-cc.org/"; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ corngood nagy konst-aa Xophmeister ]; platforms = lib.platforms.unix; description = "Portable compiler for the Scheme programming language"; longDescription = '' CHICKEN is a compiler for the Scheme programming language. CHICKEN produces portable and efficient C, supports almost all of the ${standard} Scheme language standard, and includes many enhancements and extensions. CHICKEN runs on Linux, macOS, Windows, and many Unix flavours. ''; }; })