diff options
author | Will Dietz <w@wdtz.org> | 2017-08-25 08:39:03 -0500 |
---|---|---|
committer | Will Dietz <w@wdtz.org> | 2018-02-13 09:44:49 -0600 |
commit | 3b5e1131a7e4bff57a6870f7065fd25826595a24 (patch) | |
tree | 6271ddce1e6d5065c9a59b2cf1f1f0d1a5686653 /pkgs/os-specific/linux/apparmor/default.nix | |
parent | c7399423d733a56f0f923321b905a2863ec5db45 (diff) | |
download | nixpkgs-3b5e1131a7e4bff57a6870f7065fd25826595a24.tar nixpkgs-3b5e1131a7e4bff57a6870f7065fd25826595a24.tar.gz nixpkgs-3b5e1131a7e4bff57a6870f7065fd25826595a24.tar.bz2 nixpkgs-3b5e1131a7e4bff57a6870f7065fd25826595a24.tar.lz nixpkgs-3b5e1131a7e4bff57a6870f7065fd25826595a24.tar.xz nixpkgs-3b5e1131a7e4bff57a6870f7065fd25826595a24.tar.zst nixpkgs-3b5e1131a7e4bff57a6870f7065fd25826595a24.zip |
libapparmor: Add musl patches from Alpine
(update: drop patches no longer needed on updated version)
Diffstat (limited to 'pkgs/os-specific/linux/apparmor/default.nix')
-rw-r--r-- | pkgs/os-specific/linux/apparmor/default.nix | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/apparmor/default.nix b/pkgs/os-specific/linux/apparmor/default.nix index 29e1357d38a..0bb5561e957 100644 --- a/pkgs/os-specific/linux/apparmor/default.nix +++ b/pkgs/os-specific/linux/apparmor/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, makeWrapper, autoreconfHook +{ stdenv, fetchurl, fetchpatch, makeWrapper, autoreconfHook , pkgconfig, which , flex, bison , linuxHeaders ? stdenv.cc.libc.linuxHeaders @@ -35,6 +35,27 @@ let substituteInPlace ./common/Make.rules --replace "/usr/share/man" "share/man" ''; + # use 'if c then x else null' to avoid rebuilding + # patches = stdenv.lib.optionals stdenv.hostPlatform.isMusl [ + patches = if stdenv.hostPlatform.isMusl then [ + (fetchpatch { + url = "https://git.alpinelinux.org/cgit/aports/plain/testing/apparmor/0002-Provide-missing-secure_getenv-and-scandirat-function.patch?id=74b8427cc21f04e32030d047ae92caa618105b53"; + name = "0002-Provide-missing-secure_getenv-and-scandirat-function.patch"; + sha256 = "0pj1bzifghxwxlc39j8hyy17dkjr9fk64kkj94ayymyprz4i4nac"; + }) + (fetchpatch { + url = "https://git.alpinelinux.org/cgit/aports/plain/testing/apparmor/0003-Added-missing-typedef-definitions-on-parser.patch?id=74b8427cc21f04e32030d047ae92caa618105b53"; + name = "0003-Added-missing-typedef-definitions-on-parser.patch"; + sha256 = "0yyaqz8jlmn1bm37arggprqz0njb4lhjni2d9c8qfqj0kll0bam0"; + }) + (fetchpatch { + url = "https://git.alpinelinux.org/cgit/aports/plain/testing/apparmor/0007-Do-not-build-install-vim-file-with-utils-package.patch?id=74b8427cc21f04e32030d047ae92caa618105b53"; + name = "0007-Do-not-build-install-vim-file-with-utils-package.patch"; + sha256 = "1m4dx901biqgnr4w4wz8a2z9r9dxyw7wv6m6mqglqwf2lxinqmp4"; + }) + # (alpine patches {1,4,5,6,8} are needed for apparmor 2.11, but not 2.12) + ] else null; + # FIXME: convert these to a single multiple-outputs package? libapparmor = stdenv.mkDerivation { @@ -63,6 +84,8 @@ let substituteInPlace ./libraries/libapparmor/src/Makefile.am --replace "/usr/include/netinet/in.h" "${stdenv.cc.libc.dev}/include/netinet/in.h" substituteInPlace ./libraries/libapparmor/src/Makefile.in --replace "/usr/include/netinet/in.h" "${stdenv.cc.libc.dev}/include/netinet/in.h" ''; + inherit patches; + postPatch = "cd ./libraries/libapparmor"; configureFlags = "--with-python --with-perl"; @@ -90,6 +113,7 @@ let ]; prePatch = prePatchCommon; + inherit patches; postPatch = "cd ./utils"; makeFlags = ''LANGS=''; installFlags = ''DESTDIR=$(out) BINDIR=$(out)/bin VIM_INSTALL_PATH=$(out)/share PYPREFIX=''; @@ -145,6 +169,7 @@ let ## techdoc.pdf still doesn't build ... substituteInPlace ./parser/Makefile --replace "manpages htmlmanpages pdf" "manpages htmlmanpages" ''; + inherit patches; postPatch = "cd ./parser"; makeFlags = ''LANGS= USE_SYSTEM=1 INCLUDEDIR=${libapparmor}/include''; installFlags = ''DESTDIR=$(out) DISTRO=unknown''; |