emacs: replace ad hoc implementation with writableTmpDirAsHomeHook (#379262)
This commit is contained in:
@@ -85,14 +85,11 @@ rec {
|
||||
pkg: predicate:
|
||||
pkg.overrideAttrs (
|
||||
finalAttrs: previousAttrs: {
|
||||
preInstall =
|
||||
nativeBuildInputs =
|
||||
if predicate finalAttrs previousAttrs then
|
||||
''
|
||||
HOME=$(mktemp -d)
|
||||
''
|
||||
+ previousAttrs.preInstall or ""
|
||||
previousAttrs.nativeBuildInputs or [ ] ++ [ pkgs.writableTmpDirAsHomeHook ]
|
||||
else
|
||||
previousAttrs.preInstall or null;
|
||||
previousAttrs.nativeBuildInputs or null;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
+6
-1
@@ -12,6 +12,7 @@
|
||||
gopls,
|
||||
tempel,
|
||||
unstableGitUpdater,
|
||||
writableTmpDirAsHomeHook,
|
||||
}:
|
||||
|
||||
let
|
||||
@@ -65,6 +66,10 @@ melpaBuild {
|
||||
python
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
writableTmpDirAsHomeHook
|
||||
];
|
||||
|
||||
files = ''
|
||||
("*.el"
|
||||
"lsp_bridge.py"
|
||||
@@ -80,7 +85,7 @@ melpaBuild {
|
||||
|
||||
mkfifo test.log
|
||||
cat < test.log &
|
||||
HOME=$(mktemp -d) python -m test.test
|
||||
python -m test.test
|
||||
|
||||
runHook postCheck
|
||||
'';
|
||||
|
||||
@@ -316,9 +316,7 @@ let
|
||||
});
|
||||
|
||||
# tries to write a log file to $HOME
|
||||
insert-shebang = super.insert-shebang.overrideAttrs (attrs: {
|
||||
HOME = "/tmp";
|
||||
});
|
||||
insert-shebang = mkHome super.insert-shebang;
|
||||
|
||||
ivy-rtags = ignoreCompilationError (fix-rtags super.ivy-rtags); # elisp error
|
||||
|
||||
@@ -665,9 +663,7 @@ let
|
||||
helm-rtags = ignoreCompilationError (fix-rtags super.helm-rtags); # elisp error
|
||||
|
||||
# tries to write to $HOME
|
||||
php-auto-yasnippets = super.php-auto-yasnippets.overrideAttrs (attrs: {
|
||||
HOME = "/tmp";
|
||||
});
|
||||
php-auto-yasnippets = mkHome super.php-auto-yasnippets;
|
||||
|
||||
racer = super.racer.overrideAttrs (attrs: {
|
||||
postPatch = attrs.postPatch or "" + ''
|
||||
|
||||
Reference in New Issue
Block a user