mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-21 03:25:36 +00:00
deno: 1.31.1 -> 1.32.3
Don't inherit from package sets in all-packages #204303 Fix update script to use new hash cargoHash attrs
This commit is contained in:
parent
fc861d3e06
commit
7d54a86a36
@ -2,40 +2,25 @@
|
||||
, lib
|
||||
, callPackage
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, rustPlatform
|
||||
, installShellFiles
|
||||
, tinycc
|
||||
, libiconv
|
||||
, libobjc
|
||||
, Security
|
||||
, CoreServices
|
||||
, Metal
|
||||
, Foundation
|
||||
, QuartzCore
|
||||
, darwin
|
||||
, librusty_v8 ? callPackage ./librusty_v8.nix { }
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "deno";
|
||||
version = "1.31.1";
|
||||
version = "1.32.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "denoland";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-0S5BSXWnv4DMcc8cijRQx6NyDReg5aJJT65TeNFlkkw=";
|
||||
hash = "sha256-zltMn8ped1Euia/zRCvkpSUzJwFTpbZgrnot21x5tSA=";
|
||||
};
|
||||
cargoHash = "sha256-7Xfnc91yQiAwAF5fvtiwnELUDb7LJeye3GtXNzYkUo8=";
|
||||
|
||||
cargoPatches = [
|
||||
# resolved in 1.31.2
|
||||
(fetchpatch {
|
||||
name = "CVE-2023-28446.patch";
|
||||
url = "https://github.com/denoland/deno/commit/78d430103a8f6931154ddbbe19d36f3b8630286d.patch";
|
||||
hash = "sha256-kXwr9wWxk1OaaubCr8pfmSp3TrJMQkbAg72nIHp/seA=";
|
||||
})
|
||||
];
|
||||
cargoHash = "sha256-XDs3f44ta9MaJlaMWRVkNZd9DaOfoSHJluUmL68DWOw=";
|
||||
|
||||
postPatch = ''
|
||||
# upstream uses lld on aarch64-darwin for faster builds
|
||||
@ -44,8 +29,10 @@ rustPlatform.buildRustPackage rec {
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
buildInputs = lib.optionals stdenv.isDarwin
|
||||
[ libiconv libobjc Security CoreServices Metal Foundation QuartzCore ];
|
||||
buildInputs = lib.optionals stdenv.isDarwin (
|
||||
[ libiconv darwin.libobjc ] ++
|
||||
(with darwin.apple_sdk.frameworks; [ Security CoreServices Metal Foundation QuartzCore ])
|
||||
);
|
||||
|
||||
buildAndTestSubdir = "cli";
|
||||
|
||||
|
@ -11,11 +11,11 @@ let
|
||||
};
|
||||
in
|
||||
fetch_librusty_v8 {
|
||||
version = "0.63.0";
|
||||
version = "0.68.0";
|
||||
shas = {
|
||||
x86_64-linux = "sha256-D1NLAFMD1B4NOaBFsKBin5Gs+hmNC9LgNy3Z+w/1VGs=";
|
||||
aarch64-linux = "sha256-3V2WWMCjJNiuCRmx66ISBk+pzvCKCqvOE9F3YWESABo=";
|
||||
x86_64-darwin = "sha256-rUWSHxlFDT4cDoTLhSgRr04+2/oroeIiWURHbNDcMF8=";
|
||||
aarch64-darwin = "sha256-LaoIjHrBqWn0BIpAOaiHAg5qCGoPlSHtFhiAi4og9q0=";
|
||||
x86_64-linux = "sha256-yq7YPD2TM6Uw0EvCqIsZ/lbE1RLgIg7a42qDVrr5fX4=";
|
||||
aarch64-linux = "sha256-uZFm3hAeyEUUXqRJFLM3OBVfglH3AecjFKVgeJZu3L0=";
|
||||
x86_64-darwin = "sha256-YkxoggK0I4rT/KNJ30StDPLUc02Mdjwal3JH+s/YTQo=";
|
||||
aarch64-darwin = "sha256-aXE7W3sSzbhvC661BYTTHyHlihmVVtFSv85nSjGOLkU=";
|
||||
};
|
||||
}
|
||||
|
@ -15,12 +15,12 @@ interface Replacer {
|
||||
|
||||
const log = logger("src");
|
||||
|
||||
const prefetchSha256 = (nixpkgs: string, version: string) =>
|
||||
const prefetchHash = (nixpkgs: string, version: string) =>
|
||||
run("nix-prefetch", ["-f", nixpkgs, "deno.src", "--rev", version]);
|
||||
const prefetchCargoSha256 = (nixpkgs: string) =>
|
||||
const prefetchCargoHash = (nixpkgs: string) =>
|
||||
run(
|
||||
"nix-prefetch",
|
||||
[`{ sha256 }: (import ${nixpkgs} {}).deno.cargoDeps.overrideAttrs (_: { inherit sha256; })`],
|
||||
[`{ sha256 }: (import ${nixpkgs} {}).deno.cargoDeps.overrideAttrs (_: { hash = sha256; })`],
|
||||
);
|
||||
|
||||
const replace = (str: string, replacers: Replacer[]) =>
|
||||
@ -45,23 +45,23 @@ export async function updateSrc(
|
||||
denoVersion: string,
|
||||
) {
|
||||
log("Starting src update");
|
||||
const trimVersion = denoVersion.substr(1);
|
||||
log("Fetching sha256 for:", trimVersion);
|
||||
const sha256 = await prefetchSha256(nixpkgs, denoVersion);
|
||||
const trimVersion = denoVersion.substring(1);
|
||||
log("Fetching hash for:", trimVersion);
|
||||
const sha256 = await prefetchHash(nixpkgs, denoVersion);
|
||||
log("sha256 to update:", sha256);
|
||||
await updateNix(
|
||||
filePath,
|
||||
[
|
||||
genVerReplacer("version", trimVersion),
|
||||
genShaReplacer("sha256", sha256),
|
||||
genShaReplacer("hash", sha256),
|
||||
],
|
||||
);
|
||||
log("Fetching cargoSha256 for:", sha256);
|
||||
const cargoSha256 = await prefetchCargoSha256(nixpkgs);
|
||||
log("cargoSha256 to update:", cargoSha256);
|
||||
log("Fetching cargoHash for:", sha256);
|
||||
const cargoHash = await prefetchCargoHash(nixpkgs);
|
||||
log("cargoHash to update:", cargoHash);
|
||||
await updateNix(
|
||||
filePath,
|
||||
[genShaReplacer("cargoSha256", cargoSha256)],
|
||||
[genShaReplacer("cargoHash", cargoHash)],
|
||||
);
|
||||
log("Finished src update");
|
||||
}
|
||||
|
@ -6624,11 +6624,7 @@ with pkgs;
|
||||
|
||||
deer = callPackage ../shells/zsh/zsh-deer { };
|
||||
|
||||
deno = callPackage ../development/web/deno {
|
||||
inherit (darwin) libobjc;
|
||||
inherit (darwin.apple_sdk.frameworks)
|
||||
Security CoreServices Metal Foundation QuartzCore;
|
||||
};
|
||||
deno = callPackage ../development/web/deno { };
|
||||
|
||||
detox = callPackage ../tools/misc/detox { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user