Separate architecture‐specific fixes

This commit is contained in:
Mikael Voss 2024-10-13 20:28:12 +02:00
parent dbf2bd18a7
commit 5ff4e1b1b8
No known key found for this signature in database
4 changed files with 60 additions and 39 deletions

9
overlay/aarch.nix Normal file
View file

@ -0,0 +1,9 @@
{ nixpkgs, ... }: final: prev:
let
inherit (nixpkgs) lib;
inherit (prev.stdenv) hostPlatform;
in lib.optionalAttrs hostPlatform.isAarch ({
umockdev = prev.umockdev.overrideAttrs {
doCheck = false;
};
})

View file

@ -10,4 +10,6 @@ nixpkgs.lib.composeManyExtensions [
self.overlays.mimalloc
self.overlays.modern-minimal
self.overlays.fixes
self.overlays.riscv
self.overlays.aarch
] final prev

View file

@ -1,6 +1,7 @@
{ nixpkgs, ... }: final: prev:
let
inherit (nixpkgs.lib) optionalAttrs toList;
inherit (nixpkgs) lib;
inherit (lib) toList;
inherit (prev.stdenv) hostPlatform;
in {
numactl = prev.numactl.overrideAttrs (prevAttrs: {
@ -12,9 +13,9 @@ in {
];
});
redis = prev.redis.overrideAttrs ({
redis = prev.redis.overrideAttrs {
doCheck = false;
});
};
python312 = prev.python312.override {
packageOverrides = final: prev: {
@ -22,13 +23,6 @@ in {
doCheck = false;
doInstallCheck = false;
});
} // optionalAttrs hostPlatform.isRiscV64 {
psutil = prev.psutil.overrideAttrs (prevAttrs: {
disabledTests = prevAttrs.disabledTests or [ ] ++ [
"net_if_addrs"
"net_if_stats"
];
});
};
};
@ -45,32 +39,4 @@ in {
--replace-fail 'CACHELINE_SIZE EQUAL "undefined"' 'CACHELINE_SIZE STREQUAL "undefined"'
'';
});
} // optionalAttrs hostPlatform.isRiscV64 ({
boehmgc = prev.boehmgc.overrideAttrs (prevAttrs: {
postPatch = prevAttrs.postPatch or "" + ''
sed -E -i '/^TESTS \+= gctest/d' \
tests/tests.am
'';
});
elfutils = prev.elfutils.overrideAttrs ({
doCheck = false;
doInstallCheck = false;
});
libseccomp = prev.libseccomp.overrideAttrs ({
doCheck = false;
});
libuv = prev.libuv.overrideAttrs ({
doCheck = false;
});
umockdev = prev.umockdev.overrideAttrs {
doCheck = false;
};
xdg-utils = prev.xdg-utils.override {
procmail = final.emptyDirectory;
};
})
}

44
overlay/riscv.nix Normal file
View file

@ -0,0 +1,44 @@
{ nixpkgs, ... }: final: prev:
let
inherit (nixpkgs) lib;
inherit (prev.stdenv) hostPlatform;
in lib.optionalAttrs hostPlatform.isRiscV ({
python312 = prev.python312.override {
packageOverrides = final: prev: {
psutil = prev.psutil.overrideAttrs (prevAttrs: {
disabledTests = prevAttrs.disabledTests or [ ] ++ [
"net_if_addrs"
"net_if_stats"
];
});
};
};
boehmgc = prev.boehmgc.overrideAttrs (prevAttrs: {
postPatch = prevAttrs.postPatch or "" + ''
sed -E -i '/^TESTS \+= gctest/d' \
tests/tests.am
'';
});
elfutils = prev.elfutils.overrideAttrs {
doCheck = false;
doInstallCheck = false;
};
libseccomp = prev.libseccomp.overrideAttrs {
doCheck = false;
};
libuv = prev.libuv.overrideAttrs {
doCheck = false;
};
umockdev = prev.umockdev.overrideAttrs {
doCheck = false;
};
xdg-utils = prev.xdg-utils.override {
procmail = final.emptyDirectory;
};
})