Merge master into staging-next
This commit is contained in:
commit
eba04b3485
23 changed files with 4417 additions and 104 deletions
|
@ -323,7 +323,7 @@ $ nix-shell -p haskellPackages.dhall-nixpkgs nix-prefetch-git
|
|||
```
|
||||
|
||||
:::{.note}
|
||||
`nix-prefetch-git` has to be in `$PATH` for `dhall-to-nixpkgs` to work.
|
||||
`nix-prefetch-git` is added to the `nix-shell -p` invocation above, because it has to be in `$PATH` for `dhall-to-nixpkgs` to work.
|
||||
:::
|
||||
|
||||
The utility takes care of automatically detecting remote imports and converting
|
||||
|
|
|
@ -11,7 +11,23 @@ import shutil
|
|||
import subprocess
|
||||
import sys
|
||||
import warnings
|
||||
from typing import NamedTuple
|
||||
import json
|
||||
from typing import NamedTuple, Dict, List
|
||||
from dataclasses import dataclass
|
||||
|
||||
|
||||
@dataclass
|
||||
class BootSpec:
|
||||
init: str
|
||||
initrd: str
|
||||
initrdSecrets: str
|
||||
kernel: str
|
||||
kernelParams: List[str]
|
||||
label: str
|
||||
system: str
|
||||
toplevel: str
|
||||
specialisations: Dict[str, "BootSpec"]
|
||||
|
||||
|
||||
|
||||
libc = ctypes.CDLL("libc.so.6")
|
||||
|
@ -71,12 +87,20 @@ def write_loader_conf(profile: str | None, generation: int, specialisation: str
|
|||
os.rename("@efiSysMountPoint@/loader/loader.conf.tmp", "@efiSysMountPoint@/loader/loader.conf")
|
||||
|
||||
|
||||
def profile_path(profile: str | None, generation: int, specialisation: str | None, name: str) -> str:
|
||||
return os.path.realpath("%s/%s" % (system_dir(profile, generation, specialisation), name))
|
||||
def get_bootspec(profile: str | None, generation: int) -> BootSpec:
|
||||
boot_json_path = os.path.realpath("%s/%s" % (system_dir(profile, generation, None), "boot.json"))
|
||||
boot_json_f = open(boot_json_path, 'r')
|
||||
bootspec_json = json.load(boot_json_f)
|
||||
return bootspec_from_json(bootspec_json)
|
||||
|
||||
def bootspec_from_json(bootspec_json: Dict) -> BootSpec:
|
||||
specialisations = bootspec_json['org.nixos.specialisation.v1']
|
||||
specialisations = {k: bootspec_from_json(v) for k, v in specialisations.items()}
|
||||
return BootSpec(**bootspec_json['org.nixos.bootspec.v1'], specialisations=specialisations)
|
||||
|
||||
|
||||
def copy_from_profile(profile: str | None, generation: int, specialisation: str | None, name: str, dry_run: bool = False) -> str:
|
||||
store_file_path = profile_path(profile, generation, specialisation, name)
|
||||
def copy_from_file(file: str, dry_run: bool = False) -> str:
|
||||
store_file_path = os.path.realpath(file)
|
||||
suffix = os.path.basename(store_file_path)
|
||||
store_dir = os.path.basename(os.path.dirname(store_file_path))
|
||||
efi_file_path = "/efi/nixos/%s-%s.efi" % (store_dir, suffix)
|
||||
|
@ -84,40 +108,19 @@ def copy_from_profile(profile: str | None, generation: int, specialisation: str
|
|||
copy_if_not_exists(store_file_path, "@efiSysMountPoint@%s" % (efi_file_path))
|
||||
return efi_file_path
|
||||
|
||||
|
||||
def describe_generation(profile: str | None, generation: int, specialisation: str | None) -> str:
|
||||
try:
|
||||
with open(profile_path(profile, generation, specialisation, "nixos-version")) as f:
|
||||
nixos_version = f.read()
|
||||
except IOError:
|
||||
nixos_version = "Unknown"
|
||||
|
||||
kernel_dir = os.path.dirname(profile_path(profile, generation, specialisation, "kernel"))
|
||||
module_dir = glob.glob("%s/lib/modules/*" % kernel_dir)[0]
|
||||
kernel_version = os.path.basename(module_dir)
|
||||
|
||||
build_time = int(os.path.getctime(system_dir(profile, generation, specialisation)))
|
||||
build_date = datetime.datetime.fromtimestamp(build_time).strftime('%F')
|
||||
|
||||
description = "@distroName@ {}, Linux Kernel {}, Built on {}".format(
|
||||
nixos_version, kernel_version, build_date
|
||||
)
|
||||
|
||||
return description
|
||||
|
||||
|
||||
def write_entry(profile: str | None, generation: int, specialisation: str | None,
|
||||
machine_id: str, current: bool) -> None:
|
||||
kernel = copy_from_profile(profile, generation, specialisation, "kernel")
|
||||
initrd = copy_from_profile(profile, generation, specialisation, "initrd")
|
||||
machine_id: str, bootspec: BootSpec, current: bool) -> None:
|
||||
if specialisation:
|
||||
bootspec = bootspec.specialisations[specialisation]
|
||||
kernel = copy_from_file(bootspec.kernel)
|
||||
initrd = copy_from_file(bootspec.initrd)
|
||||
|
||||
title = "@distroName@{profile}{specialisation}".format(
|
||||
profile=" [" + profile + "]" if profile else "",
|
||||
specialisation=" (%s)" % specialisation if specialisation else "")
|
||||
|
||||
try:
|
||||
append_initrd_secrets = profile_path(profile, generation, specialisation, "append-initrd-secrets")
|
||||
subprocess.check_call([append_initrd_secrets, "@efiSysMountPoint@%s" % (initrd)])
|
||||
subprocess.check_call([bootspec.initrdSecrets, "@efiSysMountPoint@%s" % (initrd)])
|
||||
except FileNotFoundError:
|
||||
pass
|
||||
except subprocess.CalledProcessError:
|
||||
|
@ -132,17 +135,19 @@ def write_entry(profile: str | None, generation: int, specialisation: str | None
|
|||
entry_file = "@efiSysMountPoint@/loader/entries/%s" % (
|
||||
generation_conf_filename(profile, generation, specialisation))
|
||||
tmp_path = "%s.tmp" % (entry_file)
|
||||
kernel_params = "init=%s " % profile_path(profile, generation, specialisation, "init")
|
||||
kernel_params = "init=%s " % bootspec.init
|
||||
|
||||
kernel_params = kernel_params + " ".join(bootspec.kernelParams)
|
||||
build_time = int(os.path.getctime(system_dir(profile, generation, specialisation)))
|
||||
build_date = datetime.datetime.fromtimestamp(build_time).strftime('%F')
|
||||
|
||||
with open(profile_path(profile, generation, specialisation, "kernel-params")) as params_file:
|
||||
kernel_params = kernel_params + params_file.read()
|
||||
with open(tmp_path, 'w') as f:
|
||||
f.write(BOOT_ENTRY.format(title=title,
|
||||
generation=generation,
|
||||
kernel=kernel,
|
||||
initrd=initrd,
|
||||
kernel_params=kernel_params,
|
||||
description=describe_generation(profile, generation, specialisation)))
|
||||
description=f"{bootspec.label}, built on {build_date}"))
|
||||
if machine_id is not None:
|
||||
f.write("machine-id %s\n" % machine_id)
|
||||
f.flush()
|
||||
|
@ -173,21 +178,14 @@ def get_generations(profile: str | None = None) -> list[SystemIdentifier]:
|
|||
return configurations[-configurationLimit:]
|
||||
|
||||
|
||||
def get_specialisations(profile: str | None, generation: int, _: str | None) -> list[SystemIdentifier]:
|
||||
specialisations_dir = os.path.join(
|
||||
system_dir(profile, generation, None), "specialisation")
|
||||
if not os.path.exists(specialisations_dir):
|
||||
return []
|
||||
return [SystemIdentifier(profile, generation, spec) for spec in os.listdir(specialisations_dir)]
|
||||
|
||||
|
||||
def remove_old_entries(gens: list[SystemIdentifier]) -> None:
|
||||
rex_profile = re.compile(r"^@efiSysMountPoint@/loader/entries/nixos-(.*)-generation-.*\.conf$")
|
||||
rex_generation = re.compile(r"^@efiSysMountPoint@/loader/entries/nixos.*-generation-([0-9]+)(-specialisation-.*)?\.conf$")
|
||||
known_paths = []
|
||||
for gen in gens:
|
||||
known_paths.append(copy_from_profile(*gen, "kernel", True))
|
||||
known_paths.append(copy_from_profile(*gen, "initrd", True))
|
||||
bootspec = get_bootspec(gen.profile, gen.generation)
|
||||
known_paths.append(copy_from_file(bootspec.kernel, True))
|
||||
known_paths.append(copy_from_file(bootspec.initrd, True))
|
||||
for path in glob.iglob("@efiSysMountPoint@/loader/entries/nixos*-generation-[1-9]*.conf"):
|
||||
if rex_profile.match(path):
|
||||
prof = rex_profile.sub(r"\1", path)
|
||||
|
@ -279,10 +277,11 @@ def install_bootloader(args: argparse.Namespace) -> None:
|
|||
remove_old_entries(gens)
|
||||
for gen in gens:
|
||||
try:
|
||||
is_default = os.path.dirname(profile_path(*gen, "init")) == args.default_config
|
||||
write_entry(*gen, machine_id, current=is_default)
|
||||
for specialisation in get_specialisations(*gen):
|
||||
write_entry(*specialisation, machine_id, current=is_default)
|
||||
bootspec = get_bootspec(gen.profile, gen.generation)
|
||||
is_default = os.path.dirname(bootspec.init) == args.default_config
|
||||
write_entry(*gen, machine_id, bootspec, current=is_default)
|
||||
for specialisation in bootspec.specialisations.keys():
|
||||
write_entry(gen.profile, gen.generation, specialisation, machine_id, bootspec, current=is_default)
|
||||
if is_default:
|
||||
write_loader_conf(*gen)
|
||||
except OSError as e:
|
||||
|
|
|
@ -10,16 +10,16 @@
|
|||
}:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "snarkos";
|
||||
version = "2.2.1";
|
||||
version = "2.2.4";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "AleoHQ";
|
||||
repo = "snarkOS";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-vEoEnjVjxVnjZ3Lya1qO2kOypNu07aYSlrSya5NJZzs=";
|
||||
sha256 = "sha256-sq99lJqSJ436wdSjdOlooGD2PysZzbyb7hTfJ9OUg/U=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-CVHvBqfcTqWBtLFcEcs9y/LmQ4gXjX+dfqqZSxN+33A=";
|
||||
cargoHash = "sha256-0x/YKPLh5yf3y/CjrQF18yDfPJ8IlArVVczgyVPzpEI=";
|
||||
|
||||
# buildAndTestSubdir = "cli";
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ rustPlatform.buildRustPackage rec {
|
|||
|
||||
meta = with lib; {
|
||||
description = "A secure virtual machine monitor for KVM";
|
||||
homepage = "https://chromium.googlesource.com/crosvm/crosvm/";
|
||||
homepage = "https://crosvm.dev/";
|
||||
mainProgram = "crosvm";
|
||||
maintainers = with maintainers; [ qyliss ];
|
||||
license = licenses.bsd3;
|
||||
|
|
|
@ -100,4 +100,9 @@ in {
|
|||
version = "3.7.3";
|
||||
hash = "sha256-eUjIVqkMglvXJotvhWdKjc0lS65C4iF4GyTj+NwzXbM=";
|
||||
};
|
||||
|
||||
libressl_3_8 = generic {
|
||||
version = "3.8.2";
|
||||
hash = "sha256-bUuNW7slofgzZjnlbsUIgFLUOpUlZpeoXEzpEyPCWVQ=";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchPypi
|
||||
, fetchFromGitHub
|
||||
, buildPythonPackage
|
||||
, setuptools
|
||||
, pkg-config
|
||||
, swig
|
||||
, pcsclite
|
||||
, PCSC
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -15,28 +18,45 @@ in
|
|||
buildPythonPackage rec {
|
||||
version = "2.0.7";
|
||||
pname = "pyscard";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-J4BUUl+nX76LEEYNh+3NA6cK2U1oixE0Xkc5mH+Fwb8=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "LudovicRousseau";
|
||||
repo = "pyscard";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-nkDI1OPQ4SsNhWkg53ZTsG7j0+mvpkJI7dsyaOl1a/8=";
|
||||
};
|
||||
|
||||
postPatch = if withApplePCSC then ''
|
||||
substituteInPlace smartcard/scard/winscarddll.c \
|
||||
--replace "/System/Library/Frameworks/PCSC.framework/PCSC" \
|
||||
"${PCSC}/Library/Frameworks/PCSC.framework/PCSC"
|
||||
'' else ''
|
||||
substituteInPlace smartcard/scard/winscarddll.c \
|
||||
--replace "libpcsclite.so.1" \
|
||||
"${lib.getLib pcsclite}/lib/libpcsclite${stdenv.hostPlatform.extensions.sharedLibrary}"
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
swig
|
||||
] ++ lib.optionals (!withApplePCSC) [
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = if withApplePCSC then [ PCSC ] else [ pcsclite ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
postPatch =
|
||||
if withApplePCSC then ''
|
||||
substituteInPlace smartcard/scard/winscarddll.c \
|
||||
--replace "/System/Library/Frameworks/PCSC.framework/PCSC" \
|
||||
"${PCSC}/Library/Frameworks/PCSC.framework/PCSC"
|
||||
'' else ''
|
||||
substituteInPlace setup.py --replace "pkg-config" "$PKG_CONFIG"
|
||||
substituteInPlace smartcard/scard/winscarddll.c \
|
||||
--replace "libpcsclite.so.1" \
|
||||
"${lib.getLib pcsclite}/lib/libpcsclite${stdenv.hostPlatform.extensions.sharedLibrary}"
|
||||
'';
|
||||
|
||||
preCheck = ''
|
||||
# remove src module, so tests use the installed module instead
|
||||
rm -r smartcard
|
||||
'';
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = lib.optionalString (! withApplePCSC)
|
||||
"-I ${lib.getDev pcsclite}/include/PCSC";
|
||||
|
||||
propagatedBuildInputs = if withApplePCSC then [ PCSC ] else [ pcsclite ];
|
||||
nativeBuildInputs = [ swig ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://pyscard.sourceforge.io/";
|
||||
description = "Smartcard library for python";
|
||||
|
|
|
@ -17,7 +17,7 @@ buildPythonPackage rec {
|
|||
owner = "python-versioneer";
|
||||
repo = "python-versioneer";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-seYT/v691QB0LUzeI4MraegbNILU3tLO//9UbZIfe+A=";
|
||||
hash = "sha256-3b7Wfhd24Vym5XCeN/M1832Q1VzvlWi3quTRaZrID2s=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -21,11 +21,12 @@
|
|||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, rustc
|
||||
, git
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "cargo-llvm-cov";
|
||||
version = "0.5.33";
|
||||
version = "0.5.36";
|
||||
|
||||
owner = "taiki-e";
|
||||
homepage = "https://github.com/${owner}/${pname}";
|
||||
|
@ -36,7 +37,7 @@ let
|
|||
cargoLock = fetchurl {
|
||||
name = "Cargo.lock";
|
||||
url = "https://crates.io/api/v1/crates/${pname}/${version}/download";
|
||||
sha256 = "sha256-FDr1Yx2k9yTqnQbtkT8h8DErPe54/lswfbzZKM0Knpk=";
|
||||
sha256 = "sha256-ZI5vxtMcIEtVPIeedha3S6GEvvQDBB9eyOFwkAAO22I=";
|
||||
downloadToTemp = true;
|
||||
postFetch = ''
|
||||
tar xzf $downloadedFile ${pname}-${version}/Cargo.lock
|
||||
|
@ -54,7 +55,8 @@ rustPlatform.buildRustPackage {
|
|||
inherit owner;
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-nlrQIzQc63XdUqWiHFXqjwzzNhgpEba7Rw4VE1d0yBU=";
|
||||
sha256 = "sha256-Ii21kjQ4nWEttvGY9bxhGmfLkI2MrAsYJZcwfE2y6uQ=";
|
||||
leaveDotGit = true;
|
||||
};
|
||||
|
||||
# Upstream doesn't include the lockfile so we need to add it back
|
||||
|
@ -62,13 +64,24 @@ rustPlatform.buildRustPackage {
|
|||
cp ${cargoLock} source/Cargo.lock
|
||||
'';
|
||||
|
||||
cargoSha256 = "sha256-etMpCnbdSzaZnlzGlVnTL84VxInYFpuA4xrt8qNqbsQ=";
|
||||
cargoSha256 = "sha256-BHocUJpk4qplwMfpSXNTZjOpUCZGS676xYrqtSFnP7s=";
|
||||
|
||||
# `cargo-llvm-cov` reads these environment variables to find these binaries,
|
||||
# which are needed to run the tests
|
||||
LLVM_COV = "${llvm}/bin/llvm-cov";
|
||||
LLVM_PROFDATA = "${llvm}/bin/llvm-profdata";
|
||||
|
||||
nativeCheckInputs = [
|
||||
git
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
# `cargo-llvm-cov`'s tests rely on `git ls-files` so the staging area needs
|
||||
# to not have everything staged as deleted, which is how `leaveDotGit` in
|
||||
# `fetchFromGitHub` leaves the staging area for reproducibility reasons.
|
||||
git restore --staged .
|
||||
'';
|
||||
|
||||
meta = {
|
||||
inherit homepage;
|
||||
changelog = homepage + "/blob/v${version}/CHANGELOG.md";
|
||||
|
|
|
@ -8,16 +8,16 @@
|
|||
}:
|
||||
buildGo121Module rec {
|
||||
pname = "turso-cli";
|
||||
version = "0.87.1";
|
||||
version = "0.87.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tursodatabase";
|
||||
repo = "turso-cli";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-wPL4fYFkk1rtHIYIVOGk5GG6S/pmOpg6WcbnpleDkUA=";
|
||||
hash = "sha256-EZSVKmOIzwokCKreLnZj4DWEhjjXo3TFhieGVR7w7NM=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-Jf2ZLzODPnvNrED8ST0u7rHGWivPwcyptkJbu8mdnoA=";
|
||||
vendorHash = "sha256-3IV0MgDe71lqLQ6tB2NM2kYokXGWvR+hh4lvxw5QWjA=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
|
|
|
@ -2,16 +2,16 @@
|
|||
|
||||
buildGoModule rec {
|
||||
pname = "vultr-cli";
|
||||
version = "2.19.0";
|
||||
version = "2.20.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "vultr";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-RLJtDzG3dKaJkppJO/cAggvgB9egCxCWd1mbQ91KPuY=";
|
||||
hash = "sha256-3Zd507yAymmQRgybm96VD413kId0/kMxIHbmUh8j6Kk=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-lVZcmqEC4InZr2zcgI4WVg6Pl3Cv/crTWuLSnqY3Vyk=";
|
||||
vendorHash = "sha256-OVoOCExAU6cDyWhSpk4hkhBZpWehH+4/vU/X81w9XgA=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, cmake
|
||||
, directx-shader-compiler
|
||||
, libGLU
|
||||
|
@ -26,6 +27,12 @@ stdenv.mkDerivation rec {
|
|||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = fetchpatch {
|
||||
name = "replace-HLSL-ternary-operators.patch";
|
||||
url = "https://github.com/RobertBeckebans/RBDOOM-3-BFG/commit/feffa4a4dd9a2a5f3c608f720cde41bea37797d3.patch";
|
||||
hash = "sha256-aR1eoWZL3+ps7P7yFXFvGsMFxpUSBDiyBsja/ISin4I=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace neo/extern/nvrhi/tools/shaderCompiler/CMakeLists.txt \
|
||||
--replace "AppleClang" "Clang"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
}:
|
||||
|
||||
let
|
||||
version = "0.86.0";
|
||||
version = "0.87.0";
|
||||
in
|
||||
|
||||
rustPlatform.buildRustPackage {
|
||||
|
@ -33,10 +33,10 @@ rustPlatform.buildRustPackage {
|
|||
owner = "nushell";
|
||||
repo = "nushell";
|
||||
rev = version;
|
||||
hash = "sha256-jUZKqsu0/RO4mc+hzjis1mNrohj1JzM17Z8e2Ggxlfs=";
|
||||
hash = "sha256-anIkIVRsJW2f2hj/Bz9lcw1vFoWhGHAE/XgIvnxbJg8=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-WDGhuc2ZGDwfh7X/oRTZLzmKPj1jSnQFL4sy7KYt5Js=";
|
||||
cargoHash = "sha256-vwOAYigKItd2T/ze5H26cMfIssoAnt0XFQtfA8exLyM=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ]
|
||||
++ lib.optionals (withDefaultFeatures && stdenv.isLinux) [ python3 ]
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "nu_scripts";
|
||||
version = "unstable-2023-10-19";
|
||||
version = "unstable-2023-10-31";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "nushell";
|
||||
repo = pname;
|
||||
rev = "7b2856ddff8afac538d826df4abc08325c4be39d";
|
||||
hash = "sha256-9OFKtaADDV5I5Yu0sCfQABAmf8yqwX2QwDhPPkh5BEo=";
|
||||
rev = "c2bb125a6790bef1e448680e077345c4d10dcb12";
|
||||
hash = "sha256-Sug07QTL7fxxQAf9YOprMNEQSDqeXEk7qt1g2dP0Eqk=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
rustPlatform.buildRustPackage rec {
|
||||
pname = "nushell_plugin_formats";
|
||||
inherit (nushell) version src;
|
||||
cargoHash = "sha256-Nuo+i1j2l5p3p1hFWipSk0EqZiR+9ZsQyTl3YmyBk+0=";
|
||||
cargoHash = "sha256-fpqXXgvTuRnU4NkJ/B4m3VTkeujE7sMWOma4KEvlxYw=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ IOKit Foundation ];
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
rustPlatform.buildRustPackage rec {
|
||||
pname = "nushell_plugin_gstat";
|
||||
inherit (nushell) version src;
|
||||
cargoHash = "sha256-GIIY4wK85igsfkwEiQ2+jJQTv5qekqx4y+OG0yt8TgE=";
|
||||
cargoHash = "sha256-o/cOHlwo2TBlO+e6DBBKf5x6bgVGozVNMGRb2nCWPT4=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
rustPlatform.buildRustPackage {
|
||||
pname = "nushell_plugin_query";
|
||||
inherit (nushell) version src;
|
||||
cargoHash = "sha256-l32TKBM01JAiUqhkxPsg76dodirZ/NuGn6/KKgHKS8I=";
|
||||
cargoHash = "sha256-seqr4FZHg/f/8iMwSurJRKr41pUbKKti6H2z/JfYkuU=";
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ IOKit CoreFoundation ];
|
||||
cargoBuildFlags = [ "--package nu_plugin_query" ];
|
||||
|
|
|
@ -32,6 +32,7 @@ runCommand "google-cloud-sdk-${google-cloud-sdk.version}"
|
|||
passAsFile = [ "comps" ];
|
||||
|
||||
doInstallCheck = true;
|
||||
disallowedRequisites = [ google-cloud-sdk ];
|
||||
installCheckPhase =
|
||||
let
|
||||
compNames = builtins.map (drv: drv.name) comps_;
|
||||
|
@ -57,5 +58,5 @@ runCommand "google-cloud-sdk-${google-cloud-sdk.version}"
|
|||
done
|
||||
|
||||
# Replace references to the original google-cloud-sdk with this one
|
||||
find $out/google-cloud-sdk/bin/ -type f -exec sed -i -e "s#${google-cloud-sdk}#$out#" {} \;
|
||||
find $out/google-cloud-sdk -type f -exec sed -i -e "s#${google-cloud-sdk}#$out#" {} \;
|
||||
''
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
buildGoModule rec {
|
||||
pname = "syft";
|
||||
version = "0.93.0";
|
||||
version = "0.96.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "anchore";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-e8d+CK7rRbyHeRHOjK3tGFIBHuosdV4AMetUQar54E4=";
|
||||
hash = "sha256-jvX7gUQX6yhk9pV2Rh66Gy6XUQN/XY5jxUYs5RfEL7s=";
|
||||
# populate values that require us to use git. By doing this in postFetch we
|
||||
# can delete .git afterwards and maintain better reproducibility of the src.
|
||||
leaveDotGit = true;
|
||||
|
@ -22,7 +22,7 @@ buildGoModule rec {
|
|||
};
|
||||
# hash mismatch with darwin
|
||||
proxyVendor = true;
|
||||
vendorHash = "sha256-BUCe2v80tHAqMBwa6xae3ZOTOok8msM6hFh6d9D4xZA=";
|
||||
vendorHash = "sha256-79m0KQ8sLodWY2LMKNdZxKZbiBBOAv6f8eLOKhrCSdU=";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, buildGoModule
|
||||
, buildGo120Module
|
||||
, git
|
||||
, nodejs
|
||||
, protobuf
|
||||
|
@ -25,7 +25,7 @@
|
|||
, CoreFoundation
|
||||
}:
|
||||
let
|
||||
version = "1.10.13";
|
||||
version = "1.10.16";
|
||||
src = fetchFromGitHub {
|
||||
owner = "vercel";
|
||||
repo = "turbo";
|
||||
|
@ -38,7 +38,7 @@ let
|
|||
inherit src version;
|
||||
cargoBuildFlags = [ "--package" "turborepo-ffi" ];
|
||||
|
||||
cargoHash = "sha256-CIKuW8qKJiqgDBPfuCIBcWUP41BHwAa1m9vmcQ9ZmAY=";
|
||||
cargoHash = "sha256-Mj46yNOYTqt732d7SJ3sAeXbgDkoh7o7S23lKVgpvKY=";
|
||||
|
||||
RUSTC_BOOTSTRAP = 1;
|
||||
nativeBuildInputs = [
|
||||
|
@ -59,7 +59,7 @@ let
|
|||
};
|
||||
|
||||
|
||||
go-turbo = buildGoModule {
|
||||
go-turbo = buildGo120Module {
|
||||
inherit src version;
|
||||
pname = "go-turbo";
|
||||
modRoot = "cli";
|
||||
|
@ -139,7 +139,7 @@ rustPlatform.buildRustPackage {
|
|||
];
|
||||
RELEASE_TURBO_CLI = "true";
|
||||
|
||||
cargoHash = "sha256-rKdonANA6WvXPMpK8sC95hsX9Yb5zedeBezY4LWzsZE=";
|
||||
cargoHash = "sha256-F+mEDkP7GismosXj+ICJCE4SHhCpWK7FiSyqjJM6LJ4=";
|
||||
|
||||
RUSTC_BOOTSTRAP = 1;
|
||||
nativeBuildInputs = [
|
||||
|
|
4166
pkgs/tools/typesetting/typst-preview/Cargo.lock
generated
Normal file
4166
pkgs/tools/typesetting/typst-preview/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
73
pkgs/tools/typesetting/typst-preview/default.nix
Normal file
73
pkgs/tools/typesetting/typst-preview/default.nix
Normal file
|
@ -0,0 +1,73 @@
|
|||
{ lib, fetchFromGitHub, rustPlatform, fetchYarnDeps, mkYarnPackage, darwin
|
||||
, stdenv }:
|
||||
|
||||
let
|
||||
name = "typst-preview";
|
||||
version = "0.9.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "Enter-tainer";
|
||||
repo = name;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-r/zDvfMvfvZqa3Xkzk70tIEyhc5LDwqc2A5MUuK2xC0=";
|
||||
};
|
||||
frontendSrc = "${src}/addons/frontend";
|
||||
frontend = mkYarnPackage rec {
|
||||
inherit version;
|
||||
pname = "${name}-frontend";
|
||||
src = frontendSrc;
|
||||
packageJSON = ./package.json;
|
||||
|
||||
offlineCache = fetchYarnDeps {
|
||||
yarnLock = "${frontendSrc}/yarn.lock";
|
||||
hash = "sha256-7a7/UOfau84nLIAKj6Tn9rTUmeBJ7rYDFAdr55ZDLgA=";
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
yarn --offline build
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
cp -R deps/${pname}/dist $out
|
||||
runHook postInstall
|
||||
'';
|
||||
doDist = false;
|
||||
};
|
||||
|
||||
in rustPlatform.buildRustPackage rec {
|
||||
|
||||
pname = name;
|
||||
inherit version src;
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin
|
||||
(with darwin.apple_sdk.frameworks; [
|
||||
Security
|
||||
SystemConfiguration
|
||||
CoreServices
|
||||
]);
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"hayagriva-0.4.0" = "sha256-377lXL3+TO8U91OopMYEI0NrWWwzy6+O7B65bLhP+X4=";
|
||||
"typst-0.9.0" = "sha256-+rnsUSGi3QZlbC4i8racsM4U6+l8oA9YjjUOtQAIWOk=";
|
||||
"typst-ts-compiler-0.4.0-rc9" =
|
||||
"sha256-NVmbAodDRJBJlGGDRjaEcTHGoCeN4hNjIynIDKqvNbM=";
|
||||
};
|
||||
};
|
||||
|
||||
prePatch = ''
|
||||
mkdir -p addons/vscode/out/frontend
|
||||
cp -R ${frontend}/* addons/vscode/out/frontend/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Preview your Typst files in vscode";
|
||||
homepage = "https://github.com/Enter-tainer/typse-preview";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ berberman ];
|
||||
mainProgram = "typst-preview";
|
||||
};
|
||||
}
|
26
pkgs/tools/typesetting/typst-preview/package.json
Normal file
26
pkgs/tools/typesetting/typst-preview/package.json
Normal file
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"name": "typst-preview-frontend",
|
||||
"private": true,
|
||||
"version": "0.0.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc && vite build",
|
||||
"preview": "vite preview",
|
||||
"test": "vitest",
|
||||
"coverage": "vitest run --coverage",
|
||||
"link:local": "yarn link @myriaddreamin/typst.ts @myriaddreamin/typst-ts-renderer"
|
||||
},
|
||||
"dependencies": {
|
||||
"@myriaddreamin/typst-ts-renderer": "0.4.0-rc11",
|
||||
"@myriaddreamin/typst.ts": "0.4.0-rc11",
|
||||
"rxjs": "^7.8.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.0.2",
|
||||
"vite": "^4.3.9",
|
||||
"vite-plugin-singlefile": "^0.13.5",
|
||||
"vite-plugin-wasm": "^3.2.2",
|
||||
"vitest": "^0.32.2"
|
||||
}
|
||||
}
|
|
@ -14245,6 +14245,8 @@ with pkgs;
|
|||
|
||||
typst-live = callPackage ../tools/typesetting/typst-live { };
|
||||
|
||||
typst-preview = callPackage ../tools/typesetting/typst-preview { };
|
||||
|
||||
tz = callPackage ../tools/misc/tz { };
|
||||
|
||||
u9fs = callPackage ../servers/u9fs { };
|
||||
|
@ -24410,9 +24412,10 @@ with pkgs;
|
|||
|
||||
inherit (callPackages ../development/libraries/libressl { })
|
||||
libressl_3_6
|
||||
libressl_3_7;
|
||||
libressl_3_7
|
||||
libressl_3_8;
|
||||
|
||||
libressl = libressl_3_7;
|
||||
libressl = libressl_3_8;
|
||||
|
||||
boringssl = callPackage ../development/libraries/boringssl { };
|
||||
|
||||
|
|
Loading…
Reference in a new issue