pylyzer: use writableTmpDirAsHomeHook

This commit is contained in:
Pol Dellaiera
2025-01-30 22:15:10 +01:00
parent e28bd60455
commit 6e7356cb06
+4 -6
View File
@@ -3,12 +3,13 @@
stdenv,
rustPlatform,
fetchFromGitHub,
git,
gitMinimal,
python3,
makeWrapper,
writeScriptBin,
versionCheckHook,
nix-update-script,
writableTmpDirAsHomeHook,
}:
rustPlatform.buildRustPackage rec {
@@ -26,19 +27,16 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-mi4pCYA0dQnv3MIpZxVVY0qLdIts/qvxS4og0Tyxk3w=";
nativeBuildInputs = [
git
gitMinimal
python3
makeWrapper
writableTmpDirAsHomeHook
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ (writeScriptBin "diskutil" "") ];
buildInputs = [
python3
];
preBuild = ''
export HOME=$(mktemp -d)
'';
postInstall = ''
mkdir -p $out/lib
cp -r $HOME/.erg/ $out/lib/erg