fix segfault in cachix
This commit is contained in:
parent
eb19dbbb52
commit
b65e8fee7e
13
patches/fix-nix-2.19.patch
Normal file
13
patches/fix-nix-2.19.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/src/libutil/current-process.cc b/src/libutil/current-process.cc
|
||||||
|
index 352a6a0..7435f58 100644
|
||||||
|
--- a/src/libutil/current-process.cc
|
||||||
|
+++ b/src/libutil/current-process.cc
|
||||||
|
@@ -35,6 +35,8 @@ unsigned int getMaxCPU()
|
||||||
|
|
||||||
|
auto cpuMax = readFile(cpuFile);
|
||||||
|
auto cpuMaxParts = tokenizeString<std::vector<std::string>>(cpuMax, " \n");
|
||||||
|
+ if (cpuMaxParts.size() != 2)
|
||||||
|
+ return 0;
|
||||||
|
auto quota = cpuMaxParts[0];
|
||||||
|
auto period = cpuMaxParts[1];
|
||||||
|
if (quota != "max")
|
@ -38,6 +38,17 @@ with lib; {
|
|||||||
wine = prev.wineWow64Packages.stagingFull;
|
wine = prev.wineWow64Packages.stagingFull;
|
||||||
intel-vaapi-driver = prev.intel-vaapi-driver.override { enableHybridCodec = true; };
|
intel-vaapi-driver = prev.intel-vaapi-driver.override { enableHybridCodec = true; };
|
||||||
|
|
||||||
|
haskellPackages = prev.haskellPackages.override {
|
||||||
|
overrides = _hFinal: hPrev: {
|
||||||
|
# TODO: remove after cachix starts to use nix > v2.21
|
||||||
|
cachix = let
|
||||||
|
nix-fixed = prev.nixVersions.nix_2_19.overrideAttrs (oldAttrs: {
|
||||||
|
patches = oldAttrs.patches ++ [ ../patches/fix-nix-2.19.patch ];
|
||||||
|
});
|
||||||
|
in hPrev.cachix.override { nix = nix-fixed; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
modprobed-db = prev.modprobed-db.overrideAttrs (oa: {
|
modprobed-db = prev.modprobed-db.overrideAttrs (oa: {
|
||||||
postPatch = (oa.postPatch or "") + ''
|
postPatch = (oa.postPatch or "") + ''
|
||||||
substituteInPlace ./common/modprobed-db.in \
|
substituteInPlace ./common/modprobed-db.in \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user