turbo: install from unstable

This commit is contained in:
Motiejus Jakštys 2024-03-13 13:56:38 +02:00 committed by Motiejus Jakštys
parent d5d5c48f04
commit 624a3fbb91
4 changed files with 26 additions and 66 deletions

View File

@ -246,6 +246,22 @@
"type": "github" "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": { "nur": {
"locked": { "locked": {
"lastModified": 1710283548, "lastModified": 1710283548,
@ -306,6 +322,7 @@
"nixgl": "nixgl", "nixgl": "nixgl",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"nur": "nur", "nur": "nur",
"pre-commit-hooks": "pre-commit-hooks" "pre-commit-hooks": "pre-commit-hooks"
} }

View File

@ -3,6 +3,7 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
flake-compat.url = "github:nix-community/flake-compat"; flake-compat.url = "github:nix-community/flake-compat";
nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixos-hardware.url = "github:NixOS/nixos-hardware/master";
@ -75,6 +76,7 @@
outputs = { outputs = {
self, self,
nixpkgs, nixpkgs,
nixpkgs-unstable,
agenix, agenix,
deploy-rs, deploy-rs,
flake-utils, flake-utils,
@ -101,8 +103,8 @@
deploy-rs = super.deploy-rs-pkg; deploy-rs = super.deploy-rs-pkg;
inherit (super.deploy-rs) lib; inherit (super.deploy-rs) lib;
}; };
deploy-rs-pkg = null;
}) })
(_: _: {deploy-rs-pkg = null;})
(_: super: { (_: super: {
inherit (super.callPackage ./pkgs/compress-drv.nix {}) compressDrvWeb; inherit (super.callPackage ./pkgs/compress-drv.nix {}) compressDrvWeb;
@ -112,8 +114,11 @@
# TODO: copied from 24.05 # TODO: copied from 24.05
turbo = super.callPackage ./pkgs/turbo.nix {}; turbo = super.callPackage ./pkgs/turbo.nix {};
})
(_: _: { nixpkgs-unstable = import nixpkgs-unstable {
inherit (super) system;
};
crossArm64 = import nixpkgs { crossArm64 = import nixpkgs {
system = "x86_64-linux"; system = "x86_64-linux";
hostPlatform.config = "aarch64-linux"; hostPlatform.config = "aarch64-linux";

View File

@ -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;
};
}

View File

@ -7,7 +7,7 @@
mj.base.users.user.extraGroups = ["docker"]; mj.base.users.user.extraGroups = ["docker"];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
turbo pkgs.nixpkgs-unstable.turbo
nodejs nodejs
google-cloud-sdk google-cloud-sdk
]; ];