Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2023-02-21 18:01:45 +00:00 committed by GitHub
commit 9acd1eb7fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
61 changed files with 8345 additions and 6452 deletions

View File

@ -337,19 +337,17 @@ rec {
# Helper functions.
/* Convert an option, described as a list of the option parts in to a
safe, human readable version.
/* Convert an option, described as a list of the option parts to a
human-readable version.
Example:
(showOption ["foo" "bar" "baz"]) == "foo.bar.baz"
(showOption ["foo" "bar.baz" "tux"]) == "foo.bar.baz.tux"
(showOption ["foo" "bar.baz" "tux"]) == "foo.\"bar.baz\".tux"
(showOption ["windowManager" "2bwm" "enable"]) == "windowManager.\"2bwm\".enable"
Placeholders will not be quoted as they are not actual values:
(showOption ["foo" "*" "bar"]) == "foo.*.bar"
(showOption ["foo" "<name>" "bar"]) == "foo.<name>.bar"
Unlike attributes, options can also start with numbers:
(showOption ["windowManager" "2bwm" "enable"]) == "windowManager.2bwm.enable"
*/
showOption = parts: let
escapeOptionPart = part:

View File

@ -9198,6 +9198,12 @@
githubId = 952712;
name = "Matt Christ";
};
matthew-levan = {
email = "matthew@coeli.network";
github = "matthew-levan";
githubId = 91502660;
name = "Matthew LeVan";
};
matthewcroughan = {
email = "matt@croughan.sh";
github = "MatthewCroughan";

View File

@ -91,18 +91,24 @@ let
in rec {
inherit optionsNix;
optionsAsciiDoc = pkgs.runCommand "options.adoc" {} ''
${pkgs.python3Minimal}/bin/python ${./generateDoc.py} \
--format asciidoc \
optionsAsciiDoc = pkgs.runCommand "options.adoc" {
nativeBuildInputs = [ pkgs.nixos-render-docs ];
} ''
nixos-render-docs -j $NIX_BUILD_CORES options asciidoc \
--manpage-urls ${pkgs.path + "/doc/manpage-urls.json"} \
--revision ${lib.escapeShellArg revision} \
${optionsJSON}/share/doc/nixos/options.json \
> $out
$out
'';
optionsCommonMark = pkgs.runCommand "options.md" {} ''
${pkgs.python3Minimal}/bin/python ${./generateDoc.py} \
--format commonmark \
optionsCommonMark = pkgs.runCommand "options.md" {
nativeBuildInputs = [ pkgs.nixos-render-docs ];
} ''
nixos-render-docs -j $NIX_BUILD_CORES options commonmark \
--manpage-urls ${pkgs.path + "/doc/manpage-urls.json"} \
--revision ${lib.escapeShellArg revision} \
${optionsJSON}/share/doc/nixos/options.json \
> $out
$out
'';
optionsJSON = pkgs.runCommand "options.json"

View File

@ -1,112 +0,0 @@
import argparse
import json
import sys
formats = ['commonmark', 'asciidoc']
parser = argparse.ArgumentParser(
description = 'Generate documentation for a set of JSON-formatted NixOS options'
)
parser.add_argument(
'nix_options_path',
help = 'a path to a JSON file containing the NixOS options'
)
parser.add_argument(
'-f',
'--format',
choices = formats,
required = True,
help = f'the documentation format to generate'
)
args = parser.parse_args()
class OptionsEncoder(json.JSONEncoder):
def encode(self, obj):
# Unpack literal expressions and other Nix types.
# Don't escape the strings: they were escaped when initially serialized to JSON.
if isinstance(obj, dict):
_type = obj.get('_type')
if _type is not None:
if _type == 'literalExpression' or _type == 'literalDocBook':
return obj['text']
if _type == 'derivation':
return obj['name']
raise Exception(f'Unexpected type `{_type}` in {json.dumps(obj)}')
return super().encode(obj)
def generate_commonmark(options):
for (name, value) in options.items():
print('##', name.replace('<', '&lt;').replace('>', '&gt;'))
print(value['description'])
print()
if 'type' in value:
print('*_Type_*')
print ('```')
print(value['type'])
print ('```')
print()
print()
if 'default' in value:
print('*_Default_*')
print('```')
print(json.dumps(value['default'], cls=OptionsEncoder, ensure_ascii=False, separators=(',', ':')))
print('```')
print()
print()
if 'example' in value:
print('*_Example_*')
print('```')
print(json.dumps(value['example'], cls=OptionsEncoder, ensure_ascii=False, separators=(',', ':')))
print('```')
print()
print()
# TODO: declarations: link to github
def generate_asciidoc(options):
for (name, value) in options.items():
print(f'== {name}')
print()
print(value['description'])
print()
print('[discrete]')
print('=== details')
print()
print(f'Type:: {value["type"]}')
if 'default' in value:
print('Default::')
print('+')
print('----')
print(json.dumps(value['default'], cls=OptionsEncoder, ensure_ascii=False, separators=(',', ':')))
print('----')
print()
else:
print('No Default:: {blank}')
if value['readOnly']:
print('Read Only:: {blank}')
else:
print()
if 'example' in value:
print('Example::')
print('+')
print('----')
print(json.dumps(value['example'], cls=OptionsEncoder, ensure_ascii=False, separators=(',', ':')))
print('----')
print()
else:
print('No Example:: {blank}')
print()
with open(args.nix_options_path) as nix_options_json:
options = json.load(nix_options_json)
if args.format == 'commonmark':
generate_commonmark(options)
elif args.format == 'asciidoc':
generate_asciidoc(options)
else:
raise Exception(f'Unsupported documentation format `--format {args.format}`')

View File

@ -0,0 +1,18 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.hardware.flipperzero;
in
{
options.hardware.flipperzero.enable = mkEnableOption (mdDoc "udev rules and software for Flipper Zero devices");
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.qFlipper ];
services.udev.packages = [ pkgs.qFlipper ];
};
}

View File

@ -53,6 +53,7 @@
./hardware/cpu/intel-sgx.nix
./hardware/device-tree.nix
./hardware/digitalbitbox.nix
./hardware/flipperzero.nix
./hardware/flirc.nix
./hardware/gkraken.nix
./hardware/gpgsmartcards.nix

View File

@ -23,6 +23,9 @@ rustPlatform.buildRustPackage rec {
mkdir -p $out/lib
cp -r runtime $out/lib
installShellCompletion contrib/completion/hx.{bash,fish,zsh}
mkdir -p $out/share/{applications,icons}
cp contrib/Helix.desktop $out/share/applications
cp contrib/helix.png $out/share/icons
'';
postFixup = ''
wrapProgram $out/bin/hx --set HELIX_RUNTIME $out/lib/runtime

File diff suppressed because it is too large Load Diff

View File

@ -1203,12 +1203,12 @@
};
python = buildGrammar {
language = "python";
version = "9e53981";
version = "528855e";
src = fetchFromGitHub {
owner = "tree-sitter";
repo = "tree-sitter-python";
rev = "9e53981ec31b789ee26162ea335de71f02186003";
hash = "sha256-D2++Xg7dRfjGM2r4cxaXGQnBOAX5JBREcEAJeNa7Y9M=";
rev = "528855eee2665210e1bf5556de48b8d8dacb8932";
hash = "sha256-H2RWMbbKIMbfH/TMC5SKbO9qEB9RfFUOYrczwmDdrVo=";
};
meta.homepage = "https://github.com/tree-sitter/tree-sitter-python";
};

View File

@ -20,14 +20,14 @@
stdenv.mkDerivation rec {
pname = "gnome-firmware";
version = "43.1";
version = "43.2";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "World";
repo = "gnome-firmware";
rev = version;
sha256 = "9QS6X1Cm9/wToQ8hnGNn3VytSCpZI8StZ3+vf0/wbAw=";
sha256 = "oplypNSj028cVBn+eJxNm5pJltp7Cw5Oto/L39pI0vA=";
};
nativeBuildInputs = [

View File

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "glooctl";
version = "1.13.6";
version = "1.13.7";
src = fetchFromGitHub {
owner = "solo-io";
repo = "gloo";
rev = "v${version}";
hash = "sha256-CBWKKW5VIkRgl7wY63OCm/CowWHO389se3kEraqaDCI=";
hash = "sha256-npp03e5pAir8t9Ej52fafW7Uk24Y+UOFojaNc2MSkVA=";
};
subPackages = [ "projects/gloo/cli/cmd" ];

View File

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "k9s";
version = "0.27.2";
version = "0.27.3";
src = fetchFromGitHub {
owner = "derailed";
repo = "k9s";
rev = "v${version}";
sha256 = "sha256-9wdc3Wiqry8+q/60Y7mPzH0k4dp1nKIGinxfkYBaHJY=";
sha256 = "sha256-oUn9qQG4rpunfeHgSlY9THkYv1aGWrVmdTZoEWeZJTs=";
};
ldflags = [
@ -20,7 +20,7 @@ buildGoModule rec {
tags = [ "netgo" ];
vendorHash = "sha256-8H7siVl6gXifQOBOLtyCeDbYflhKjaIRmP0KOTWVJk0=";
vendorHash = "sha256-sQ3D4JUK9epRkDZ7DC+IH+iMaLN+uKM2hZkhqji+0Zc=";
# TODO investigate why some config tests are failing
doCheck = !(stdenv.isDarwin && stdenv.isAarch64);

View File

@ -1,7 +1,7 @@
{ branch ? "stable", callPackage, fetchurl, lib, stdenv }:
let
versions = if stdenv.isLinux then {
stable = "0.0.24";
stable = "0.0.25";
ptb = "0.0.38";
canary = "0.0.148";
} else {
@ -14,7 +14,7 @@ let
x86_64-linux = {
stable = fetchurl {
url = "https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz";
sha256 = "sha256-SG+34ft0mTqtg9rFiI60N6JIONyqF8c8SlnRcn5a4Xc=";
sha256 = "sha256-WBcmy9fwGPq3Vs1+7lIOR7OiW/d0kZNIKp4Q5NRYBCw=";
};
ptb = fetchurl {
url = "https://dl-ptb.discordapp.net/apps/linux/${version}/discord-ptb-${version}.tar.gz";

View File

@ -2,12 +2,12 @@
stdenv.mkDerivation rec {
pname = "signal-cli";
version = "0.11.6";
version = "0.11.7";
# Building from source would be preferred, but is much more involved.
src = fetchurl {
url = "https://github.com/AsamK/signal-cli/releases/download/v${version}/signal-cli-${version}-Linux.tar.gz";
hash = "sha256-DWG67Jr2hDas1aL5Q+9MUjNKNLFpOFLsehYbJfy/rzg=";
hash = "sha256-oN80HQkPpJfhM4WBaRm4ytmhLjSokjEpfMhP6/XnQXs=";
};
buildInputs = lib.optionals stdenv.isLinux [ libmatthew_java dbus dbus_java ];

View File

@ -70,13 +70,13 @@ let
in
stdenv.mkDerivation rec {
pname = "freerdp";
version = "2.9.0";
version = "2.10.0";
src = fetchFromGitHub {
owner = "FreeRDP";
repo = "FreeRDP";
rev = version;
sha256 = "sha256-I9xJWHoY8fZ5T9zca77gFciC+7JdD6fMwV16giiY4FU=";
sha256 = "sha256-4sq3LblFRWCBREudtzg+o9wjstm58gPzBq7QAwlWvEg=";
};
postPatch = ''

View File

@ -12,13 +12,13 @@
stdenvNoCC.mkDerivation rec {
pname = "ani-cli";
version = "4.0";
version = "4.1";
src = fetchFromGitHub {
owner = "pystardust";
repo = "ani-cli";
rev = "v${version}";
hash = "sha256-1yhBlQ/abT+/BKEIskgnAh+cmKCzXuS9hu6apaangVk=";
hash = "sha256-8fpOCyv/XafrVy76jtazRoHW2gidjikgnRdaWzh8kY8=";
};
nativeBuildInputs = [ makeWrapper ];

View File

@ -2,11 +2,11 @@
stdenvNoCC.mkDerivation rec {
pname = "andika";
version = "6.101";
version = "6.200";
src = fetchzip {
url = "https://software.sil.org/downloads/r/andika/Andika-${version}.zip";
hash = "sha256-LghkGd/cjuXghzsU9X/YneNIdBeDEnu0ARszipANm8w=";
hash = "sha256-Ge+Yq3+1IJ+mXhjw7Vtpu5DIWiMfwOdEH/S1RSzYh3A=";
};
installPhase = ''

View File

@ -38,11 +38,11 @@
stdenv.mkDerivation rec {
pname = "epiphany";
version = "43.0";
version = "43.1";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.major version}/${pname}-${version}.tar.xz";
sha256 = "tm1Jn57nJpbYPPhEElN3GBqVRVSkuzeFtzKTOArAwic=";
sha256 = "6G6tJ8uZgoFRUGZN478g+vN193uAZbArMRgMZba767Q=";
};
patches = lib.optionals withPantheon [

View File

@ -4,14 +4,14 @@
, installShellFiles
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (self: {
pname = "dxa";
version = "0.1.5";
src = fetchurl {
urls = [
"https://www.floodgap.com/retrotech/xa/dists/${pname}-${version}.tar.gz"
"https://www.floodgap.com/retrotech/xa/dists/unsupported/${pname}-${version}.tar.gz"
"https://www.floodgap.com/retrotech/xa/dists/dxa-${self.version}.tar.gz"
"https://www.floodgap.com/retrotech/xa/dists/unsupported/dxa-${self.version}.tar.gz"
];
hash = "sha256-jkDtd4FlgfmtlaysLtaaL7KseFDkM9Gc1oQZOkWCZ5k=";
};
@ -27,17 +27,18 @@ stdenv.mkDerivation rec {
installPhase = ''
runHook preInstall
install -d $out/bin/
install dxa $out/bin/
install -Dm755 -T dxa $out/bin/dxa
installManPage dxa.1
runHook postInstall
'';
meta = with lib; {
meta = {
homepage = "https://www.floodgap.com/retrotech/xa/";
description = "Andre Fachat's open-source 6502 disassembler";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = with platforms; unix;
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = with lib.platforms; unix;
};
}
})

View File

@ -4,16 +4,16 @@
, perl
}:
stdenv.mkDerivation rec {
stdenv.mkDerivation (self: {
pname = "xa";
version = "2.3.13";
version = "2.3.14";
src = fetchurl {
urls = [
"https://www.floodgap.com/retrotech/xa/dists/${pname}-${version}.tar.gz"
"https://www.floodgap.com/retrotech/xa/dists/unsupported/${pname}-${version}.tar.gz"
"https://www.floodgap.com/retrotech/xa/dists/xa-${self.version}.tar.gz"
"https://www.floodgap.com/retrotech/xa/dists/unsupported/xa-${self.version}.tar.gz"
];
hash = "sha256-qUd68VC2yKkc09QeHPjJ31UtODMmSVV2gwJxykRnvYY=";
hash = "sha256-G5u6vdvY07lBC4UuUKEo7qQeaBM55vdsPoB2+lQg8C4=";
};
nativeCheckInputs = [ perl ];
@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
patchShebangs tests
'';
meta = with lib; {
meta = {
homepage = "https://www.floodgap.com/retrotech/xa/";
description = "Andre Fachat's open-source 6502 cross assembler";
longDescription = ''
@ -62,8 +62,8 @@ stdenv.mkDerivation rec {
suite, as well as "bare" plain binary object files
- block structure for label scoping
'';
license = licenses.gpl2Plus;
maintainers = with maintainers; [ AndersonTorres ];
platforms = with platforms; unix;
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ AndersonTorres ];
platforms = with lib.platforms; unix;
};
}
})

View File

@ -1,46 +0,0 @@
{ lib
, stdenv
, fetchFromGitHub
, buildDotnetModule
, dotnetCorePackages
, stdenvNoCC
, autoPatchelfHook
, openssl
, icu
}:
buildDotnetModule rec {
pname = "python-language-server";
version = "2022-02-18";
src = fetchFromGitHub {
owner = "microsoft";
repo = "python-language-server";
rev = "52c1afd34b5acb0b44597bb8681232876fe94084";
sha256 = "05s8mwi3dqzjghgpr1mfs1b7cgrq818bbj1v7aly6axc8c2n4gny";
};
projectFile = "src/LanguageServer/Impl/Microsoft.Python.LanguageServer.csproj";
nugetDeps = ./deps.nix;
dotnet-sdk = dotnetCorePackages.sdk_3_1;
dotnet-runtime = dotnetCorePackages.runtime_3_1;
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [ stdenv.cc.cc.lib ];
runtimeDeps = [ openssl icu ];
postFixup = ''
mv $out/bin/Microsoft.Python.LanguageServer $out/bin/python-language-server
'';
passthru.updateScript = ./updater.sh;
meta = with lib; {
description = "Microsoft Language Server for Python";
homepage = "https://github.com/microsoft/python-language-server";
license = licenses.asl20;
maintainers = with maintainers; [ thomasjm ];
platforms = [ "x86_64-linux" ];
};
}

View File

@ -1,107 +0,0 @@
# This file was automatically generated by passthru.fetch-deps.
# Please dont edit it manually, your changes might get overwritten!
{ fetchNuGet }: [
(fetchNuGet { pname = "MessagePack"; version = "2.1.90"; sha256 = "1j5wjl7aq7nn5ga3j6zaaivdf2wlfyd7w66ak0i7krgrmv26lb8i"; })
(fetchNuGet { pname = "MessagePack.Annotations"; version = "2.1.90"; sha256 = "08sghhwbz8h7ji9lg0klhwcyndxg6v11pq9jac975sb38samnm11"; })
(fetchNuGet { pname = "MicroBuild.Core"; version = "0.3.0"; sha256 = "190d755l60j3l5m1661wj19gj9w6ngza56q3vkijkkmbbabdmqln"; })
(fetchNuGet { pname = "Microsoft.Bcl.AsyncInterfaces"; version = "1.0.0"; sha256 = "00dx5armvkqjxvkldz3invdlck9nj7w21dlsr2aqp1rqbyrbsbbh"; })
(fetchNuGet { pname = "Microsoft.Extensions.FileSystemGlobbing"; version = "3.1.8"; sha256 = "1v2lr0vbssqayzgxvdwb54jmvz7mvlih4l9h7i71gm3c62nlbq8y"; })
(fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.1.0"; sha256 = "08vh1r12g6ykjygq5d3vq09zylgb84l63k49jc4v8faw9g93iqqm"; })
(fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "1.1.1"; sha256 = "164wycgng4mi9zqi2pnsf1pq6gccbqvw6ib916mqizgjmd8f44pj"; })
(fetchNuGet { pname = "Microsoft.NETCore.Platforms"; version = "3.0.0"; sha256 = "1bk8r4r3ihmi6322jmcag14jmw11mjqys202azqjzglcx59pxh51"; })
(fetchNuGet { pname = "Microsoft.NETCore.Targets"; version = "1.1.0"; sha256 = "193xwf33fbm0ni3idxzbr5fdq3i2dlfgihsac9jj7whj0gd902nh"; })
(fetchNuGet { pname = "Microsoft.VisualStudio.Threading"; version = "16.6.13"; sha256 = "0qbvcwy7njz5zpqgfqdf41gf9xqcz64z4rkfjf6bi4zynpkv6n1l"; })
(fetchNuGet { pname = "Microsoft.VisualStudio.Threading.Analyzers"; version = "16.6.13"; sha256 = "09nqkjnarwj0chb6xrzscq98mpgi86n2a3mfdd3y695kviq99s18"; })
(fetchNuGet { pname = "Microsoft.VisualStudio.Validation"; version = "15.5.31"; sha256 = "1ah99rn922qa0sd2k3h64m324f2r32pw8cn4cfihgvwx4qdrpmgw"; })
(fetchNuGet { pname = "Microsoft.Win32.Primitives"; version = "4.3.0"; sha256 = "0j0c1wj4ndj21zsgivsc24whiya605603kxrbiw6wkfdync464wq"; })
(fetchNuGet { pname = "Microsoft.Win32.Registry"; version = "4.6.0"; sha256 = "0i4y782yrqqyx85pg597m20gm0v126w0j9ddk5z7xb3crx4z9f2s"; })
(fetchNuGet { pname = "Nerdbank.Streams"; version = "2.5.76"; sha256 = "017h8m1zrm247alhlz4vqsz580b8b88s50cyxb939hmc2nn0qlfv"; })
(fetchNuGet { pname = "NETStandard.Library"; version = "2.0.3"; sha256 = "1fn9fxppfcg4jgypp2pmrpr6awl3qz1xmnri0cygpkwvyx27df1y"; })
(fetchNuGet { pname = "Newtonsoft.Json"; version = "12.0.3"; sha256 = "17dzl305d835mzign8r15vkmav2hq8l6g7942dfjpnzr17wwl89x"; })
(fetchNuGet { pname = "runtime.any.System.Collections"; version = "4.3.0"; sha256 = "0bv5qgm6vr47ynxqbnkc7i797fdi8gbjjxii173syrx14nmrkwg0"; })
(fetchNuGet { pname = "runtime.any.System.Diagnostics.Tracing"; version = "4.3.0"; sha256 = "00j6nv2xgmd3bi347k00m7wr542wjlig53rmj28pmw7ddcn97jbn"; })
(fetchNuGet { pname = "runtime.any.System.Globalization"; version = "4.3.0"; sha256 = "1daqf33hssad94lamzg01y49xwndy2q97i2lrb7mgn28656qia1x"; })
(fetchNuGet { pname = "runtime.any.System.Globalization.Calendars"; version = "4.3.0"; sha256 = "1ghhhk5psqxcg6w88sxkqrc35bxcz27zbqm2y5p5298pv3v7g201"; })
(fetchNuGet { pname = "runtime.any.System.IO"; version = "4.3.0"; sha256 = "0l8xz8zn46w4d10bcn3l4yyn4vhb3lrj2zw8llvz7jk14k4zps5x"; })
(fetchNuGet { pname = "runtime.any.System.Reflection"; version = "4.3.0"; sha256 = "02c9h3y35pylc0zfq3wcsvc5nqci95nrkq0mszifc0sjx7xrzkly"; })
(fetchNuGet { pname = "runtime.any.System.Reflection.Primitives"; version = "4.3.0"; sha256 = "0x1mm8c6iy8rlxm8w9vqw7gb7s1ljadrn049fmf70cyh42vdfhrf"; })
(fetchNuGet { pname = "runtime.any.System.Resources.ResourceManager"; version = "4.3.0"; sha256 = "03kickal0iiby82wa5flar18kyv82s9s6d4xhk5h4bi5kfcyfjzl"; })
(fetchNuGet { pname = "runtime.any.System.Runtime"; version = "4.3.0"; sha256 = "1cqh1sv3h5j7ixyb7axxbdkqx6cxy00p4np4j91kpm492rf4s25b"; })
(fetchNuGet { pname = "runtime.any.System.Runtime.Handles"; version = "4.3.0"; sha256 = "0bh5bi25nk9w9xi8z23ws45q5yia6k7dg3i4axhfqlnj145l011x"; })
(fetchNuGet { pname = "runtime.any.System.Runtime.InteropServices"; version = "4.3.0"; sha256 = "0c3g3g3jmhlhw4klrc86ka9fjbl7i59ds1fadsb2l8nqf8z3kb19"; })
(fetchNuGet { pname = "runtime.any.System.Text.Encoding"; version = "4.3.0"; sha256 = "0aqqi1v4wx51h51mk956y783wzags13wa7mgqyclacmsmpv02ps3"; })
(fetchNuGet { pname = "runtime.any.System.Text.Encoding.Extensions"; version = "4.3.0"; sha256 = "0lqhgqi0i8194ryqq6v2gqx0fb86db2gqknbm0aq31wb378j7ip8"; })
(fetchNuGet { pname = "runtime.any.System.Threading.Tasks"; version = "4.3.0"; sha256 = "03mnvkhskbzxddz4hm113zsch1jyzh2cs450dk3rgfjp8crlw1va"; })
(fetchNuGet { pname = "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "0rwpqngkqiapqc5c2cpkj7idhngrgss5qpnqg0yh40mbyflcxf8i"; })
(fetchNuGet { pname = "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "1n06gxwlinhs0w7s8a94r1q3lwqzvynxwd3mp10ws9bg6gck8n4r"; })
(fetchNuGet { pname = "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "0404wqrc7f2yc0wxv71y3nnybvqx8v4j9d47hlscxy759a525mc3"; })
(fetchNuGet { pname = "runtime.native.System"; version = "4.3.0"; sha256 = "15hgf6zaq9b8br2wi1i3x0zvmk410nlmsmva9p0bbg73v6hml5k4"; })
(fetchNuGet { pname = "runtime.native.System.Net.Http"; version = "4.3.0"; sha256 = "1n6rgz5132lcibbch1qlf0g9jk60r0kqv087hxc0lisy50zpm7kk"; })
(fetchNuGet { pname = "runtime.native.System.Security.Cryptography.Apple"; version = "4.3.0"; sha256 = "1b61p6gw1m02cc1ry996fl49liiwky6181dzr873g9ds92zl326q"; })
(fetchNuGet { pname = "runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "0zy5r25jppz48i2bkg8b9lfig24xixg6nm3xyr1379zdnqnpm8f6"; })
(fetchNuGet { pname = "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "096ch4n4s8k82xga80lfmpimpzahd2ip1mgwdqgar0ywbbl6x438"; })
(fetchNuGet { pname = "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "1dm8fifl7rf1gy7lnwln78ch4rw54g0pl5g1c189vawavll7p6rj"; })
(fetchNuGet { pname = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple"; version = "4.3.0"; sha256 = "10yc8jdrwgcl44b4g93f1ds76b176bajd3zqi2faf5rvh1vy9smi"; })
(fetchNuGet { pname = "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "1m9z1k9kzva9n9kwinqxl97x2vgl79qhqjlv17k9s2ymcyv2bwr6"; })
(fetchNuGet { pname = "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "1cpx56mcfxz7cpn57wvj18sjisvzq8b5vd9rw16ihd2i6mcp3wa1"; })
(fetchNuGet { pname = "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "15gsm1a8jdmgmf8j5v1slfz8ks124nfdhk2vxs2rw3asrxalg8hi"; })
(fetchNuGet { pname = "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "0q0n5q1r1wnqmr5i5idsrd9ywl33k0js4pngkwq9p368mbxp8x1w"; })
(fetchNuGet { pname = "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl"; version = "4.3.2"; sha256 = "1x0g58pbpjrmj2x2qw17rdwwnrcl0wvim2hdwz48lixvwvp22n9c"; })
(fetchNuGet { pname = "runtime.unix.Microsoft.Win32.Primitives"; version = "4.3.0"; sha256 = "0y61k9zbxhdi0glg154v30kkq7f8646nif8lnnxbvkjpakggd5id"; })
(fetchNuGet { pname = "runtime.unix.System.Diagnostics.Debug"; version = "4.3.0"; sha256 = "1lps7fbnw34bnh3lm31gs5c0g0dh7548wfmb8zz62v0zqz71msj5"; })
(fetchNuGet { pname = "runtime.unix.System.IO.FileSystem"; version = "4.3.0"; sha256 = "14nbkhvs7sji5r1saj2x8daz82rnf9kx28d3v2qss34qbr32dzix"; })
(fetchNuGet { pname = "runtime.unix.System.Net.Primitives"; version = "4.3.0"; sha256 = "0bdnglg59pzx9394sy4ic66kmxhqp8q8bvmykdxcbs5mm0ipwwm4"; })
(fetchNuGet { pname = "runtime.unix.System.Private.Uri"; version = "4.3.0"; sha256 = "1jx02q6kiwlvfksq1q9qr17fj78y5v6mwsszav4qcz9z25d5g6vk"; })
(fetchNuGet { pname = "runtime.unix.System.Runtime.Extensions"; version = "4.3.0"; sha256 = "0pnxxmm8whx38dp6yvwgmh22smknxmqs5n513fc7m4wxvs1bvi4p"; })
(fetchNuGet { pname = "StreamJsonRpc"; version = "2.5.46"; sha256 = "0rsgxfxcfgbx1w2jhllx1cwnbj9vra6034gv4kgzahh0v5vn8shf"; })
(fetchNuGet { pname = "System.Buffers"; version = "4.3.0"; sha256 = "0fgns20ispwrfqll4q1zc1waqcmylb3zc50ys9x8zlwxh9pmd9jy"; })
(fetchNuGet { pname = "System.Buffers"; version = "4.5.0"; sha256 = "1ywfqn4md6g3iilpxjn5dsr0f5lx6z0yvhqp4pgjcamygg73cz2c"; })
(fetchNuGet { pname = "System.Collections"; version = "4.3.0"; sha256 = "19r4y64dqyrq6k4706dnyhhw7fs24kpp3awak7whzss39dakpxk9"; })
(fetchNuGet { pname = "System.Collections.Concurrent"; version = "4.3.0"; sha256 = "0wi10md9aq33jrkh2c24wr2n9hrpyamsdhsxdcnf43b7y86kkii8"; })
(fetchNuGet { pname = "System.Collections.Immutable"; version = "1.5.0"; sha256 = "1d5gjn5afnrf461jlxzawcvihz195gayqpcfbv6dd7pxa9ialn06"; })
(fetchNuGet { pname = "System.Diagnostics.Debug"; version = "4.3.0"; sha256 = "00yjlf19wjydyr6cfviaph3vsjzg3d5nvnya26i2fvfg53sknh3y"; })
(fetchNuGet { pname = "System.Diagnostics.DiagnosticSource"; version = "4.3.0"; sha256 = "0z6m3pbiy0qw6rn3n209rrzf9x1k4002zh90vwcrsym09ipm2liq"; })
(fetchNuGet { pname = "System.Diagnostics.Tracing"; version = "4.3.0"; sha256 = "1m3bx6c2s958qligl67q7grkwfz3w53hpy7nc97mh6f7j5k168c4"; })
(fetchNuGet { pname = "System.Globalization"; version = "4.3.0"; sha256 = "1cp68vv683n6ic2zqh2s1fn4c2sd87g5hpp6l4d4nj4536jz98ki"; })
(fetchNuGet { pname = "System.Globalization.Calendars"; version = "4.3.0"; sha256 = "1xwl230bkakzzkrggy1l1lxmm3xlhk4bq2pkv790j5lm8g887lxq"; })
(fetchNuGet { pname = "System.Globalization.Extensions"; version = "4.3.0"; sha256 = "02a5zfxavhv3jd437bsncbhd2fp1zv4gxzakp1an9l6kdq1mcqls"; })
(fetchNuGet { pname = "System.IO"; version = "4.3.0"; sha256 = "05l9qdrzhm4s5dixmx68kxwif4l99ll5gqmh7rqgw554fx0agv5f"; })
(fetchNuGet { pname = "System.IO.FileSystem"; version = "4.3.0"; sha256 = "0z2dfrbra9i6y16mm9v1v6k47f0fm617vlb7s5iybjjsz6g1ilmw"; })
(fetchNuGet { pname = "System.IO.FileSystem.Primitives"; version = "4.3.0"; sha256 = "0j6ndgglcf4brg2lz4wzsh1av1gh8xrzdsn9f0yznskhqn1xzj9c"; })
(fetchNuGet { pname = "System.IO.Pipelines"; version = "4.7.0"; sha256 = "1cx6bl2bhzp30ahy2csnwbphmlwwp840j56wgab105xc32la0mg4"; })
(fetchNuGet { pname = "System.Linq"; version = "4.3.0"; sha256 = "1w0gmba695rbr80l1k2h4mrwzbzsyfl2z4klmpbsvsg5pm4a56s7"; })
(fetchNuGet { pname = "System.Memory"; version = "4.5.3"; sha256 = "0naqahm3wljxb5a911d37mwjqjdxv9l0b49p5dmfyijvni2ppy8a"; })
(fetchNuGet { pname = "System.Net.Http"; version = "4.3.4"; sha256 = "0kdp31b8819v88l719j6my0yas6myv9d1viql3qz5577mv819jhl"; })
(fetchNuGet { pname = "System.Net.Primitives"; version = "4.3.0"; sha256 = "0c87k50rmdgmxx7df2khd9qj7q35j9rzdmm2572cc55dygmdk3ii"; })
(fetchNuGet { pname = "System.Net.WebSockets"; version = "4.3.0"; sha256 = "1gfj800078kggcgl0xyl00a6y5k4wwh2k2qm69rjy22wbmq7fy4p"; })
(fetchNuGet { pname = "System.Private.Uri"; version = "4.3.0"; sha256 = "04r1lkdnsznin0fj4ya1zikxiqr0h6r6a1ww2dsm60gqhdrf0mvx"; })
(fetchNuGet { pname = "System.Reflection"; version = "4.3.0"; sha256 = "0xl55k0mw8cd8ra6dxzh974nxif58s3k1rjv1vbd7gjbjr39j11m"; })
(fetchNuGet { pname = "System.Reflection.Emit"; version = "4.6.0"; sha256 = "18h375q5bn9h7swxnk4krrxym1dxmi9bm26p89xps9ygrj4q6zqw"; })
(fetchNuGet { pname = "System.Reflection.Emit.Lightweight"; version = "4.6.0"; sha256 = "0hry2k6b7kicg4zxnq0hhn0ys52711pxy7l9v5sp7gvp9cicwpgp"; })
(fetchNuGet { pname = "System.Reflection.Primitives"; version = "4.3.0"; sha256 = "04xqa33bld78yv5r93a8n76shvc8wwcdgr1qvvjh959g3rc31276"; })
(fetchNuGet { pname = "System.Resources.ResourceManager"; version = "4.3.0"; sha256 = "0sjqlzsryb0mg4y4xzf35xi523s4is4hz9q4qgdvlvgivl7qxn49"; })
(fetchNuGet { pname = "System.Runtime"; version = "4.3.0"; sha256 = "066ixvgbf2c929kgknshcxqj6539ax7b9m570cp8n179cpfkapz7"; })
(fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "4.5.2"; sha256 = "1vz4275fjij8inf31np78hw50al8nqkngk04p3xv5n4fcmf1grgi"; })
(fetchNuGet { pname = "System.Runtime.CompilerServices.Unsafe"; version = "4.6.0"; sha256 = "0xmzi2gpbmgyfr75p24rqqsba3cmrqgmcv45lsqp5amgrdwd0f0m"; })
(fetchNuGet { pname = "System.Runtime.Extensions"; version = "4.3.0"; sha256 = "1ykp3dnhwvm48nap8q23893hagf665k0kn3cbgsqpwzbijdcgc60"; })
(fetchNuGet { pname = "System.Runtime.Handles"; version = "4.3.0"; sha256 = "0sw2gfj2xr7sw9qjn0j3l9yw07x73lcs97p8xfc9w1x9h5g5m7i8"; })
(fetchNuGet { pname = "System.Runtime.InteropServices"; version = "4.3.0"; sha256 = "00hywrn4g7hva1b2qri2s6rabzwgxnbpw9zfxmz28z09cpwwgh7j"; })
(fetchNuGet { pname = "System.Runtime.Numerics"; version = "4.3.0"; sha256 = "19rav39sr5dky7afygh309qamqqmi9kcwvz3i0c5700v0c5cg61z"; })
(fetchNuGet { pname = "System.Security.AccessControl"; version = "4.6.0"; sha256 = "1wl1dyghi0qhpap1vgfhg2ybdyyhy9vc2a7dpm1xb30vfgmlkjmf"; })
(fetchNuGet { pname = "System.Security.Cryptography.Algorithms"; version = "4.3.0"; sha256 = "03sq183pfl5kp7gkvq77myv7kbpdnq3y0xj7vi4q1kaw54sny0ml"; })
(fetchNuGet { pname = "System.Security.Cryptography.Cng"; version = "4.3.0"; sha256 = "1k468aswafdgf56ab6yrn7649kfqx2wm9aslywjam1hdmk5yypmv"; })
(fetchNuGet { pname = "System.Security.Cryptography.Csp"; version = "4.3.0"; sha256 = "1x5wcrddf2s3hb8j78cry7yalca4lb5vfnkrysagbn6r9x6xvrx1"; })
(fetchNuGet { pname = "System.Security.Cryptography.Encoding"; version = "4.3.0"; sha256 = "1jr6w70igqn07k5zs1ph6xja97hxnb3mqbspdrff6cvssgrixs32"; })
(fetchNuGet { pname = "System.Security.Cryptography.OpenSsl"; version = "4.3.0"; sha256 = "0givpvvj8yc7gv4lhb6s1prq6p2c4147204a0wib89inqzd87gqc"; })
(fetchNuGet { pname = "System.Security.Cryptography.Primitives"; version = "4.3.0"; sha256 = "0pyzncsv48zwly3lw4f2dayqswcfvdwq2nz0dgwmi7fj3pn64wby"; })
(fetchNuGet { pname = "System.Security.Cryptography.X509Certificates"; version = "4.3.0"; sha256 = "0valjcz5wksbvijylxijjxb1mp38mdhv03r533vnx1q3ikzdav9h"; })
(fetchNuGet { pname = "System.Security.Principal.Windows"; version = "4.6.0"; sha256 = "1jmfzfz1n8hp63s5lja5xxpzkinbp6g59l3km9h8avjiisdrg5wm"; })
(fetchNuGet { pname = "System.Text.Encoding"; version = "4.3.0"; sha256 = "1f04lkir4iladpp51sdgmis9dj4y8v08cka0mbmsy0frc9a4gjqr"; })
(fetchNuGet { pname = "System.Text.Encoding.Extensions"; version = "4.3.0"; sha256 = "11q1y8hh5hrp5a3kw25cb6l00v5l5dvirkz8jr3sq00h1xgcgrxy"; })
(fetchNuGet { pname = "System.Threading"; version = "4.3.0"; sha256 = "0rw9wfamvhayp5zh3j7p1yfmx9b5khbf4q50d8k5rk993rskfd34"; })
(fetchNuGet { pname = "System.Threading.Tasks"; version = "4.3.0"; sha256 = "134z3v9abw3a6jsw17xl3f6hqjpak5l682k2vz39spj4kmydg6k7"; })
(fetchNuGet { pname = "System.Threading.Tasks.Dataflow"; version = "4.9.0"; sha256 = "1g6s9pjg4z8iy98df60y9a01imdqy59zd767vz74rrng78jl2dk5"; })
(fetchNuGet { pname = "System.Threading.Tasks.Extensions"; version = "4.5.3"; sha256 = "0g7r6hm572ax8v28axrdxz1gnsblg6kszq17g51pj14a5rn2af7i"; })
(fetchNuGet { pname = "System.ValueTuple"; version = "4.5.0"; sha256 = "00k8ja51d0f9wrq4vv5z2jhq8hy31kac2rg0rv06prylcybzl8cy"; })
]

View File

@ -1,23 +0,0 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=./. -i bash -p gnused jq common-updater-scripts nix-prefetch-git
set -eo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
deps_file="$(realpath ./deps.nix)"
nix-prefetch-git https://github.com/microsoft/python-language-server --quiet > repo_info
new_version="$(jq -r ".date" < repo_info | cut -d"T" -f1)"
new_hash="$(jq -r ".sha256" < repo_info)"
new_rev="$(jq -r ".rev" < repo_info)"
rm repo_info
old_rev="$(sed -nE 's/\s*rev = "(.*)".*/\1/p' ./default.nix)"
if [[ $new_rev == $old_rev ]]; then
echo "Already up to date!"
exit 0
fi
pushd ../../../..
update-source-version python-language-server "$new_version" "$new_hash" --rev="$new_rev"
$(nix-build -A python-language-server.fetch-deps --no-out-link) "$deps_file"

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "edencommon";
version = "2023.01.30.00";
version = "2023.02.13.00";
src = fetchFromGitHub {
owner = "facebookexperimental";
repo = "edencommon";
rev = "v${version}";
sha256 = "sha256-N3/Ey0zrfOfuAaS6qIpEgUUL5GkCZrqpAspJ7OprLPk=";
sha256 = "sha256-WxxE7ePZuNkSKRQG5Vni51xrrZT6BsKwwvhzykQf9X4=";
};
nativeBuildInputs = [ cmake ];

View File

@ -12,7 +12,13 @@ let
then "DYLD_LIBRARY_PATH"
else "LD_LIBRARY_PATH";
generic = { version, hash, patches ? [] }: stdenv.mkDerivation rec {
generic =
{ version
, hash
, patches ? []
, knownVulnerabilities ? []
}: stdenv.mkDerivation rec
{
pname = "libressl";
inherit version;
@ -80,6 +86,7 @@ let
license = with licenses; [ publicDomain bsdOriginal bsd0 bsd3 gpl3 isc openssl ];
platforms = platforms.all;
maintainers = with maintainers; [ thoughtpolice fpletz ];
inherit knownVulnerabilities;
};
};
@ -87,11 +94,22 @@ in {
libressl_3_4 = generic {
version = "3.4.3";
hash = "sha256-/4i//jVIGLPM9UXjyv5FTFAxx6dyFwdPUzJx1jw38I0=";
knownVulnerabilities = [ "Support ended 2022-10-14." ];
patches = [
(fetchpatch {
# https://marc.info/?l=libressl&m=167582148932407&w=2
name = "backport-type-confusion-fix.patch";
url = "https://raw.githubusercontent.com/libressl/portable/30dc760ed1d7c70766b135500950d8ca9d17b13a/patches/x509_genn.c.diff";
sha256 = "sha256-N9jsOueqposDWZwaR+n/v/cHgNiZbZ644d8/wKjN2/M=";
stripLen = 2;
extraPrefix = "crypto/";
})
];
};
libressl_3_5 = generic {
version = "3.5.3";
hash = "sha256-OrXl6u9pziDGsXDuZNeFtCI19I8uYrCV/KXXtmcriyg=";
version = "3.5.4";
hash = "sha256-A3naE0Si9xrUpOO+MO+dgu7N3Of43CrmZjGh3+FDQ6w=";
patches = [
# Fix endianness detection on aarch64-darwin, issue #181187
@ -104,7 +122,7 @@ in {
};
libressl_3_6 = generic {
version = "3.6.1";
hash = "sha256-rPrGExbpO5GcKNYtUwN8pzTehcRrTXA/Gf2Dlc8AZ3Q=";
version = "3.6.2";
hash = "sha256-S+gP/wc3Rs9QtKjlur4nlayumMaxMqngJRm0Rd+/0DM=";
};
}

View File

@ -19,7 +19,7 @@
buildPythonPackage rec {
pname = "deal";
version = "4.23.4";
version = "4.23.7";
format = "pyproject";
disabled = pythonOlder "3.7";
@ -27,7 +27,7 @@ buildPythonPackage rec {
owner = "life4";
repo = pname;
rev = "refs/tags/${version}";
hash = "sha256-YwozwoTb1JsvrwcTntlpWpQJ9DszH2lmtuKkK8qZiG0=";
hash = "sha256-RWbMitgrU8VUsOgarBKYDNPIa/AwifvBURUytiGzeVo=";
};
postPatch = ''

View File

@ -12,7 +12,7 @@
buildPythonPackage rec {
pname = "dunamai";
version = "1.15.0";
version = "1.16.0";
format = "pyproject";
disabled = pythonOlder "3.7";
@ -21,7 +21,7 @@ buildPythonPackage rec {
owner = "mtkennerly";
repo = "dunamai";
rev = "refs/tags/v${version}";
sha256 = "sha256-dqMI51UHbkyfkxAPojRlS6qew2Ob4LbUkYua6zmcQgc=";
hash = "sha256-pPUn+1rv76N/7WVDyWJLPVMweJ1Qbx6/P4zIKU06hSs=";
};
nativeBuildInputs = [
@ -49,11 +49,14 @@ buildPythonPackage rec {
setuptools
];
pythonImportsCheck = [ "dunamai" ];
pythonImportsCheck = [
"dunamai"
];
meta = with lib; {
description = "Dynamic version generation";
homepage = "https://github.com/mtkennerly/dunamai";
changelog = "https://github.com/mtkennerly/dunamai/blob/v${version}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ jmgilman ];
};

View File

@ -14,7 +14,7 @@
buildPythonPackage rec {
pname = "pipdeptree";
version = "2.4.0";
version = "2.5.0";
format = "pyproject";
disabled = pythonOlder "3.7";
@ -23,7 +23,7 @@ buildPythonPackage rec {
owner = "tox-dev";
repo = "pipdeptree";
rev = "refs/tags/${version}";
hash = "sha256-agjerQTSkrpHCleqNUxg+NFiPnf9u9DQrs3vSR917oE=";
hash = "sha256-hAODK7kFCntfKC77VF/KyTk0O/z+bXHixVxQIz8JuDk=";
};
SETUPTOOLS_SCM_PRETEND_VERSION = version;

View File

@ -7,14 +7,14 @@
buildPythonPackage rec {
pname = "stripe";
version = "5.1.1";
version = "5.2.0";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-wAjdCMWZhtzwWfu3dkhucLgtT6RqY8oQhdlLJojCjhk=";
hash = "sha256-pDcrna+DEtgjaaqmSZcpem8Ea8B8oJ91159ayAkztBQ=";
};
propagatedBuildInputs = [

View File

@ -5,13 +5,13 @@
buildPythonPackage rec {
pname = "types-pyyaml";
version = "6.0.12.6";
version = "6.0.12.8";
format = "setuptools";
src = fetchPypi {
pname = "types-PyYAML";
inherit version;
sha256 = "sha256-JOdrk41Y5oZFJx7rFJr2Ai0dqZeI5IH5Wb0oSxZPOaE=";
sha256 = "sha256-GTBIaaidSa8AvmgeeyZ0FN8hP064ljTESV+mLo+UK58=";
};
# Module doesn't have tests

View File

@ -37,8 +37,8 @@ let
in
rec {
shards_0_17 = generic {
version = "0.17.1";
hash = "sha256-YAsFsMoZVUINnIQzYNjE7/hpvipmyU5DrLJJrk9TkHs=";
version = "0.17.2";
hash = "sha256-2HpoMgyi8jnWYiBHscECYiaRu2g0mAH+dCY1t5m/l1s=";
};
shards = shards_0_17;

View File

@ -5,13 +5,13 @@
buildGoModule rec {
pname = "go-tools";
version = "2023.1";
version = "2023.1.2";
src = fetchFromGitHub {
owner = "dominikh";
repo = "go-tools";
rev = version;
sha256 = "sha256-RzYaaiDu78JVM8G0zJzlZcyCd+1V9KZIyIIyVib0yZc=";
sha256 = "sha256-Xnylkv0n3FExQ4e4pmD6DAUqGtud80wHHoVY56UXfOU=";
};
vendorHash = "sha256-o9UtS6AMgRYuAkOWdktG2Kr3QDBDQTOGSlya69K2br8=";

View File

@ -2,16 +2,16 @@
rustPlatform.buildRustPackage rec {
pname = "cargo-watch";
version = "8.3.0";
version = "8.4.0";
src = fetchFromGitHub {
owner = "watchexec";
repo = pname;
rev = "v${version}";
hash = "sha256-2keI5hTWglqh+mLeGzRCxpfnUt6kur0I9fefYwZr5l4=";
hash = "sha256-YwiTzIO60ct076vMoK9BHKa65Qet2PAvPRwnZcjDgcM=";
};
cargoHash = "sha256-kR12j0Z7nXfwh9nPT35/LpkK56a8D1gvVkl9/2s6rIQ=";
cargoHash = "sha256-BzcKWQSB94H3XOsbwNvJoAHlZwkJvLABIrfFh9Ugfig=";
buildInputs = lib.optionals stdenv.isDarwin [ Cocoa CoreServices Foundation libiconv ];

View File

@ -2,14 +2,14 @@
buildGoModule rec {
pname = "symfony-cli";
version = "5.4.21";
vendorHash = "sha256-P5KEliTqj9kGYffhl014QK6qPY9gLG+bViOz4dtsQwA=";
version = "5.5.0";
vendorHash = "sha256-l8h2jHOwxvFEk9v/U8DU8g6La9TyPtpDvQTTSX4BW84=";
src = fetchFromGitHub {
owner = "symfony-cli";
repo = "symfony-cli";
rev = "v${version}";
sha256 = "sha256-lNEd5mj5K8MhlLkrRiFnEqVLnS+4mx7FNAtYuF5jdC0=";
sha256 = "sha256-d/Ld/F1dvwO7/uKLtgQmYhfOoxvIyEbnE3ks6R2412I=";
};
ldflags = [

View File

@ -5,7 +5,7 @@
let
steamPackagesFun = self: let
inherit (self) callPackage;
in {
in rec {
steamArch = if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
else if stdenv.hostPlatform.system == "i686-linux" then "i386"
else throw "Unsupported platform: ${stdenv.hostPlatform.system}";
@ -21,6 +21,7 @@ let
else null;
inherit buildFHSUserEnv;
};
steam-fhsenv-small = steam-fhsenv.override { withGameSpecificLibraries = false; };
steamcmd = callPackage ./steamcmd.nix { };
};
keep = self: { };

View File

@ -1,46 +1,37 @@
{ config, lib, writeScript, buildFHSUserEnv, steam, glxinfo-i686
{ lib, stdenv, writeScript, buildFHSUserEnv, steam, glxinfo-i686, runtimeShell
, steam-runtime-wrapped, steam-runtime-wrapped-i686 ? null
, extraPkgs ? pkgs: [ ] # extra packages to add to targetPkgs
, extraLibraries ? pkgs: [ ] # extra packages to add to multiPkgs
, extraProfile ? "" # string to append to profile
, extraArgs ? "" # arguments to always pass to steam
, runtimeOnly ? false
, runtimeShell
, stdenv
# DEPRECATED
, withJava ? config.steam.java or false
, withPrimus ? config.steam.primus or false
, withGameSpecificLibraries ? true # exclude game specific libraries
}:
let
commonTargetPkgs = pkgs: with pkgs;
[
# Needed for operating system detection until
# https://github.com/ValveSoftware/steam-for-linux/issues/5909 is resolved
lsb-release
# Errors in output without those
pciutils
# Games' dependencies
xorg.xrandr
which
# Needed by gdialog, including in the steam-runtime
perl
# Open URLs
xdg-utils
iana-etc
# Steam Play / Proton
python3
# Steam VR
procps
usbutils
commonTargetPkgs = pkgs: with pkgs; [
# Needed for operating system detection until
# https://github.com/ValveSoftware/steam-for-linux/issues/5909 is resolved
lsb-release
# Errors in output without those
pciutils
# Games' dependencies
xorg.xrandr
which
# Needed by gdialog, including in the steam-runtime
perl
# Open URLs
xdg-utils
iana-etc
# Steam Play / Proton
python3
# Steam VR
procps
usbutils
# electron based launchers need newer versions of these libraries than what runtime provides
mesa
sqlite
] ++ lib.optional withJava jdk8 # TODO: upgrade https://github.com/NixOS/nixpkgs/pull/89731
++ lib.optional withPrimus primus
++ extraPkgs pkgs;
# electron based launchers need newer versions of these libraries than what runtime provides
mesa
sqlite
] ++ extraPkgs pkgs;
ldPath = lib.optionals stdenv.is64bit [ "/lib64" ]
++ [ "/lib32" ]
@ -87,52 +78,8 @@ in buildFHSUserEnv rec {
libthai
pango
# Not formally in runtime but needed by some games
at-spi2-atk
at-spi2-core # CrossCode
gst_all_1.gstreamer
gst_all_1.gst-plugins-ugly
gst_all_1.gst-plugins-base
json-glib # paradox launcher (Stellaris)
libdrm
libxkbcommon # paradox launcher
libvorbis # Dead Cells
libxcrypt # Alien Isolation, XCOM 2, Company of Heroes 2
mono
xorg.xkeyboardconfig
xorg.libpciaccess
xorg.libXScrnSaver # Dead Cells
udev # shadow of the tomb raider
icu # dotnet runtime, e.g. stardew valley
# screeps dependencies
gtk3
dbus
zlib
atk
cairo
freetype
gdk-pixbuf
fontconfig
# friends options won't display "Launch Game" without it
lsof
# called by steam's setup.sh
file
# Prison Architect
libGLU
libuuid
libbsd
alsa-lib
# Loop Hero
libidn2
libpsl
nghttp2.lib
openssl_1_1
rtmpdump
lsof # friends options won't display "Launch Game" without it
file # called by steam's setup.sh
# dependencies for mesa drivers, needed inside pressure-vessel
mesa.llvmPackages.llvm.lib
@ -144,14 +91,7 @@ in buildFHSUserEnv rec {
xorg.libxshmfence
xorg.libXxf86vm
libelf
# pressure-vessel (required for mangohud and possibly more)
elfutils.out
# Required
glib
gtk2
bzip2
(lib.getLib elfutils)
# Without these it silently fails
xorg.libXinerama
@ -171,10 +111,11 @@ in buildFHSUserEnv rec {
libusb1
dbus-glib
ffmpeg
# Only libraries are needed from those two
libudev0-shim
# Verified games requirements
fontconfig
freetype
xorg.libXt
xorg.libXmu
libogg
@ -182,10 +123,15 @@ in buildFHSUserEnv rec {
SDL
SDL2_image
glew110
libdrm
libidn
tbb
zlib
# Other things from runtime
glib
gtk2
bzip2
flac
freeglut
libjpeg
@ -212,8 +158,48 @@ in buildFHSUserEnv rec {
librsvg
xorg.libXft
libvdpau
]
++ steamPackages.steam-runtime-wrapped.overridePkgs
] ++ lib.optionals withGameSpecificLibraries [
# Not formally in runtime but needed by some games
at-spi2-atk
at-spi2-core # CrossCode
gst_all_1.gstreamer
gst_all_1.gst-plugins-ugly
gst_all_1.gst-plugins-base
json-glib # paradox launcher (Stellaris)
libdrm
libxkbcommon # paradox launcher
libvorbis # Dead Cells
libxcrypt # Alien Isolation, XCOM 2, Company of Heroes 2
mono
xorg.xkeyboardconfig
xorg.libpciaccess
xorg.libXScrnSaver # Dead Cells
udev # Shadow of the Tomb Raider
icu # dotnet runtime, e.g. Stardew Valley
# screeps dependencies
gtk3
dbus
zlib
atk
cairo
freetype
gdk-pixbuf
fontconfig
# Prison Architect
libGLU
libuuid
libbsd
alsa-lib
# Loop Hero
libidn2
libpsl
nghttp2.lib
openssl_1_1
rtmpdump
] ++ steamPackages.steam-runtime-wrapped.overridePkgs
++ extraLibraries pkgs;
extraInstallCommands = ''
@ -266,7 +252,9 @@ in buildFHSUserEnv rec {
exec steam ${extraArgs} "$@"
'';
inherit (steam) meta;
meta = steam.meta // lib.optionalAttrs (!withGameSpecificLibraries) {
description = steam.meta.description + " (without game specific libraries)";
};
# allows for some gui applications to share IPC
# this fixes certain issues where they don't render correctly
@ -282,7 +270,6 @@ in buildFHSUserEnv rec {
targetPkgs = commonTargetPkgs;
inherit multiPkgs profile extraInstallCommands;
inherit unshareIpc unsharePid;
runScript = writeScript "steam-run" ''

View File

@ -14,7 +14,6 @@
, testers
}:
with lib;
let
inherit (python3Packages) python dbus-python;
shouldUsePkg = pkg: if pkg != null && lib.meta.availableOn stdenv.hostPlatform pkg then pkg else null;
@ -34,14 +33,14 @@ stdenv.mkDerivation (finalAttrs: {
src = fetchFromGitHub {
owner = "jackaudio";
repo = "jack2";
rev = "v${version}";
rev = "v${finalAttrs.version}";
sha256 = "01s8i64qczxqawgrzrw19asaqmcspf5l2h3203xzg56wnnhhzcw7";
};
nativeBuildInputs = [ pkg-config python makeWrapper wafHook ];
buildInputs = [ libsamplerate libsndfile readline eigen celt
optDbus optPythonDBus optLibffado optAlsaLib optLibopus
] ++ optionals stdenv.isDarwin [
] ++ lib.optionals stdenv.isDarwin [
aften AudioUnit CoreAudio Accelerate libobjc
];
@ -54,9 +53,9 @@ stdenv.mkDerivation (finalAttrs: {
wafConfigureFlags = [
"--classic"
"--autostart=${if (optDbus != null) then "dbus" else "classic"}"
] ++ optional (optDbus != null) "--dbus"
++ optional (optLibffado != null) "--firewire"
++ optional (optAlsaLib != null) "--alsa";
] ++ lib.optional (optDbus != null) "--dbus"
++ lib.optional (optLibffado != null) "--firewire"
++ lib.optional (optAlsaLib != null) "--alsa";
postInstall = (if libOnly then ''
rm -rf $out/{bin,share}
@ -67,7 +66,7 @@ stdenv.mkDerivation (finalAttrs: {
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
meta = {
meta = with lib; {
description = "JACK audio connection kit, version 2 with jackdbus";
homepage = "https://jackaudio.org";
license = licenses.gpl2Plus;

View File

@ -1,31 +1,38 @@
{ lib, stdenv, fetchFromGitHub, curl, git, gmp, libsigsegv, meson, ncurses, ninja
, openssl, pkg-config, re2c, zlib
{ stdenv
, lib
, fetchzip
}:
let
os = if stdenv.isDarwin then "macos" else "linux";
arch = if stdenv.isAarch64 then "aarch64" else "x86_64";
platform = "${os}-${arch}";
in
stdenv.mkDerivation rec {
pname = "urbit";
version = "0.7.3";
version = "1.20";
src = fetchFromGitHub {
owner = "urbit";
repo = "urbit";
rev = "v${version}";
sha256 = "192843pjzh8z55fd0x70m3l1vncmixljia3nphgn7j7x4976xkp2";
fetchSubmodules = true;
src = fetchzip {
url = "https://github.com/urbit/vere/releases/download/vere-v${version}/${platform}.tgz";
sha256 = {
x86_64-linux = "sha256-nBIpf9akK4cXnR5y5Fcl1g7/FxL8BU/CH/WHGhYuP74=";
aarch64-linux = "sha256-ERSYXNh/vmAKr4PNonOxTm5/FRLNDWwHSHM6fIeY4Nc=";
x86_64-darwin = "sha256-Kk9hNzyWngnyqlyQ9hILFM81WVw1ZYimMj4K3ENtifE=";
aarch64-darwin = "sha256-i3ixj04J/fcb396ncINLF8eYw1mpFCYeIM3f74K6tqY=";
}.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
};
nativeBuildInputs = [ pkg-config ninja meson ];
buildInputs = [ curl git gmp libsigsegv ncurses openssl re2c zlib ];
postPatch = ''
patchShebangs .
postInstall = ''
install -m755 -D vere-v${version}-${platform} $out/bin/urbit
'';
passthru.updateScript = ./update-bin.sh;
meta = with lib; {
description = "An operating function";
homepage = "https://urbit.org";
description = "An operating function";
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"];
maintainers = [ maintainers.matthew-levan ];
license = licenses.mit;
maintainers = with maintainers; [ mudri ];
platforms = with platforms; linux;
};
}

40
pkgs/misc/urbit/update-bin.sh Executable file
View File

@ -0,0 +1,40 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl common-updater-scripts nix-prefetch
set -euo pipefail
ROOT="$(dirname "$(readlink -f "$0")")"
NIX_DRV="$ROOT/default.nix"
if [ ! -f "$NIX_DRV" ]; then
echo "ERROR: cannot find urbit in $ROOT"
exit 1
fi
fetch_arch() {
VER="$1"; ARCH="$2"
URL="https://github.com/urbit/vere/releases/download/vere-v${VER}/${ARCH}.tgz";
nix-prefetch "{ stdenv, fetchzip }:
stdenv.mkDerivation rec {
pname = \"vere\"; version = \"${VER}\";
src = fetchzip { url = \"$URL\"; };
}
"
}
replace_sha() {
sed -i "s#$1 = \"sha256-.\{44\}\"#$1 = \"$2\"#" "$NIX_DRV"
}
VERE_VER=$(curl https://bootstrap.urbit.org/vere/live/last)
VERE_LINUX_AARCH64_SHA256=$(fetch_arch "$VERE_VER" "linux-aarch64")
VERE_LINUX_X64_SHA256=$(fetch_arch "$VERE_VER" "linux-x86_64")
VERE_DARWIN_AARCH64_SHA256=$(fetch_arch "$VERE_VER" "macos-aarch64")
VERE_DARWIN_X64_SHA256=$(fetch_arch "$VERE_VER" "macos-x86_64")
sed -i "s/version = \".*\"/version = \"$VERE_VER\"/" "$NIX_DRV"
replace_sha "aarch64-linux" "$VERE_LINUX_AARCH64_SHA256"
replace_sha "x86_64-linux" "$VERE_LINUX_X64_SHA256"
replace_sha "aarch64-darwin" "$VERE_DARWIN_AARCH64_SHA256"
replace_sha "x86_64-darwin" "$VERE_DARWIN_X64_SHA256"

View File

@ -240,6 +240,7 @@ let
};
in
self: {
# see https://mariadb.org/about/#maintenance-policy for EOLs
mariadb_104 = self.callPackage generic {
# Supported until 2024-06-18
version = "10.4.28";
@ -255,31 +256,38 @@ in
inherit (self.darwin.apple_sdk.frameworks) CoreServices;
};
mariadb_106 = self.callPackage generic {
# Supported until 2026-07
# Supported until 2026-07-06
version = "10.6.12";
hash = "sha256-PtLrdCnC+uVCPKVcZhdC0QfjUkbxqwwQcJbwxLg5Rjo=";
inherit (self.darwin) cctools;
inherit (self.darwin.apple_sdk.frameworks) CoreServices;
};
mariadb_108 = self.callPackage generic {
# Supported until 2023-05. TODO: remove ahead of 23.05 branchoff
# Supported until 2023-05-20. TODO: remove ahead of 23.05 branchoff
version = "10.8.7";
hash = "sha256-A6uqsKMvNTjqZZFbrUBBWf2mHEJE9HZJpC6xdUIGuAI=";
inherit (self.darwin) cctools;
inherit (self.darwin.apple_sdk.frameworks) CoreServices;
};
mariadb_109 = self.callPackage generic {
# Supported until 2023-08. TODO: remove ahead of 23.05 branchoff?
# Supported until 2023-08-22. TODO: remove ahead of 23.05 branchoff?
version = "10.9.5";
hash = "sha256-CXYrdcZEuUEukV0w4bJm3tc5ZRf8L9hrvmf+zDcGWtw=";
inherit (self.darwin) cctools;
inherit (self.darwin.apple_sdk.frameworks) CoreServices;
};
mariadb_1010 = self.callPackage generic {
# Supported until 2023-11
# Supported until 2023-11-17
version = "10.10.3";
hash = "sha256-DQxF/oUFnY0mxuIp8wQQqLj3KC7C1WVg/JqJMOFO130=";
inherit (self.darwin) cctools;
inherit (self.darwin.apple_sdk.frameworks) CoreServices;
};
mariadb_1011 = self.callPackage generic {
# Supported until 2028-02-16
version = "10.11.2";
hash = "sha256-HIne4MrtD2i8Kh0gPrmKEjFQ5qF59u4PH8C6Pwjccdw=";
inherit (self.darwin) cctools;
inherit (self.darwin.apple_sdk.frameworks) CoreServices;
};
}

View File

@ -53,11 +53,22 @@ stdenv.mkDerivation rec {
sourceRoot = ".";
patches = [ ./fix-build-on-darwin.patch ];
patches = [
./fix-build-on-darwin.patch
./fix-cross-mingw-build.patch
];
patchFlags = [ "-p0" ];
postPatch = lib.optionalString stdenv.hostPlatform.isMinGW ''
substituteInPlace CPP/7zip/7zip_gcc.mak C/7zip_gcc_c.mak \
--replace windres.exe ${stdenv.cc.targetPrefix}windres
'';
NIX_CFLAGS_COMPILE = lib.optionals stdenv.isDarwin [
"-Wno-deprecated-copy-dtor"
] ++ lib.optionals stdenv.hostPlatform.isMinGW [
"-Wno-conversion"
"-Wno-unused-macros"
];
inherit makefile;
@ -73,7 +84,8 @@ stdenv.mkDerivation rec {
# aarch64-darwin so we don't need additional changes for it
++ lib.optionals stdenv.isDarwin [ "MACOSX_DEPLOYMENT_TARGET=10.16" ]
# it's the compression code with the restriction, see DOC/License.txt
++ lib.optionals (!enableUnfree) [ "DISABLE_RAR_COMPRESS=true" ];
++ lib.optionals (!enableUnfree) [ "DISABLE_RAR_COMPRESS=true" ]
++ lib.optionals (stdenv.hostPlatform.isMinGW) [ "IS_MINGW=1" "MSYSTEM=1" ];
nativeBuildInputs = lib.optionals useUasm [ uasm ];
@ -84,7 +96,7 @@ stdenv.mkDerivation rec {
installPhase = ''
runHook preInstall
install -Dm555 -t $out/bin b/*/7zz
install -Dm555 -t $out/bin b/*/7zz${stdenv.hostPlatform.extensions.executable}
install -Dm444 -t $out/share/doc/${pname} ../../../../DOC/*.txt
runHook postInstall
@ -109,7 +121,7 @@ stdenv.mkDerivation rec {
# the unRAR compression code is disabled by default
lib.optionals enableUnfree [ unfree ];
maintainers = with maintainers; [ anna328p peterhoeg jk ];
platforms = platforms.unix;
platforms = platforms.unix ++ platforms.windows;
mainProgram = "7zz";
};
}

View File

@ -0,0 +1,659 @@
diff --git C/7zVersion.rc C/7zVersion.rc
index 6ed26de7445..675e9bb0321 100755
--- C/7zVersion.rc
+++ C/7zVersion.rc
@@ -5,7 +5,7 @@
#define MY_VFT_APP 0x00000001L
#define MY_VFT_DLL 0x00000002L
-// #include <WinVer.h>
+// #include <winver.h>
#ifndef MY_VERSION
#include "7zVersion.h"
diff --git C/7zip_gcc_c.mak C/7zip_gcc_c.mak
index d41810478db..43cdd51271e 100755
--- C/7zip_gcc_c.mak
+++ C/7zip_gcc_c.mak
@@ -93,7 +93,7 @@ DEL_OBJ_EXE = -$(RM) $(O)\*.o $(O)\$(PROG).exe $(O)\$(PROG).dll
endif
-LIB2 = -lOle32 -loleaut32 -luuid -ladvapi32 -lUser32
+LIB2 = -lole32 -loleaut32 -luuid -ladvapi32 -luser32
CXXFLAGS_EXTRA = -DUNICODE -D_UNICODE
# -Wno-delete-non-virtual-dtor
diff --git C/Alloc.c C/Alloc.c
index 142a1ea2219..0d0107c56f4 100755
--- C/Alloc.c
+++ C/Alloc.c
@@ -6,7 +6,7 @@
#include <stdio.h>
#ifdef _WIN32
-#include <Windows.h>
+#include <windows.h>
#endif
#include <stdlib.h>
diff --git C/CpuArch.c C/CpuArch.c
index a0e93e8b08e..36e0be0b1c8 100755
--- C/CpuArch.c
+++ C/CpuArch.c
@@ -217,7 +217,7 @@ BoolInt CPU_Is_InOrder()
}
#if !defined(MY_CPU_AMD64) && defined(_WIN32)
-#include <Windows.h>
+#include <windows.h>
static BoolInt CPU_Sys_Is_SSE_Supported()
{
OSVERSIONINFO vi;
@@ -275,7 +275,7 @@ BoolInt CPU_IsSupported_SHA()
// #include <stdio.h>
#ifdef _WIN32
-#include <Windows.h>
+#include <windows.h>
#endif
BoolInt CPU_IsSupported_AVX2()
@@ -351,7 +351,7 @@ BoolInt CPU_IsSupported_PageGB()
#ifdef _WIN32
-#include <Windows.h>
+#include <windows.h>
BoolInt CPU_IsSupported_CRC32() { return IsProcessorFeaturePresent(PF_ARM_V8_CRC32_INSTRUCTIONS_AVAILABLE) ? 1 : 0; }
BoolInt CPU_IsSupported_CRYPTO() { return IsProcessorFeaturePresent(PF_ARM_V8_CRYPTO_INSTRUCTIONS_AVAILABLE) ? 1 : 0; }
diff --git C/DllSecur.c C/DllSecur.c
index a37c1b3e2c5..16755bba930 100755
--- C/DllSecur.c
+++ C/DllSecur.c
@@ -5,7 +5,7 @@
#ifdef _WIN32
-#include <Windows.h>
+#include <windows.h>
#include "DllSecur.h"
diff --git C/Threads.h C/Threads.h
index e9493afff62..71972558d48 100755
--- C/Threads.h
+++ C/Threads.h
@@ -5,7 +5,7 @@
#define __7Z_THREADS_H
#ifdef _WIN32
-#include <Windows.h>
+#include <windows.h>
#else
#if defined(__linux__)
diff --git C/Util/7zipInstall/7zipInstall.c C/Util/7zipInstall/7zipInstall.c
index 2c498bb4392..d791bc4181c 100755
--- C/Util/7zipInstall/7zipInstall.c
+++ C/Util/7zipInstall/7zipInstall.c
@@ -10,7 +10,7 @@
#endif
#include <windows.h>
-#include <ShlObj.h>
+#include <shlobj.h>
#include "../../7z.h"
#include "../../7zAlloc.h"
diff --git C/Util/7zipInstall/resource.rc C/Util/7zipInstall/resource.rc
index 4d6a91feda1..c19f601f69f 100755
--- C/Util/7zipInstall/resource.rc
+++ C/Util/7zipInstall/resource.rc
@@ -1,6 +1,6 @@
#include <winnt.h>
#include <WinUser.h>
-#include <CommCtrl.h>
+#include <commctrl.h>
#define USE_COPYRIGHT_CR
#include "../../7zVersion.rc"
diff --git C/Util/7zipUninstall/7zipUninstall.c C/Util/7zipUninstall/7zipUninstall.c
index 89cd764dbe9..32ece1c6c14 100755
--- C/Util/7zipUninstall/7zipUninstall.c
+++ C/Util/7zipUninstall/7zipUninstall.c
@@ -11,7 +11,7 @@
// #define SZ_ERROR_ABORT 100
#include <windows.h>
-#include <ShlObj.h>
+#include <shlobj.h>
#include "../../7zVersion.h"
diff --git C/Util/7zipUninstall/resource.rc C/Util/7zipUninstall/resource.rc
index 506e0665cdd..ae1dfedc83b 100755
--- C/Util/7zipUninstall/resource.rc
+++ C/Util/7zipUninstall/resource.rc
@@ -1,6 +1,6 @@
#include <winnt.h>
#include <WinUser.h>
-#include <CommCtrl.h>
+#include <commctrl.h>
#define USE_COPYRIGHT_CR
#include "../../7zVersion.rc"
diff --git CPP/7zip/7zip_gcc.mak CPP/7zip/7zip_gcc.mak
index 2a24e06aa1f..fb32b933201 100755
--- CPP/7zip/7zip_gcc.mak
+++ CPP/7zip/7zip_gcc.mak
@@ -113,8 +113,8 @@ MY_MKDIR=mkdir
DEL_OBJ_EXE = -$(RM) $(O)\*.o $(O)\$(PROG).exe $(O)\$(PROG).dll
endif
-LIB2_GUI = -lOle32 -lGdi32 -lComctl32 -lComdlg32 $(LIB_HTMLHELP)
-LIB2 = -loleaut32 -luuid -ladvapi32 -lUser32 $(LIB2_GUI)
+LIB2_GUI = -lole32 -lgdi32 -lcomctl32 -lcomdlg32 $(LIB_HTMLHELP)
+LIB2 = -loleaut32 -luuid -ladvapi32 -luser32 $(LIB2_GUI)
CXXFLAGS_EXTRA = -DUNICODE -D_UNICODE
# -Wno-delete-non-virtual-dtor
diff --git CPP/7zip/Bundles/Fm/StdAfx.h CPP/7zip/Bundles/Fm/StdAfx.h
index c15e07939da..d1e094cc339 100755
--- CPP/7zip/Bundles/Fm/StdAfx.h
+++ CPP/7zip/Bundles/Fm/StdAfx.h
@@ -9,8 +9,8 @@
#include "../../../Common/Common.h"
-#include <CommCtrl.h>
-#include <ShlObj.h>
-#include <Shlwapi.h>
+#include <commctrl.h>
+#include <shlobj.h>
+#include <shlwapi.h>
#endif
diff --git CPP/7zip/Bundles/SFXWin/SfxWin.cpp CPP/7zip/Bundles/SFXWin/SfxWin.cpp
index cf3bad389a0..260484c11e4 100755
--- CPP/7zip/Bundles/SFXWin/SfxWin.cpp
+++ CPP/7zip/Bundles/SFXWin/SfxWin.cpp
@@ -4,7 +4,7 @@
#include "../../../Common/MyWindows.h"
-#include <Shlwapi.h>
+#include <shlwapi.h>
#include "../../../Common/MyInitGuid.h"
diff --git CPP/7zip/Bundles/SFXWin/StdAfx.h CPP/7zip/Bundles/SFXWin/StdAfx.h
index f263ecb77c5..e96640e995c 100755
--- CPP/7zip/Bundles/SFXWin/StdAfx.h
+++ CPP/7zip/Bundles/SFXWin/StdAfx.h
@@ -6,7 +6,7 @@
#include "../../../Common/Common.h"
#include <commctrl.h>
-#include <ShlObj.h>
+#include <shlobj.h>
// #define printf(x) NO_PRINTF_(x)
// #define sprintf(x) NO_SPRINTF_(x)
diff --git CPP/7zip/Crypto/RandGen.cpp CPP/7zip/Crypto/RandGen.cpp
index c123109a15b..c3709ccff6b 100755
--- CPP/7zip/Crypto/RandGen.cpp
+++ CPP/7zip/Crypto/RandGen.cpp
@@ -19,7 +19,7 @@
#ifdef USE_STATIC_RtlGenRandom
-// #include <NTSecAPI.h>
+// #include <ntsecapi.h>
EXTERN_C_BEGIN
#ifndef RtlGenRandom
diff --git CPP/7zip/GuiCommon.rc CPP/7zip/GuiCommon.rc
index 565ee702ef9..13043ef4c53 100755
--- CPP/7zip/GuiCommon.rc
+++ CPP/7zip/GuiCommon.rc
@@ -4,7 +4,7 @@
// #include <WinUser.h>
// for Windows CE:
-#include <CommCtrl.h>
+#include <commctrl.h>
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
diff --git CPP/7zip/MyVersionInfo.rc CPP/7zip/MyVersionInfo.rc
index eddf8935c84..90e65376be8 100755
--- CPP/7zip/MyVersionInfo.rc
+++ CPP/7zip/MyVersionInfo.rc
@@ -1,2 +1,2 @@
#include "MyVersion.h"
-#include "..\..\C\7zVersion.rc"
+#include "../../C/7zVersion.rc"
diff --git CPP/7zip/UI/Common/Update.cpp CPP/7zip/UI/Common/Update.cpp
index 5490ff445a0..003ee6634ea 100755
--- CPP/7zip/UI/Common/Update.cpp
+++ CPP/7zip/UI/Common/Update.cpp
@@ -1163,7 +1163,7 @@ static HRESULT EnumerateInArchiveItems(
#if defined(_WIN32) && !defined(UNDER_CE)
-#include <MAPI.h>
+#include <mapi.h>
#endif
diff --git CPP/7zip/UI/Console/Main.cpp CPP/7zip/UI/Console/Main.cpp
index 363572cd3dd..765f55293a7 100755
--- CPP/7zip/UI/Console/Main.cpp
+++ CPP/7zip/UI/Console/Main.cpp
@@ -5,7 +5,7 @@
#include "../../../Common/MyWindows.h"
#ifdef _WIN32
-#include <Psapi.h>
+#include <psapi.h>
#else
#include <unistd.h>
#include <sys/ioctl.h>
diff --git CPP/7zip/UI/Explorer/ContextMenu.h CPP/7zip/UI/Explorer/ContextMenu.h
index e60ffccf11b..aea34e7de07 100755
--- CPP/7zip/UI/Explorer/ContextMenu.h
+++ CPP/7zip/UI/Explorer/ContextMenu.h
@@ -5,7 +5,7 @@
#include "../../../Common/MyWindows.h"
-#include <ShlObj.h>
+#include <shlobj.h>
#include "MyExplorerCommand.h"
diff --git CPP/7zip/UI/Explorer/DllExportsExplorer.cpp CPP/7zip/UI/Explorer/DllExportsExplorer.cpp
index 84c92e2e2d3..df126d8d232 100755
--- CPP/7zip/UI/Explorer/DllExportsExplorer.cpp
+++ CPP/7zip/UI/Explorer/DllExportsExplorer.cpp
@@ -11,7 +11,7 @@
#include "../../../Common/MyWindows.h"
// #include "../../../Common/IntToString.h"
-#include <OleCtl.h>
+#include <olectl.h>
#include "../../../Common/MyInitGuid.h"
diff --git CPP/7zip/UI/Explorer/MyExplorerCommand.h CPP/7zip/UI/Explorer/MyExplorerCommand.h
index b1997f0da6e..d1d038df11b 100755
--- CPP/7zip/UI/Explorer/MyExplorerCommand.h
+++ CPP/7zip/UI/Explorer/MyExplorerCommand.h
@@ -17,7 +17,7 @@
ShObjIdl.h : old Windows SDK
ShObjIdl_core.h : new Windows 10 SDK */
-#include <ShObjIdl.h>
+#include <shobjidl.h>
#ifndef __IShellItem_INTERFACE_DEFINED__
#define __IShellItem_INTERFACE_DEFINED__
diff --git CPP/7zip/UI/Explorer/StdAfx.h CPP/7zip/UI/Explorer/StdAfx.h
index 35e8b337d68..16883ceda1b 100755
--- CPP/7zip/UI/Explorer/StdAfx.h
+++ CPP/7zip/UI/Explorer/StdAfx.h
@@ -9,6 +9,6 @@
#include "../../../Common/Common.h"
-#include <ShlObj.h>
+#include <shlobj.h>
#endif
diff --git CPP/7zip/UI/FileManager/BrowseDialog.cpp CPP/7zip/UI/FileManager/BrowseDialog.cpp
index e43172385b6..286faeeb660 100755
--- CPP/7zip/UI/FileManager/BrowseDialog.cpp
+++ CPP/7zip/UI/FileManager/BrowseDialog.cpp
@@ -4,7 +4,7 @@
#include "../../../Common/MyWindows.h"
-#include <CommCtrl.h>
+#include <commctrl.h>
#ifndef UNDER_CE
#include "../../../Windows/CommonDialog.h"
diff --git CPP/7zip/UI/FileManager/FM.cpp CPP/7zip/UI/FileManager/FM.cpp
index b0b3715c9a5..14af8c32288 100755
--- CPP/7zip/UI/FileManager/FM.cpp
+++ CPP/7zip/UI/FileManager/FM.cpp
@@ -4,7 +4,7 @@
#include "../../../Common/MyWindows.h"
-#include <Shlwapi.h>
+#include <shlwapi.h>
#include "../../../../C/Alloc.h"
#ifdef _WIN32
diff --git CPP/7zip/UI/FileManager/FSFolderCopy.cpp CPP/7zip/UI/FileManager/FSFolderCopy.cpp
index b0e1146816d..16208e58f6b 100755
--- CPP/7zip/UI/FileManager/FSFolderCopy.cpp
+++ CPP/7zip/UI/FileManager/FSFolderCopy.cpp
@@ -4,7 +4,7 @@
#include "../../../Common/MyWindows.h"
-#include <WinBase.h>
+#include <winbase.h>
#include "../../../Common/Defs.h"
#include "../../../Common/StringConvert.h"
diff --git CPP/7zip/UI/FileManager/HelpUtils.cpp CPP/7zip/UI/FileManager/HelpUtils.cpp
index 94253a70f5c..3f4479dbddd 100755
--- CPP/7zip/UI/FileManager/HelpUtils.cpp
+++ CPP/7zip/UI/FileManager/HelpUtils.cpp
@@ -24,7 +24,7 @@ void ShowHelpWindow(LPCSTR)
#include "../../../Windows/FileName.h"
#else
-#include <HtmlHelp.h>
+#include <htmlhelp.h>
#endif
#include "../../../Common/StringConvert.h"
diff --git CPP/7zip/UI/FileManager/MyWindowsNew.h CPP/7zip/UI/FileManager/MyWindowsNew.h
index c0fe8439b98..ba7d608b90e 100755
--- CPP/7zip/UI/FileManager/MyWindowsNew.h
+++ CPP/7zip/UI/FileManager/MyWindowsNew.h
@@ -5,7 +5,7 @@
#ifdef _MSC_VER
-#include <ShObjIdl.h>
+#include <shobjidl.h>
#ifndef __ITaskbarList3_INTERFACE_DEFINED__
#define __ITaskbarList3_INTERFACE_DEFINED__
diff --git CPP/7zip/UI/FileManager/Panel.cpp CPP/7zip/UI/FileManager/Panel.cpp
index f7162e502ac..2eaf9e1266b 100755
--- CPP/7zip/UI/FileManager/Panel.cpp
+++ CPP/7zip/UI/FileManager/Panel.cpp
@@ -2,7 +2,7 @@
#include "StdAfx.h"
-#include <WindowsX.h>
+#include <windowsx.h>
// #include <stdio.h>
#include "../../../Common/IntToString.h"
diff --git CPP/7zip/UI/FileManager/Panel.h CPP/7zip/UI/FileManager/Panel.h
index 5a9fef01de2..1f2b86a8e43 100755
--- CPP/7zip/UI/FileManager/Panel.h
+++ CPP/7zip/UI/FileManager/Panel.h
@@ -5,7 +5,7 @@
#include "../../../Common/MyWindows.h"
-#include <ShlObj.h>
+#include <shlobj.h>
#include "../../../../C/Alloc.h"
diff --git CPP/7zip/UI/FileManager/PanelItemOpen.cpp CPP/7zip/UI/FileManager/PanelItemOpen.cpp
index 6af42c96923..595acdbb563 100755
--- CPP/7zip/UI/FileManager/PanelItemOpen.cpp
+++ CPP/7zip/UI/FileManager/PanelItemOpen.cpp
@@ -4,7 +4,7 @@
#include "../../../Common/MyWindows.h"
-#include <TlHelp32.h>
+#include <tlhelp32.h>
#include "../../../Common/IntToString.h"
diff --git CPP/7zip/UI/FileManager/RootFolder.cpp CPP/7zip/UI/FileManager/RootFolder.cpp
index 6984434026f..d50c1eb832e 100755
--- CPP/7zip/UI/FileManager/RootFolder.cpp
+++ CPP/7zip/UI/FileManager/RootFolder.cpp
@@ -4,7 +4,7 @@
#include "../../../Common/MyWindows.h"
-#include <ShlObj.h>
+#include <shlobj.h>
#include "../../../Common/StringConvert.h"
diff --git CPP/7zip/UI/FileManager/StdAfx.h CPP/7zip/UI/FileManager/StdAfx.h
index 74cfbc6deef..88960aa8c58 100755
--- CPP/7zip/UI/FileManager/StdAfx.h
+++ CPP/7zip/UI/FileManager/StdAfx.h
@@ -14,8 +14,8 @@
// #include "../../../Common/MyWindows.h"
-// #include <CommCtrl.h>
-// #include <ShlObj.h>
-// #include <Shlwapi.h>
+// #include <commctrl.h>
+// #include <shlobj.h>
+// #include <shlwapi.h>
#endif
diff --git CPP/7zip/UI/FileManager/SysIconUtils.cpp CPP/7zip/UI/FileManager/SysIconUtils.cpp
index 43c613244a8..1cdf1d4c5b3 100755
--- CPP/7zip/UI/FileManager/SysIconUtils.cpp
+++ CPP/7zip/UI/FileManager/SysIconUtils.cpp
@@ -10,7 +10,7 @@
#include "SysIconUtils.h"
-#include <ShlObj.h>
+#include <shlobj.h>
#define MY_CAST_FUNC (void(*)())
// #define MY_CAST_FUNC
diff --git CPP/7zip/UI/FileManager/SysIconUtils.h CPP/7zip/UI/FileManager/SysIconUtils.h
index ba747d9ded0..2eedc4be403 100755
--- CPP/7zip/UI/FileManager/SysIconUtils.h
+++ CPP/7zip/UI/FileManager/SysIconUtils.h
@@ -5,7 +5,7 @@
#include "../../../Common/MyWindows.h"
-#include <CommCtrl.h>
+#include <commctrl.h>
#include "../../../Common/MyString.h"
diff --git CPP/7zip/UI/FileManager/SystemPage.cpp CPP/7zip/UI/FileManager/SystemPage.cpp
index ff68172e2bf..06025259c85 100755
--- CPP/7zip/UI/FileManager/SystemPage.cpp
+++ CPP/7zip/UI/FileManager/SystemPage.cpp
@@ -4,7 +4,7 @@
#include "../../../Common/MyWindows.h"
-#include <ShlObj.h>
+#include <shlobj.h>
#include "../../../Common/Defs.h"
#include "../../../Common/StringConvert.h"
diff --git CPP/7zip/UI/GUI/GUI.cpp CPP/7zip/UI/GUI/GUI.cpp
index 0cc2ee3afcc..4ffc2384668 100755
--- CPP/7zip/UI/GUI/GUI.cpp
+++ CPP/7zip/UI/GUI/GUI.cpp
@@ -8,7 +8,7 @@
#include "../../../Common/MyWindows.h"
-#include <Shlwapi.h>
+#include <shlwapi.h>
#include "../../../Common/MyInitGuid.h"
diff --git CPP/7zip/UI/GUI/StdAfx.h CPP/7zip/UI/GUI/StdAfx.h
index 498b2fcbe4b..3c830f6a3d4 100755
--- CPP/7zip/UI/GUI/StdAfx.h
+++ CPP/7zip/UI/GUI/StdAfx.h
@@ -11,9 +11,9 @@
// #include "../../../Common/MyWindows.h"
-// #include <CommCtrl.h>
-// #include <ShlObj.h>
-// #include <Shlwapi.h>
+// #include <commctrl.h>
+// #include <shlobj.h>
+// #include <shlwapi.h>
// #define printf(x) NO_PRINTF_(x)
// #define sprintf(x) NO_SPRINTF_(x)
diff --git CPP/Common/MyInitGuid.h CPP/Common/MyInitGuid.h
index 6895097371a..6b2f3f35d5a 100755
--- CPP/Common/MyInitGuid.h
+++ CPP/Common/MyInitGuid.h
@@ -29,7 +29,7 @@ Also we need IID_IUnknown that is initialized in some file for linking:
#include <basetyps.h>
#endif
-#include <InitGuid.h>
+#include <initguid.h>
#ifdef UNDER_CE
DEFINE_GUID(IID_IUnknown,
diff --git CPP/Common/MyWindows.h CPP/Common/MyWindows.h
index 69eed8f6446..f48680f9d05 100755
--- CPP/Common/MyWindows.h
+++ CPP/Common/MyWindows.h
@@ -5,7 +5,7 @@
#ifdef _WIN32
-#include <Windows.h>
+#include <windows.h>
#ifdef UNDER_CE
#undef VARIANT_TRUE
diff --git CPP/Windows/Control/ComboBox.h CPP/Windows/Control/ComboBox.h
index 8ab9ce5027d..8b12599b785 100755
--- CPP/Windows/Control/ComboBox.h
+++ CPP/Windows/Control/ComboBox.h
@@ -5,7 +5,7 @@
#include "../../Common/MyWindows.h"
-#include <CommCtrl.h>
+#include <commctrl.h>
#include "../Window.h"
diff --git CPP/Windows/Control/ImageList.h CPP/Windows/Control/ImageList.h
index e59443058b8..f72ea0d1990 100755
--- CPP/Windows/Control/ImageList.h
+++ CPP/Windows/Control/ImageList.h
@@ -3,7 +3,7 @@
#ifndef __WINDOWS_CONTROL_IMAGE_LIST_H
#define __WINDOWS_CONTROL_IMAGE_LIST_H
-#include <CommCtrl.h>
+#include <commctrl.h>
#include "../Defs.h"
diff --git CPP/Windows/Control/ListView.h CPP/Windows/Control/ListView.h
index 56e1100c726..cbd9cd1e21d 100755
--- CPP/Windows/Control/ListView.h
+++ CPP/Windows/Control/ListView.h
@@ -5,7 +5,7 @@
#include "../../Common/MyWindows.h"
-#include <CommCtrl.h>
+#include <commctrl.h>
#include "../Window.h"
diff --git CPP/Windows/Control/ProgressBar.h CPP/Windows/Control/ProgressBar.h
index 741315dd4dd..f18d89c14f0 100755
--- CPP/Windows/Control/ProgressBar.h
+++ CPP/Windows/Control/ProgressBar.h
@@ -5,7 +5,7 @@
#include "../../Common/MyWindows.h"
-#include <CommCtrl.h>
+#include <commctrl.h>
#include "../Window.h"
diff --git CPP/Windows/Control/PropertyPage.h CPP/Windows/Control/PropertyPage.h
index 97c87b3b453..551c95994c2 100755
--- CPP/Windows/Control/PropertyPage.h
+++ CPP/Windows/Control/PropertyPage.h
@@ -5,7 +5,7 @@
#include "../../Common/MyWindows.h"
-#include <PrSht.h>
+#include <prsht.h>
#include "Dialog.h"
diff --git CPP/Windows/FileIO.h CPP/Windows/FileIO.h
index 9146491d236..e11022f82d4 100755
--- CPP/Windows/FileIO.h
+++ CPP/Windows/FileIO.h
@@ -17,7 +17,7 @@
#ifdef _WIN32
#if defined(_WIN32) && !defined(UNDER_CE)
-#include <WinIoCtl.h>
+#include <winioctl.h>
#endif
#else
diff --git CPP/Windows/ProcessUtils.h CPP/Windows/ProcessUtils.h
index 64ebe3775e4..de46c6f52a5 100755
--- CPP/Windows/ProcessUtils.h
+++ CPP/Windows/ProcessUtils.h
@@ -3,7 +3,7 @@
#ifndef __WINDOWS_PROCESS_UTILS_H
#define __WINDOWS_PROCESS_UTILS_H
-#include <Psapi.h>
+#include <psapi.h>
#include "../Common/MyString.h"
diff --git CPP/Windows/SecurityUtils.h CPP/Windows/SecurityUtils.h
index de62035ec86..18a083fc580 100755
--- CPP/Windows/SecurityUtils.h
+++ CPP/Windows/SecurityUtils.h
@@ -3,7 +3,7 @@
#ifndef __WINDOWS_SECURITY_UTILS_H
#define __WINDOWS_SECURITY_UTILS_H
-#include <NTSecAPI.h>
+#include <ntsecapi.h>
#include "Defs.h"
diff --git CPP/Windows/Shell.h CPP/Windows/Shell.h
index 30388bc5a70..dc3daa5e60b 100755
--- CPP/Windows/Shell.h
+++ CPP/Windows/Shell.h
@@ -4,7 +4,7 @@
#define __WINDOWS_SHELL_H
#include "../Common/MyWindows.h"
-#include <ShlObj.h>
+#include <shlobj.h>
#include "../Common/MyString.h"

View File

@ -5,16 +5,16 @@
buildGoModule rec {
pname = "easeprobe";
version = "2.0.0";
version = "2.0.1";
src = fetchFromGitHub {
owner = "megaease";
repo = pname;
rev = "v${version}";
sha256 = "sha256-y9R2OgK+slQUvUMS3E6aX8WVCQ1fSMAruGKggxYRniA=";
sha256 = "sha256-FBraLP/wsoJiVLjAqNZettMDOd8W8l1j4t8ETyvqrcQ=";
};
vendorSha256 = "sha256-ZfqBSPnIm2GHPREowHmEEPnOovYjoarxrkPeYmZBkIc=";
vendorHash = "sha256-Z2JLFLVTdPGFFHnjNA1JS1lYjGimdvMLiXQyNi+91Hc=";
subPackages = [ "cmd/easeprobe" ];

View File

@ -1,29 +1,19 @@
{ lib
, fetchFromGitHub
, fetchpatch
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "esptool";
version = "4.4";
version = "4.5";
src = fetchFromGitHub {
owner = "espressif";
repo = "esptool";
rev = "v${version}";
hash = "sha256-haLwf3loOvqdqQN/iuVBciQ6nCnuc9AqqOGKvDwLBHE=";
hash = "sha256-SwMdemCk3e3RyXTzoXIqDRywpg3ogE9nQjXGBz0BjwE=";
};
patches = [
./test-call-bin-directly.patch
(fetchpatch {
name = "bitstring-4-compatibility.patch";
url = "https://github.com/espressif/esptool/commit/ee27a6437576797d5f58c31e1c39f3a232a71df0.patch";
hash = "sha256-8/AzR3HK79eQQRSaGEKU4YKn/piPCPjm/G9pvizKuUE=";
})
];
propagatedBuildInputs = with python3.pkgs; [
bitstring
cryptography
@ -34,19 +24,18 @@ python3.pkgs.buildPythonApplication rec {
nativeCheckInputs = with python3.pkgs; [
pyelftools
pytest
pytestCheckHook
];
# tests mentioned in `.github/workflows/test_esptool.yml`
checkPhase = ''
runHook preCheck
export ESPSECURE_PY=$out/bin/espsecure.py
export ESPTOOL_PY=$out/bin/esptool.py
${python3.interpreter} test/test_imagegen.py
${python3.interpreter} test/test_espsecure.py
${python3.interpreter} test/test_merge_bin.py
${python3.interpreter} test/test_modules.py
pytest test/test_imagegen.py
pytest test/test_espsecure.py
pytest test/test_merge_bin.py
pytest test/test_image_info.py
pytest test/test_modules.py
runHook postCheck
'';

View File

@ -1,89 +0,0 @@
diff --git a/test/test_espsecure.py b/test/test_espsecure.py
index 25b0b87..627005c 100755
--- a/test/test_espsecure.py
+++ b/test/test_espsecure.py
@@ -35,7 +35,7 @@ class EspSecureTestCase:
Returns output as a string if there is any,
raises an exception if espsecure.py fails
"""
- cmd = [sys.executable, ESPSECURE_PY] + args.split(" ")
+ cmd = [ESPSECURE_PY] + args.split(" ")
print("\nExecuting {}...".format(" ".join(cmd)))
try:
diff --git a/test/test_esptool.py b/test/test_esptool.py
index 042a1ce..b294e26 100755
--- a/test/test_esptool.py
+++ b/test/test_esptool.py
@@ -57,7 +57,10 @@ try:
ESPTOOL_PY = os.environ["ESPTOOL_PY"]
except KeyError:
ESPTOOL_PY = os.path.join(TEST_DIR, "..", "esptool/__init__.py")
-ESPSECURE_PY = os.path.join(TEST_DIR, "..", "espsecure/__init__.py")
+try:
+ ESPSECURE_PY = os.environ["ESPSECURE_PY"]
+except KeyError:
+ ESPSECURE_PY = os.path.join(TEST_DIR, "..", "espsecure/__init__.py")
ESPRFC2217SERVER_PY = os.path.join(TEST_DIR, "..", "esp_rfc2217_server.py")
RETURN_CODE_FATAL_ERROR = 2
@@ -74,7 +77,6 @@ class ESPRFC2217Server(object):
def __init__(self, rfc2217_port=None):
self.port = rfc2217_port or self.get_free_port()
self.cmd = [
- sys.executable,
ESPRFC2217SERVER_PY,
"-p",
str(self.port),
@@ -130,7 +132,7 @@ class ESPRFC2217Server(object):
class EsptoolTestCase:
def run_espsecure(self, args):
- cmd = [sys.executable, ESPSECURE_PY] + args.split(" ")
+ cmd = [ESPSECURE_PY] + args.split(" ")
print("\nExecuting {}...".format(" ".join(cmd)))
try:
output = subprocess.check_output(
@@ -155,7 +157,7 @@ class EsptoolTestCase:
Raises an exception if esptool.py fails.
"""
trace_args = ["--trace"] if arg_trace else []
- cmd = [sys.executable, ESPTOOL_PY] + trace_args
+ cmd = [ESPTOOL_PY] + trace_args
if chip_name or arg_chip is not None and chip_name != "auto":
cmd += ["--chip", chip_name or arg_chip]
if rfc2217_port or arg_port is not None:
diff --git a/test/test_imagegen.py b/test/test_imagegen.py
index a1feec2..01bd59c 100755
--- a/test/test_imagegen.py
+++ b/test/test_imagegen.py
@@ -108,7 +108,7 @@ class BaseTestCase:
Run esptool.py image_info on a binary file,
assert no red flags about contents.
"""
- cmd = [sys.executable, ESPTOOL_PY, "--chip", chip, "image_info", binpath]
+ cmd = [ESPTOOL_PY, "--chip", chip, "image_info", binpath]
try:
output = subprocess.check_output(cmd)
output = output.decode("utf-8")
@@ -123,7 +123,7 @@ class BaseTestCase:
def run_elf2image(self, chip, elf_path, version=None, extra_args=[]):
"""Run elf2image on elf_path"""
- cmd = [sys.executable, ESPTOOL_PY, "--chip", chip, "elf2image"]
+ cmd = [ESPTOOL_PY, "--chip", chip, "elf2image"]
if version is not None:
cmd += ["--version", str(version)]
cmd += [elf_path] + extra_args
diff --git a/test/test_merge_bin.py b/test/test_merge_bin.py
index 8230069..2df5f8c 100755
--- a/test/test_merge_bin.py
+++ b/test/test_merge_bin.py
@@ -39,7 +39,6 @@ class TestMergeBin:
output_file.close()
cmd = [
- sys.executable,
ESPTOOL_PY,
"--chip",
chip,

View File

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "vsh";
version = "0.12.1";
version = "0.12.2";
src = fetchFromGitHub {
owner = "fishi0x01";
repo = "vsh";
rev = "v${version}";
sha256 = "0skd16j969mb2kgq503wskaw8clyhkw135ny2nsqv5j2zjpr71ap";
sha256 = "13qa9r7kij6aqhackzmsn38vyhmajgmhflnrd9rarfhhyg6ldv4z";
};
# vendor directory is part of repository

View File

@ -24,18 +24,15 @@ let
};
makeDeps = pkgs: small:
[ pkgs.frozendict ]
++ (
if small
then [
markdown-it-py-no-tests
mdit-py-plugins-no-tests
]
else [
pkgs.markdown-it-py
pkgs.mdit-py-plugins
]
);
if small
then [
markdown-it-py-no-tests
mdit-py-plugins-no-tests
]
else [
pkgs.markdown-it-py
pkgs.mdit-py-plugins
];
in
python.pkgs.buildPythonApplication rec {

View File

@ -0,0 +1,262 @@
from collections.abc import Mapping, MutableMapping, Sequence
from dataclasses import dataclass
from typing import Any, cast, Optional
from urllib.parse import quote
from .md import Renderer
import markdown_it
from markdown_it.token import Token
from markdown_it.utils import OptionsDict
_asciidoc_escapes = {
# escape all dots, just in case one is pasted at SOL
ord('.'): "{zwsp}.",
# may be replaced by typographic variants
ord("'"): "{apos}",
ord('"'): "{quot}",
# passthrough character
ord('+'): "{plus}",
# table marker
ord('|'): "{vbar}",
# xml entity reference
ord('&'): "{amp}",
# crossrefs. < needs extra escaping because links break in odd ways if they start with it
ord('<'): "{zwsp}+<+{zwsp}",
ord('>'): "{gt}",
# anchors, links, block attributes
ord('['): "{startsb}",
ord(']'): "{endsb}",
# superscript, subscript
ord('^'): "{caret}",
ord('~'): "{tilde}",
# bold
ord('*'): "{asterisk}",
# backslash
ord('\\'): "{backslash}",
# inline code
ord('`'): "{backtick}",
}
def asciidoc_escape(s: str) -> str:
s = s.translate(_asciidoc_escapes)
# :: is deflist item, ;; is has a replacement but no idea why
return s.replace("::", "{two-colons}").replace(";;", "{two-semicolons}")
@dataclass(kw_only=True)
class List:
head: str
@dataclass()
class Par:
sep: str
block_delim: str
continuing: bool = False
class AsciiDocRenderer(Renderer):
__output__ = "asciidoc"
_parstack: list[Par]
_list_stack: list[List]
_attrspans: list[str]
def __init__(self, manpage_urls: Mapping[str, str], parser: Optional[markdown_it.MarkdownIt] = None):
super().__init__(manpage_urls, parser)
self._parstack = [ Par("\n\n", "====") ]
self._list_stack = []
self._attrspans = []
def _enter_block(self, is_list: bool) -> None:
self._parstack.append(Par("\n+\n" if is_list else "\n\n", self._parstack[-1].block_delim + "="))
def _leave_block(self) -> None:
self._parstack.pop()
def _break(self, force: bool = False) -> str:
result = self._parstack[-1].sep if force or self._parstack[-1].continuing else ""
self._parstack[-1].continuing = True
return result
def _admonition_open(self, kind: str) -> str:
pbreak = self._break()
self._enter_block(False)
return f"{pbreak}[{kind}]\n{self._parstack[-2].block_delim}\n"
def _admonition_close(self) -> str:
self._leave_block()
return f"\n{self._parstack[-1].block_delim}\n"
def _list_open(self, token: Token, head: str) -> str:
attrs = []
if (idx := token.attrs.get('start')) is not None:
attrs.append(f"start={idx}")
if token.meta['compact']:
attrs.append('options="compact"')
if self._list_stack:
head *= len(self._list_stack[0].head) + 1
self._list_stack.append(List(head=head))
return f"{self._break()}[{','.join(attrs)}]"
def _list_close(self) -> str:
self._list_stack.pop()
return ""
def text(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._parstack[-1].continuing = True
return asciidoc_escape(token.content)
def paragraph_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._break()
def paragraph_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return ""
def hardbreak(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return " +\n"
def softbreak(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return f" "
def code_inline(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._parstack[-1].continuing = True
return f"``{asciidoc_escape(token.content)}``"
def code_block(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self.fence(token, tokens, i, options, env)
def link_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._parstack[-1].continuing = True
return f"link:{quote(cast(str, token.attrs['href']), safe='/:')}["
def link_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return "]"
def list_item_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._enter_block(True)
# allow the next token to be a block or an inline.
return f'\n{self._list_stack[-1].head} {{empty}}'
def list_item_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._leave_block()
return "\n"
def bullet_list_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._list_open(token, '*')
def bullet_list_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._list_close()
def em_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return "__"
def em_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return "__"
def strong_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return "**"
def strong_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return "**"
def fence(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
attrs = f"[source,{token.info}]\n" if token.info else ""
code = token.content
if code.endswith('\n'):
code = code[:-1]
return f"{self._break(True)}{attrs}----\n{code}\n----"
def blockquote_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
pbreak = self._break(True)
self._enter_block(False)
return f"{pbreak}[quote]\n{self._parstack[-2].block_delim}\n"
def blockquote_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._leave_block()
return f"\n{self._parstack[-1].block_delim}"
def note_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._admonition_open("NOTE")
def note_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._admonition_close()
def caution_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._admonition_open("CAUTION")
def caution_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._admonition_close()
def important_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._admonition_open("IMPORTANT")
def important_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._admonition_close()
def tip_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._admonition_open("TIP")
def tip_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._admonition_close()
def warning_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._admonition_open("WARNING")
def warning_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._admonition_close()
def dl_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return f"{self._break()}[]"
def dl_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return ""
def dt_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._break()
def dt_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._enter_block(True)
return ":: {empty}"
def dd_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return ""
def dd_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._leave_block()
return "\n"
def myst_role(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._parstack[-1].continuing = True
content = asciidoc_escape(token.content)
if token.meta['name'] == 'manpage' and (url := self._manpage_urls.get(token.content)):
return f"link:{quote(url, safe='/:')}[{content}]"
return f"[.{token.meta['name']}]``{asciidoc_escape(token.content)}``"
def inline_anchor(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._parstack[-1].continuing = True
return f"[[{token.attrs['id']}]]"
def attr_span_begin(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._parstack[-1].continuing = True
(id_part, class_part) = ("", "")
if id := token.attrs.get('id'):
id_part = f"[[{id}]]"
if s := token.attrs.get('class'):
if s == 'keycap':
class_part = "kbd:["
self._attrspans.append("]")
else:
return super().attr_span_begin(token, tokens, i, options, env)
else:
self._attrspans.append("")
return id_part + class_part
def attr_span_end(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._attrspans.pop()
def heading_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return token.markup.replace("#", "=") + " "
def heading_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return "\n"
def ordered_list_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._list_open(token, '.')
def ordered_list_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._list_close()

View File

@ -0,0 +1,231 @@
from collections.abc import Mapping, MutableMapping, Sequence
from dataclasses import dataclass
from typing import Any, cast, Optional
from .md import md_escape, md_make_code, Renderer
import markdown_it
from markdown_it.token import Token
from markdown_it.utils import OptionsDict
@dataclass(kw_only=True)
class List:
next_idx: Optional[int] = None
compact: bool
first_item_seen: bool = False
@dataclass
class Par:
indent: str
continuing: bool = False
class CommonMarkRenderer(Renderer):
__output__ = "commonmark"
_parstack: list[Par]
_link_stack: list[str]
_list_stack: list[List]
def __init__(self, manpage_urls: Mapping[str, str], parser: Optional[markdown_it.MarkdownIt] = None):
super().__init__(manpage_urls, parser)
self._parstack = [ Par("") ]
self._link_stack = []
self._list_stack = []
def _enter_block(self, extra_indent: str) -> None:
self._parstack.append(Par(self._parstack[-1].indent + extra_indent))
def _leave_block(self) -> None:
self._parstack.pop()
self._parstack[-1].continuing = True
def _break(self) -> str:
self._parstack[-1].continuing = True
return f"\n{self._parstack[-1].indent}"
def _maybe_parbreak(self) -> str:
result = f"\n{self._parstack[-1].indent}" * 2 if self._parstack[-1].continuing else ""
self._parstack[-1].continuing = True
return result
def _admonition_open(self, kind: str) -> str:
pbreak = self._maybe_parbreak()
self._enter_block("")
return f"{pbreak}**{kind}:** "
def _admonition_close(self) -> str:
self._leave_block()
return ""
def _indent_raw(self, s: str) -> str:
if '\n' not in s:
return s
return f"\n{self._parstack[-1].indent}".join(s.splitlines())
def text(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._parstack[-1].continuing = True
return self._indent_raw(md_escape(token.content))
def paragraph_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._maybe_parbreak()
def paragraph_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return ""
def hardbreak(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return f" {self._break()}"
def softbreak(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._break()
def code_inline(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._parstack[-1].continuing = True
return md_make_code(token.content)
def code_block(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self.fence(token, tokens, i, options, env)
def link_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._parstack[-1].continuing = True
self._link_stack.append(cast(str, token.attrs['href']))
return "["
def link_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return f"]({md_escape(self._link_stack.pop())})"
def list_item_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
lst = self._list_stack[-1]
lbreak = "" if not lst.first_item_seen else self._break() * (1 if lst.compact else 2)
lst.first_item_seen = True
head = " -"
if lst.next_idx is not None:
head = f" {lst.next_idx}."
lst.next_idx += 1
self._enter_block(" " * (len(head) + 1))
return f'{lbreak}{head} '
def list_item_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._leave_block()
return ""
def bullet_list_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._list_stack.append(List(compact=bool(token.meta['compact'])))
return self._maybe_parbreak()
def bullet_list_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._list_stack.pop()
return ""
def em_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return "*"
def em_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return "*"
def strong_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return "**"
def strong_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return "**"
def fence(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
code = token.content
if code.endswith('\n'):
code = code[:-1]
pbreak = self._maybe_parbreak()
return pbreak + self._indent_raw(md_make_code(code, info=token.info, multiline=True))
def blockquote_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
pbreak = self._maybe_parbreak()
self._enter_block("> ")
return pbreak + "> "
def blockquote_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._leave_block()
return ""
def note_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._admonition_open("Note")
def note_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._admonition_close()
def caution_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._admonition_open("Caution")
def caution_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._admonition_close()
def important_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._admonition_open("Important")
def important_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._admonition_close()
def tip_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._admonition_open("Tip")
def tip_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._admonition_close()
def warning_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._admonition_open("Warning")
def warning_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return self._admonition_close()
def dl_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._list_stack.append(List(compact=False))
return ""
def dl_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._list_stack.pop()
return ""
def dt_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
pbreak = self._maybe_parbreak()
self._enter_block(" ")
# add an opening zero-width non-joiner to separate *our* emphasis from possible
# emphasis in the provided term
return f'{pbreak} - *{chr(0x200C)}'
def dt_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return f"{chr(0x200C)}*"
def dd_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._parstack[-1].continuing = True
return ""
def dd_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._leave_block()
return ""
def myst_role(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._parstack[-1].continuing = True
content = md_make_code(token.content)
if token.meta['name'] == 'manpage' and (url := self._manpage_urls.get(token.content)):
return f"[{content}]({url})"
return content # no roles in regular commonmark
def attr_span_begin(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
# there's no way we can emit attrspans correctly in all cases. we could use inline
# html for ids, but that would not round-trip. same holds for classes. since this
# renderer is only used for approximate options export and all of these things are
# not allowed in options we can ignore them for now.
return ""
def attr_span_end(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return ""
def heading_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return token.markup + " "
def heading_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
return "\n"
def ordered_list_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._list_stack.append(
List(next_idx = cast(int, token.attrs.get('start', 1)),
compact = bool(token.meta['compact'])))
return self._maybe_parbreak()
def ordered_list_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
self._list_stack.pop()
return ""

View File

@ -1,5 +1,4 @@
from collections.abc import Mapping, MutableMapping, Sequence
from frozendict import frozendict # type: ignore[attr-defined]
from typing import Any, cast, Optional, NamedTuple
import markdown_it

View File

@ -1,6 +1,5 @@
from abc import ABC
from collections.abc import Mapping, MutableMapping, Sequence
from frozendict import frozendict # type: ignore[attr-defined]
from typing import Any, Callable, cast, get_args, Iterable, Literal, NoReturn, Optional
import dataclasses
@ -28,6 +27,19 @@ _md_escape_table = {
def md_escape(s: str) -> str:
return s.translate(_md_escape_table)
def md_make_code(code: str, info: str = "", multiline: Optional[bool] = None) -> str:
# for multi-line code blocks we only have to count ` runs at the beginning
# of a line, but this is much easier.
multiline = multiline or info != "" or '\n' in code
longest, current = (0, 0)
for c in code:
current = current + 1 if c == '`' else 0
longest = max(current, longest)
# inline literals need a space to separate ticks from content, code blocks
# need newlines. inline literals need one extra tick, code blocks need three.
ticks, sep = ('`' * (longest + (3 if multiline else 1)), '\n' if multiline else ' ')
return f"{ticks}{info}{sep}{code}{sep}{ticks}"
AttrBlockKind = Literal['admonition', 'example']
AdmonitionKind = Literal["note", "caution", "tip", "important", "warning"]
@ -458,7 +470,7 @@ class Converter(ABC):
__renderer__: Callable[[Mapping[str, str], markdown_it.MarkdownIt], Renderer]
def __init__(self, manpage_urls: Mapping[str, str]):
self._manpage_urls = frozendict(manpage_urls)
self._manpage_urls = manpage_urls
self._md = markdown_it.MarkdownIt(
"commonmark",

View File

@ -8,14 +8,17 @@ from collections.abc import Mapping, MutableMapping, Sequence
from markdown_it.utils import OptionsDict
from markdown_it.token import Token
from typing import Any, Optional
from urllib.parse import quote
from xml.sax.saxutils import escape, quoteattr
import markdown_it
from . import parallel
from .asciidoc import AsciiDocRenderer, asciidoc_escape
from .commonmark import CommonMarkRenderer
from .docbook import DocBookRenderer, make_xml_id
from .manpage import ManpageRenderer, man_escape
from .md import Converter, md_escape
from .md import Converter, md_escape, md_make_code
from .types import OptionLoc, Option, RenderedOption
def option_is(option: Option, key: str, typ: str) -> Optional[dict[str, str]]:
@ -95,18 +98,7 @@ class BaseConverter(Converter):
if lit := option_is(option, key, 'literalMD'):
return [ self._render(f"*{key.capitalize()}:*\n{lit['text']}") ]
elif lit := option_is(option, key, 'literalExpression'):
code = lit['text']
# for multi-line code blocks we only have to count ` runs at the beginning
# of a line, but this is much easier.
multiline = '\n' in code
longest, current = (0, 0)
for c in code:
current = current + 1 if c == '`' else 0
longest = max(current, longest)
# inline literals need a space to separate ticks from content, code blocks
# need newlines. inline literals need one extra tick, code blocks need three.
ticks, sep = ('`' * (longest + (3 if multiline else 1)), '\n' if multiline else ' ')
code = f"{ticks}{sep}{code}{sep}{ticks}"
code = md_make_code(lit['text'])
return [ self._render(f"*{key.capitalize()}:*\n{code}") ]
elif key in option:
raise Exception(f"{key} has unrecognized type", option[key])
@ -182,14 +174,21 @@ class BaseConverter(Converter):
@abstractmethod
def finalize(self) -> str: raise NotImplementedError()
class OptionsDocBookRenderer(DocBookRenderer):
class OptionDocsRestrictions:
def heading_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
raise RuntimeError("md token not supported in options doc", token)
def heading_close(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
raise RuntimeError("md token not supported in options doc", token)
def attr_span_begin(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
raise RuntimeError("md token not supported in options doc", token)
def example_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
raise RuntimeError("md token not supported in options doc", token)
class OptionsDocBookRenderer(OptionDocsRestrictions, DocBookRenderer):
# TODO keep optionsDocBook diff small. remove soon if rendering is still good.
def ordered_list_open(self, token: Token, tokens: Sequence[Token], i: int, options: OptionsDict,
env: MutableMapping[str, Any]) -> str:
@ -204,7 +203,7 @@ class DocBookConverter(BaseConverter):
__renderer__ = OptionsDocBookRenderer
__option_block_separator__ = ""
def __init__(self, manpage_urls: dict[str, str],
def __init__(self, manpage_urls: Mapping[str, str],
revision: str,
markdown_by_default: bool,
document_type: str,
@ -298,7 +297,7 @@ class DocBookConverter(BaseConverter):
return "\n".join(result)
class OptionsManpageRenderer(ManpageRenderer):
class OptionsManpageRenderer(OptionDocsRestrictions, ManpageRenderer):
pass
class ManpageConverter(BaseConverter):
@ -426,6 +425,112 @@ class ManpageConverter(BaseConverter):
return "\n".join(result)
class OptionsCommonMarkRenderer(OptionDocsRestrictions, CommonMarkRenderer):
pass
class CommonMarkConverter(BaseConverter):
__renderer__ = OptionsCommonMarkRenderer
__option_block_separator__ = ""
def _parallel_render_prepare(self) -> Any:
return (self._manpage_urls, self._revision, self._markdown_by_default)
@classmethod
def _parallel_render_init_worker(cls, a: Any) -> CommonMarkConverter:
return cls(*a)
def _render_code(self, option: dict[str, Any], key: str) -> list[str]:
# NOTE this duplicates the old direct-paste behavior, even if it is somewhat
# incorrect, since users rely on it.
if lit := option_is(option, key, 'literalDocBook'):
return [ f"*{key.capitalize()}:* {lit['text']}" ]
else:
return super()._render_code(option, key)
def _render_description(self, desc: str | dict[str, Any]) -> list[str]:
# NOTE this duplicates the old direct-paste behavior, even if it is somewhat
# incorrect, since users rely on it.
if isinstance(desc, str) and not self._markdown_by_default:
return [ desc ]
else:
return super()._render_description(desc)
def _related_packages_header(self) -> list[str]:
return [ "*Related packages:*" ]
def _decl_def_header(self, header: str) -> list[str]:
return [ f"*{header}:*" ]
def _decl_def_entry(self, href: Optional[str], name: str) -> list[str]:
if href is not None:
return [ f" - [{md_escape(name)}]({href})" ]
return [ f" - {md_escape(name)}" ]
def _decl_def_footer(self) -> list[str]:
return []
def finalize(self) -> str:
result = []
for (name, opt) in self._sorted_options():
result.append(f"## {md_escape(name)}\n")
result += opt.lines
result.append("\n\n")
return "\n".join(result)
class OptionsAsciiDocRenderer(OptionDocsRestrictions, AsciiDocRenderer):
pass
class AsciiDocConverter(BaseConverter):
__renderer__ = AsciiDocRenderer
__option_block_separator__ = ""
def _parallel_render_prepare(self) -> Any:
return (self._manpage_urls, self._revision, self._markdown_by_default)
@classmethod
def _parallel_render_init_worker(cls, a: Any) -> AsciiDocConverter:
return cls(*a)
def _render_code(self, option: dict[str, Any], key: str) -> list[str]:
# NOTE this duplicates the old direct-paste behavior, even if it is somewhat
# incorrect, since users rely on it.
if lit := option_is(option, key, 'literalDocBook'):
return [ f"*{key.capitalize()}:* {lit['text']}" ]
else:
return super()._render_code(option, key)
def _render_description(self, desc: str | dict[str, Any]) -> list[str]:
# NOTE this duplicates the old direct-paste behavior, even if it is somewhat
# incorrect, since users rely on it.
if isinstance(desc, str) and not self._markdown_by_default:
return [ desc ]
else:
return super()._render_description(desc)
def _related_packages_header(self) -> list[str]:
return [ "__Related packages:__" ]
def _decl_def_header(self, header: str) -> list[str]:
return [ f"__{header}:__\n" ]
def _decl_def_entry(self, href: Optional[str], name: str) -> list[str]:
if href is not None:
return [ f"* link:{quote(href, safe='/:')}[{asciidoc_escape(name)}]" ]
return [ f"* {asciidoc_escape(name)}" ]
def _decl_def_footer(self) -> list[str]:
return []
def finalize(self) -> str:
result = []
for (name, opt) in self._sorted_options():
result.append(f"== {asciidoc_escape(name)}\n")
result += opt.lines
result.append("\n\n")
return "\n".join(result)
def _build_cli_db(p: argparse.ArgumentParser) -> None:
p.add_argument('--manpage-urls', required=True)
p.add_argument('--revision', required=True)
@ -441,6 +546,20 @@ def _build_cli_manpage(p: argparse.ArgumentParser) -> None:
p.add_argument("infile")
p.add_argument("outfile")
def _build_cli_commonmark(p: argparse.ArgumentParser) -> None:
p.add_argument('--manpage-urls', required=True)
p.add_argument('--revision', required=True)
p.add_argument('--markdown-by-default', default=False, action='store_true')
p.add_argument("infile")
p.add_argument("outfile")
def _build_cli_asciidoc(p: argparse.ArgumentParser) -> None:
p.add_argument('--manpage-urls', required=True)
p.add_argument('--revision', required=True)
p.add_argument('--markdown-by-default', default=False, action='store_true')
p.add_argument("infile")
p.add_argument("outfile")
def _run_cli_db(args: argparse.Namespace) -> None:
with open(args.manpage_urls, 'r') as manpage_urls:
md = DocBookConverter(
@ -468,15 +587,45 @@ def _run_cli_manpage(args: argparse.Namespace) -> None:
with open(args.outfile, 'w') as f:
f.write(md.finalize())
def _run_cli_commonmark(args: argparse.Namespace) -> None:
with open(args.manpage_urls, 'r') as manpage_urls:
md = CommonMarkConverter(
json.load(manpage_urls),
revision = args.revision,
markdown_by_default = args.markdown_by_default)
with open(args.infile, 'r') as f:
md.add_options(json.load(f))
with open(args.outfile, 'w') as f:
f.write(md.finalize())
def _run_cli_asciidoc(args: argparse.Namespace) -> None:
with open(args.manpage_urls, 'r') as manpage_urls:
md = AsciiDocConverter(
json.load(manpage_urls),
revision = args.revision,
markdown_by_default = args.markdown_by_default)
with open(args.infile, 'r') as f:
md.add_options(json.load(f))
with open(args.outfile, 'w') as f:
f.write(md.finalize())
def build_cli(p: argparse.ArgumentParser) -> None:
formats = p.add_subparsers(dest='format', required=True)
_build_cli_db(formats.add_parser('docbook'))
_build_cli_manpage(formats.add_parser('manpage'))
_build_cli_commonmark(formats.add_parser('commonmark'))
_build_cli_asciidoc(formats.add_parser('asciidoc'))
def run_cli(args: argparse.Namespace) -> None:
if args.format == 'docbook':
_run_cli_db(args)
elif args.format == 'manpage':
_run_cli_manpage(args)
elif args.format == 'commonmark':
_run_cli_commonmark(args)
elif args.format == 'asciidoc':
_run_cli_asciidoc(args)
else:
raise RuntimeError('format not hooked up', args)

View File

@ -0,0 +1,143 @@
import nixos_render_docs
from sample_md import sample1
class Converter(nixos_render_docs.md.Converter):
__renderer__ = nixos_render_docs.asciidoc.AsciiDocRenderer
def test_lists() -> None:
c = Converter({})
# attaching to the nth ancestor list requires n newlines before the +
assert c._render("""\
- a
b
- c
- d
- e
1
f
""") == """\
[]
* {empty}a
+
b
* {empty}c
+
[options="compact"]
** {empty}d
+
[]
** {empty}e
+
1
+
f
"""
def test_full() -> None:
c = Converter({ 'man(1)': 'http://example.org' })
assert c._render(sample1) == """\
[WARNING]
====
foo
[NOTE]
=====
nested
=====
====
link:link[ multiline ]
link:http://example.org[man(1)] reference
[[b]]some [[a]]nested anchors
__emph__ **strong** __nesting emph **and strong** and ``code``__
[]
* {empty}wide bullet
* {empty}list
[]
. {empty}wide ordered
. {empty}list
[options="compact"]
* {empty}narrow bullet
* {empty}list
[options="compact"]
. {empty}narrow ordered
. {empty}list
[quote]
====
quotes
[quote]
=====
with __nesting__
----
nested code block
----
=====
[options="compact"]
* {empty}and lists
* {empty}
+
----
containing code
----
and more quote
====
[start=100,options="compact"]
. {empty}list starting at 100
. {empty}goes on
[]
deflist:: {empty}
+
[quote]
=====
with a quote and stuff
=====
+
----
code block
----
+
----
fenced block
----
+
text
more stuff in same deflist:: {empty}foo
"""

View File

@ -0,0 +1,92 @@
import nixos_render_docs
from sample_md import sample1
from typing import Mapping, Optional
import markdown_it
class Converter(nixos_render_docs.md.Converter):
__renderer__ = nixos_render_docs.commonmark.CommonMarkRenderer
# NOTE: in these tests we represent trailing spaces by ` ` and replace them with real space later,
# since a number of editors will strip trailing whitespace on save and that would break the tests.
def test_indented_fence() -> None:
c = Converter({})
s = """\
> - ```foo
> thing
>      
> rest
> ```\
""".replace(' ', ' ')
assert c._render(s) == s
def test_full() -> None:
c = Converter({ 'man(1)': 'http://example.org' })
assert c._render(sample1) == f"""\
**Warning:** foo
**Note:** nested
[
multiline
](link)
[` man(1) `](http://example.org) reference
some nested anchors
*emph* **strong** *nesting emph **and strong** and ` code `*
- wide bullet
- list
1. wide ordered
2. list
- narrow bullet
- list
1. narrow ordered
2. list
> quotes
> 
> > with *nesting*
> > 
> > ```
> > nested code block
> > ```
> 
> - and lists
> - ```
> containing code
> ```
> 
> and more quote
100. list starting at 100
101. goes on
- *deflist*
   
> with a quote
> and stuff
   
```
code block
```
   
```
fenced block
```
   
text
- *more stuff in same deflist*
   
foo""".replace(' ', ' ')

View File

@ -6,15 +6,15 @@
python3.pkgs.buildPythonApplication rec {
pname = "txt2tags";
version = "unstable-2022-10-17";
version = "3.8";
format = "setuptools";
src = fetchFromGitHub {
owner = "txt2tags";
repo = "txt2tags";
rev = "114ab24ea9111060df136bfc1c8b1a35a59fe0f2";
hash = "sha256-h2OtlUMzEHKyJ9AIO1Uo9Lx7jMYZNMtC6U+usBu7gNU=";
rev = "refs/tags/${version}";
hash = "sha256-urLsA2oeQM0WcKNDgaxKJOgBPGohJT6Zq6y6bEYMTxk=";
};
postPatch = ''

View File

@ -15,7 +15,7 @@ let
];
};
pkgList = rec {
all = lib.filter pkgFilter (combinePkgs pkgSet);
all = lib.filter pkgFilter (combinePkgs (lib.attrValues pkgSet));
splitBin = builtins.partition (p: p.tlType == "bin") all;
bin = mkUniqueOutPaths splitBin.right
++ lib.optional

View File

@ -30,9 +30,9 @@ let
# the set of TeX Live packages, collections, and schemes; using upstream naming
tl = let
orig = import ./pkgs.nix tl;
orig = import ./pkgs.nix;
removeSelfDep = lib.mapAttrs
(n: p: if p ? deps then p // { deps = lib.filterAttrs (dn: _: n != dn) p.deps; }
(n: p: if p ? deps then p // { deps = lib.filter (dn: n != dn) p.deps; }
else p);
clean = removeSelfDep (orig // {
# overrides of texlive.tlpdb
@ -42,24 +42,24 @@ let
};
xdvi = orig.xdvi // { # it seems to need it to transform fonts
deps = (orig.xdvi.deps or {}) // { inherit (tl) metafont; };
deps = (orig.xdvi.deps or []) ++ [ "metafont" ];
};
# remove dependency-heavy packages from the basic collections
collection-basic = orig.collection-basic // {
deps = removeAttrs orig.collection-basic.deps [ "metafont" "xdvi" ];
deps = lib.filter (n: n != "metafont" && n != "xdvi") orig.collection-basic.deps;
};
# add them elsewhere so that collections cover all packages
collection-metapost = orig.collection-metapost // {
deps = orig.collection-metapost.deps // { inherit (tl) metafont; };
deps = orig.collection-metapost.deps ++ [ "metafont" ];
};
collection-plaingeneric = orig.collection-plaingeneric // {
deps = orig.collection-plaingeneric.deps // { inherit (tl) xdvi; };
deps = orig.collection-plaingeneric.deps ++ [ "xdvi" ];
};
# override cyclic dependency until #167226 is fixed
xecjk = orig.xecjk // {
deps = removeAttrs orig.xecjk.deps [ "ctex" ];
deps = lib.remove "ctex" orig.xecjk.deps;
};
texdoc = orig.texdoc // {
@ -82,8 +82,11 @@ let
};
}); # overrides
# tl =
in lib.mapAttrs flatDeps clean;
linkDeps = lib.mapAttrs (_: attrs: attrs // lib.optionalAttrs (attrs ? deps) {
deps = builtins.map (n: tl.${n}) attrs.deps;
}); # transform [ "dep1" "dep2" ... ] into [ tl."dep1" ... ]
in lib.mapAttrs flatDeps (linkDeps clean);
# TODO: texlive.infra for web2c config?
@ -113,7 +116,7 @@ let
++ lib.optional (attrs.sha512 ? source) (mkPkgV "source")
++ lib.optional (bin ? ${pname})
( bin.${pname} // { inherit pname; tlType = "bin"; } )
++ combinePkgs (attrs.deps or {});
++ combinePkgs (attrs.deps or []);
};
# for daily snapshots
@ -183,8 +186,8 @@ let
);
# combine a set of TL packages into a single TL meta-package
combinePkgs = pkgSet: lib.concatLists # uniqueness is handled in `combine`
(lib.mapAttrsToList (_n: a: a.pkgs) pkgSet);
combinePkgs = pkgList: lib.concatLists # uniqueness is handled in `combine`
(builtins.map (a: a.pkgs) pkgList);
in
tl // {

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
# wrap whole file into an attrset
1itl: { # no indentation
1i{ # no indentation
$a}
# form an attrmap per package
@ -28,16 +28,16 @@ $a}
# extract deps
/^depend [^.]+$/{
s/^depend (.+)$/ deps."\1" = tl."\1";/
s/^depend (.+)$/ deps = [\n "\1"/
# loop through following depend lines
:next
h ; N # save & read next line
s/\ndepend (.+)\.(.+)$//
s/\ndepend (.+)$/\n deps."\1" = tl."\1";/
s/\ndepend (.+)$/\n "\1"/
t next # loop if the previous lines matched
x; p; x # print saved deps
x; s/$/\n ];/p ; x # print saved deps
s/^.*\n// # remove deps, resume processing
}

View File

@ -1299,6 +1299,7 @@ mapAliases ({
pyrex096 = throw "pyrex has been removed from nixpkgs as the project is still stuck on python2"; # Added 2022-01-12
pyrit = throw "pyrit has been removed from nixpkgs as the project is still stuck on python2"; # Added 2022-01-01
python = python2; # Added 2022-01-11
python-language-server = throw "python-language-server has been removed as it is no longer maintained. Use e.g. python-lsp-server instead"; # Added 2023-01-07
python-swiftclient = swiftclient; # Added 2021-09-09
python2nix = throw "python2nix has been removed as it is outdated. Use e.g. nixpkgs-pytools instead"; # Added 2021-03-08
pythonFull = python2Full; # Added 2022-01-11

View File

@ -18214,8 +18214,6 @@ with pkgs;
mdl = callPackage ../development/tools/misc/mdl { };
python-language-server = callPackage ../development/dotnet-modules/python-language-server { };
python-matter-server = with python3Packages; toPythonApplication python-matter-server;
minify = callPackage ../development/web/minify { };
@ -24985,6 +24983,7 @@ with pkgs;
mariadb_108
mariadb_109
mariadb_1010
mariadb_1011
;
mariadb = mariadb_106;
mariadb-embedded = mariadb.override { withEmbedded = true; };
@ -31737,7 +31736,10 @@ with pkgs;
open-policy-agent = callPackage ../development/tools/open-policy-agent { };
openmm = callPackage ../development/libraries/science/chemistry/openmm { };
openmm = callPackage ../development/libraries/science/chemistry/openmm {
stdenv = if stdenv.targetPlatform.isAarch64 then gcc9Stdenv else gcc11Stdenv;
gfortran = if stdenv.targetPlatform.isAarch64 then gfortran9 else gfortran11;
};
openshift = callPackage ../applications/networking/cluster/openshift { };
@ -35806,6 +35808,7 @@ with pkgs;
});
steam = steamPackages.steam-fhsenv;
steam-small = steamPackages.steam-fhsenv-small;
steam-run = steam.run;