Skip to content

Commit

Permalink
Merge pull request NixOS#289771 from D3vil0p3r/patch-3
Browse files Browse the repository at this point in the history
galleta: add darwin support
  • Loading branch information
drupol authored Feb 19, 2024
2 parents a332040 + cab286e commit 045b2a1
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion pkgs/by-name/ga/galleta/package.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ lib
, stdenv
, fetchzip
, fetchpatch
}:

stdenv.mkDerivation (finalAttrs: {
Expand All @@ -12,16 +13,38 @@ stdenv.mkDerivation (finalAttrs: {
hash = "sha256-tc5XLToyQZutb51ZoBlGWXDpsSqdJ89bjzJwY8kRncA=";
};

patches = [
# fix some GCC warnings.
(fetchpatch {
url = "https://salsa.debian.org/pkg-security-team/galleta/-/raw/998470d8151b2f3a4bec71ae340c30f252d03a9b/debian/patches/10_fix-gcc-warnings.patch";
hash = "sha256-b8VJGSAoSnWteyUbC2Ue3tqkpho7gyn+E/yrN2O3G9c=";
})
# make Makefile compliant with Debian and add GCC hardening.
(fetchpatch {
url = "https://salsa.debian.org/pkg-security-team/galleta/-/raw/553c237a34995d9f7fc0383ee547d4f5cd004d5b/debian/patches/20_fix-makefile.patch";
hash = "sha256-+rnoTrlXtWl9zmZlkvqbJ+YlIXFCpKOqvxIkN8xxtsg=";
})
# Fix cross compilation.
# Galleta fails to cross build from source, because the upstream
# Makefile hard codes the build architecture compiler. The patch
# makes the compiler substitutable and galleta cross buildable.
(fetchpatch {
url = "https://salsa.debian.org/pkg-security-team/galleta/-/raw/f0f51a5a9e5adc0279f78872461fa57ee90d6842/debian/patches/30-fix-FTBS-cross-compilation.patch";
hash = "sha256-ZwymEVJy7KvLFvNOcVZqDtJPxEcpQBVg+u+G+kSDZBo=";
})
];

makeFlags = [
"-C src"
"CC=cc"
];

enableParallelBuilding = true;

installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp bin/galleta $out/bin
cp src/galleta $out/bin
runHook postInstall
'';

Expand Down

0 comments on commit 045b2a1

Please sign in to comment.