Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2023-02-18 00:02:56 +00:00 committed by GitHub
commit c466fa7ff4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
28 changed files with 294 additions and 127 deletions

View File

@ -0,0 +1,43 @@
# Developing the NixOS Test Driver {#chap-developing-the-test-driver}
The NixOS test framework is a project of its own.
It consists of roughly the following components:
- `nixos/lib/test-driver`: The Python framework that sets up the test and runs the [`testScript`](#test-opt-testScript)
- `nixos/lib/testing`: The Nix code responsible for the wiring, written using the (NixOS) Module System.
These components are exposed publicly through:
- `nixos/lib/default.nix`: The public interface that exposes the `nixos/lib/testing` entrypoint.
- `flake.nix`: Exposes the `lib.nixos`, including the public test interface.
Beyond the test driver itself, its integration into NixOS and Nixpkgs is important.
- `pkgs/top-level/all-packages.nix`: Defines the `nixosTests` attribute, used
by the package `tests` attributes and OfBorg.
- `nixos/release.nix`: Defines the `tests` attribute built by Hydra, independently, but analogous to `nixosTests`
- `nixos/release-combined.nix`: Defines which tests are channel blockers.
Finally, we have legacy entrypoints that users should move away from, but are cared for on a best effort basis.
These include `pkgs.nixosTest`, `testing-python.nix` and `make-test-python.nix`.
## Testing changes to the test framework {#sec-test-the-test-framework}
When making significant changes to the test framework, we run the tests on Hydra, to avoid disrupting the larger NixOS project.
For this, we use the `python-test-refactoring` branch in the `NixOS/nixpkgs` repository, and its [corresponding Hydra jobset](https://hydra.nixos.org/jobset/nixos/python-test-refactoring).
This branch is used as a pointer, and not as a feature branch.
1. Rebase the PR onto a recent, good evaluation of `nixos-unstable`
2. Create a baseline evaluation by force-pushing this revision of `nixos-unstable` to `python-test-refactoring`.
3. Note the evaluation number (we'll call it `<previous>`)
4. Push the PR to `python-test-refactoring` and evaluate the PR on Hydra
5. Create a comparison URL by navigating to the latest build of the PR and adding to the URL `?compare=<previous>`. This is not necessary for the evaluation that comes right after the baseline.
Review the removed tests and newly failed tests using the constructed URL; otherwise you will accidentally compare iterations of the PR instead of changes to the PR base.
As we currently have some flaky tests, newly failing tests are expected, but should be reviewed to make sure that
- The number of failures did not increase significantly.
- All failures that do occur can reasonably be assumed to fail for a different reason than the changes.

View File

@ -10,5 +10,6 @@ bootspec.chapter.md
what-happens-during-a-system-switch.chapter.md
writing-documentation.chapter.md
nixos-tests.chapter.md
developing-the-test-driver.chapter.md
testing-installer.chapter.md
```

View File

@ -22,7 +22,7 @@ in
};
timeout = lib.mkOption {
type = types.nullOr types.int;
default = null; # NOTE: null values are filtered out by `meta`.
default = 3600; # 1 hour
description = mdDoc ''
The [{option}`test`](#test-opt-test)'s [`meta.timeout`](https://nixos.org/manual/nixpkgs/stable/#var-meta-timeout) in seconds.
'';

View File

@ -8,19 +8,9 @@ let
keyboard = {
options = {
devices = mkOption {
type = types.addCheck (types.listOf types.str)
(devices: (length devices) > 0);
type = types.listOf types.str;
example = [ "/dev/input/by-id/usb-0000_0000-event-kbd" ];
# TODO replace note with tip, which has not been implemented yet in
# nixos/lib/make-options-doc/mergeJSON.py
description = mdDoc ''
Paths to keyboard devices.
::: {.note}
To avoid unnecessary triggers of the service unit, unplug devices in
the order of the list.
:::
'';
description = mdDoc "Paths to keyboard devices.";
};
config = mkOption {
type = types.lines;
@ -44,8 +34,10 @@ let
cap (tap-hold 100 100 caps lctl))
'';
description = mdDoc ''
Configuration other than `defcfg`. See [example config
files](https://github.com/jtroo/kanata) for more information.
Configuration other than `defcfg`.
See [example config files](https://github.com/jtroo/kanata)
for more information.
'';
};
extraDefCfg = mkOption {
@ -53,8 +45,12 @@ let
default = "";
example = "danger-enable-cmd yes";
description = mdDoc ''
Configuration of `defcfg` other than `linux-dev`. See [example
config files](https://github.com/jtroo/kanata) for more information.
Configuration of `defcfg` other than `linux-dev` (generated
from the devices option) and
`linux-continue-if-no-devs-found` (hardcoded to be yes).
See [example config files](https://github.com/jtroo/kanata)
for more information.
'';
};
extraArgs = mkOption {
@ -67,8 +63,7 @@ let
default = null;
example = 6666;
description = mdDoc ''
Port to run the notification server on. `null` will not run the
server.
Port to run the TCP server on. `null` will not run the server.
'';
};
};
@ -76,28 +71,23 @@ let
mkName = name: "kanata-${name}";
mkDevices = devices: concatStringsSep ":" devices;
mkDevices = devices:
optionalString ((length devices) > 0) "linux-dev ${concatStringsSep ":" devices}";
mkConfig = name: keyboard: pkgs.writeText "${mkName name}-config.kdb" ''
(defcfg
${keyboard.extraDefCfg}
linux-dev ${mkDevices keyboard.devices})
${mkDevices keyboard.devices}
linux-continue-if-no-devs-found yes)
${keyboard.config}
'';
mkService = name: keyboard: nameValuePair (mkName name) {
description = "kanata for ${mkDevices keyboard.devices}";
# Because path units are used to activate service units, which
# will start the old stopped services during "nixos-rebuild
# switch", stopIfChanged here is a workaround to make sure new
# services are running after "nixos-rebuild switch".
stopIfChanged = false;
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = ''
${cfg.package}/bin/kanata \
${getExe cfg.package} \
--cfg ${mkConfig name keyboard} \
--symlink-path ''${RUNTIME_DIRECTORY}/${name} \
${optionalString (keyboard.port != null) "--port ${toString keyboard.port}"} \
@ -146,37 +136,10 @@ let
UMask = "0077";
};
};
mkPathName = i: name: "${mkName name}-${toString i}";
mkPath = name: n: i: device:
nameValuePair (mkPathName i name) {
description =
"${toString (i+1)}/${toString n} kanata trigger for ${name}, watching ${device}";
wantedBy = optional (i == 0) "multi-user.target";
pathConfig = {
PathExists = device;
# (ab)use systemd.path to construct a trigger chain so that the
# service unit is only started when all paths exist
# however, manual of systemd.path says Unit's suffix is not ".path"
Unit =
if (i + 1) == n
then "${mkName name}.service"
else "${mkPathName (i + 1) name}.path";
};
unitConfig.StopPropagatedFrom = optional (i > 0) "${mkName name}.service";
};
mkPaths = name: keyboard:
let
n = length keyboard.devices;
in
imap0 (mkPath name n) keyboard.devices
;
in
{
options.services.kanata = {
enable = mkEnableOption (lib.mdDoc "kanata");
enable = mkEnableOption (mdDoc "kanata");
package = mkOption {
type = types.package;
default = pkgs.kanata;
@ -201,14 +164,7 @@ in
config = mkIf cfg.enable {
hardware.uinput.enable = true;
systemd = {
paths = trivial.pipe cfg.keyboards [
(mapAttrsToList mkPaths)
concatLists
listToAttrs
];
services = mapAttrs' mkService cfg.keyboards;
};
systemd.services = mapAttrs' mkService cfg.keyboards;
};
meta.maintainers = with maintainers; [ linj ];

View File

@ -223,22 +223,59 @@ in {
'';
};
ensureAccounts = mkOption {
type = types.listOf types.str;
default = [];
description = lib.mdDoc ''
List of IMAP accounts which get automatically created. Note that for
a complete setup, user credentials for these accounts are required too
and can be created using the command `maddyctl creds`.
This option does not delete accounts which are not (anymore) listed.
'';
example = [
"user1@localhost"
"user2@localhost"
];
};
};
};
config = mkIf cfg.enable {
systemd = {
packages = [ pkgs.maddy ];
services.maddy = {
serviceConfig = {
User = cfg.user;
Group = cfg.group;
StateDirectory = [ "maddy" ];
services = {
maddy = {
serviceConfig = {
User = cfg.user;
Group = cfg.group;
StateDirectory = [ "maddy" ];
};
restartTriggers = [ config.environment.etc."maddy/maddy.conf".source ];
wantedBy = [ "multi-user.target" ];
};
restartTriggers = [ config.environment.etc."maddy/maddy.conf".source ];
wantedBy = [ "multi-user.target" ];
maddy-ensure-accounts = {
script = ''
${optionalString (cfg.ensureAccounts != []) ''
${concatMapStrings (account: ''
if ! ${pkgs.maddy}/bin/maddyctl imap-acct list | grep "${account}"; then
${pkgs.maddy}/bin/maddyctl imap-acct create ${account}
fi
'') cfg.ensureAccounts}
''}
'';
serviceConfig = {
Type = "oneshot";
User= "maddy";
};
after = [ "maddy.service" ];
wantedBy = [ "multi-user.target" ];
};
};
};
environment.etc."maddy/maddy.conf" = {

View File

@ -163,7 +163,7 @@ in
###### implementation
config = mkIf cfg.enable (mkMerge [{
boot.kernelModules = [ "bridge" "veth" ];
boot.kernelModules = [ "bridge" "veth" "br_netfilter" "xt_nat" ];
boot.kernel.sysctl = {
"net.ipv4.conf.all.forwarding" = mkOverride 98 true;
"net.ipv4.conf.default.forwarding" = mkOverride 98 true;

View File

@ -9,6 +9,7 @@ import ./make-test-python.nix ({ pkgs, ... }: {
hostname = "server";
primaryDomain = "server";
openFirewall = true;
ensureAccounts = [ "postmaster@server" ];
};
};
@ -50,7 +51,6 @@ import ./make-test-python.nix ({ pkgs, ... }: {
server.wait_for_open_port(587)
server.succeed("maddyctl creds create --password test postmaster@server")
server.succeed("maddyctl imap-acct create postmaster@server")
client.succeed("send-testmail")
client.succeed("test-imap")

View File

@ -1,6 +1,6 @@
import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "pass-secret-service";
meta.maintainers = with lib; [ aidalgol ];
meta.maintainers = [ lib.maintainers.aidalgol ];
nodes.machine = { nodes, pkgs, ... }:
{

View File

@ -1,4 +1,4 @@
import ./make-test-python.nix ({ pkgs, ...} :
import ./make-test-python.nix ({ pkgs, lib, ...} :
let
@ -11,9 +11,9 @@ let
};
# Only allow the demo data to be used (only if it's unfreeRedistributable).
unfreePredicate = pkg: with pkgs.lib; let
unfreePredicate = pkg: with lib; let
allowPackageNames = [ "quake3-demodata" "quake3-pointrelease" ];
allowLicenses = [ pkgs.lib.licenses.unfreeRedistributable ];
allowLicenses = [ lib.licenses.unfreeRedistributable ];
in elem pkg.pname allowPackageNames &&
elem (pkg.meta.license or null) allowLicenses;
@ -31,7 +31,7 @@ in
rec {
name = "quake3";
meta = with pkgs.stdenv.lib.maintainers; {
meta = with lib.maintainers; {
maintainers = [ domenkozar eelco ];
};

View File

@ -28,6 +28,6 @@ appimageTools.wrapType2 rec {
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
mainProgram = "protonup-qt";
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ ];
maintainers = with maintainers; [ michaelBelsanti ];
};
}

View File

@ -1,6 +1,6 @@
{ lib
, buildGoModule
, buildGo119Module
, buildGo120Module
, fetchFromGitHub
, nixosTests
}:
@ -47,24 +47,24 @@ rec {
nomad = nomad_1_4;
nomad_1_2 = generic {
buildGoModule = buildGo119Module;
version = "1.2.15";
sha256 = "sha256-p9yRjSapQAhuHv+slUmYI25bUb1N1A7LBiJOdk1++iI=";
vendorSha256 = "sha256-6d3tE337zVAIkzQzAnV2Ya5xwwhuzmKgtPUJcJ9HRto=";
buildGoModule = buildGo120Module;
version = "1.2.16";
sha256 = "sha256-fhfUpcG91EgIzJ4mCS7geyIJyTSHS2e8t4yYiI3PqpQ=";
vendorSha256 = "sha256-kwCDsGFw+25Mimgt/cTK/Z2H7Qh5n4rjr3kIBvjcPL8=";
};
nomad_1_3 = generic {
buildGoModule = buildGo119Module;
version = "1.3.8";
sha256 = "sha256-hUmDWgGV8HAXew8SpcbhaiaF9VfBN5mk1W7t5lhnZ9I=";
vendorSha256 = "sha256-IfYobyDFriOldJnNfRK0QVKBfttoZZ1iOkt4cBQxd00=";
buildGoModule = buildGo120Module;
version = "1.3.9";
sha256 = "sha256-xfoIzLDG/OfqAPQqeLvQZ11uESWFNyOyLP6Imi+S96w=";
vendorSha256 = "sha256-kW0goicoM1lM1NEHPTfozg2EKR1daf33UxT/mVabyfY=";
};
nomad_1_4 = generic {
buildGoModule = buildGo119Module;
version = "1.4.3";
sha256 = "sha256-GQVfrn9VlzfdIj73W3hBpHcevsXZcb6Uj808HUCZUUg=";
vendorSha256 = "sha256-JQRpsQhq5r/QcgFwtnptmvnjBEhdCFrXFrTKkJioL3A=";
buildGoModule = buildGo120Module;
version = "1.4.4";
sha256 = "sha256-mAimuWolTJ3lMY/ArnLZFu+GZv9ADdGsriXsTcEgdYc=";
vendorSha256 = "sha256-QtP7pzsIBd2S79AUcbOeVG71Mb5qK706rq5DkT41VqM=";
passthru.tests.nomad = nixosTests.nomad;
};
}

View File

@ -45,7 +45,7 @@ stdenvNoCC.mkDerivation (attrs // {
installPhase = attrs.installPhase or ''
runHook preInstall
mix deps.get ''${mixEnv:+--only $mixEnv}
mix deps.get ''${MIX_ENV:+--only $MIX_ENV}
find "$TEMPDIR/deps" -path '*/.git/*' -a ! -name HEAD -exec rm -rf {} +
cp -r --no-preserve=mode,ownership,timestamps $TEMPDIR/deps $out
runHook postInstall

View File

@ -25,10 +25,8 @@ stdenv.mkDerivation rec {
buildInputs = [ hwdata ];
prePatch = ''
substituteInPlace meson.build \
--replace "find_program('tool/gen-search-table.py')" "find_program('python3')" \
--replace "gen_search_table," "gen_search_table, '$src/tool/gen-search-table.py',"
postPatch = ''
patchShebangs tool/gen-search-table.py
'';
meta = with lib; {

View File

@ -12,7 +12,7 @@
buildPythonPackage rec {
pname = "griffe";
version = "0.25.4";
version = "0.25.5";
format = "pyproject";
disabled = pythonOlder "3.7";
@ -21,7 +21,7 @@ buildPythonPackage rec {
owner = "mkdocstrings";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-AZZhwHtVhdHkztzr/Hdi63VC5CjK2Vz8h8zizmSUdNY=";
hash = "sha256-0+n5v93ERcQDKNtXxSZYfCUMTRzcbtQEXl023KSxfrE=";
};
postPatch = ''

View File

@ -12,7 +12,7 @@
buildPythonPackage rec {
pname = "pydeconz";
version = "106";
version = "107";
format = "setuptools";
disabled = pythonOlder "3.9";
@ -21,7 +21,7 @@ buildPythonPackage rec {
owner = "Kane610";
repo = "deconz";
rev = "refs/tags/v${version}";
hash = "sha256-13of5ohz/hezlmGvSNqCu9QoOPKdPPtrhQHbxmG2/Do=";
hash = "sha256-5NR+N2UoWvzD/y1kP08qOS2djMsLIwLDuaIBmt0AV/s=";
};
propagatedBuildInputs = [
@ -43,6 +43,7 @@ buildPythonPackage rec {
meta = with lib; {
description = "Python library wrapping the Deconz REST API";
homepage = "https://github.com/Kane610/deconz";
changelog = "https://github.com/Kane610/deconz/releases/tag/v${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};

View File

@ -6,11 +6,11 @@
buildPythonPackage rec {
pname = "pyfido";
version = "2.1.1";
version = "2.1.2";
src = fetchPypi {
inherit pname version;
sha256 = "0b28bhyhscaw7dbc92dxswann05x8mz92cagyawdfm8jnc67gq4b";
sha256 = "sha256-hh2g46GVCkiMHElEP6McY8FdzGNzZV7pgA5DQhodP20=";
};
propagatedBuildInputs = [ aiohttp ];

View File

@ -10,14 +10,14 @@
buildPythonPackage rec {
pname = "python-ipmi";
version = "0.5.3";
version = "0.5.4";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "kontron";
repo = pname;
rev = version;
sha256 = "sha256-Y8HJ7MXYHJRUWPTcw8p+GGSFswuRI7u+/bIaJpKy7lY=";
sha256 = "sha256-IXEq3d1nXGEndciQw2MJ1Abc0vmEYez+k6aWGSWEzWA=";
};
propagatedBuildInputs = [

View File

@ -20,11 +20,11 @@
buildPythonPackage rec {
pname = "python-ironicclient";
version = "5.0.1";
version = "5.1.0";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-7RawbJ5O5KCruD499fOkuFcouBzp3f7aEUnE37wJqmM=";
sha256 = "sha256-yYmzZuwZSasN6g6Bosivexe5oOy3dP+l/cD5TkXC87g=";
};
propagatedBuildInputs = [

View File

@ -21,7 +21,7 @@
buildPythonPackage rec {
pname = "slack-sdk";
version = "3.19.5";
version = "3.20.0";
format = "setuptools";
disabled = pythonOlder "3.6";
@ -30,7 +30,7 @@ buildPythonPackage rec {
owner = "slackapi";
repo = "python-slack-sdk";
rev = "refs/tags/v${version}";
hash = "sha256-/DVcnfHjvmRreHSlZbzxz6pbqytEUdqbaGbQVxIW4Qk=";
hash = "sha256-NlUmoOlRV7h7d553uX2tAWi2aWCAqpHflSUrdZxlaws=";
};
propagatedBuildInputs = [

View File

@ -104,7 +104,7 @@ buildPythonPackage rec {
# Set BOKEH_CDN_VERSION to stop bokeh throwing an exception in tests
preCheck = ''
export HOME=$(mktemp -d)
export BOKEH_CDN_VERSION=3.0.3
export BOKEH_CDN_VERSION=${bokeh.version}
'';
pythonRelaxDeps = [ "protobuf" ];

View File

@ -10,16 +10,16 @@
buildPythonPackage rec {
pname = "weconnect-mqtt";
version = "0.41.1";
version = "0.42.0";
format = "setuptools";
disabled = pythonOlder "3.7";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "tillsteinbach";
repo = "WeConnect-mqtt";
rev = "refs/tags/v${version}";
hash = "sha256-RYxfz5uBWV1HLbcIK1N/glJv2w0nfPLBPyM2b7HuDIY=";
hash = "sha256-jxfV2RDyGLugnPae+uNtg/GBsWbKCSbKxuHll10guhU=";
};
propagatedBuildInputs = [

View File

@ -12,16 +12,16 @@
buildPythonPackage rec {
pname = "weconnect";
version = "0.50.1";
version = "0.52.0";
format = "setuptools";
disabled = pythonOlder "3.7";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "tillsteinbach";
repo = "WeConnect-python";
rev = "refs/tags/v${version}";
hash = "sha256-KYGNtUJXpY1UrRbUxr71EHxLCR6WixTAk+ybkfqB3Ps=";
hash = "sha256-SfdN/em4NrzNeItcaVuyOcUxmE50n5/jjmY4I5hfpQI=";
};
propagatedBuildInputs = [
@ -48,7 +48,7 @@ buildPythonPackage rec {
--replace "setup_requires=SETUP_REQUIRED," "setup_requires=[]," \
--replace "tests_require=TEST_REQUIRED," "tests_require=[],"
substituteInPlace image_extra_requirements.txt \
--replace "pillow~=9.3.0" "pillow"
--replace "pillow~=9.4.0" "pillow"
substituteInPlace pytest.ini \
--replace "--cov=weconnect --cov-config=.coveragerc --cov-report html" "" \
--replace "pytest-cov" ""

View File

@ -9,24 +9,25 @@
buildPythonPackage rec {
pname = "z3c-checkversions";
version = "1.2";
version = "2.0";
src = fetchPypi {
inherit version;
pname = "z3c.checkversions";
sha256 = "94c7ab0810ee6fdb66a4689b48e537b57e2dbee277cb1de2ece7a7f4d8c83001";
hash = "sha256-rn4kl8Pn6YNqbE+VD6L8rVBQHkQqXSD47ZIy77+ashE=";
};
propagatedBuildInputs = [ zc-buildout ];
nativeCheckInputs = [ zope_testrunner ];
doCheck = !python.pkgs.isPy27;
checkPhase = ''
${python.interpreter} -m zope.testrunner --test-path=src []
'';
meta = with lib; {
broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin;
homepage = "https://github.com/zopefoundation/z3c.checkversions";
changelog = "https://github.com/zopefoundation/z3c.checkversions/blob/${version}/CHANGES.rst";
description = "Find newer package versions on PyPI";
license = licenses.zpl21;
};

View File

@ -15,7 +15,7 @@ rustPlatform.buildRustPackage rec {
description = "Quickly get ANSI escape sequences";
longDescription = ''
CLI utility called "ansi" to quickly get ANSI escape sequences. Supports
the colors and styles, such as bold or italic.";
the colors and styles, such as bold or italic.
'';
homepage = "https://github.com/phip1611/ansi-escape-sequences-cli";
license = with licenses; [ mit ];

View File

@ -12,16 +12,16 @@
# server, and the FHS userenv and corresponding NixOS module should
# automatically pick up the changes.
stdenv.mkDerivation rec {
version = "1.30.2.6563-3d4dc0cce";
version = "1.31.0.6654-02189b09f";
pname = "plexmediaserver";
# Fetch the source
src = if stdenv.hostPlatform.system == "aarch64-linux" then fetchurl {
url = "https://downloads.plex.tv/plex-media-server-new/${version}/debian/plexmediaserver_${version}_arm64.deb";
sha256 = "0sz6xc484flh1cnlrvwin7x34bl118yy2mwj034f8p9ngiy5hrkw";
sha256 = "sha256-ttkvYD+ALxfZpQutI1VyTbmQi/7hmvZ+YMUv3lskeWU=";
} else fetchurl {
url = "https://downloads.plex.tv/plex-media-server-new/${version}/debian/plexmediaserver_${version}_amd64.deb";
sha256 = "0ymxfy3s9nygv9syiy2bdwmjfqg8m4i5n8c37z1ib6393iwj8mgi";
sha256 = "sha256-TTEcyIBFiuJTNHeJ9wu+4o2ol72oCvM9FdDPC83J3Mc=";
};
outputs = [ "out" "basedb" ];

View File

@ -0,0 +1,35 @@
{ lib
, stdenv
, fetchFromGitHub
, libX11
, SDL2
}:
stdenv.mkDerivation rec {
pname = "paperview";
version = "unstable-2020-09-22";
src = fetchFromGitHub {
owner = "glouw";
repo = "paperview";
rev = "40162fb76566fec8163c338c169c2fcd9df6ef42";
hash = "sha256-rvf89vMIT274+Hva+N4KFu1iT2XE6fq5Bi4kOQg2M0g=";
};
buildInputs = [
SDL2
libX11
];
makeFlags = [
"PREFIX=${placeholder "out"}"
];
meta = with lib; {
description = "A high performance X11 animated wallpaper setter";
homepage = "https://github.com/glouw/paperview";
platforms = platforms.linux;
license = with licenses; [ mit ];
maintainers = with maintainers; [ _3JlOy-PYCCKUi ];
};
}

View File

@ -0,0 +1,91 @@
{ lib
, fetchFromGitHub
, buildGoModule
, git
, nodejs
, protobuf
, protoc-gen-go
, protoc-gen-go-grpc
, rustPlatform
, pkg-config
, openssl
, extra-cmake-modules
, fontconfig
, go
}:
let
version = "1.7.0";
src = fetchFromGitHub {
owner = "vercel";
repo = "turbo";
rev = "v${version}";
sha256 = "YTuEv2S3jNV2o7HJML+P6OMazgwgRhUPnd/zaTWfDWs=";
};
go-turbo = buildGoModule rec {
inherit src version;
pname = "go-turbo";
modRoot = "cli";
vendorSha256 = "Kx/CLFv23h2TmGe8Jwu+S3QcONfqeHk2fCW1na75c0s=";
nativeBuildInputs = [
git
nodejs
protobuf
protoc-gen-go
protoc-gen-go-grpc
];
preBuild = ''
make compile-protos
'';
preCheck = ''
# Some tests try to run mkdir $HOME
HOME=$TMP
# Test_getTraversePath requires that source is a git repo
# pwd: /build/source/cli
pushd ..
git config --global init.defaultBranch main
git init
popd
'';
};
in
rustPlatform.buildRustPackage rec {
pname = "turbo";
inherit src version;
cargoBuildFlags = [
"--package"
"turbo"
];
RELEASE_TURBO_CLI = "true";
cargoSha256 = "ENw6NU3Fedd+OJEEWgL8A54aowNqjn3iv7rxlr+/4ZE=";
RUSTC_BOOTSTRAP = 1;
nativeBuildInputs = [
pkg-config
extra-cmake-modules
];
buildInputs = [
openssl
fontconfig
];
postInstall = ''
ln -s ${go-turbo}/bin/turbo $out/bin/go-turbo
'';
# Browser tests time out with chromium and google-chrome
doCheck = false;
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

@ -1536,6 +1536,8 @@ with pkgs;
ocs-url = libsForQt5.callPackage ../tools/misc/ocs-url { };
paperview = callPackage ../tools/X11/paperview { };
pferd = callPackage ../tools/misc/pferd {};
proycon-wayout = callPackage ../tools/wayland/proycon-wayout {};
@ -12804,6 +12806,8 @@ with pkgs;
tuptime = callPackage ../tools/system/tuptime { };
turbo = callPackage ../tools/misc/turbo { };
turses = callPackage ../applications/networking/instant-messengers/turses { };
tutanota-desktop = callPackage ../applications/networking/mailreaders/tutanota-desktop { };