From 721bd297b16f8a5c113f387af9f2620fc8e5af76 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Tue, 6 May 2025 15:45:16 +0200 Subject: [PATCH] perlPackages.UUID4Tiny: add loongarch64 and riscv64 support --- pkgs/top-level/perl-packages.nix | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pkgs/top-level/perl-packages.nix b/pkgs/top-level/perl-packages.nix index b1543f44f992..60d227fd28da 100644 --- a/pkgs/top-level/perl-packages.nix +++ b/pkgs/top-level/perl-packages.nix @@ -37577,12 +37577,17 @@ with self; url = "mirror://cpan/authors/id/C/CV/CVLIBRARY/UUID4-Tiny-0.003.tar.gz"; hash = "sha256-4S9sgrg1dcORd3O0HA+1HPeDx8bPcuDJkWks4u8Hg2I="; }; - postPatch = lib.optionalString (stdenv.hostPlatform.isAarch64) '' - # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/unistd.h - # printf SYS_getrandom | gcc -include sys/syscall.h -E - - substituteInPlace lib/UUID4/Tiny.pm \ - --replace "syscall( 318" "syscall( 278" - ''; + postPatch = + lib.optionalString + ( + stdenv.hostPlatform.isAarch64 || stdenv.hostPlatform.isLoongArch64 || stdenv.hostPlatform.isRiscV64 + ) + '' + # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/uapi/asm-generic/unistd.h + # printf SYS_getrandom | gcc -include sys/syscall.h -E - + substituteInPlace lib/UUID4/Tiny.pm \ + --replace "syscall( 318" "syscall( 278" + ''; meta = { description = "Cryptographically secure v4 UUIDs for Linux x64"; license = with lib.licenses; [