Merge remote-tracking branch 'origin/master' into staging-next

This commit is contained in:
Martin Weinelt 2022-07-22 14:56:01 +02:00
commit b5e4c14806
21 changed files with 245 additions and 133 deletions

View File

@ -85,7 +85,7 @@ sub debug {
# nixpkgs.system # nixpkgs.system
my ($status, @systemLines) = runCommand("nix-instantiate --impure --eval --expr builtins.currentSystem"); my ($status, @systemLines) = runCommand("@nixInstantiate@ --impure --eval --expr builtins.currentSystem");
if ($status != 0 || join("", @systemLines) =~ /error/) { if ($status != 0 || join("", @systemLines) =~ /error/) {
die "Failed to retrieve current system type from nix.\n"; die "Failed to retrieve current system type from nix.\n";
} }

View File

@ -34,6 +34,7 @@ let
name = "nixos-generate-config"; name = "nixos-generate-config";
src = ./nixos-generate-config.pl; src = ./nixos-generate-config.pl;
perl = "${pkgs.perl.withPackages (p: [ p.FileSlurp ])}/bin/perl"; perl = "${pkgs.perl.withPackages (p: [ p.FileSlurp ])}/bin/perl";
nixInstantiate = "${pkgs.nix}/bin/nix-instantiate";
detectvirt = "${config.systemd.package}/bin/systemd-detect-virt"; detectvirt = "${config.systemd.package}/bin/systemd-detect-virt";
btrfs = "${pkgs.btrfs-progs}/bin/btrfs"; btrfs = "${pkgs.btrfs-progs}/bin/btrfs";
inherit (config.system.nixos-generate-config) configuration desktopConfiguration; inherit (config.system.nixos-generate-config) configuration desktopConfiguration;

View File

@ -611,7 +611,6 @@ let
session optional ${pkgs.ecryptfs}/lib/security/pam_ecryptfs.so session optional ${pkgs.ecryptfs}/lib/security/pam_ecryptfs.so
'' + '' +
optionalString cfg.pamMount '' optionalString cfg.pamMount ''
session [success=1 default=ignore] ${pkgs.pam}/lib/security/pam_succeed_if.so service = systemd-user quiet
session optional ${pkgs.pam_mount}/lib/security/pam_mount.so disable_interactive session optional ${pkgs.pam_mount}/lib/security/pam_mount.so disable_interactive
'' + '' +
optionalString use_ldap '' optionalString use_ldap ''

View File

@ -164,7 +164,7 @@ in
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "pict-rs.service " ] ++ lib.optionals cfg.settings.database.createLocally [ "lemmy-postgresql.service" ]; after = [ "pict-rs.service" ] ++ lib.optionals cfg.settings.database.createLocally [ "lemmy-postgresql.service" ];
requires = lib.optionals cfg.settings.database.createLocally [ "lemmy-postgresql.service" ]; requires = lib.optionals cfg.settings.database.createLocally [ "lemmy-postgresql.service" ];

View File

@ -145,6 +145,10 @@ in {
{ # Ensure that pam_systemd gets included. This is special-cased { # Ensure that pam_systemd gets included. This is special-cased
# in systemd to provide XDG_RUNTIME_DIR. # in systemd to provide XDG_RUNTIME_DIR.
startSession = true; startSession = true;
# Disable pam_mount in systemd-user to prevent it from being called
# multiple times during login, because it will prevent pam_mount from
# unmounting the previously mounted volumes.
pamMount = false;
}; };
# Some overrides to upstream units. # Some overrides to upstream units.

View File

@ -1,12 +1,14 @@
{ lib, stdenv, fetchurl, libjpeg }: { lib, stdenv, fetchFromGitHub, libjpeg }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
version = "1.4.6"; version = "1.4.7";
pname = "jpegoptim"; pname = "jpegoptim";
src = fetchurl { src = fetchFromGitHub {
url = "https://www.kokkonen.net/tjko/src/${pname}-${version}.tar.gz"; owner = "tjko";
sha256 = "1dss7907fclfl8zsw0bl4qcw0hhz6fqgi3867w0jyfm3q9jfpcc8"; repo = pname;
rev = "v${version}";
sha256 = "sha256-qae3OEG4CC/OGkmNdHrXFUv9CkoaB1ZJnFHX3RFoxhk=";
}; };
# There are no checks, it seems. # There are no checks, it seems.
@ -17,7 +19,7 @@ stdenv.mkDerivation rec {
meta = with lib; { meta = with lib; {
description = "Optimize JPEG files"; description = "Optimize JPEG files";
homepage = "https://www.kokkonen.net/tjko/projects.html"; homepage = "https://www.kokkonen.net/tjko/projects.html";
license = licenses.gpl2; license = licenses.gpl3Plus;
maintainers = [ maintainers.aristid ]; maintainers = [ maintainers.aristid ];
platforms = platforms.all; platforms = platforms.all;
}; };

View File

@ -1,47 +1,65 @@
{ lib, buildGoPackage, fetchFromGitHub, git, groff, installShellFiles, unixtools, nixosTests }: { lib
, buildGoModule
, fetchpatch
, fetchFromGitHub
, git
, groff
, installShellFiles
, makeWrapper
, unixtools
, nixosTests
}:
buildGoPackage rec { buildGoModule rec {
pname = "hub"; pname = "hub";
version = "2.14.2"; version = "unstable-2022-04-04";
goPackagePath = "github.com/github/hub";
# Only needed to build the man-pages
excludedPackages = [ "github.com/github/hub/md2roff-bin" ];
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "github"; owner = "github";
repo = pname; repo = pname;
rev = "v${version}"; rev = "363513a0f822a8bde5b620e5de183702280d4ace";
sha256 = "1qjab3dpia1jdlszz3xxix76lqrm4zbmqzd9ymld7h06awzsg2vh"; sha256 = "sha256-jipZHmGtPTsztTeVZofaMReU4AEU9k6mdw9YC4KKB1Q=";
}; };
nativeBuildInputs = [ groff installShellFiles unixtools.col ];
postPatch = '' postPatch = ''
patchShebangs . patchShebangs script/
substituteInPlace git/git.go --replace "cmd.New(\"git\")" "cmd.New(\"${git}/bin/git\")"
substituteInPlace commands/args.go --replace "Executable: \"git\"" "Executable: \"${git}/bin/git\""
''; '';
vendorSha256 = "sha256-wQH8V9jRgh45JGs4IfYS1GtmCIYdo93JG1UjJ0BGxXk=";
# Only needed to build the man-pages
excludedPackages = [ "github.com/github/hub/md2roff-bin" ];
nativeBuildInputs = [
groff
installShellFiles
makeWrapper
unixtools.col
];
postInstall = '' postInstall = ''
cd go/src/${goPackagePath} installShellCompletion --cmd hub \
installShellCompletion --zsh --name _hub etc/hub.zsh_completion --bash etc/hub.bash_completion.sh \
installShellCompletion --bash --name hub etc/hub.bash_completion.sh --fish etc/hub.fish_completion \
installShellCompletion --fish --name hub.fish etc/hub.fish_completion --zsh etc/hub.zsh_completion
LC_ALL=C.UTF8 \ LC_ALL=C.UTF8 make man-pages
make man-pages
installManPage share/man/man[1-9]/*.[1-9] installManPage share/man/man[1-9]/*.[1-9]
wrapProgram $out/bin/hub \
--suffix PATH : ${lib.makeBinPath [ git ]}
''; '';
checkInputs = [
git
];
passthru.tests = { inherit (nixosTests) hub; }; passthru.tests = { inherit (nixosTests) hub; };
meta = with lib; { meta = with lib; {
description = "Command-line wrapper for git that makes you better at GitHub"; description = "Command-line wrapper for git that makes you better at GitHub";
license = licenses.mit;
homepage = "https://hub.github.com/"; homepage = "https://hub.github.com/";
license = licenses.mit;
maintainers = with maintainers; [ globin ]; maintainers = with maintainers; [ globin ];
platforms = with platforms; unix;
}; };
} }

View File

@ -1,29 +1,26 @@
{ lib, stdenv, fetchurl, cabextract }: { lib, stdenv, fetchurl, cabextract }:
let let
fonts = [ fonts = [
{name = "andale"; sha256 = "0w7927hlwayqf3vvanf8f3qp2g1i404jzqvhp1z3mp0sjm1gw905";} { name = "andale"; sha256 = "0w7927hlwayqf3vvanf8f3qp2g1i404jzqvhp1z3mp0sjm1gw905"; }
{name = "arial"; sha256 = "1xkqyivbyb3z9dcalzidf8m4npzfpls2g0kldyn8g73f2i6plac5";} { name = "arial"; sha256 = "1xkqyivbyb3z9dcalzidf8m4npzfpls2g0kldyn8g73f2i6plac5"; }
{name = "arialb"; sha256 = "1a60zqrg63kjnykh5hz7dbpzvx7lyivn3vbrp7jyv9d1nvzz09d4";} { name = "arialb"; sha256 = "1a60zqrg63kjnykh5hz7dbpzvx7lyivn3vbrp7jyv9d1nvzz09d4"; }
{name = "comic"; sha256 = "0ki0rljjc1pxkbsxg515fwx15yc95bdyaksa3pjd89nyxzzg6vcw";} { name = "comic"; sha256 = "0ki0rljjc1pxkbsxg515fwx15yc95bdyaksa3pjd89nyxzzg6vcw"; }
{name = "courie"; sha256 = "111k3waxki9yyxpjwl2qrdkswvsd2dmvhbjmmrwyipam2s31sldv";} { name = "courie"; sha256 = "111k3waxki9yyxpjwl2qrdkswvsd2dmvhbjmmrwyipam2s31sldv"; }
{name = "georgi"; sha256 = "0083jcpd837j2c06kp1q8glfjn9k7z6vg3wi137savk0lv6psb1c";} { name = "georgi"; sha256 = "0083jcpd837j2c06kp1q8glfjn9k7z6vg3wi137savk0lv6psb1c"; }
{name = "impact"; sha256 = "1yyc5z7zmm3s418hmrkmc8znc55afsrz5dgxblpn9n81fhxyyqb0";} { name = "impact"; sha256 = "1yyc5z7zmm3s418hmrkmc8znc55afsrz5dgxblpn9n81fhxyyqb0"; }
{name = "times"; sha256 = "1aq7z3l46vwgqljvq9zfgkii6aivy00z1529qbjkspggqrg5jmnv";} { name = "times"; sha256 = "1aq7z3l46vwgqljvq9zfgkii6aivy00z1529qbjkspggqrg5jmnv"; }
{name = "trebuc"; sha256 = "1jfsgz80pvyqvpfpaiz5pd8zwlcn67rg2jgynjwf22sip2dhssas";} { name = "trebuc"; sha256 = "1jfsgz80pvyqvpfpaiz5pd8zwlcn67rg2jgynjwf22sip2dhssas"; }
{name = "webdin"; sha256 = "0nnp2znmnmx87ijq9zma0vl0hd46npx38p0cc6lgp00hpid5nnb4";} { name = "webdin"; sha256 = "0nnp2znmnmx87ijq9zma0vl0hd46npx38p0cc6lgp00hpid5nnb4"; }
{name = "verdan"; sha256 = "15mdbbfqbyp25a6ynik3rck3m3mg44plwrj79rwncc9nbqjn3jy1";} { name = "verdan"; sha256 = "15mdbbfqbyp25a6ynik3rck3m3mg44plwrj79rwncc9nbqjn3jy1"; }
{name = "wd97vwr"; sha256 = "1lmkh3zb6xv47k0z2mcwk3vk8jff9m845c9igxm14bbvs6k2c4gn";} { name = "wd97vwr"; sha256 = "1lmkh3zb6xv47k0z2mcwk3vk8jff9m845c9igxm14bbvs6k2c4gn"; }
]; ];
eula = fetchurl { eula = fetchurl {
url = "http://corefonts.sourceforge.net/eula.htm"; url = "http://corefonts.sourceforge.net/eula.htm";
sha256 = "1aqbcnl032g2hd7iy56cs022g47scb0jxxp3mm206x1yqc90vs1c"; sha256 = "1aqbcnl032g2hd7iy56cs022g47scb0jxxp3mm206x1yqc90vs1c";
}; };
in in
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "corefonts"; pname = "corefonts";
version = "1"; version = "1";
@ -33,22 +30,53 @@ stdenv.mkDerivation {
inherit sha256; inherit sha256;
}) fonts; }) fonts;
nativeBuildInputs = [cabextract]; nativeBuildInputs = [ cabextract ];
buildCommand = '' buildCommand = ''
for i in $exes; do for i in $exes; do
cabextract --lowercase $i cabextract --lowercase $i
done done
cabextract --lowercase viewer1.cab cabextract --lowercase viewer1.cab
# rename to more standard names
mv andalemo.ttf Andale_Mono.ttf
mv ariblk.ttf Arial_Black.ttf
mv arial.ttf Arial.ttf
mv arialbd.ttf Arial_Bold.ttf
mv arialbi.ttf Arial_Bold_Italic.ttf
mv ariali.ttf Arial_Italic.ttf
mv comic.ttf Comic_Sans_MS.ttf
mv comicbd.ttf Comic_Sans_MS_Bold.ttf
mv cour.ttf Courier_New.ttf
mv courbd.ttf Courier_New_Bold.ttf
mv couri.ttf Courier_New_Italic.ttf
mv courbi.ttf Courier_New_Bold_Italic.ttf
mv georgia.ttf Georgia.ttf
mv georgiab.ttf Georgia_Bold.ttf
mv georgiai.ttf Georgia_Italic.ttf
mv georgiaz.ttf Georgia_Bold_Italic.ttf
mv impact.ttf Impact.ttf
mv tahoma.ttf Tahoma.ttf
mv times.ttf Times_New_Roman.ttf
mv timesbd.ttf Times_New_Roman_Bold.ttf
mv timesbi.ttf Times_New_Roman_Bold_Italic.ttf
mv timesi.ttf Times_New_Roman_Italic.ttf
mv trebuc.ttf Trebuchet_MS.ttf
mv trebucbd.ttf Trebuchet_MS_Bold.ttf
mv trebucit.ttf Trebuchet_MS_Italic.ttf
mv trebucbi.ttf Trebuchet_MS_Italic.ttf
mv verdana.ttf Verdana.ttf
mv verdanab.ttf Verdana_Bold.ttf
mv verdanai.ttf Verdana_Italic.ttf
mv verdanaz.ttf Verdana_Bold_Italic.ttf
mv webdings.ttf Webdings.ttf
install -m444 -Dt $out/share/fonts/truetype *.ttf install -m444 -Dt $out/share/fonts/truetype *.ttf
# Also put the EULA there to be on the safe side. # Also put the EULA there to be on the safe side.
cp ${eula} $out/share/fonts/truetype/eula.html cp ${eula} $out/share/fonts/truetype/eula.html
# Set up no-op font configs to override any aliases set up by # Set up no-op font configs to override any aliases set up by other packages.
# other packages.
mkdir -p $out/etc/fonts/conf.d mkdir -p $out/etc/fonts/conf.d
for name in Andale-Mono Arial-Black Arial Comic-Sans-MS \ for name in Andale-Mono Arial-Black Arial Comic-Sans-MS \
Courier-New Georgia Impact Times-New-Roman \ Courier-New Georgia Impact Times-New-Roman \
@ -58,10 +86,6 @@ stdenv.mkDerivation {
done done
''; '';
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "089d2m9bvaacj36qdq77pcazji0sbbr796shic3k52cpxkjnzbwh";
meta = with lib; { meta = with lib; {
homepage = "http://corefonts.sourceforge.net/"; homepage = "http://corefonts.sourceforge.net/";
description = "Microsoft's TrueType core fonts for the Web"; description = "Microsoft's TrueType core fonts for the Web";

View File

@ -6,13 +6,13 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "intel-gmmlib"; pname = "intel-gmmlib";
version = "22.1.5"; version = "22.1.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "intel"; owner = "intel";
repo = "gmmlib"; repo = "gmmlib";
rev = "intel-gmmlib-${version}"; rev = "intel-gmmlib-${version}";
sha256 = "sha256-A7XZXkYBsFa8NMQA7EBnvEReSTorAGgoow08bMZ+WkQ="; sha256 = "sha256-HRN4SSjP8h8nnCisysDM9V17012ECLz2GgdUok1AV24=";
}; };
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];

View File

@ -1,8 +1,10 @@
{ lib { lib
, stdenv , stdenv
, buildPythonPackage , buildPythonPackage
, pythonOlder
, fetchFromGitHub , fetchFromGitHub
, substituteAll , substituteAll
, fetchpatch
, gdb , gdb
, django , django
, flask , flask
@ -12,8 +14,6 @@
, pytest-xdist , pytest-xdist
, pytestCheckHook , pytestCheckHook
, requests , requests
, isPy3k
, pythonAtLeast
}: }:
buildPythonPackage rec { buildPythonPackage rec {
@ -21,11 +21,13 @@ buildPythonPackage rec {
version = "1.6.2"; version = "1.6.2";
format = "setuptools"; format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Microsoft"; owner = "Microsoft";
repo = pname; repo = pname;
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
sha256 = "sha256-jcokiAZ2WwyIvsXNIUzvMIrRttR76RwDSE7gk0xHExc="; hash = "sha256-jcokiAZ2WwyIvsXNIUzvMIrRttR76RwDSE7gk0xHExc=";
}; };
patches = [ patches = [
@ -50,6 +52,13 @@ buildPythonPackage rec {
# To avoid this issue, debugpy should be installed using python.withPackages: # To avoid this issue, debugpy should be installed using python.withPackages:
# python.withPackages (ps: with ps; [ debugpy ]) # python.withPackages (ps: with ps; [ debugpy ])
./fix-test-pythonpath.patch ./fix-test-pythonpath.patch
# Fix compiling attach library from source
# https://github.com/microsoft/debugpy/pull/978
(fetchpatch {
url = "https://github.com/microsoft/debugpy/commit/08b3b13cba9035f4ab3308153aef26e3cc9275f9.patch";
sha256 = "sha256-8E+Y40mYQou9T1ozWslEK2XNQtuy5+MBvPvDLt4eQak=";
})
]; ];
# Remove pre-compiled "attach" libraries and recompile for host platform # Remove pre-compiled "attach" libraries and recompile for host platform
@ -59,17 +68,15 @@ buildPythonPackage rec {
cd src/debugpy/_vendored/pydevd/pydevd_attach_to_process cd src/debugpy/_vendored/pydevd/pydevd_attach_to_process
rm *.so *.dylib *.dll *.exe *.pdb rm *.so *.dylib *.dll *.exe *.pdb
${stdenv.cc}/bin/c++ linux_and_mac/attach.cpp -Ilinux_and_mac -fPIC -nostartfiles ${{ ${stdenv.cc}/bin/c++ linux_and_mac/attach.cpp -Ilinux_and_mac -fPIC -nostartfiles ${{
"x86_64-linux" = "-shared -m64 -o attach_linux_amd64.so"; "x86_64-linux" = "-shared -o attach_linux_amd64.so";
"i686-linux" = "-shared -m32 -o attach_linux_x86.so"; "i686-linux" = "-shared -o attach_linux_x86.so";
"aarch64-linux" = "-shared -o attach_linux_arm64.so"; "aarch64-linux" = "-shared -o attach_linux_arm64.so";
"x86_64-darwin" = "-std=c++11 -lc -D_REENTRANT -dynamiclib -arch x86_64 -o attach_x86_64.dylib"; "x86_64-darwin" = "-std=c++11 -lc -D_REENTRANT -dynamiclib -o attach_x86_64.dylib";
"i686-darwin" = "-std=c++11 -lc -D_REENTRANT -dynamiclib -arch i386 -o attach_x86.dylib"; "i686-darwin" = "-std=c++11 -lc -D_REENTRANT -dynamiclib -o attach_x86.dylib";
"aarch64-darwin" = "-std=c++11 -lc -D_REENTRANT -dynamiclib -arch arm64 -o attach_arm64.dylib"; "aarch64-darwin" = "-std=c++11 -lc -D_REENTRANT -dynamiclib -o attach_arm64.dylib";
}.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}")} }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}")}
)''; )'';
doCheck = isPy3k;
checkInputs = [ checkInputs = [
django django
flask flask
@ -86,16 +93,8 @@ buildPythonPackage rec {
"--timeout=0" "--timeout=0"
]; ];
disabledTests = lib.optionals (pythonAtLeast "3.10") [ # Fixes hanging tests on Darwin
"test_flask_breakpoint_multiproc" __darwinAllowLocalNetworking = true;
"test_subprocess[program-launch-None]"
"test_systemexit[0-zero-uncaught-raised-launch(integratedTerminal)-module]"
"test_systemexit[0-zero-uncaught--attach_pid-program]"
"test_success_exitcodes[-break_on_system_exit_zero-0-attach_listen(cli)-module]"
"test_success_exitcodes[--0-attach_connect(api)-program]"
"test_run[code-attach_connect(api)]"
"test_subprocess[program-launch-None]"
];
pythonImportsCheck = [ pythonImportsCheck = [
"debugpy" "debugpy"

View File

@ -1,8 +1,8 @@
diff --git a/tests/debug/session.py b/tests/debug/session.py diff --git a/tests/debug/session.py b/tests/debug/session.py
index 101492fc..4ee7cfbe 100644 index af242877..30b21a1e 100644
--- a/tests/debug/session.py --- a/tests/debug/session.py
+++ b/tests/debug/session.py +++ b/tests/debug/session.py
@@ -630,6 +630,7 @@ class Session(object): @@ -622,6 +622,7 @@ class Session(object):
if "PYTHONPATH" in self.config.env: if "PYTHONPATH" in self.config.env:
# If specified, launcher will use it in lieu of PYTHONPATH it inherited # If specified, launcher will use it in lieu of PYTHONPATH it inherited
# from the adapter when spawning debuggee, so we need to adjust again. # from the adapter when spawning debuggee, so we need to adjust again.

View File

@ -1,5 +1,5 @@
diff --git a/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py b/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py diff --git a/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py b/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py
index 3c0e1b94..e995a20f 100644 index 462feae9..eb2aa945 100644
--- a/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py --- a/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py
+++ b/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py +++ b/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py
@@ -399,7 +399,7 @@ def run_python_code_linux(pid, python_code, connect_debugger_tracing=False, show @@ -399,7 +399,7 @@ def run_python_code_linux(pid, python_code, connect_debugger_tracing=False, show

View File

@ -1,5 +1,5 @@
diff --git a/setup.py b/setup.py diff --git a/setup.py b/setup.py
index e7487100..10d36520 100644 index 5fc40070..775a08ec 100644
--- a/setup.py --- a/setup.py
+++ b/setup.py +++ b/setup.py
@@ -12,7 +12,6 @@ import sys @@ -12,7 +12,6 @@ import sys
@ -26,24 +26,22 @@ index e7487100..10d36520 100644
description="An implementation of the Debug Adapter Protocol for Python", # noqa description="An implementation of the Debug Adapter Protocol for Python", # noqa
long_description=long_description, long_description=long_description,
long_description_content_type="text/markdown", long_description_content_type="text/markdown",
diff --git a/src/debugpy/__init__.py b/src/debugpy/__init__.py diff --git a/src/debugpy/public_api.py b/src/debugpy/public_api.py
index baa5a7c5..53553272 100644 index 3c800898..27743245 100644
--- a/src/debugpy/__init__.py --- a/src/debugpy/public_api.py
+++ b/src/debugpy/__init__.py +++ b/src/debugpy/public_api.py
@@ -27,7 +27,6 @@ __all__ = [ @@ -7,8 +7,6 @@ from __future__ import annotations
import codecs import functools
import os import typing
-from debugpy import _version -from debugpy import _version
from debugpy.common import compat -
# Expose debugpy.server API from subpackage, but do not actually import it unless
# and until a member is invoked - we don't want the server package loaded in the
@@ -182,4 +180,4 @@ def trace_this_thread(__should_trace: bool):
"""
@@ -204,7 +203,7 @@ def trace_this_thread(should_trace): -__version__: str = _version.get_versions()["version"]
return api.trace_this_thread(should_trace) +__version__: str = "@version@"
-__version__ = _version.get_versions()["version"]
+__version__ = "@version@"
# Force absolute path on Python 2.
__file__ = os.path.abspath(__file__)

View File

@ -1,4 +1,13 @@
{ lib, stdenv, buildGoModule, fetchFromGitHub, pkg-config, btrfs-progs, gpgme, lvm2 }: { lib
, stdenv
, buildGoModule
, fetchFromGitHub
, fetchpatch
, pkg-config
, btrfs-progs
, gpgme
, lvm2
}:
buildGoModule rec { buildGoModule rec {
pname = "dive"; pname = "dive";
@ -11,7 +20,14 @@ buildGoModule rec {
sha256 = "sha256-1pmw8pUlek5FlI1oAuvLSqDow7hw5rw86DRDZ7pFAmA="; sha256 = "sha256-1pmw8pUlek5FlI1oAuvLSqDow7hw5rw86DRDZ7pFAmA=";
}; };
vendorSha256 = "sha256-0gJ3dAPoilh3IWkuesy8geNsuI1T0DN64XvInc9LvlM="; patches = [
(fetchpatch {
url = "https://github.com/wagoodman/dive/commit/fe9411c414418d839a8638bb9a12ccfc892b5845.patch";
sha256 = "sha256-c0TcUQ87CeOiXHoTQ3z/04i72aDr403DL7fIbXTJ9cY=";
})
];
vendorSha256 = "sha256-YPkEei7d7mXP+5FhooNoMDARQLosH2fdSaLXGZ5C27o=";
nativeBuildInputs = [ pkg-config ]; nativeBuildInputs = [ pkg-config ];

View File

@ -1,4 +1,4 @@
{ callPackage, openssl, python3, enableNpm ? true }: { callPackage, openssl, python3, fetchpatch, enableNpm ? true }:
let let
buildNodejs = callPackage ./nodejs.nix { buildNodejs = callPackage ./nodejs.nix {
@ -8,9 +8,17 @@ let
in in
buildNodejs { buildNodejs {
inherit enableNpm; inherit enableNpm;
version = "16.15.0"; # Do not upgrade until #176127 is solved version = "16.16.0";
sha256 = "sha256-oPgS78Q/eDIeygiVeWCkj15r+XAE1QWMjdOwPGRupPc="; sha256 = "sha256-FFFR7/Oyql6+czhACcUicag3QK5oepPJjGKM19UnNus=";
patches = [ patches = [
./disable-darwin-v8-system-instrumentation.patch ./disable-darwin-v8-system-instrumentation.patch
# Fix npm silently fail without a HOME directory https://github.com/npm/cli/issues/4996
(fetchpatch {
url = "https://github.com/npm/cli/commit/9905d0e24c162c3f6cc006fa86b4c9d0205a4c6f.patch";
sha256 = "sha256-RlabXWtjzTZ5OgrGf4pFkolonvTDIPlzPY1QcYDd28E=";
includes = [ "deps/npm/lib/npm.js" "deps/npm/lib/utils/log-file.js" ];
stripLen = 1;
extraPrefix = "deps/npm/";
})
]; ];
} }

View File

@ -254,7 +254,7 @@ nixBuild() {
nixFlakeBuild() { nixFlakeBuild() {
logVerbose "Building in flake mode." logVerbose "Building in flake mode."
if [[ -z "$buildHost" && -z "$targetHost" && "$action" != switch && "$action" != boot ]] if [[ -z "$buildHost" && -z "$targetHost" && "$action" != switch && "$action" != boot && "$action" != test && "$action" != dry-activate ]]
then then
runCmd nix "${flakeFlags[@]}" build "$@" runCmd nix "${flakeFlags[@]}" build "$@"
readlink -f ./result readlink -f ./result

View File

@ -2,24 +2,24 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "mediawiki"; pname = "mediawiki";
version = "1.37.2"; version = "1.38.1";
src = with lib; fetchurl { src = fetchurl {
url = "https://releases.wikimedia.org/mediawiki/${versions.majorMinor version}/${pname}-${version}.tar.gz"; url = "https://releases.wikimedia.org/mediawiki/${lib.versions.majorMinor version}/mediawiki-${version}.tar.gz";
sha256 = "sha256-WD8HS8r87BfaUBQqVvW7/eXDNml31h2RLX5W/Mo72hs="; sha256 = "sha256-EXNlUloN7xsgnKUIV9ZXNrYlRbh3p1NIpXqF0SZDezE=";
}; };
prePatch = '' postPatch = ''
sed -i 's|$vars = Installer::getExistingLocalSettings();|$vars = null;|' includes/installer/CliInstaller.php sed -i 's|$vars = Installer::getExistingLocalSettings();|$vars = null;|' includes/installer/CliInstaller.php
''; '';
phpConfig = writeText "LocalSettings.php" '' installPhase = let
<?php phpConfig = writeText "LocalSettings.php" ''
return require(getenv('MEDIAWIKI_CONFIG')); <?php
?> return require(getenv('MEDIAWIKI_CONFIG'));
''; ?>
'';
installPhase = '' in ''
runHook preInstall runHook preInstall
mkdir -p $out/share/mediawiki mkdir -p $out/share/mediawiki
@ -34,6 +34,6 @@ stdenv.mkDerivation rec {
license = licenses.gpl2Plus; license = licenses.gpl2Plus;
homepage = "https://www.mediawiki.org/"; homepage = "https://www.mediawiki.org/";
platforms = platforms.all; platforms = platforms.all;
maintainers = with maintainers; [ ]; maintainers = with maintainers; [ ] ++ teams.c3d2.members;
}; };
} }

View File

@ -1,6 +1,7 @@
{ lib { lib
, stdenv , stdenv
, fetchFromGitHub , fetchFromGitHub
, fetchpatch
, fetchurl , fetchurl
, substituteAll , substituteAll
, coreutils , coreutils
@ -27,7 +28,12 @@
, libXNVCtrl , libXNVCtrl
, wayland , wayland
, spdlog , spdlog
, glew
, glfw
, nlohmann_json
, xorg
, addOpenGLRunpath , addOpenGLRunpath
, gamescopeSupport ? true # build mangoapp and mangohudctl
}: }:
let let
@ -86,6 +92,12 @@ in stdenv.mkDerivation rec {
libdbus = dbus.lib; libdbus = dbus.lib;
inherit hwdata libX11; inherit hwdata libX11;
}) })
(fetchpatch {
name = "allow-system-nlohmann-json.patch";
url = "https://github.com/flightlessmango/MangoHud/commit/e1ffa0f85820abea44639438fca2152290c87ee8.patch";
sha256 = "sha256-CaJb0RpXmNGCBidMXM39VJVLIXb6NbN5HXWkH/5Sfvo=";
})
] ++ lib.optional (stdenv.hostPlatform.system == "x86_64-linux") [ ] ++ lib.optional (stdenv.hostPlatform.system == "x86_64-linux") [
# Support 32bit OpenGL applications by appending the mangohud32 # Support 32bit OpenGL applications by appending the mangohud32
# lib path to LD_LIBRARY_PATH. # lib path to LD_LIBRARY_PATH.
@ -105,6 +117,10 @@ in stdenv.mkDerivation rec {
"-Dvulkan_datadir=${vulkan-headers}/share" "-Dvulkan_datadir=${vulkan-headers}/share"
"-Dwith_wayland=enabled" "-Dwith_wayland=enabled"
"-Duse_system_spdlog=enabled" "-Duse_system_spdlog=enabled"
] ++ lib.optionals gamescopeSupport [
"-Dmangoapp_layer=true"
"-Dmangoapp=true"
"-Dmangohudctl=true"
]; ];
nativeBuildInputs = [ nativeBuildInputs = [
@ -125,6 +141,12 @@ in stdenv.mkDerivation rec {
libXNVCtrl libXNVCtrl
wayland wayland
spdlog spdlog
] ++ lib.optionals gamescopeSupport [
glew
glfw
nlohmann_json
vulkan-headers
xorg.libXrandr
]; ];
# Support 32bit Vulkan applications by linking in 32bit Vulkan layer # Support 32bit Vulkan applications by linking in 32bit Vulkan layer
@ -140,6 +162,12 @@ in stdenv.mkDerivation rec {
wrapProgram "$out/bin/mangohud" \ wrapProgram "$out/bin/mangohud" \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ addOpenGLRunpath.driverLink ]} \ --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ addOpenGLRunpath.driverLink ]} \
--prefix XDG_DATA_DIRS : "$out/share" --prefix XDG_DATA_DIRS : "$out/share"
'' + lib.optionalString (gamescopeSupport) ''
if [[ -e "$out/bin/mangoapp" ]]; then
wrapProgram "$out/bin/mangoapp" \
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ addOpenGLRunpath.driverLink ]} \
--prefix XDG_DATA_DIRS : "$out/share"
fi
''; '';
meta = with lib; { meta = with lib; {

View File

@ -1,7 +1,13 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub { stdenv
, Cocoa ? null }: , lib
, buildGoModule
, fetchFromGitHub
, fetchurl
, Cocoa
, installShellFiles
}:
buildGoPackage rec { buildGoModule rec {
pname = "noti"; pname = "noti";
version = "3.5.0"; version = "3.5.0";
@ -12,17 +18,29 @@ buildGoPackage rec {
sha256 = "12r9wawwl6x0rfv1kahwkamfa0pjq24z60az9pn9nsi2z1rrlwkd"; sha256 = "12r9wawwl6x0rfv1kahwkamfa0pjq24z60az9pn9nsi2z1rrlwkd";
}; };
patches = [
# update golang.org/x/sys to fix building on aarch64-darwin
# using fetchurl because fetchpatch breaks the patch
(fetchurl {
url = "https://github.com/variadico/noti/commit/a90bccfdb2e6a0adc2e92f9a4e7be64133832ba9.patch";
sha256 = "sha256-vSAwuAR9absMSFqGOlzmRZoOGC/jpkmh8CMCVjeleUo=";
})
];
vendorSha256 = null;
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optional stdenv.isDarwin Cocoa; buildInputs = lib.optional stdenv.isDarwin Cocoa;
goPackagePath = "github.com/variadico/noti";
ldflags = [ ldflags = [
"-X ${goPackagePath}/internal/command.Version=${version}" "-s"
"-w"
"-X github.com/variadico/noti/internal/command.Version=${version}"
]; ];
postInstall = '' postInstall = ''
install -Dm444 -t $out/share/man/man1 $src/docs/man/*.1 installManPage docs/man/*
install -Dm444 -t $out/share/man/man5 $src/docs/man/*.5
''; '';
meta = with lib; { meta = with lib; {

View File

@ -6,13 +6,13 @@
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "sta"; pname = "sta";
version = "unstable-2020-05-10"; version = "unstable-2021-11-30";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "simonccarter"; owner = "simonccarter";
repo = "sta"; repo = "sta";
rev = "566e3a77b103aa27a5f77ada8e068edf700f26ef"; rev = "94559e3dfa97d415e3f37b1180b57c17c7222b4f";
sha256 = "1v20di90ckl405rj5pn6lxlpxh2m2b3y9h2snjvk0k9sihk7w7d5"; sha256 = "sha256-AiygCfBze7J1Emy6mc27Dim34eLR7VId9wodUZapIL4=";
}; };
nativeBuildInputs = [ autoreconfHook ]; nativeBuildInputs = [ autoreconfHook ];

View File

@ -4252,7 +4252,6 @@ with pkgs;
noti = callPackage ../tools/misc/noti { noti = callPackage ../tools/misc/noti {
inherit (darwin.apple_sdk.frameworks) Cocoa; inherit (darwin.apple_sdk.frameworks) Cocoa;
buildGoPackage = buildGo117Package;
}; };
notify = callPackage ../tools/misc/notify { }; notify = callPackage ../tools/misc/notify { };
@ -15749,9 +15748,7 @@ with pkgs;
binutils = binutils; binutils = binutils;
}; };
dive = callPackage ../development/tools/dive { dive = callPackage ../development/tools/dive { };
buildGoModule = buildGo117Module;
};
doclifter = callPackage ../development/tools/misc/doclifter { }; doclifter = callPackage ../development/tools/misc/doclifter { };