diff options
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/linux/apparmor/default.nix | 15 | ||||
-rw-r--r-- | pkgs/os-specific/linux/systemd/default.nix | 13 |
2 files changed, 17 insertions, 11 deletions
diff --git a/pkgs/os-specific/linux/apparmor/default.nix b/pkgs/os-specific/linux/apparmor/default.nix index 0bb5561e9572..c8e58dfbf6fb 100644 --- a/pkgs/os-specific/linux/apparmor/default.nix +++ b/pkgs/os-specific/linux/apparmor/default.nix @@ -8,6 +8,7 @@ , swig , ncurses , pam +, buildPackages }: let @@ -29,8 +30,8 @@ let }; prePatchCommon = '' - substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2man" "${perl}/bin/pod2man" - substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2html" "${perl}/bin/pod2html" + substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2man" "${buildPackages.perl}/bin/pod2man" + substituteInPlace ./common/Make.rules --replace "/usr/bin/pod2html" "${buildPackages.perl}/bin/pod2html" substituteInPlace ./common/Make.rules --replace "/usr/include/linux/capability.h" "${linuxHeaders}/include/linux/capability.h" substituteInPlace ./common/Make.rules --replace "/usr/share/man" "share/man" ''; @@ -70,9 +71,10 @@ let swig ncurses which + perl ]; - buildInputs = [ + buildInputs = stdenv.lib.optionals (!stdenv.isCross) [ perl python ]; @@ -87,11 +89,12 @@ let inherit patches; postPatch = "cd ./libraries/libapparmor"; - configureFlags = "--with-python --with-perl"; + # https://gitlab.com/apparmor/apparmor/issues/1 + configureFlags = stdenv.lib.optionalString (!stdenv.isCross) "--with-python --with-perl"; - outputs = [ "out" "python" ]; + outputs = if stdenv.isCross then [ "out" ] else [ "out" "python" ]; - postInstall = '' + postInstall = stdenv.lib.optionalString (!stdenv.isCross) '' mkdir -p $python/lib mv $out/lib/python* $python/lib/ ''; diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index 383e3c340e64..df51284689e2 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -9,12 +9,13 @@ , patchelf , getent , hostPlatform +, buildPackages }: assert stdenv.isLinux; let - pythonLxmlEnv = python3Packages.python.withPackages ( ps: with ps; [ python3Packages.lxml ]); + pythonLxmlEnv = buildPackages.python3Packages.python.withPackages ( ps: with ps; [ python3Packages.lxml ]); in @@ -35,14 +36,16 @@ in [ pkgconfig intltool gperf libxslt gettext docbook_xsl docbook_xml_dtd_42 docbook_xml_dtd_45 ninja meson coreutils # meson calls date, stat etc. - pythonLxmlEnv glibcLocales - patchelf getent + glibcLocales + patchelf getent m4 ]; buildInputs = [ linuxHeaders libcap kmod xz pam acl - /* cryptsetup */ libuuid m4 glib libgcrypt libgpgerror libidn2 + /* cryptsetup */ libuuid glib libgcrypt libgpgerror libidn2 libmicrohttpd kexectools libseccomp libffi audit lz4 bzip2 libapparmor iptables gnu-efi + # This is actually native, but we already pull it from buildPackages + pythonLxmlEnv ]; #dontAddPrefix = true; @@ -128,7 +131,7 @@ in for i in src/basic/generate-gperfs.py src/resolve/generate-dns_type-gperf.py src/test/generate-sym-test.py ; do substituteInPlace $i \ - --replace "#!/usr/bin/env python" "#!${python3Packages.python}/bin/python" + --replace "#!/usr/bin/env python" "#!${buildPackages.python3Packages.python}/bin/python" done substituteInPlace src/journal/catalog.c \ |