From 624a3fbb918f2d5fc111770275b69880dfcf7c6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Wed, 13 Mar 2024 13:56:38 +0200 Subject: [PATCH] turbo: install from unstable --- flake.lock | 17 +++++++++++ flake.nix | 11 ++++++-- pkgs/turbo.nix | 62 ----------------------------------------- shared/work/default.nix | 2 +- 4 files changed, 26 insertions(+), 66 deletions(-) delete mode 100644 pkgs/turbo.nix diff --git a/flake.lock b/flake.lock index 4f77827..f2119fa 100644 --- a/flake.lock +++ b/flake.lock @@ -246,6 +246,22 @@ "type": "github" } }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1710272261, + "narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0ad13a6833440b8e238947e47bea7f11071dc2b2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "nur": { "locked": { "lastModified": 1710283548, @@ -306,6 +322,7 @@ "nixgl": "nixgl", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable", "nur": "nur", "pre-commit-hooks": "pre-commit-hooks" } diff --git a/flake.nix b/flake.nix index caed622..fd6d0ae 100644 --- a/flake.nix +++ b/flake.nix @@ -3,6 +3,7 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; flake-utils.url = "github:numtide/flake-utils"; flake-compat.url = "github:nix-community/flake-compat"; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; @@ -75,6 +76,7 @@ outputs = { self, nixpkgs, + nixpkgs-unstable, agenix, deploy-rs, flake-utils, @@ -101,8 +103,8 @@ deploy-rs = super.deploy-rs-pkg; inherit (super.deploy-rs) lib; }; + deploy-rs-pkg = null; }) - (_: _: {deploy-rs-pkg = null;}) (_: super: { inherit (super.callPackage ./pkgs/compress-drv.nix {}) compressDrvWeb; @@ -112,8 +114,11 @@ # TODO: copied from 24.05 turbo = super.callPackage ./pkgs/turbo.nix {}; - }) - (_: _: { + + nixpkgs-unstable = import nixpkgs-unstable { + inherit (super) system; + }; + crossArm64 = import nixpkgs { system = "x86_64-linux"; hostPlatform.config = "aarch64-linux"; diff --git a/pkgs/turbo.nix b/pkgs/turbo.nix deleted file mode 100644 index a241c9b..0000000 --- a/pkgs/turbo.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ - lib, - fetchFromGitHub, - protobuf, - rustPlatform, - pkg-config, - openssl, - extra-cmake-modules, - fontconfig, - rust-jemalloc-sys, - testers, - turbo, - nix-update-script, - capnproto, -}: -rustPlatform.buildRustPackage rec { - pname = "turbo"; - version = "1.11.3"; - src = fetchFromGitHub { - owner = "vercel"; - repo = "turbo"; - rev = "v${version}"; - hash = "sha256-hjJXbGct9ZmriKdVjB7gwfmFsV1Tv57V7DfUMFZ8Xv0="; - }; - cargoBuildFlags = [ - "--package" - "turbo" - ]; - RELEASE_TURBO_CLI = "true"; - - cargoHash = "sha256-bAXO4Lqv4ibo+fz3679MjNgP2MMY8TbxhG0+DRy0xcA="; - - RUSTC_BOOTSTRAP = 1; - nativeBuildInputs = [ - pkg-config - extra-cmake-modules - protobuf - capnproto - ]; - buildInputs = [ - openssl - fontconfig - rust-jemalloc-sys - ]; - - # Browser tests time out with chromium and google-chrome - doCheck = false; - - passthru = { - updateScript = nix-update-script { - extraArgs = ["--version-regex" "^\d+\.\d+\.\d+$"]; - }; - tests.version = testers.testVersion {package = turbo;}; - }; - - meta = with lib; { - description = "High-performance build system for JavaScript and TypeScript codebases"; - homepage = "https://turbo.build/"; - maintainers = with maintainers; [dlip]; - license = licenses.mpl20; - }; -} diff --git a/shared/work/default.nix b/shared/work/default.nix index 621a93b..fefebc6 100644 --- a/shared/work/default.nix +++ b/shared/work/default.nix @@ -7,7 +7,7 @@ mj.base.users.user.extraGroups = ["docker"]; environment.systemPackages = with pkgs; [ - turbo + pkgs.nixpkgs-unstable.turbo nodejs google-cloud-sdk ];