diff options
author | Artturi <Artturin@artturin.com> | 2023-02-13 22:34:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-13 22:34:23 +0200 |
commit | fa169bb239d7b2d860af851573569182ee5e0127 (patch) | |
tree | c33f6220585f0fddf04a9c61683f0b5ba3e8a24b | |
parent | 938a52f603f1a545319441832441fb40820a7953 (diff) | |
parent | 1db242213092dc1ba1038edbe0bb5660d0fb5e00 (diff) | |
download | nixpkgs-fa169bb239d7b2d860af851573569182ee5e0127.tar nixpkgs-fa169bb239d7b2d860af851573569182ee5e0127.tar.gz nixpkgs-fa169bb239d7b2d860af851573569182ee5e0127.tar.bz2 nixpkgs-fa169bb239d7b2d860af851573569182ee5e0127.tar.lz nixpkgs-fa169bb239d7b2d860af851573569182ee5e0127.tar.xz nixpkgs-fa169bb239d7b2d860af851573569182ee5e0127.tar.zst nixpkgs-fa169bb239d7b2d860af851573569182ee5e0127.zip |
Merge pull request #214207 from Artturin/ssytemdbuildbash1
-rw-r--r-- | pkgs/os-specific/linux/systemd/default.nix | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/pkgs/os-specific/linux/systemd/default.nix b/pkgs/os-specific/linux/systemd/default.nix index ec44cde0c32..73d2b06cac1 100644 --- a/pkgs/os-specific/linux/systemd/default.nix +++ b/pkgs/os-specific/linux/systemd/default.nix @@ -3,6 +3,7 @@ { stdenv , lib , nixosTests +, pkgsCross , fetchFromGitHub , fetchpatch , fetchzip @@ -63,6 +64,7 @@ , withKexectools ? lib.meta.availableOn stdenv.hostPlatform kexec-tools , kexec-tools , bashInteractive +, bash , libmicrohttpd , libfido2 , p11-kit @@ -139,7 +141,7 @@ let # jq '.created_at|strptime("%Y-%m-%dT%H:%M:%SZ")|mktime' releaseTimestamp = "1667246393"; in -stdenv.mkDerivation { +stdenv.mkDerivation (finalAttrs: { inherit pname version; # We use systemd/systemd-stable for src, and ship NixOS-specific patches inside nixpkgs directly @@ -339,7 +341,7 @@ stdenv.mkDerivation { # when cross-compiling. + '' shopt -s extglob - patchShebangs tools test src/!(rpm) + patchShebangs tools test src/!(rpm|kernel-install) src/kernel-install/test-kernel-install.sh ''; outputs = [ "out" "man" "dev" ]; @@ -362,6 +364,7 @@ stdenv.mkDerivation { docbook_xsl docbook_xml_dtd_42 docbook_xml_dtd_45 + bash (buildPackages.python3Packages.python.withPackages (ps: with ps; [ lxml jinja2 ])) ] ++ lib.optionals withLibBPF [ @@ -382,6 +385,7 @@ stdenv.mkDerivation { libuuid linuxHeaders pam + bashInteractive # for patch shebangs ] ++ lib.optionals wantGcrypt [ libgcrypt libgpg-error ] @@ -694,6 +698,10 @@ stdenv.mkDerivation { mv $out/dont-strip-me $out/lib/systemd/boot/efi ''; + disallowedReferences = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) + # 'or p' is for manually specified buildPackages as they dont have __spliced + (builtins.map (p: p.__spliced.buildHost or p) finalAttrs.nativeBuildInputs); + passthru = { # The interface version prevents NixOS from switching to an # incompatible systemd at runtime. (Switching across reboots is @@ -707,6 +715,7 @@ stdenv.mkDerivation { tests = { inherit (nixosTests) switchTest; + cross = pkgsCross.aarch64-multiplatform.systemd; }; }; @@ -721,4 +730,4 @@ stdenv.mkDerivation { priority = 10; maintainers = with maintainers; [ flokli kloenk mic92 ]; }; -} +}) |