diff --git a/pkgs/development/web/deno/default.nix b/pkgs/development/web/deno/default.nix index 871406b109a83..22b88c10277f3 100644 --- a/pkgs/development/web/deno/default.nix +++ b/pkgs/development/web/deno/default.nix @@ -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"; diff --git a/pkgs/development/web/deno/librusty_v8.nix b/pkgs/development/web/deno/librusty_v8.nix index a98587a7b9d83..65eaddfdfc7ec 100644 --- a/pkgs/development/web/deno/librusty_v8.nix +++ b/pkgs/development/web/deno/librusty_v8.nix @@ -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="; }; } diff --git a/pkgs/development/web/deno/update/src.ts b/pkgs/development/web/deno/update/src.ts index 3bfae27c21c34..20793a7178fa3 100644 --- a/pkgs/development/web/deno/update/src.ts +++ b/pkgs/development/web/deno/update/src.ts @@ -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"); } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 19acd6446c313..f24aa0df6a798 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { };