vscode-extensions: use sponge instead of mktemp

This commit is contained in:
happysalada 2021-07-26 23:54:33 +09:00 committed by Raphael Megzari
parent e5d5dd2c9f
commit 69c8868883

View File

@ -185,12 +185,10 @@ let
version = "0.0.1";
sha256 = "sha256-vz2kU36B1xkLci2QwLpl/SBEhfSWltIDJ1r7SorHcr8=";
};
nativeBuildInputs = [ jq ];
nativeBuildInputs = [ jq moreutils ];
postInstall = ''
cd "$out/$installPrefix"
tmp_package_json=$(mktemp)
jq '.contributes.configuration.properties."nixpkgs-fmt.path".default = "${nixpkgs-fmt}/bin/nixpkgs-fmt"' package.json > "$tmp_package_json"
mv "$tmp_package_json" package.json
jq '.contributes.configuration.properties."nixpkgs-fmt.path".default = "${nixpkgs-fmt}/bin/nixpkgs-fmt"' package.json | sponge package.json
'';
meta = with lib; {
license = licenses.mit;
@ -1342,12 +1340,10 @@ let
version = "0.14.4";
sha256 = "05z314sw9nqym3qlj7dcwm0fz1hb23xppzqn3nr2wcj17hs8zz4m";
};
nativeBuildInputs = [ jq ];
nativeBuildInputs = [ jq moreutils ];
postInstall = ''
cd "$out/$installPrefix"
tmp_package_json=$(mktemp)
jq '.contributes.configuration.properties."shellcheck.executablePath".default = "${shellcheck}/bin/shellcheck"' package.json > "$tmp_package_json"
mv "$tmp_package_json" package.json
jq '.contributes.configuration.properties."shellcheck.executablePath".default = "${shellcheck}/bin/shellcheck"' package.json | sponge package.json
'';
meta = {
license = lib.licenses.mit;