Merge pull request #289771 from D3vil0p3r/patch-3

galleta: add darwin support

authored by Pol Dellaiera and committed by GitHub 045b2a11 a3320403

+24 -1
+24 -1
pkgs/by-name/ga/galleta/package.nix
··· 1 1 { lib 2 2 , stdenv 3 3 , fetchzip 4 + , fetchpatch 4 5 }: 5 6 6 7 stdenv.mkDerivation (finalAttrs: { ··· 12 13 hash = "sha256-tc5XLToyQZutb51ZoBlGWXDpsSqdJ89bjzJwY8kRncA="; 13 14 }; 14 15 16 + patches = [ 17 + # fix some GCC warnings. 18 + (fetchpatch { 19 + url = "https://salsa.debian.org/pkg-security-team/galleta/-/raw/998470d8151b2f3a4bec71ae340c30f252d03a9b/debian/patches/10_fix-gcc-warnings.patch"; 20 + hash = "sha256-b8VJGSAoSnWteyUbC2Ue3tqkpho7gyn+E/yrN2O3G9c="; 21 + }) 22 + # make Makefile compliant with Debian and add GCC hardening. 23 + (fetchpatch { 24 + url = "https://salsa.debian.org/pkg-security-team/galleta/-/raw/553c237a34995d9f7fc0383ee547d4f5cd004d5b/debian/patches/20_fix-makefile.patch"; 25 + hash = "sha256-+rnoTrlXtWl9zmZlkvqbJ+YlIXFCpKOqvxIkN8xxtsg="; 26 + }) 27 + # Fix cross compilation. 28 + # Galleta fails to cross build from source, because the upstream 29 + # Makefile hard codes the build architecture compiler. The patch 30 + # makes the compiler substitutable and galleta cross buildable. 31 + (fetchpatch { 32 + url = "https://salsa.debian.org/pkg-security-team/galleta/-/raw/f0f51a5a9e5adc0279f78872461fa57ee90d6842/debian/patches/30-fix-FTBS-cross-compilation.patch"; 33 + hash = "sha256-ZwymEVJy7KvLFvNOcVZqDtJPxEcpQBVg+u+G+kSDZBo="; 34 + }) 35 + ]; 36 + 15 37 makeFlags = [ 16 38 "-C src" 39 + "CC=cc" 17 40 ]; 18 41 19 42 enableParallelBuilding = true; ··· 21 44 installPhase = '' 22 45 runHook preInstall 23 46 mkdir -p $out/bin 24 - cp bin/galleta $out/bin 47 + cp src/galleta $out/bin 25 48 runHook postInstall 26 49 ''; 27 50