jiebi/CodeConvo huggingface dataset:
<ins> diff -ru orig/t/SATest.pm new/t/SATest.pm --- orig/t/SATest.pm	2023-06-25 11:26:27.663204415 +0000 +++ new/t/SATest.pm	2023-06-25 11:34:08.902174669 +0000 @@ -65,9 +65,12 @@ # Clean PATH so taint doesn't complain if (!$RUNNING_ON_WINDOWS) { -    $ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin'; +    # untaint PATH +    $ENV{'PATH'} =~ /^(.+)$/; +    $ENV{'PATH'} = $1; +    # $ENV{'PATH'} = '/bin:/usr/bin:/usr/local/bin'; # Remove tainted envs, at least ENV used in FreeBSD -    delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; +    # delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; } else { # Windows might need non-system directories in PATH to run a Perl installation # The best we can do is clean out obviously bad stuff such as relative paths or .. </ins>
}; }; <ins> MailDMARC = buildPerlPackage { pname = "Mail-DMARC"; version = "1.20230215"; src = fetchurl { url = "mirror://cpan/authors/id/M/MB/MBRADSHAW/Mail-DMARC-1.20230215.tar.gz"; hash = "sha256-V9z1R1nLkkSOVukUE0D2E0QnTFjZ3WWqkKqczw5+uQM="; }; buildInputs = [ ExtUtilsMakeMaker FileShareDirInstall ]; doCheck = false;  # uses actual DNS at runtime checkInputs = [ XMLSAX XMLValidatorSchema TestException TestFileShareDir TestMore TestOutput ]; propagatedBuildInputs = [ ConfigTiny DBDSQLite DBIxSimple EmailMIME EmailSender Encode FileShareDir GetoptLong IOCompress IO IOSocketSSL NetDNS NetIDNEncode NetIP NetSSLeay RegexpCommon Socket6 SysSyslog URI XMLLibXML ]; meta = { description = "Perl implementation of DMARC"; homepage = "https://github.com/msimerson/mail-dmarc"; license = with lib.licenses; [ artistic1 gpl1Plus ]; }; }; </ins> MailMaildir = buildPerlPackage { version = "1.0.0"; pname = "Mail-Maildir";
}; }; <ins> NetLibIDN2 = buildPerlModule { pname = "Net-LibIDN2"; version = "1.02"; src = fetchurl { url = "mirror://cpan/authors/id/T/TH/THOR/Net-LibIDN2-1.02.tar.gz"; hash = "sha256-0fMK/GrPplQbAMCafkx059jkuknjJ3wLvEGuNcE5DQc="; }; propagatedBuildInputs = [ pkgs.libidn2 ]; meta = { description = "Perl bindings for GNU Libidn2"; homepage = "https://github.com/gnuthor/Net--LibIDN2"; license = with lib.licenses; [ artistic1 gpl1Plus ]; }; }; </ins> NetNetmask = buildPerlPackage { pname = "Net-Netmask"; version = "2.0001";
propagatedBuildInputs = [ six protobuf ] ++ lib.optionals (isPy27) [ enum34 futures ]; <del> preBuild = lib.optionalString stdenv.isDarwin "unset AR"; </del> <ins> preBuild = '' export GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS="$NIX_BUILD_CORES" if [ -z "$enableParallelBuilding" ]; then GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS=1 fi '' + lib.optionalString stdenv.isDarwin '' unset AR ''; </ins> GRPC_BUILD_WITH_BORING_SSL_ASM = ""; GRPC_PYTHON_BUILD_SYSTEM_OPENSSL = 1;
<del> { lib, stdenv, fetchFromGitHub, makeWrapper, perl, procps, file, gnused, bash, binutils }: </del> <ins> { lib , stdenv , fetchFromGitHub , makeWrapper , perl , procps , bash # shell referenced dependencies , resholve , binutils-unwrapped , file , gnugrep , coreutils , gnused , gnutar , iconv , ncurses }: </ins> stdenv.mkDerivation rec { pname = "lesspipe";
installFlags = [ "DESTDIR=$(out)" ]; postInstall = '' <del> for f in lesspipe.sh lesscomplete; do wrapProgram "$out/bin/$f" --prefix-each PATH : "${lib.makeBinPath [ binutils file gnused procps ]}" done </del> <ins> # resholve doesn't see strings in an array definition substituteInPlace $out/bin/lesspipe.sh --replace 'nodash strings' "nodash ${binutils-unwrapped}/bin/strings" ${resholve.phraseSolution "lesspipe.sh" { scripts = [ "bin/lesspipe.sh" ]; interpreter = "${bash}/bin/bash"; inputs = [ coreutils file gnugrep gnused gnutar iconv procps ncurses ]; keep = [ "$prog" "$c1" "$c2" "$c3" "$c4" "$c5" "$cmd" "$colorizer" "$HOME" ]; fake = { # script guards usage behind has_cmd test function, it's safe to leave these external and optional external = [ "cpio" "isoinfo" "cabextract" "bsdtar" "rpm2cpio" "bsdtar" "unzip" "ar" "unrar" "rar" "7zr" "7za" "isoinfo" "gzip" "bzip2" "lzip" "lzma" "xz" "brotli" "compress" "zstd" "lz4" "archive_color" "bat" "batcat" "pygmentize" "source-highlight" "vimcolor" "code2color" "w3m" "lynx" "elinks" "html2text" "dtc" "pdftotext" "pdftohtml" "pdfinfo" "ps2ascii" "procyon" "ccze" "mdcat" "pandoc" "docx2txt" "libreoffice" "pptx2md" "mdcat" "xlscat" "odt2txt" "wvText" "antiword" "catdoc" "broken_catppt" "sxw2txt" "groff" "mandoc" "unrtf" "dvi2tty" "pod2text" "perldoc" "h5dump" "ncdump" "matdump" "djvutxt" "openssl" "gpg" "plistutil" "plutil" "id3v2" "csvlook" "jq" "zlib-flate" "lessfilter" ] ++ lib.optional stdenv.isDarwin [ # resholve only identifies this on darwin # call site is gaurded by || so it's safe to leave dynamic "locale" ]; builtin = [ "setopt" ]; }; execer = [ "cannot:${iconv}/bin/iconv" ]; }} ${resholve.phraseSolution "lesscomplete" { scripts = [ "bin/lesscomplete" ]; interpreter = "${bash}/bin/bash"; inputs = [ coreutils file gnugrep gnused gnutar ]; keep = [ "$prog" "$c1" "$c2" "$c3" "$c4" "$c5" "$cmd" ]; fake = { # script guards usage behind has_cmd test function, it's safe to leave these external and optional external = [ "cpio" "isoinfo" "cabextract" "bsdtar" "rpm2cpio" "bsdtar" "unzip" "ar" "unrar" "rar" "7zr" "7za" "isoinfo" "gzip" "bzip2" "lzip" "lzma" "xz" "brotli" "compress" "zstd" "lz4" ]; builtin = [ "setopt" ]; }; }} </ins> ''; meta = with lib; {
}; in { <del> libressl_3_4 = generic { version = "3.4.3"; hash = "sha256-/4i//jVIGLPM9UXjyv5FTFAxx6dyFwdPUzJx1jw38I0="; knownVulnerabilities = [ "Support ended 2022-10-14." ]; patches = [ (fetchpatch { # https://marc.info/?l=libressl&m=167582148932407&w=2 name = "backport-type-confusion-fix.patch"; url = "https://raw.githubusercontent.com/libressl/portable/30dc760ed1d7c70766b135500950d8ca9d17b13a/patches/x509_genn.c.diff"; sha256 = "sha256-N9jsOueqposDWZwaR+n/v/cHgNiZbZ644d8/wKjN2/M="; stripLen = 2; extraPrefix = "crypto/"; }) ]; }; </del> libressl_3_6 = generic { version = "3.6.2"; hash = "sha256-S+gP/wc3Rs9QtKjlur4nlayumMaxMqngJRm0Rd+/0DM=";
<del> { stdenv, fetchFromGitHub, fetchpatch, lib, enableUnfree ? false }: </del> <ins> { lib, stdenv, fetchFromGitHub, enableUnfree ? false }: </ins> <del> stdenv.mkDerivation rec { </del> <ins> stdenv.mkDerivation (finalAttrs: { </ins> pname = "p7zip"; <del> version = "17.04"; </del> <ins> version = "17.05"; </ins> src = fetchFromGitHub { <del> owner  = "jinfeihan57"; repo   = pname; rev    = "v${version}"; </del> <ins> owner = "p7zip-project"; repo = "p7zip"; rev = "v${finalAttrs.version}"; </ins> sha256 = { <del> free = "sha256-DrBuf2VPdcprHI6pMSmL7psm2ofOrUf0Oj0qwMjXzkk="; unfree = "sha256-19F4hPV0nKVuFZNbOcXrcA1uW6Y3HQolaHVIYXGmh18="; </del> <ins> free = "sha256-5r7M9BVcAryZNTkqJ/BfHnSSWov1PwoZhUnLBwEbJoA="; unfree = "sha256-z3qXgv/TkNRbb85Ew1OcJNxoyssfzHShc0b0/4NZOb0="; </ins> }.${if enableUnfree then "unfree" else "free"}; # remove the unRAR related code from the src drv # > the license requires that you agree to these use restrictions,
''; enableParallelBuilding = true; <ins> env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing"; </ins> <del> setupHook = ./setup-hook.sh; </del> <ins> makeFlags = [ "DEST_BIN=${placeholder "out"}/bin" "DEST_SHARE=${placeholder "lib"}/lib/p7zip" "DEST_MAN=${placeholder "man"}/share/man" "DEST_SHARE_DOC=${placeholder "doc"}/share/doc/p7zip" ]; </ins> <del> env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=c++11-narrowing"; </del> <ins> outputs = [ "out" "lib" "doc" "man" ]; setupHook = ./setup-hook.sh; </ins> passthru.updateScript = ./update.sh; meta = with lib; { <del> homepage = "https://github.com/jinfeihan57/p7zip"; </del> <ins> homepage = "https://github.com/p7zip-project/p7zip"; </ins> description = "A new p7zip fork with additional codecs and improvements (forked from https://sourceforge.net/projects/p7zip/)"; license = with licenses; # p7zip code is largely lgpl2Plus
OLD_VERSION="$(sed -nE 's/s*version = "(.*)".*/1/p' ./default.nix)" <del> NEW_VERSION="$(curl https://api.github.com/repos/jinfeihan57/p7zip/releases/latest | jq .tag_name -r | tr -d 'v')" </del> <ins> NEW_VERSION="$(curl https://api.github.com/repos/p7zip-project/p7zip/releases/latest | jq .tag_name -r | tr -d 'v')" </ins> echo "comparing versions $OLD_VERSION => $NEW_VERSION" if [[ "$OLD_VERSION" == "$NEW_VERSION" ]]; then
- [Localsend](https://localsend.org/), an open source cross-platform alternative to AirDrop. Available as [programs.localsend](#opt-programs.localsend.enable). <ins> - [cryptpad](https://cryptpad.org/), a privacy-oriented collaborative platform (docs/drive/etc), has been added back. Available as [services.cryptpad](#opt-services.cryptpad.enable). </ins> - [realm](https://github.com/zhboner/realm), a simple, high performance relay server written in rust. Available as [services.realm.enable](#opt-services.realm.enable). - [Playerctld](https://github.com/altdesktop/playerctl), a daemon to track media player activity. Available as [services.playerctld](option.html#opt-services.playerctld).
(mkRemovedOptionModule [ "services" "virtuoso" ] "The corresponding package was removed from nixpkgs.") (mkRemovedOptionModule [ "services" "openfire" ] "The corresponding package was removed from nixpkgs.") (mkRemovedOptionModule [ "services" "riak" ] "The corresponding package was removed from nixpkgs.") <del> (mkRemovedOptionModule [ "services" "cryptpad" ] "The corresponding package was removed from nixpkgs.") </del> (mkRemovedOptionModule [ "services" "rtsp-simple-server" ] "Package has been completely rebranded by upstream as mediamtx, and thus the service and the package were renamed in NixOS as well.") (mkRemovedOptionModule [ "services" "prayer" ] "The corresponding package was removed from nixpkgs.") (mkRemovedOptionModule [ "services" "restya-board" ] "The corresponding package was removed from nixpkgs.")
couchdb = handleTest ./couchdb.nix {}; crabfit = handleTest ./crabfit.nix {}; cri-o = handleTestOn ["aarch64-linux" "x86_64-linux"] ./cri-o.nix {}; <ins> cryptpad = runTest ./cryptpad.nix; </ins> cups-pdf = handleTest ./cups-pdf.nix {}; curl-impersonate = handleTest ./curl-impersonate.nix {}; custom-ca = handleTest ./custom-ca.nix {};
<ins> { pkgs, ... }: let certs = pkgs.runCommand "cryptpadSelfSignedCerts" { buildInputs = [ pkgs.openssl ]; } '' mkdir -p $out cd $out openssl req -x509 -newkey rsa:4096  -keyout key.pem -out cert.pem -nodes -days 3650  -subj '/CN=cryptpad.localhost'  -addext 'subjectAltName = DNS.1:cryptpad.localhost, DNS.2:cryptpad-sandbox.localhost' ''; # data sniffed from cryptpad's /checkup network trace, seems to be re-usable test_write_data = pkgs.writeText "cryptpadTestData" '' {"command":"WRITE_BLOCK","content":{"publicKey":"O2onvM62pC1io6jQKm8Nc2UyFXcd4kOmOsBIoYtZ2ik=","signature":"aXcM9SMO59lwA7q7HbYB+AnzymmxSyy/KhkG/cXIBVzl8v+kkPWXmFuWhcuKfRF8yt3Zc3ktIsHoFyuyDSAwAA==","ciphertext":"AFwCIfBHKdFzDKjMg4cu66qlJLpP+6Yxogbl3o9neiQou5P8h8yJB8qgnQ=="},"publicKey":"O2onvM62pC1io6jQKm8Nc2UyFXcd4kOmOsBIoYtZ2ik=","nonce":"bitSbJMNSzOsg98nEzN80a231PCkBQeH"} ''; in { name = "cryptpad"; meta = with pkgs.lib.maintainers; { maintainers = [ martinetd ]; }; nodes.machine = { services.cryptpad = { enable = true; configureNginx = true; settings = { httpUnsafeOrigin = "https://cryptpad.localhost"; httpSafeOrigin = "https://cryptpad-sandbox.localhost"; }; }; services.nginx = { virtualHosts."cryptpad.localhost" = { enableACME = false; sslCertificate = "${certs}/cert.pem"; sslCertificateKey = "${certs}/key.pem"; }; }; security = { pki.certificateFiles = [ "${certs}/cert.pem" ]; }; }; testScript = '' machine.wait_for_unit("cryptpad.service") machine.wait_for_unit("nginx.service") machine.wait_for_open_port(3000) # test home page machine.succeed("curl --fail https://cryptpad.localhost -o /tmp/cryptpad_home.html") machine.succeed("grep -F 'CryptPad: Collaboration suite' /tmp/cryptpad_home.html") # test scripts/build.js actually generated customize content from config machine.succeed("grep -F 'meta property="og:url" content="https://cryptpad.localhost/index.html' /tmp/cryptpad_home.html") # make sure child pages are accessible (e.g. check nginx try_files paths) machine.succeed( "grep -oE '/(customize|components)[^"]*' /tmp/cryptpad_home.html" "  | while read -r page; do" "        curl -O --fail https://cryptpad.localhost$page || exit;" "    done") # test some API (e.g. check cryptpad main process) machine.succeed("curl --fail -d @${test_write_data} -H 'Content-Type: application/json' https://cryptpad.localhost/api/auth") # test telemetry has been disabled machine.fail("journalctl -u cryptpad | grep TELEMETRY"); # for future improvements machine.log(machine.execute("systemd-analyze security cryptpad.service")[1]) ''; } </ins>
<ins> From 4bf0be64fe51a9c9fd9e410ada15251378b743bf Mon Sep 17 00:00:00 2001 From: Dominique Martinet <asmadeus@codewreck.org> Date: Sat, 26 Aug 2023 09:28:59 +0900 Subject: [PATCH] env.js: fix httpSafePort handling It has been clarified that this is only a dev option that should not be used in production, but setting the value in config was still ignored, so fix the init code to consider the config value and make it clear that this port is not bound if safeOrigin is set. --- config/config.example.js | 3 ++- lib/env.js               | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/config/config.example.js b/config/config.example.js index 7c8184c6c2f6..77263643c354 100644 --- a/config/config.example.js +++ b/config/config.example.js @@ -89,8 +89,9 @@ module.exports = { /*  httpSafePort purpose is to emulate another origin for the sandbox when *  you don't have two domains at hand (i.e. when httpSafeOrigin not defined). - *  It is meant to be used only in case where you are working on a local + *  It is meant to be used only in case where you are working on a local *  development instance. The default value is your httpPort + 1. + *  Setting this to 0 or setting httpSafeOrigin disables this listener. * */ //httpSafePort: 3001, diff --git a/lib/env.js b/lib/env.js index d3748750f21e..f0660cba3e11 100644 --- a/lib/env.js +++ b/lib/env.js @@ -74,8 +74,9 @@ module.exports.create = function (config) { if (typeof(config.httpSafeOrigin) !== 'string') { NO_SANDBOX = true; -        if (typeof(config.httpSafePort) !== 'number') { httpSafePort = httpPort + 1; } httpSafeOrigin = deriveSandboxOrigin(httpUnsafeOrigin, httpSafePort); +        // only set if httpSafeOrigin isn't set. +        httpSafePort = isValidPort(config.httpSafePort) ? config.httpSafePort : (httpPort + 1); } else { httpSafeOrigin = canonicalizeOrigin(config.httpSafeOrigin); } @@ -115,7 +116,7 @@ module.exports.create = function (config) { permittedEmbedders: typeof(permittedEmbedders) === 'string' && permittedEmbedders? permittedEmbedders: httpSafeOrigin, removeDonateButton: config.removeDonateButton, -        httpPort: isValidPort(config.httpPort)? config.httpPort: 3000, +        httpPort: httpPort, httpAddress: typeof(config.httpAddress) === 'string'? config.httpAddress: 'localhost', websocketPath: config.externalWebsocketURL, logIP: config.logIP, -- 2.45.2 </ins>
let versions = [ { <ins> version = "13.2.1"; lang = "en"; language = "English"; sha256 = "sha256-GA2k+jvE4mTJsIbMHce5c516h/glHLnXdthEfnNmk0w="; installer = "Mathematica_13.2.1_LINUX.sh"; } { version = "13.2.1"; lang = "en"; language = "English"; sha256 = "sha256-ZvgG2W/gjQIo4hyXHsGta5FyTslrz/ltOe/ZK/U2Sx8="; installer = "Mathematica_13.2.1_BNDL_LINUX.sh"; } { </ins> version = "13.2.0"; lang = "en"; language = "English";
<ins> { lib , fetchFromGitLab , python3Packages , wrapGAppsHook4 , gst_all_1 , gobject-introspection , yt-dlp , libadwaita , libsoup_3 , glib-networking }: python3Packages.buildPythonApplication rec { pname = "monophony"; version = "2.3.1"; format = "other"; sourceRoot = "source/source"; src = fetchFromGitLab { owner = "zehkira"; repo = "monophony"; rev = "v${version}"; hash = "sha256-dpRTHsujaIwzgr+qY5LC9xtXz40g3akdpEiHuxiilZM="; }; pythonPath = with python3Packages; [ mpris-server pygobject3 ytmusicapi ]; nativeBuildInputs = [ python3Packages.nuitka gobject-introspection wrapGAppsHook4 ]; buildInputs = [ libadwaita # needed for gstreamer https libsoup_3 glib-networking ] ++ (with gst_all_1; [ gst-plugins-base gst-plugins-good gstreamer ]); installFlags = [ "prefix=$(out)" ]; preFixup = '' buildPythonPath "$pythonPath" gappsWrapperArgs+=( --prefix PYTHONPATH : "$program_PYTHONPATH" --prefix PATH : "${lib.makeBinPath [yt-dlp]}" # needed for gstreamer https --prefix LD_LIBRARY_PATH : "${libsoup_3.out}/lib" ) ''; meta = with lib; { homepage = "https://gitlab.com/zehkira/monophony"; description = "Linux app for streaming music from YouTube"; longDescription = "Monophony is a free and open source Linux app for streaming music from YouTube. It has no ads and does not require an account."; license = licenses.agpl3Plus; mainProgram = "monophony"; platforms = platforms.linux; maintainers = with maintainers; [ quadradical ]; }; } </ins>
<ins> { lib , buildPythonPackage , fetchPypi , emoji , pydbus , pygobject3 , unidecode , setuptools }: buildPythonPackage rec { pname = "mpris-server"; version = "0.4.2"; pyproject = true; src = fetchPypi { pname = "mpris_server"; inherit version; hash = "sha256-p3nM80fOMtRmeKvOXuX40Fu9xH8gPgYyneXbUS678fE="; }; nativeBuildInputs = [ setuptools ]; propagatedBuildInputs = [ emoji pydbus pygobject3 unidecode ]; pythonImportsCheck = [ "mpris_server" ]; # upstream has no tests doCheck = false; meta = with lib; { description = "Publish a MediaPlayer2 MPRIS device to D-Bus"; homepage = "https://pypi.org/project/mpris-server/"; license = licenses.agpl3Only; maintainers = with maintainers; [ quadradical ]; }; } </ins>
nativeBuildInputs = [ cmake ninja ]; buildInputs = [ netcdf hdf5 curl ]; <del> # 10 - cxx4_test_filter (Failed) # Setting Filter....Caught unexpected exception. doCheck = false; </del> <ins> doCheck = true; </ins> enableParallelChecking = false; <ins> preCheck = '' export HDF5_PLUGIN_PATH=${netcdf}/lib/hdf5-plugins ''; </ins> meta = { description = "C++ API to manipulate netcdf files";
"--enable-dap" "--enable-shared" "--disable-dap-remote-tests" <ins> "--with-plugin-dir=${placeholder "out"}/lib/hdf5-plugins" </ins> ] ++ (lib.optionals mpiSupport [ "--enable-parallel-tests" "CC=${mpi}/bin/mpicc" ]); <ins> enableParallelBuilding = true; </ins> disallowedReferences = [ stdenv.cc ]; postFixup = ''
<ins> { stdenv, fetchurl, bison, m4 }: stdenv.mkDerivation { name = "flex-2.5.35"; src = fetchurl { url = mirror://sourceforge/flex/flex-2.5.35.tar.bz2; sha256 = "0ysff249mwhq0053bw3hxh58djc0gy7vjan2z1krrf9n5d5vvv0b"; }; buildInputs = [ bison ]; propagatedNativeBuildInputs = [ m4 ]; crossAttrs = { preConfigure = '' export ac_cv_func_malloc_0_nonnull=yes export ac_cv_func_realloc_0_nonnull=yes ''; }; meta = { homepage = http://flex.sourceforge.net/; description = "A fast lexical analyser generator"; }; } </ins>
buggyBiosCDSupport = config.grub.buggyBiosCDSupport or true; }; <del> grub2 = callPackage ../tools/misc/grub/2.0x.nix { libusb = libusb1; }; </del> <ins> grub2 = callPackage ../tools/misc/grub/2.0x.nix { libusb = libusb1; flex = flex_2_5_35; }; </ins> grub2_efi = grub2.override { EFIsupport = true; };
systemd.services.systemd-remount-fs.restartIfChanged = false; systemd.services.systemd-update-utmp.restartIfChanged = false; systemd.services.systemd-user-sessions.restartIfChanged = false; # Restart kills all active sessions. <ins> systemd.services.systemd-udev-settle.restartIfChanged = false; # Causes long delays in nixos-rebuild </ins> # Restarting systemd-logind breaks X11 # - upstream commit: https://cgit.freedesktop.org/xorg/xserver/commit/?id=dc48bd653c7e101 # - systemd announcement: https://github.com/systemd/systemd/blob/22043e4317ecd2bc7834b48a6d364de76bb26d91/NEWS#L103-L112
(b == armv7l && isCompatible a armv7a) (b == armv7l && isCompatible a armv7r) (b == armv7l && isCompatible a armv7m) <del> (b == armv7a && isCompatible a armv8a) (b == armv7r && isCompatible a armv8a) (b == armv7m && isCompatible a armv8a) (b == armv7a && isCompatible a armv8r) (b == armv7r && isCompatible a armv8r) (b == armv7m && isCompatible a armv8r) (b == armv7a && isCompatible a armv8m) (b == armv7r && isCompatible a armv8m) (b == armv7m && isCompatible a armv8m) </del> # ARMv8 <del> (b == armv8r && isCompatible a armv8a) (b == armv8m && isCompatible a armv8a) # XXX: not always true! Some arm64 cpus don’t support arm32 mode. </del> (b == aarch64 && a == armv8a) (b == armv8a && isCompatible a aarch64) <ins> (b == armv8r && isCompatible a armv8a) (b == armv8m && isCompatible a armv8a) </ins> # PowerPC (b == powerpc && isCompatible a powerpc64)
requiredSystemFeatures = [ "big-parallel" ]; passthru = { <del> inherit cudaSupport cudaPackages gpuTargetString; cudaCapabilities = supportedCudaCapabilities; </del> <ins> inherit cudaSupport cudaPackages; </ins> # At least for 1.10.2 `torch.fft` is unavailable unless BLAS provider is MKL. This attribute allows for easy detection of its availability. blasProvider = blas.provider; <ins> } // lib.optionalAttrs cudaSupport { # NOTE: supportedCudaCapabilities isn't computed unless cudaSupport is true, so we can't use #   it in the passthru set above because a downstream package might try to access it even #   when cudaSupport is false. Better to have it missing than null or an empty list by default. cudaCapabilities = supportedCudaCapabilities; </ins> }; meta = with lib; {
+ lib.optionalString cudaSupport '' export CC=${cudatoolkit.cc}/bin/cc export CXX=${cudatoolkit.cc}/bin/c++ <del> export TORCH_CUDA_ARCH_LIST="${gpuTargetString}" </del> <ins> export TORCH_CUDA_ARCH_LIST="${lib.concatStringsSep ";" cudaCapabilities}" </ins> export FORCE_CUDA=1 '';
, perl }: <ins> let versionReplace = { easybind = { snapshot = "2.2.1-SNAPSHOT"; pin = "2.2.1-20230117.075740-16"; }; afterburner = { snapshot = "testmoduleinfo-SNAPSHOT"; pin = "0e337d8773"; }; }; in </ins> stdenv.mkDerivation rec { <del> version = "5.7"; </del> <ins> version = "5.9"; </ins> pname = "jabref"; src = fetchFromGitHub { owner = "JabRef"; repo = "jabref"; rev = "v${version}"; <del> hash = "sha256-wzBaAaxGsMPh64uW+bBOiycYfVCW9H5FCn06r6XdxeE="; </del> <ins> hash = "sha256-uACmXas5L1NcxLwllkcbgCCt9bRicpQkiJkhkkVWDDY="; </ins> }; desktopItems = [
deps = stdenv.mkDerivation { pname = "${pname}-deps"; <del> inherit src version; </del> <ins> inherit src version postPatch; </ins> nativeBuildInputs = [ gradle perl ]; buildPhase = '' export GRADLE_USER_HOME=$(mktemp -d) <del> gradle --no-daemon downloadDependencies </del> <ins> gradle --no-daemon downloadDependencies -Dos.arch=amd64 gradle --no-daemon downloadDependencies -Dos.arch=aarch64 </ins> ''; # perl code mavenizes pathes (com.squareup.okio/okio/1.13.0/a9283170b7305c8d92d25aff02a6ab7e45d06cbe/okio-1.13.0.jar -> com/squareup/okio/okio/1.13.0/okio-1.13.0.jar) installPhase = '' find $GRADLE_USER_HOME/caches/modules-2 -type f -regex '.*.(jar|pom)'  | perl -pe 's#(.*/([^/]+)/([^/]+)/([^/]+)/[0-9a-f]{30,40}/([^/s]+))$# ($x = $2) =~ tr|.|/|; "install -Dm444 $1 $out/$x/$3/$4/''${($5 =~ s/-jvm//r)}" #e'  | sh <ins> mv $out/com/tobiasdiez/easybind/${versionReplace.easybind.pin}  $out/com/tobiasdiez/easybind/${versionReplace.easybind.snapshot} </ins> ''; # Don't move info to share/ forceShare = [ "dummy" ]; outputHashMode = "recursive"; <del> outputHash = { x86_64-linux = "sha256-OicHJVFxHGPE76bEDoLhkEhVcAJmplqjoh2I3nnVaLA="; aarch64-linux = "sha256-8QWmweptL/+pSO6DhfBLaLcBrfKd4TDsDoXs4TgXvew="; }.${stdenv.hostPlatform.system} or (throw "Unsupported system ${stdenv.hostPlatform.system}"); </del> <ins> outputHash = "sha256-s6GA8iT3UEVuELBgpBvzPJlVX+9DpfOQrEd3KIth8eA="; </ins> }; <ins> postPatch = '' # Pin the version substituteInPlace build.gradle  --replace 'com.github.JabRef:afterburner.fx:${versionReplace.afterburner.snapshot}'  'com.github.JabRef:afterburner.fx:${versionReplace.afterburner.pin}'  --replace 'com.tobiasdiez:easybind:${versionReplace.easybind.snapshot}'  'com.tobiasdiez:easybind:${versionReplace.easybind.pin}' ''; </ins> preBuild = '' # Include CSL styles and locales in our build cp -r buildres/csl/* src/main/resources/