lol

isa-l: 2.31.0 -> 2.31.0-unstable-2024-04-25 to fix compilation on aarch64-darwin (#350167)

authored by

Gaétan Lepage and committed by
GitHub
9d892fc5 a74fb7ae

+46 -11
+46 -11
pkgs/development/libraries/isa-l/default.nix
··· 1 - { lib, stdenv, fetchFromGitHub, autoreconfHook, nasm }: 1 + { lib, stdenv, fetchFromGitHub, runCommand, autoreconfHook, nix, nasm }: 2 2 3 - stdenv.mkDerivation rec { 3 + stdenv.mkDerivation (finalAttrs: { 4 4 pname = "isa-l"; 5 - version = "2.31.0"; 5 + version = "2.31.0-unstable-2024-04-25"; 6 6 7 7 src = fetchFromGitHub { 8 8 owner = "intel"; 9 9 repo = "isa-l"; 10 - rev = "v${version}"; 11 - sha256 = "sha256-xBBtpjtWyba0DogdLobtuWmiiAHTXMK4oRnjYuTUCNk="; 10 + rev = "dbaf284e112bea1b90983772a3164e794b923aaf"; 11 + sha256 = "sha256-eM1K3uObb4eZq0nSfafltp5DuZIDwknUYj9CdLn14lY="; 12 12 }; 13 13 14 14 nativeBuildInputs = [ nasm autoreconfHook ]; ··· 17 17 export AS=nasm 18 18 ''; 19 19 20 - meta = with lib; { 20 + passthru = { 21 + tests = { 22 + igzip = runCommand "test-isa-l-igzip" { 23 + nativeBuildInputs = [ 24 + finalAttrs.finalPackage 25 + ]; 26 + sample = runCommand "nixpkgs-lib.nar" { 27 + nativeBuildInputs = [ nix ]; 28 + } '' 29 + nix nar --extra-experimental-features nix-command pack ${../../../../lib} > "$out" 30 + ''; 31 + meta = { 32 + description = "Cross validation of igzip provided by isa-l with gzip"; 33 + }; 34 + } '' 35 + HASH_ORIGINAL="$(cat "$sample" | sha256sum | cut -d" " -f1)" 36 + HASH_COMPRESSION_TEST="$(igzip -c "$sample" | gzip -d -c | sha256sum | cut -d" " -f1)" 37 + HASH_DECOMPRESSION_TEST="$(gzip -c "$sample" | igzip -d -c | sha256sum | cut -d" " -f1)" 38 + if [[ "$HASH_COMPRESSION_TEST" != "$HASH_ORIGINAL" ]] || [[ "$HASH_DECOMPRESSION_TEST" != "$HASH_ORIGINAL" ]]; then 39 + if [[ "HASH_COMPRESSION_TEST" != "$HASH_ORIGINAL" ]]; then 40 + echo "The igzip-compressed file does not decompress to the original file." 1>&2 41 + fi 42 + if [[ "HASH_DECOMPRESSION_TEST" != "$HASH_ORIGINAL" ]]; then 43 + echo "igzip does not decompress the gzip-compressed archive to the original file." 1>&2 44 + fi 45 + echo "SHA256 checksums:" 1>&2 46 + printf ' original file:\t%s\n' "$HASH_ORIGINAL" 1>&2 47 + printf ' compression test:\t%s\n' "$HASH_COMPRESSION_TEST" 1>&2 48 + printf ' decompression test:\t%s\n' "$HASH_DECOMPRESSION_TEST" 1>&2 49 + exit 1 50 + fi 51 + touch "$out" 52 + ''; 53 + }; 54 + }; 55 + 56 + meta = { 21 57 description = "Collection of optimised low-level functions targeting storage applications"; 22 58 mainProgram = "igzip"; 23 - license = licenses.bsd3; 59 + license = lib.licenses.bsd3; 24 60 homepage = "https://github.com/intel/isa-l"; 25 - maintainers = with maintainers; [ jbedo ]; 26 - platforms = platforms.all; 27 - broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64; # does not build on M1 mac (asm/hwcap.h file not found) maybe needs gcc not clang? 61 + maintainers = with lib.maintainers; [ jbedo ]; 62 + platforms = lib.platforms.all; 28 63 }; 29 - } 64 + })