vscode-extensions: use sponge instead of mktemp
This commit is contained in:
parent
e5d5dd2c9f
commit
69c8868883
1 changed files with 4 additions and 8 deletions
|
@ -185,12 +185,10 @@ let
|
||||||
version = "0.0.1";
|
version = "0.0.1";
|
||||||
sha256 = "sha256-vz2kU36B1xkLci2QwLpl/SBEhfSWltIDJ1r7SorHcr8=";
|
sha256 = "sha256-vz2kU36B1xkLci2QwLpl/SBEhfSWltIDJ1r7SorHcr8=";
|
||||||
};
|
};
|
||||||
nativeBuildInputs = [ jq ];
|
nativeBuildInputs = [ jq moreutils ];
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
cd "$out/$installPrefix"
|
cd "$out/$installPrefix"
|
||||||
tmp_package_json=$(mktemp)
|
jq '.contributes.configuration.properties."nixpkgs-fmt.path".default = "${nixpkgs-fmt}/bin/nixpkgs-fmt"' package.json | sponge package.json
|
||||||
jq '.contributes.configuration.properties."nixpkgs-fmt.path".default = "${nixpkgs-fmt}/bin/nixpkgs-fmt"' package.json > "$tmp_package_json"
|
|
||||||
mv "$tmp_package_json" package.json
|
|
||||||
'';
|
'';
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
@ -1342,12 +1340,10 @@ let
|
||||||
version = "0.14.4";
|
version = "0.14.4";
|
||||||
sha256 = "05z314sw9nqym3qlj7dcwm0fz1hb23xppzqn3nr2wcj17hs8zz4m";
|
sha256 = "05z314sw9nqym3qlj7dcwm0fz1hb23xppzqn3nr2wcj17hs8zz4m";
|
||||||
};
|
};
|
||||||
nativeBuildInputs = [ jq ];
|
nativeBuildInputs = [ jq moreutils ];
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
cd "$out/$installPrefix"
|
cd "$out/$installPrefix"
|
||||||
tmp_package_json=$(mktemp)
|
jq '.contributes.configuration.properties."shellcheck.executablePath".default = "${shellcheck}/bin/shellcheck"' package.json | sponge package.json
|
||||||
jq '.contributes.configuration.properties."shellcheck.executablePath".default = "${shellcheck}/bin/shellcheck"' package.json > "$tmp_package_json"
|
|
||||||
mv "$tmp_package_json" package.json
|
|
||||||
'';
|
'';
|
||||||
meta = {
|
meta = {
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
|
|
Loading…
Reference in a new issue