commit
ea38d91485
@ -2,40 +2,25 @@
|
|||||||
, lib
|
, lib
|
||||||
, callPackage
|
, callPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, fetchpatch
|
|
||||||
, rustPlatform
|
, rustPlatform
|
||||||
, installShellFiles
|
, installShellFiles
|
||||||
, tinycc
|
, tinycc
|
||||||
, libiconv
|
, libiconv
|
||||||
, libobjc
|
, darwin
|
||||||
, Security
|
|
||||||
, CoreServices
|
|
||||||
, Metal
|
|
||||||
, Foundation
|
|
||||||
, QuartzCore
|
|
||||||
, librusty_v8 ? callPackage ./librusty_v8.nix { }
|
, librusty_v8 ? callPackage ./librusty_v8.nix { }
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "deno";
|
pname = "deno";
|
||||||
version = "1.31.1";
|
version = "1.32.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "denoland";
|
owner = "denoland";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-0S5BSXWnv4DMcc8cijRQx6NyDReg5aJJT65TeNFlkkw=";
|
hash = "sha256-zltMn8ped1Euia/zRCvkpSUzJwFTpbZgrnot21x5tSA=";
|
||||||
};
|
};
|
||||||
cargoHash = "sha256-7Xfnc91yQiAwAF5fvtiwnELUDb7LJeye3GtXNzYkUo8=";
|
cargoHash = "sha256-XDs3f44ta9MaJlaMWRVkNZd9DaOfoSHJluUmL68DWOw=";
|
||||||
|
|
||||||
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=";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# upstream uses lld on aarch64-darwin for faster builds
|
# upstream uses lld on aarch64-darwin for faster builds
|
||||||
@ -44,8 +29,10 @@ rustPlatform.buildRustPackage rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ installShellFiles ];
|
nativeBuildInputs = [ installShellFiles ];
|
||||||
buildInputs = lib.optionals stdenv.isDarwin
|
buildInputs = lib.optionals stdenv.isDarwin (
|
||||||
[ libiconv libobjc Security CoreServices Metal Foundation QuartzCore ];
|
[ libiconv darwin.libobjc ] ++
|
||||||
|
(with darwin.apple_sdk.frameworks; [ Security CoreServices Metal Foundation QuartzCore ])
|
||||||
|
);
|
||||||
|
|
||||||
buildAndTestSubdir = "cli";
|
buildAndTestSubdir = "cli";
|
||||||
|
|
||||||
|
@ -11,11 +11,11 @@ let
|
|||||||
};
|
};
|
||||||
in
|
in
|
||||||
fetch_librusty_v8 {
|
fetch_librusty_v8 {
|
||||||
version = "0.63.0";
|
version = "0.68.0";
|
||||||
shas = {
|
shas = {
|
||||||
x86_64-linux = "sha256-D1NLAFMD1B4NOaBFsKBin5Gs+hmNC9LgNy3Z+w/1VGs=";
|
x86_64-linux = "sha256-yq7YPD2TM6Uw0EvCqIsZ/lbE1RLgIg7a42qDVrr5fX4=";
|
||||||
aarch64-linux = "sha256-3V2WWMCjJNiuCRmx66ISBk+pzvCKCqvOE9F3YWESABo=";
|
aarch64-linux = "sha256-uZFm3hAeyEUUXqRJFLM3OBVfglH3AecjFKVgeJZu3L0=";
|
||||||
x86_64-darwin = "sha256-rUWSHxlFDT4cDoTLhSgRr04+2/oroeIiWURHbNDcMF8=";
|
x86_64-darwin = "sha256-YkxoggK0I4rT/KNJ30StDPLUc02Mdjwal3JH+s/YTQo=";
|
||||||
aarch64-darwin = "sha256-LaoIjHrBqWn0BIpAOaiHAg5qCGoPlSHtFhiAi4og9q0=";
|
aarch64-darwin = "sha256-aXE7W3sSzbhvC661BYTTHyHlihmVVtFSv85nSjGOLkU=";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -15,12 +15,12 @@ interface Replacer {
|
|||||||
|
|
||||||
const log = logger("src");
|
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]);
|
run("nix-prefetch", ["-f", nixpkgs, "deno.src", "--rev", version]);
|
||||||
const prefetchCargoSha256 = (nixpkgs: string) =>
|
const prefetchCargoHash = (nixpkgs: string) =>
|
||||||
run(
|
run(
|
||||||
"nix-prefetch",
|
"nix-prefetch",
|
||||||
[`{ sha256 }: (import ${nixpkgs} {}).deno.cargoDeps.overrideAttrs (_: { inherit sha256; })`],
|
[`{ sha256 }: (import ${nixpkgs} {}).deno.cargoDeps.overrideAttrs (_: { hash = sha256; })`],
|
||||||
);
|
);
|
||||||
|
|
||||||
const replace = (str: string, replacers: Replacer[]) =>
|
const replace = (str: string, replacers: Replacer[]) =>
|
||||||
@ -45,23 +45,23 @@ export async function updateSrc(
|
|||||||
denoVersion: string,
|
denoVersion: string,
|
||||||
) {
|
) {
|
||||||
log("Starting src update");
|
log("Starting src update");
|
||||||
const trimVersion = denoVersion.substr(1);
|
const trimVersion = denoVersion.substring(1);
|
||||||
log("Fetching sha256 for:", trimVersion);
|
log("Fetching hash for:", trimVersion);
|
||||||
const sha256 = await prefetchSha256(nixpkgs, denoVersion);
|
const sha256 = await prefetchHash(nixpkgs, denoVersion);
|
||||||
log("sha256 to update:", sha256);
|
log("sha256 to update:", sha256);
|
||||||
await updateNix(
|
await updateNix(
|
||||||
filePath,
|
filePath,
|
||||||
[
|
[
|
||||||
genVerReplacer("version", trimVersion),
|
genVerReplacer("version", trimVersion),
|
||||||
genShaReplacer("sha256", sha256),
|
genShaReplacer("hash", sha256),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
log("Fetching cargoSha256 for:", sha256);
|
log("Fetching cargoHash for:", sha256);
|
||||||
const cargoSha256 = await prefetchCargoSha256(nixpkgs);
|
const cargoHash = await prefetchCargoHash(nixpkgs);
|
||||||
log("cargoSha256 to update:", cargoSha256);
|
log("cargoHash to update:", cargoHash);
|
||||||
await updateNix(
|
await updateNix(
|
||||||
filePath,
|
filePath,
|
||||||
[genShaReplacer("cargoSha256", cargoSha256)],
|
[genShaReplacer("cargoHash", cargoHash)],
|
||||||
);
|
);
|
||||||
log("Finished src update");
|
log("Finished src update");
|
||||||
}
|
}
|
||||||
|
@ -6624,11 +6624,7 @@ with pkgs;
|
|||||||
|
|
||||||
deer = callPackage ../shells/zsh/zsh-deer { };
|
deer = callPackage ../shells/zsh/zsh-deer { };
|
||||||
|
|
||||||
deno = callPackage ../development/web/deno {
|
deno = callPackage ../development/web/deno { };
|
||||||
inherit (darwin) libobjc;
|
|
||||||
inherit (darwin.apple_sdk.frameworks)
|
|
||||||
Security CoreServices Metal Foundation QuartzCore;
|
|
||||||
};
|
|
||||||
|
|
||||||
detox = callPackage ../tools/misc/detox { };
|
detox = callPackage ../tools/misc/detox { };
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user