Merge staging-next into staging

This commit is contained in:
github-actions[bot] 2023-06-10 00:03:09 +00:00 committed by GitHub
commit f85baf313e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 741 additions and 86 deletions

View File

@ -103,6 +103,10 @@ in
serviceConfig = {
DynamicUser = true;
User = "go2rtc";
SupplementaryGroups = [
# for v4l2 devices
"video"
];
StateDirectory = "go2rtc";
ExecStart = "${cfg.package}/bin/go2rtc -config ${configFile}";
};

View File

@ -2,7 +2,7 @@
let
pname = "erigon";
version = "2.43.0";
version = "2.45.1";
in
buildGoModule {
inherit pname version;
@ -11,11 +11,11 @@ buildGoModule {
owner = "ledgerwatch";
repo = pname;
rev = "v${version}";
sha256 = "sha256-3o7vu2bA8lB1CiVaSF6YU9WjwNliQAK5AcGl82GCqFg=";
sha256 = "sha256-uaEGshpAmCXIIcpN5Fx/VNUK8DgQp9yFm2xBDGz7FNo=";
fetchSubmodules = true;
};
vendorSha256 = "sha256-JhMefeUxo9ksyCnNsLgAhGG0Ix7kxCA/cYyiELd0H64=";
vendorSha256 = "sha256-Yd78OW48HsOgxT5R3QT6/xDzPsRNFRE2nKocljTKKBA=";
proxyVendor = true;
# Build errors in mdbx when format hardening is enabled:

View File

@ -2,14 +2,14 @@
buildGoModule rec {
pname = "aiac";
version = "2.4.0";
version = "2.5.0";
excludedPackages = [".ci"];
src = fetchFromGitHub {
owner = "gofireflyio";
repo = pname;
rev = "v${version}";
hash = "sha256-C9eQdN8S8Qe0x+Uly69nbYNXDKpi1uZ6qNBetn2P4Gk=";
hash = "sha256-BCcoMftnvfAqmabnSz/oRAlJg95KJ236mduxV2DfRG4=";
};
vendorHash = "sha256-Uqr9wH7hCLdZEu6DXddgB7NuLtqcjUbOPJ2YX+9ehKM=";

View File

@ -6,13 +6,13 @@
buildGoModule rec {
pname = "k0sctl";
version = "0.15.1";
version = "0.15.2";
src = fetchFromGitHub {
owner = "k0sproject";
repo = pname;
rev = "v${version}";
sha256 = "sha256-80AmGc3SdniKayvviVoItrj8v+3m1sAJXSjoRJzw7mE=";
sha256 = "sha256-pti52JlnIxinKg2DxNfLewoJuhMohsAVmHgvR2N5shg=";
};
vendorSha256 = "sha256-K4/sIHWVe1Wj8LJgrqfoOg1hHXvH3HEgU5vq82tzMSk=";

View File

@ -9,13 +9,13 @@
python3.pkgs.buildPythonApplication rec {
pname = "chirp";
version = "unstable-2023-03-15";
version = "unstable-2023-06-02";
src = fetchFromGitHub {
owner = "kk7ds";
repo = "chirp";
rev = "33402b7c545c5a92b7042369867e7eb75ef32a59";
hash = "sha256-duSEpd2GBBskoKNFos5X9wFtsjRct1918VhZd1T2rvU=";
rev = "72789c3652c332dc68ba694f8f8f005913fe5c95";
hash = "sha256-WQwCX7h9BFLdYOBVVntxQ6g4t3j7QLfNmlHVLzlRh7U=";
};
buildInputs = [
glib

View File

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "git-credential-oauth";
version = "0.7.0";
version = "0.8.0";
src = fetchFromGitHub {
owner = "hickford";
repo = pname;
rev = "v${version}";
hash = "sha256-f12PgTtfs/S9RI8+QFROkNqccRWeIW1/YkynqvKJc7I=";
hash = "sha256-t1P20BDNQ0aJRgQhOgYP2Md44+I8xs6884ktBO4nGjY=";
};
ldflags = [
@ -17,7 +17,7 @@ buildGoModule rec {
"-X main.version=${version}"
];
vendorHash = "sha256-9X7ti3NR5MKK0MpiyTOTO+EtdMuu4/TW/diHq9FjSHY=";
vendorHash = "sha256-oHusgU5SMkFDY2dhFRdDonyYkyOBGOp+zqx2nFmOWXk=";
meta = {
description = "Git credential helper that securely authenticates to GitHub, GitLab and BitBucket using OAuth";

View File

@ -1,4 +1,5 @@
{ llvmPackages
{ stdenv
, llvmPackages
, lib
, fetchFromGitHub
, cmake
@ -13,7 +14,7 @@
assert blas.implementation == "openblas" && lapack.implementation == "openblas";
llvmPackages.stdenv.mkDerivation rec {
stdenv.mkDerivation rec {
pname = "halide";
version = "15.0.1";
@ -24,7 +25,15 @@ llvmPackages.stdenv.mkDerivation rec {
sha256 = "sha256-mnZ6QMqDr48bH2W+andGZj2EhajXKApjuW6B50xtzx0=";
};
cmakeFlags = [ "-DWARNINGS_AS_ERRORS=OFF" "-DWITH_PYTHON_BINDINGS=OFF" "-DTARGET_WEBASSEMBLY=OFF" ];
cmakeFlags = [
"-DWARNINGS_AS_ERRORS=OFF"
"-DWITH_PYTHON_BINDINGS=OFF"
"-DTARGET_WEBASSEMBLY=OFF"
# Disable performance tests since they may fail on busy machines
"-DWITH_TEST_PERFORMANCE=OFF"
];
doCheck = true;
# Note: only openblas and not atlas part of this Nix expression
# see pkgs/development/libraries/science/math/liblapack/3.5.0.nix

View File

@ -1,6 +1,6 @@
{ mkDerivation }:
mkDerivation {
version = "25.3.2.1";
sha256 = "4PDK18/tekJHgNGECG5hv/HvwvteR+FeN6hlpB9FC9o=";
version = "25.3.2.2";
sha256 = "TeDszsF9X4ExnOfP20ujlJpfxKK1zwhHHnPAbSnm/YQ=";
}

View File

@ -1,32 +1,49 @@
{ lib, buildPythonPackage, fetchPypi
, pytest-runner
{ lib
, buildPythonPackage
, fetchPypi
, setuptools
, coverage, pytest
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "diceware";
version = "0.10";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-srTMm1n1aNLvUb/fn34a+UHSX7j1wl8XAZHburzpZWk=";
};
nativeBuildInputs = [ pytest-runner ];
propagatedBuildInputs = [ setuptools ];
nativeCheckInputs = [ coverage pytest ];
# see https://github.com/ulif/diceware/commit/a7d844df76cd4b95a717f21ef5aa6167477b6733
checkPhase = ''
py.test -m 'not packaging'
postPatch = ''
substituteInPlace setup.py \
--replace "'pytest_runner'," ""
'';
propagatedBuildInputs = [
setuptools
];
nativeCheckInputs = [
pytestCheckHook
];
pytestFlagsArray = [
# see https://github.com/ulif/diceware/commit/a7d844df76cd4b95a717f21ef5aa6167477b6733
"-m 'not packaging'"
];
pythonImportsCheck = [
"diceware"
];
meta = with lib; {
description = "Generates passphrases by concatenating words randomly picked from wordlists";
homepage = "https://github.com/ulif/diceware";
changelog = "https://github.com/ulif/diceware/blob/v${version}/CHANGES.rst";
license = licenses.gpl3;
maintainers = with maintainers; [ asymmetric ];
};

View File

@ -1,25 +1,49 @@
{ lib, buildPythonPackage, fetchPypi,
six, pytest, pytest-runner, pytest-cov, coverage
{ lib
, buildPythonPackage
, fetchPypi
, pytestCheckHook
, pythonOlder
, six
}:
buildPythonPackage rec {
pname = "libais";
version = "0.17";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "0pyka09h8nb0vlzh14npq4nxmzg1046lr3klgn97dsf5k0iflapb";
hash = "sha256-6yrqIpjF6XaSfXSOTA0B4f3aLcHXkgA/3WBZBBNQ018=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "'pytest-runner'," ""
'';
propagatedBuildInputs = [
six
];
nativeCheckInputs = [
pytestCheckHook
];
# data files missing
doCheck = false;
nativeCheckInputs = [ pytest pytest-runner pytest-cov coverage ];
propagatedBuildInputs = [ six ];
pythonImportsCheck = [
"ais"
];
meta = with lib; {
homepage = "https://github.com/schwehr/libais";
description = "Library for decoding maritime Automatic Identification System messages";
homepage = "https://github.com/schwehr/libais";
changelog = "https://github.com/schwehr/libais/blob/master/Changelog.md";
license = licenses.asl20;
maintainers = with maintainers; [ ];
platforms = platforms.unix;
};
}

View File

@ -6,14 +6,14 @@
buildPythonPackage rec {
pname = "policyuniverse";
version = "1.5.1.20230526";
version = "1.5.1.20230608";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-80Q1qkCAD3VwNk0pblPWni3qY/8Dc2YrOLDjPrg/2Os=";
hash = "sha256-q0Btbo5jznv3mUXh5SjVU7SmdxFpPkiVe/ZNY+lzUCg=";
};
# Tests are not shipped and there are no GitHub tags

View File

@ -1,34 +1,42 @@
{ buildPythonPackage
{ lib
, buildPythonPackage
, callPackage
, pytest-cov
, fetchPypi
, lib
, pytest
, pytestCheckHook
, pythonOlder
, pytest-runner
}:
buildPythonPackage rec {
pname = "pycategories";
version = "1.2.0";
disabled = pythonOlder "3.4";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "bd70ecb5e94e7659e564ea153f0c7673291dc37c526c246800fc08d6c5378099";
hash = "sha256-vXDstelOdlnlZOoVPwx2cykdw3xSbCRoAPwI1sU3gJk=";
};
nativeBuildInputs = [ pytest-runner ];
postPatch = ''
substituteInPlace setup.py \
--replace "'pytest-runner'," ""
substituteInPlace setup.cfg \
--replace "--cov-report term --cov=categories" ""
'';
# Is private because the author states it's unmaintained
# and shouldn't be used in production code
propagatedBuildInputs = [ (callPackage ./infix.nix { }) ];
nativeCheckInputs = [ pytest pytest-cov ];
nativeCheckInputs = [
pytestCheckHook
];
meta = with lib; {
homepage = "https://gitlab.com/danielhones/pycategories";
description = "Implementation of some concepts from category theory";
homepage = "https://gitlab.com/danielhones/pycategories";
changelog = "https://gitlab.com/danielhones/pycategories/-/blob/v${version}/CHANGELOG.rst";
license = licenses.mit;
maintainers = with maintainers; [ dmvianna ];
};

View File

@ -1,30 +1,43 @@
{ lib
, fetchPypi
, buildPythonPackage
, pytest-runner
, fetchPypi
, numpy
, pythonOlder
, pyyaml
}:
buildPythonPackage rec {
pname = "pysrim";
version = "0.5.10";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "ada088f73f7e1a3bf085206e81e0f83ed89c1d0b23a789ecd0ba0a250724aee8";
hash = "sha256-raCI9z9+GjvwhSBugeD4PticHQsjp4ns0LoKJQckrug=";
};
buildInputs = [ pytest-runner ];
propagatedBuildInputs = [ numpy pyyaml ];
postPatch = ''
substituteInPlace setup.py \
--replace "'pytest-runner', " ""
'';
propagatedBuildInputs = [
numpy
pyyaml
];
# Tests require git lfs download of repository
doCheck = false;
meta = {
# pythonImportsCheck does not work
# TypeError: load() missing 1 required positional argument: 'Loader'
meta = with lib; {
description = "Srim Automation of Tasks via Python";
homepage = "https://gitlab.com/costrouc/pysrim";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ costrouc ];
license = licenses.mit;
maintainers = with maintainers; [ costrouc ];
};
}

View File

@ -0,0 +1,52 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, hatchling
, bluetooth-data-tools
, bluetooth-sensor-state-data
, home-assistant-bluetooth
, sensor-state-data
, pythonOlder
}:
buildPythonPackage rec {
pname = "sensirion-ble";
version = "0.1.0";
format = "pyproject";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "akx";
repo = "sensirion-ble";
rev = "refs/tags/v${version}";
hash = "sha256-7l76/Bci1ztt2CfwytLOySK6IL8IDijpB0AYhksRP7o=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov=sensirion_ble --cov-report=term-missing:skip-covered" ""
'';
nativeBuildInputs = [
hatchling
];
propagatedBuildInputs = [
bluetooth-data-tools
bluetooth-sensor-state-data
home-assistant-bluetooth
sensor-state-data
];
pythonImportsCheck = [
"sensirion_ble"
];
meta = with lib; {
description = "Parser for Sensirion BLE devices";
homepage = "https://github.com/akx/sensirion-ble";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
};
}

View File

@ -1,21 +1,39 @@
{ lib, buildPythonPackage, fetchPypi, six, pytest, pytest-runner }:
{ lib
, buildPythonPackage
, fetchPypi
, six
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "srptools";
version = "1.0.1";
format = "setuptools";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "7fa4337256a1542e8f5bb4bed19e1d9aea98fe5ff9baf76693342a1dd6ac7c96";
hash = "sha256-f6QzclahVC6PW7S+0Z4dmuqY/l/5uvdmkzQqHdasfJY=";
};
propagatedBuildInputs = [ six ];
propagatedBuildInputs = [
six
];
nativeCheckInputs = [ pytest pytest-runner ];
nativeCheckInputs = [
pytestCheckHook
];
pythonImportsCheck = [
"srptools"
];
meta = with lib; {
description = "Python-Tools to implement Secure Remote Password (SRP) authentication";
description = "Module to implement Secure Remote Password (SRP) authentication";
homepage = "https://github.com/idlesign/srptools";
changelog = "https://github.com/idlesign/srptools/blob/v${version}/CHANGELOG";
license = licenses.bsd3;
maintainers = with maintainers; [ ];
};

View File

@ -1,12 +1,18 @@
{ lib, buildPythonPackage, fetchFromGitHub, pythonOlder
, colorama, regex
, pytest-runner, pytestCheckHook, pytest-mypy
{ lib
, buildPythonPackage
, colorama
, fetchFromGitHub
, pytest-mypy
, pytestCheckHook
, pythonOlder
, regex
}:
buildPythonPackage rec {
pname = "tatsu";
version = "5.8.3";
# upstream only supports 3.10+
format = "setuptools";
disabled = pythonOlder "3.10";
src = fetchFromGitHub {
@ -16,11 +22,19 @@ buildPythonPackage rec {
hash = "sha256-cKEMRbH/xNtYM0lmNVazv3i0Q1tmVrVPrB6F2s02Sro=";
};
nativeBuildInputs = [ pytest-runner ];
propagatedBuildInputs = [ colorama regex ];
nativeCheckInputs = [ pytestCheckHook pytest-mypy ];
propagatedBuildInputs = [
colorama
regex
];
pythonImportsCheck = [ "tatsu" ];
nativeCheckInputs = [
pytest-mypy
pytestCheckHook
];
pythonImportsCheck = [
"tatsu"
];
meta = with lib; {
description = "Generates Python parsers from grammars in a variation of EBNF";
@ -30,8 +44,8 @@ buildPythonPackage rec {
Python.
'';
homepage = "https://tatsu.readthedocs.io/";
changelog = "https://github.com/neogeny/TatSu/releases/tag/v${version}";
license = licenses.bsd2;
maintainers = with maintainers; [ ];
};
}

View File

@ -0,0 +1,222 @@
{ stdenv
, cmake
, lsb-release
, ninja
, lib
, fetchFromGitHub
, fetchurl
, makeDesktopItem
, python3
, libX11
, libXrandr
, libXinerama
, libXcursor
, libXi
, libXext
, glew
, boost
, SDL2
, SDL2_net
, pkg-config
, libpulseaudio
, libpng
, imagemagick
, requireFile
, oot ? rec {
enable = true;
variant = "debug";
rom = requireFile {
name = "oot-${variant}.z64";
message = ''
This nix expression requires that oot-${variant}.z64 is already part of the store.
To get this file you can dump your Ocarina of Time's cartridge to a file,
and add it to the nix store with nix-store --add-fixed sha1 <FILE>, or override the package:
shipwright.override { oot = { enable = true; variant = "debug"; rom = path/to/oot-debug-mq.z64; } }
The supported variants are:
- debug: Ocarina of Time Debug PAL GC (not Master Quest)
- pal-gc: Ocarina of Time PAL GameCube (may lead to crashes and instability)
This is optional if you have imported an Ocarina of Time Master Quest ROM.
If so, please set oot.enable to false and ootMq.enable to true.
If both are enabled, Ship of Harkinian will be built with both ROMs.
'';
# From upstream: https://github.com/HarbourMasters/Shipwright/blob/e46c60a7a1396374e23f7a1f7122ddf9efcadff7/README.md#1-check-your-sha1
sha1 = {
debug = "cee6bc3c2a634b41728f2af8da54d9bf8cc14099";
pal-gc = "0227d7c0074f2d0ac935631990da8ec5914597b4";
}.${variant} or (throw "Unsupported romVariant ${variant}. Valid options are 'debug' and 'pal-gc'.");
};
}
, ootMq ? rec {
enable = false;
variant = "debug-mq";
rom = requireFile {
name = "oot-${variant}.z64";
message = ''
This nix expression requires that oot-${variant}.z64 is already part of the store.
To get this file you can dump your Ocarina of Time Master Quest's cartridge to a file,
and add it to the nix store with nix-store --add-fixed sha1 <FILE>, or override the package:
shipwright.override { ootMq = { enable = true; variant = "debug-mq"; rom = path/to/oot-debug-mq.z64; } }
The supported variants are:
- debug-mq: Ocarina of Time Debug PAL GC MQ (Dungeons will be Master Quest)
- debug-mq-alt: Alternate ROM, not produced by decompilation.
This is optional if you have imported an Ocarina of Time ROM.
If so, please set oot.enable to true and ootMq.enable to false.
If both are enabled, Ship of Harkinian will be built with both ROMs.
'';
# From upstream: https://github.com/HarbourMasters/Shipwright/blob/e46c60a7a1396374e23f7a1f7122ddf9efcadff7/README.md#1-check-your-sha1
sha1 = {
debug-mq = "079b855b943d6ad8bd1eb026c0ed169ecbdac7da";
debug-mq-alt = "50bebedad9e0f10746a52b07239e47fa6c284d03";
}.${variant} or (throw "Unsupported mqRomVariant ${variant}. Valid options are 'debug-mq' and 'debug-mq-alt'.");
};
}
}:
let
checkAttrs = attrs:
let
validAttrs = [ "enable" "rom" "variant" ];
in
lib.all (name: lib.elem name validAttrs) (lib.attrNames attrs);
in
assert (lib.assertMsg (checkAttrs oot) "oot must have the attributes 'enable' and 'rom', and none other");
assert (lib.assertMsg (checkAttrs ootMq) "ootMq must have the attributes 'enable' and 'rom', and none other");
assert (lib.assertMsg (oot.enable || ootMq.enable) "At least one of 'oot.enable' and 'ootMq.enable' must be true");
stdenv.mkDerivation rec {
pname = "shipwright";
version = "7.0.2";
src = fetchFromGitHub {
owner = "harbourmasters";
repo = "shipwright";
rev = version;
hash = "sha256-2VCcczGWSvp6hk8FTA1/T1E1KkrrvWyOdkEw8eiYYnY=";
fetchSubmodules = true;
};
# This would get fetched at build time otherwise, see:
# https://github.com/HarbourMasters/Shipwright/blob/e46c60a7a1396374e23f7a1f7122ddf9efcadff7/soh/CMakeLists.txt#L736
gamecontrollerdb = fetchurl {
name = "gamecontrollerdb.txt";
url = "https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/c5b4df0e1061175cb11e3ebbf8045178339864a5/gamecontrollerdb.txt";
hash = "sha256-2VFCsaalXoe+JYWCH6IbgjnLXNKxe0UqSyJNGZMn5Ko=";
};
nativeBuildInputs = [
cmake
ninja
pkg-config
lsb-release
python3
imagemagick
];
buildInputs = [
boost
libX11
libXrandr
libXinerama
libXcursor
libXi
libXext
glew
SDL2
SDL2_net
libpulseaudio
libpng
];
patches = [
# These patches make soh look inside the nix store for data files (the controller database and the OTRs)
./lus-install-paths.patch
./soh-misc-otr-patches.patch
];
cmakeFlags = [
"-DCMAKE_INSTALL_PREFIX=${placeholder "out"}/lib"
];
dontAddPrefix = true;
# Linking fails without this
hardeningDisable = [ "format" ];
postBuild = ''
cp ${gamecontrollerdb} ${gamecontrollerdb.name}
pushd ../OTRExporter
${lib.optionalString oot.enable "python3 ./extract_assets.py -z ../build/ZAPD/ZAPD.out ${oot.rom}"}
${lib.optionalString ootMq.enable "python3 ./extract_assets.py -z ../build/ZAPD/ZAPD.out ${ootMq.rom}"}
popd
'';
preInstall = ''
# Cmake likes it here for its install paths
cp ../OTRExporter/soh.otr ..
'';
postInstall = ''
mkdir -p $out/bin
# Copy the extracted assets, required to be in the same directory as the executable
${lib.optionalString oot.enable "cp ../OTRExporter/oot.otr $out/lib"}
${lib.optionalString ootMq.enable "cp ../OTRExporter/oot-mq.otr $out/lib"}
ln -s $out/lib/soh.elf $out/bin/soh
'';
desktopItems = [
(makeDesktopItem {
name = "soh";
icon = "soh";
exec = "soh";
genericName = "Ship of Harkinian";
desktopName = "soh";
categories = [ "Game" ];
})
];
meta = with lib; {
homepage = "https://github.com/HarbourMasters/Shipwright";
description = "A PC port of Ocarina of Time with modern controls, widescreen, high-resolution, and more";
longDescription = ''
An PC port of Ocarina of Time with modern controls, widescreen, high-resolution and more, based off of decompilation.
Note that you must supply an OoT rom yourself to use this package because propietary assets are extracted from it.
You can change the game variant like this:
shipwright.override { oot.enable = false; ootMq.enable = true }
The default ROM variants for Oot and OotMq are debug and debug-mq respectively.
If you have a pal-gc rom, you should override like this:
shipwright.override { oot = { enable = true; variant = "pal-gc"; rom = path/to/oot-pal-gc.z64; } }
The supported Oot variants are:
- debug: Ocarina of Time Debug PAL GC (not Master Quest)
- pal-gc: Ocarina of Time PAL GameCube (may lead to crashes and instability)
The supported OotMq variants are:
- debug-mq: Ocarina of Time Debug PAL GC MQ (Dungeons will be Master Quest)
- debug-mq-alt: Alternate ROM, not produced by decompilation.
'';
mainProgram = "soh";
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ ivar j0lol ];
license = with licenses; [
# OTRExporter, OTRGui, ZAPDTR, libultraship
mit
# Ship of Harkinian itself
unfree
];
};
}

View File

@ -0,0 +1,146 @@
Submodule libultraship contains modified content
diff --git a/libultraship/src/CMakeLists.txt b/libultraship/src/CMakeLists.txt
index f95c3c9..5b967b9 100644
--- a/libultraship/src/CMakeLists.txt
+++ b/libultraship/src/CMakeLists.txt
@@ -74,7 +74,10 @@ target_sources(libultraship PRIVATE ${Source_Files__Controller})
#=================== Core ===================
+configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/install_config.h.in ${CMAKE_BINARY_DIR}/install_config.h @ONLY)
+
set(Source_Files__Core
+ ${CMAKE_BINARY_DIR}/install_config.h
${CMAKE_CURRENT_SOURCE_DIR}/core/Window.h
${CMAKE_CURRENT_SOURCE_DIR}/core/Window.cpp
${CMAKE_CURRENT_SOURCE_DIR}/core/ConsoleVariable.h
@@ -329,7 +332,7 @@ endif()
#=================== Packages & Includes ===================
target_include_directories(libultraship
- PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../extern
+ PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../extern ${CMAKE_BINARY_DIR}
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ${INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../extern/spdlog/include ${CMAKE_CURRENT_SOURCE_DIR}/../extern/stb
)
diff --git a/libultraship/src/core/Context.cpp b/libultraship/src/core/Context.cpp
index 776333e..fa546e6 100644
--- a/libultraship/src/core/Context.cpp
+++ b/libultraship/src/core/Context.cpp
@@ -14,6 +14,7 @@
#elif defined(__WIIU__)
#include "port/wiiu/WiiUImpl.h"
#endif
+#include "install_config.h"
namespace LUS {
std::weak_ptr<Context> Context::mContext;
@@ -281,6 +282,18 @@ std::string Context::GetShortName() {
}
std::string Context::GetAppBundlePath() {
+#ifdef CMAKE_INSTALL_PREFIX
+ static const std::string fpath = CMAKE_INSTALL_PREFIX;
+ static int exists = -1;
+
+ if (exists == -1) {
+ exists = fpath.size() > 0 && std::filesystem::is_directory(fpath);
+ }
+
+ if (exists) {
+ return fpath;
+ }
+#else
#ifdef __APPLE__
FolderManager folderManager;
return folderManager.getMainBundlePath();
@@ -291,6 +304,7 @@ std::string Context::GetAppBundlePath() {
if (fpath != NULL) {
return std::string(fpath);
}
+#endif
#endif
return ".";
@@ -304,6 +318,13 @@ std::string Context::GetAppDirectoryPath() {
}
#endif
+ char *prefpath = SDL_GetPrefPath(NULL, "soh");
+ if (prefpath != NULL) {
+ std::string ret(prefpath);
+ SDL_free(prefpath);
+ return ret;
+ }
+
return ".";
}
@@ -315,7 +336,24 @@ std::string Context::GetPathRelativeToAppDirectory(const char* path) {
return GetAppDirectoryPath() + "/" + path;
}
+std::string Context::FindFileFromAllAppDirectories(const char* path) {
+ std::string fpath;
+
+ // app configuration dir (eg. ~/.local/share)
+ fpath = GetPathRelativeToAppDirectory(path);
+ if (std::filesystem::exists(fpath)) {
+ return fpath;
+ }
+ // app install dir (eg. /usr/)
+ fpath = GetPathRelativeToAppBundle(path);
+ if (std::filesystem::exists(fpath)) {
+ return fpath;
+ }
+ // current dir
+ return "./" + std::string(path);
+}
+
bool Context::DoesOtrFileExist() {
return mOtrFileExists;
}
-} // namespace LUS
\ No newline at end of file
+} // namespace LUS
diff --git a/libultraship/src/core/Context.h b/libultraship/src/core/Context.h
index c32f4dd..a9f1639 100644
--- a/libultraship/src/core/Context.h
+++ b/libultraship/src/core/Context.h
@@ -26,6 +26,7 @@ class Context {
static std::string GetAppDirectoryPath();
static std::string GetPathRelativeToAppDirectory(const char* path);
static std::string GetPathRelativeToAppBundle(const char* path);
+ static std::string FindFileFromAllAppDirectories(const char* path);
Context(std::string name, std::string shortName);
diff --git a/libultraship/src/core/libultra/os.cpp b/libultraship/src/core/libultra/os.cpp
index 9058fe1..7d9387e 100644
--- a/libultraship/src/core/libultra/os.cpp
+++ b/libultraship/src/core/libultra/os.cpp
@@ -21,8 +21,8 @@ int32_t osContInit(OSMesgQueue* mq, uint8_t* controllerBits, OSContStatus* statu
}
#ifndef __SWITCH__
- const char* controllerDb = "gamecontrollerdb.txt";
- int mappingsAdded = SDL_GameControllerAddMappingsFromFile(controllerDb);
+ std::string controllerDb = LUS::Context::GetPathRelativeToAppBundle("gamecontrollerdb.txt");
+ int mappingsAdded = SDL_GameControllerAddMappingsFromFile(controllerDb.c_str());
if (mappingsAdded >= 0) {
SPDLOG_INFO("Added SDL game controllers from \"{}\" ({})", controllerDb, mappingsAdded);
} else {
@@ -90,4 +90,4 @@ int32_t osRecvMesg(OSMesgQueue* mq, OSMesg* msg, int32_t flag) {
mq->validCount--;
return 0;
}
-}
\ No newline at end of file
+}
diff --git a/libultraship/src/install_config.h.in b/libultraship/src/install_config.h.in
new file mode 100644
index 0000000..029753c
--- /dev/null
+++ b/libultraship/src/install_config.h.in
@@ -0,0 +1 @@
+#cmakedefine CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"

View File

@ -0,0 +1,119 @@
diff --git a/soh/soh/Extractor/Extract.cpp b/soh/soh/Extractor/Extract.cpp
index a9ddc4f4..f6d45fe2 100644
--- a/soh/soh/Extractor/Extract.cpp
+++ b/soh/soh/Extractor/Extract.cpp
@@ -490,28 +490,27 @@ const char* Extractor::GetZapdVerStr() const {
extern "C" int zapd_main(int argc, char** argv);
-bool Extractor::CallZapd() {
+bool Extractor::CallZapd(std::string &assetPath) {
constexpr int argc = 16;
- char xmlPath[100];
- char confPath[100];
std::array<const char*, argc> argv;
const char* version = GetZapdVerStr();
- snprintf(xmlPath, 100, "assets/extractor/xmls/%s", version);
- snprintf(confPath, 100, "assets/extractor/Config_%s.xml", version);
+ std::string xmlPath = assetPath + "/assets/extractor/xmls/" + version;
+ std::string confPath = assetPath + "/assets/extractor/Config_" + version + ".xml";
+ std::string fileListsPath = assetPath + "/assets/extractor/filelists";
argv[0] = "ZAPD";
argv[1] = "ed";
argv[2] = "-i";
- argv[3] = xmlPath;
+ argv[3] = xmlPath.c_str();
argv[4] = "-b";
argv[5] = mCurrentRomPath.c_str();
argv[6] = "-fl";
- argv[7] = "assets/extractor/filelists";
+ argv[7] = fileListsPath.c_str();
argv[8] = "-gsf";
- argv[9] = "1";
+ argv[9] = "0";
argv[10] = "-rconf";
- argv[11] = confPath;
+ argv[11] = confPath.c_str();
argv[12] = "-se";
argv[13] = "OTR";
argv[14] = "--otrfile";
diff --git a/soh/soh/Extractor/Extract.h b/soh/soh/Extractor/Extract.h
index e4eb2e5b..3c95b025 100644
--- a/soh/soh/Extractor/Extract.h
+++ b/soh/soh/Extractor/Extract.h
@@ -57,7 +57,7 @@ class Extractor {
bool IsMasterQuest() const;
bool Run(RomSearchMode searchMode = RomSearchMode::Both);
- bool CallZapd();
+ bool CallZapd(std::string& assetPath);
const char* GetZapdStr();
};
#endif
diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp
index d192de6a..cc516085 100644
--- a/soh/soh/OTRGlobals.cpp
+++ b/soh/soh/OTRGlobals.cpp
@@ -201,11 +201,11 @@ const char* constCameraStrings[] = {
OTRGlobals::OTRGlobals() {
std::vector<std::string> OTRFiles;
- std::string mqPath = LUS::Context::GetPathRelativeToAppDirectory("oot-mq.otr");
+ std::string mqPath = LUS::Context::FindFileFromAllAppDirectories("oot-mq.otr");
if (std::filesystem::exists(mqPath)) {
OTRFiles.push_back(mqPath);
}
- std::string ootPath = LUS::Context::GetPathRelativeToAppDirectory("oot.otr");
+ std::string ootPath = LUS::Context::FindFileFromAllAppDirectories("oot.otr");
if (std::filesystem::exists(ootPath)) {
OTRFiles.push_back(ootPath);
}
@@ -213,7 +213,7 @@ OTRGlobals::OTRGlobals() {
if (std::filesystem::exists(sohOtrPath)) {
OTRFiles.push_back(sohOtrPath);
}
- std::string patchesPath = LUS::Context::GetPathRelativeToAppDirectory("mods");
+ std::string patchesPath = LUS::Context::FindFileFromAllAppDirectories("mods");
if (patchesPath.length() > 0 && std::filesystem::exists(patchesPath)) {
if (std::filesystem::is_directory(patchesPath)) {
for (const auto& p : std::filesystem::recursive_directory_iterator(patchesPath)) {
@@ -709,8 +709,10 @@ extern "C" void OTRExtScanner() {
extern "C" void InitOTR() {
#if not defined (__SWITCH__) && not defined(__WIIU__)
- if (!std::filesystem::exists(LUS::Context::GetPathRelativeToAppDirectory("oot-mq.otr")) &&
- !std::filesystem::exists(LUS::Context::GetPathRelativeToAppDirectory("oot.otr"))){
+ if (!std::filesystem::exists(LUS::Context::FindFileFromAllAppDirectories("oot-mq.otr")) &&
+ !std::filesystem::exists(LUS::Context::FindFileFromAllAppDirectories("oot.otr"))){
+ std::string exporterAssetPath = LUS::Context::GetAppBundlePath();
+
bool generatedOtrIsMQ = false;
if (Extractor::ShowYesNoBox("No OTR Files", "No OTR files found. Generate one now?") == IDYES) {
Extractor extract;
@@ -718,7 +720,7 @@ extern "C" void InitOTR() {
Extractor::ShowErrorBox("Error", "An error occured, no OTR file was generated. Exiting...");
exit(1);
}
- extract.CallZapd();
+ extract.CallZapd(exporterAssetPath);
generatedOtrIsMQ = extract.IsMasterQuest();
} else {
exit(1);
@@ -728,7 +730,7 @@ extern "C" void InitOTR() {
if (!extract.Run(generatedOtrIsMQ ? RomSearchMode::Vanilla : RomSearchMode::MQ)) {
Extractor::ShowErrorBox("Error", "An error occured, an OTR file may have been generated by a different step. Continuing...");
} else {
- extract.CallZapd();
+ extract.CallZapd(exporterAssetPath);
}
}
}
@@ -2018,4 +2020,4 @@ extern "C" void Gfx_RegisterBlendedTexture(const char* name, u8* mask, u8* repla
extern "C" void SaveManager_ThreadPoolWait() {
SaveManager::Instance->ThreadPoolWait();
-}
\ No newline at end of file
+}

View File

@ -10,15 +10,15 @@ let
in
stdenv.mkDerivation rec {
pname = "urbit";
version = "2.8";
version = "2.9";
src = fetchzip {
url = "https://github.com/urbit/vere/releases/download/vere-v${version}/${platform}.tgz";
sha256 = {
x86_64-linux = "sha256-reU8i7++VdAiuH36AyfhZhAJPnE4t0nBnYvWoglrKwA=";
aarch64-linux = "sha256-l3190BUIeJVbQI1tfP8W6WHw6WyfoYpI8rnjbgevznk=";
x86_64-darwin = "sha256-tsBuIcbWiK1oyu9UzHfwJe/nsVrLWXzoX/eIHyg4uaU=";
aarch64-darwin = "sha256-f+C5DB+IeN6ZcZ4oES4dc3LQ4pwDDszffu/U/KFwqmg=";
x86_64-linux = "sha256-CX3KoB5NNZBfikARh0ikeKQocaGIhbWcZsTFWOFk5oI=";
aarch64-linux = "sha256-PHVh4ktUe2HIPyudiwEUNuAfwOu4yCI9lxgbjrIllSU=";
x86_64-darwin = "sha256-lACh1UYtGrZUw+dtR0Ye6zqdtgp7llV9EkUoGOi+V4c=";
aarch64-darwin = "sha256-IRVMIriFVEsv69yUCxsiUaEgIlc618tf9dHiz76D+ug=";
}.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
};

View File

@ -3500,10 +3500,11 @@
psutil-home-assistant
pyserial
pyudev
sensirion-ble
sqlalchemy
webrtcvad
zeroconf
]; # missing inputs: sensirion-ble
];
"sensor" = ps: with ps; [
fnv-hash-fast
psutil-home-assistant
@ -5280,6 +5281,7 @@
"sense"
"senseme"
"sensibo"
"sensirion_ble"
"sensor"
"sensorpro"
"sensorpush"

View File

@ -12,20 +12,20 @@ in
with python3.pkgs;
buildPythonApplication rec {
pname = "matrix-synapse";
version = "1.85.1";
version = "1.85.2";
format = "pyproject";
src = fetchFromGitHub {
owner = "matrix-org";
repo = "synapse";
rev = "v${version}";
hash = "sha256-I/InjuTJOwYXw98qW7zT+fTnyLUo96xsVkFGSL+x+5k=";
hash = "sha256-pFafBsisBPfpDnFYWcimUuBgfFVPZzLna3yHeqIBAAE=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-KE56crjZDM1cJnVS7MvObIQ7NvH7+fUm1Mlb6HcT9+U=";
hash = "sha256-dnno+5Ma0YNYpmj3oZ5UG22uAanKwVT67BwQW+mHoFc=";
};
postPatch = ''

View File

@ -5,17 +5,17 @@
buildGoModule rec {
pname = "trivy";
version = "0.42.0";
version = "0.42.1";
src = fetchFromGitHub {
owner = "aquasecurity";
repo = pname;
rev = "v${version}";
sha256 = "sha256-TmtQ7rs77W6YFjh3y9kvIZabcGT6U/SCr5Hg6pa7K+s=";
sha256 = "sha256-QEjhnZmrmVzNG1/Zj8z/76v0Fb1N0rMYlvGb2pid2VM=";
};
# hash missmatch on across linux and darwin
proxyVendor = true;
vendorHash = "sha256-4YUJ4HfbAvYt/QtI9wmh8326T4avIXCtPkICo4lEpqQ=";
vendorHash = "sha256-bEmp3Fq9Zop3YCbZH4lOG71osY0P71xuhpIPOUSnHSY=";
excludedPackages = [ "magefiles" "misc" ];

View File

@ -4,7 +4,7 @@ nimPackages.buildNimPackage rec {
version = "0.1.6";
nimBinOnly = true;
src = fetchFromGitHub {
owner = "unxsh";
owner = "ssleert";
repo = "nitch";
rev = "42ad6899931dd5e0cec7b021c2b7e383fcc891f3";
hash = "sha256-QI7CbP0lvvjD+g29FR/YJjuZboZ+PoHynsNbpYC9SvE=";
@ -15,6 +15,10 @@ nimPackages.buildNimPackage rec {
url = "https://github.com/unxsh/nitch/commit/6831cf96144f58c4da298a0bc9b50d33056f6c08.patch";
sha256 = "sha256-uZUzUBLHBsssNqDxZ0NuTRMN9/gBxIlIiGgQkqCqEFc=";
})
(fetchpatch {
url = "https://github.com/ssleert/nitch/commit/ff10dea47dbc4d9736bd839b87869f53166cf395.patch";
hash = "sha256-n7JtI1Td0xMqhuScnMvxTkbY2I+l+FcUTz7aytxFasE=";
})
];
meta = with lib; {
@ -23,6 +27,5 @@ nimPackages.buildNimPackage rec {
license = licenses.mit;
platforms = platforms.linux;
maintainers = with maintainers; [ michaelBelsanti ];
mainProgram = "nitch";
};
}

View File

@ -2,13 +2,13 @@
buildGoModule rec {
pname = "phrase-cli";
version = "2.8.0";
version = "2.8.2";
src = fetchFromGitHub {
owner = "phrase";
repo = "phrase-cli";
rev = version;
sha256 = "sha256-Gima27E77iJEgOVY49Y2s9kQkd+rnzS359ru5NAyGik=";
sha256 = "sha256-jsN7JouIyrFd//+kDAcEEsXiGLZx8e5jQsiNVQuDiQg=";
};
vendorHash = "sha256-a0QA/1vUryAnO0Nr+m8frxtpnSHBOSOP1pq+BORTIJw=";

View File

@ -36221,6 +36221,8 @@ with pkgs;
keeperrl = callPackage ../games/keeperrl { };
shipwright = callPackage ../games/shipwright { };
### GAMES/DOOM-PORTS
dhewm3 = callPackage ../games/doom-ports/dhewm3 { };

View File

@ -11040,6 +11040,8 @@ self: super: with self; {
sense-energy = callPackage ../development/python-modules/sense-energy { };
sensirion-ble = callPackage ../development/python-modules/sensirion-ble { };
sensor-state-data = callPackage ../development/python-modules/sensor-state-data { };
sensorpro-ble = callPackage ../development/python-modules/sensorpro-ble { };