Merge master into staging-next
This commit is contained in:
+1
-1
@@ -141,7 +141,7 @@ let
|
|||||||
isStorePath isStringLike
|
isStorePath isStringLike
|
||||||
isValidPosixName toShellVar toShellVars trim trimWith
|
isValidPosixName toShellVar toShellVars trim trimWith
|
||||||
escapeRegex escapeURL escapeXML replaceChars lowerChars
|
escapeRegex escapeURL escapeXML replaceChars lowerChars
|
||||||
upperChars toLower toUpper addContextFrom splitString
|
upperChars toLower toUpper toSentenceCase addContextFrom splitString
|
||||||
removePrefix removeSuffix versionOlder versionAtLeast
|
removePrefix removeSuffix versionOlder versionAtLeast
|
||||||
getName getVersion match split
|
getName getVersion match split
|
||||||
cmakeOptionType cmakeBool cmakeFeature
|
cmakeOptionType cmakeBool cmakeFeature
|
||||||
|
|||||||
@@ -1424,6 +1424,42 @@ rec {
|
|||||||
*/
|
*/
|
||||||
toUpper = replaceStrings lowerChars upperChars;
|
toUpper = replaceStrings lowerChars upperChars;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Converts the first character of a string `s` to upper-case.
|
||||||
|
|
||||||
|
# Inputs
|
||||||
|
|
||||||
|
`str`
|
||||||
|
: The string to convert to sentence case.
|
||||||
|
|
||||||
|
# Type
|
||||||
|
|
||||||
|
```
|
||||||
|
toSentenceCase :: string -> string
|
||||||
|
```
|
||||||
|
|
||||||
|
# Examples
|
||||||
|
:::{.example}
|
||||||
|
## `lib.strings.toSentenceCase` usage example
|
||||||
|
|
||||||
|
```nix
|
||||||
|
toSentenceCase "home"
|
||||||
|
=> "Home"
|
||||||
|
```
|
||||||
|
|
||||||
|
:::
|
||||||
|
*/
|
||||||
|
toSentenceCase = str:
|
||||||
|
lib.throwIfNot (isString str)
|
||||||
|
"toSentenceCase does only accepts string values, but got ${typeOf str}"
|
||||||
|
(
|
||||||
|
let
|
||||||
|
firstChar = substring 0 1 str;
|
||||||
|
rest = substring 1 (stringLength str) str;
|
||||||
|
in
|
||||||
|
addContextFrom str (toUpper firstChar + toLower rest)
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Appends string context from string like object `src` to `target`.
|
Appends string context from string like object `src` to `target`.
|
||||||
|
|
||||||
|
|||||||
@@ -678,6 +678,15 @@ runTests {
|
|||||||
("%20%3F%26%3D%23%2B%25%21%3C%3E%23%22%7B%7D%7C%5C%5E%5B%5D%60%09%3A%2F%40%24%27%28%29%2A%2C%3B" == strings.escapeURL " ?&=#+%!<>#\"{}|\\^[]`\t:/@$'()*,;")
|
("%20%3F%26%3D%23%2B%25%21%3C%3E%23%22%7B%7D%7C%5C%5E%5B%5D%60%09%3A%2F%40%24%27%28%29%2A%2C%3B" == strings.escapeURL " ?&=#+%!<>#\"{}|\\^[]`\t:/@$'()*,;")
|
||||||
];
|
];
|
||||||
|
|
||||||
|
testToSentenceCase = {
|
||||||
|
expr = strings.toSentenceCase "hello world";
|
||||||
|
expected = "Hello world";
|
||||||
|
};
|
||||||
|
|
||||||
|
testToSentenceCasePath = testingThrow (
|
||||||
|
strings.toSentenceCase ./.
|
||||||
|
);
|
||||||
|
|
||||||
testToInt = testAllTrue [
|
testToInt = testAllTrue [
|
||||||
# Naive
|
# Naive
|
||||||
(123 == toInt "123")
|
(123 == toInt "123")
|
||||||
|
|||||||
+3
-3
@@ -32,13 +32,13 @@ let
|
|||||||
in
|
in
|
||||||
melpaBuild {
|
melpaBuild {
|
||||||
pname = "lsp-bridge";
|
pname = "lsp-bridge";
|
||||||
version = "0-unstable-2025-02-03";
|
version = "0-unstable-2025-02-10";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "manateelazycat";
|
owner = "manateelazycat";
|
||||||
repo = "lsp-bridge";
|
repo = "lsp-bridge";
|
||||||
rev = "16c9054be6e40a254e096715b1acf80ca36918aa";
|
rev = "4401d1396dce89d1fc5dc5414565818dd1c30ae0";
|
||||||
hash = "sha256-u1NWrSLsc+SRiK9BZwAujrzYb7vU+lEqyT+wozbXaiY=";
|
hash = "sha256-lWbFbYwJoy4UAezKUK7rnjQlDcnszHQwK5I7fuHfE8Y=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
|||||||
@@ -9,13 +9,13 @@
|
|||||||
}:
|
}:
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
pname = "airwindows";
|
pname = "airwindows";
|
||||||
version = "0-unstable-2025-02-02";
|
version = "0-unstable-2025-02-16";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "airwindows";
|
owner = "airwindows";
|
||||||
repo = "airwindows";
|
repo = "airwindows";
|
||||||
rev = "14f348fe83cfd42a6402856d3d15a1866b157996";
|
rev = "6a9e1e2913c85edc21f4554b49089668f19cc924";
|
||||||
hash = "sha256-IHOEpVykX1416wQBqymFgYHA8AnNH9mfUU53IkVVs6Y=";
|
hash = "sha256-Lb7IawTn/JKm/UF8ArwYalJGzX0yZwhKden5e2TlBeI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# we patch helpers because honestly im spooked out by where those variables
|
# we patch helpers because honestly im spooked out by where those variables
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
pname = "erigon";
|
pname = "erigon";
|
||||||
version = "2.61.0";
|
version = "2.61.1";
|
||||||
in
|
in
|
||||||
buildGoModule {
|
buildGoModule {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
@@ -16,11 +16,11 @@ buildGoModule {
|
|||||||
owner = "ledgerwatch";
|
owner = "ledgerwatch";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-B9FDGBx5ac1v0PqVK/2LhDH2seRthZxtaGu3G9flo0A=";
|
hash = "sha256-fSDAUdhSFTzqZji2bYxky8Orf64ZWvuQLZ/GqoPwNTM=";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorHash = "sha256-bGVHIrICYWyHPgWWgEAIT+J/IIPjcWqTHeuqbT6lung=";
|
vendorHash = "sha256-1LB2T0o9LjFdpl86NPMKx1lFLrQZefAGldcSQyL6O7M=";
|
||||||
proxyVendor = true;
|
proxyVendor = true;
|
||||||
|
|
||||||
# Build errors in mdbx when format hardening is enabled:
|
# Build errors in mdbx when format hardening is enabled:
|
||||||
|
|||||||
@@ -11,18 +11,18 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "ghost-cli";
|
pname = "ghost-cli";
|
||||||
version = "1.26.1";
|
version = "1.27.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "TryGhost";
|
owner = "TryGhost";
|
||||||
repo = "Ghost-CLI";
|
repo = "Ghost-CLI";
|
||||||
tag = "v${finalAttrs.version}";
|
tag = "v${finalAttrs.version}";
|
||||||
hash = "sha256-2zyRkPTQBzF+7nmlHPMi4S0BAdmUwIBkwD71y1y7Pn8=";
|
hash = "sha256-xOchKEktagamLJQONI9SJsv5vypVpBOAy/SWGdSzjLc=";
|
||||||
};
|
};
|
||||||
|
|
||||||
yarnOfflineCache = fetchYarnDeps {
|
yarnOfflineCache = fetchYarnDeps {
|
||||||
yarnLock = finalAttrs.src + "/yarn.lock";
|
yarnLock = finalAttrs.src + "/yarn.lock";
|
||||||
hash = "sha256-No+Hkb2ivrCSd0S9L5QxZ8ReX9NANMRITKHFvjzRSuc=";
|
hash = "sha256-Dgy+Ab0OaapjuuuRMcfHtzpsrfI5uPItXDY4XE9iK3A=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|||||||
@@ -19,10 +19,10 @@
|
|||||||
#
|
#
|
||||||
# Ensure you also check ../mattermostLatest/package.nix.
|
# Ensure you also check ../mattermostLatest/package.nix.
|
||||||
regex = "^v(9\\.11\\.[0-9]+)$";
|
regex = "^v(9\\.11\\.[0-9]+)$";
|
||||||
version = "9.11.8";
|
version = "9.11.9";
|
||||||
srcHash = "sha256-mTEAsY3Dw5n6sqLWyNfS4EGgZuUOol27UwqsZ2kEXZY=";
|
srcHash = "sha256-sEu5s+yMCPYxvyc7kuiA9AE/qBi08iTqhYxwO7J9xiE=";
|
||||||
vendorHash = "sha256-alLPBfnA1o6bUUgPRqvYW/98UKR9wltmFTzKIGtVEm4=";
|
vendorHash = "sha256-h/hcdVImU3wFp7BGHS/TxYBEWGv9v06y8etaz9OrHTA=";
|
||||||
npmDepsHash = "sha256-ysz38ywGxJ5DXrrcDmcmezKbc5Y7aug9jOWUzHRAs/0=";
|
npmDepsHash = "sha256-B7pXMHwyf7dQ2x2VJu+mdZz03/9FyyYvFYOw8XguTH8=";
|
||||||
},
|
},
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
|||||||
@@ -78,6 +78,16 @@ stdenv.mkDerivation rec {
|
|||||||
url = "https://raw.githubusercontent.com/openwrt/openwrt/87606e25afac6776d1bbc67ed284434ec5a832b4/toolchain/musl/patches/300-relative.patch";
|
url = "https://raw.githubusercontent.com/openwrt/openwrt/87606e25afac6776d1bbc67ed284434ec5a832b4/toolchain/musl/patches/300-relative.patch";
|
||||||
sha256 = "0hfadrycb60sm6hb6by4ycgaqc9sgrhh42k39v8xpmcvdzxrsq2n";
|
sha256 = "0hfadrycb60sm6hb6by4ycgaqc9sgrhh42k39v8xpmcvdzxrsq2n";
|
||||||
})
|
})
|
||||||
|
(fetchurl {
|
||||||
|
name = "CVE-2025-26519_0.patch";
|
||||||
|
url = "https://www.openwall.com/lists/musl/2025/02/13/1/1";
|
||||||
|
hash = "sha256-CJb821El2dByP04WXxPCCYMOcEWnXLpOhYBgg3y3KS4=";
|
||||||
|
})
|
||||||
|
(fetchurl {
|
||||||
|
name = "CVE-2025-26519_1.patch";
|
||||||
|
url = "https://www.openwall.com/lists/musl/2025/02/13/1/2";
|
||||||
|
hash = "sha256-BiD87k6KTlLr4ep14rUdIZfr2iQkicBYaSTq+p6WBqE=";
|
||||||
|
})
|
||||||
];
|
];
|
||||||
CFLAGS = [
|
CFLAGS = [
|
||||||
"-fstack-protector-strong"
|
"-fstack-protector-strong"
|
||||||
|
|||||||
@@ -22,14 +22,14 @@ let
|
|||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "pkcs11-provider";
|
pname = "pkcs11-provider";
|
||||||
version = "0.6";
|
version = "1.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "latchset";
|
owner = "latchset";
|
||||||
repo = "pkcs11-provider";
|
repo = "pkcs11-provider";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
hash = "sha256-wYqmxxAzraaVR2+mbsRfgyvD/tapn8UOO0UzBX2ZJH4=";
|
hash = "sha256-Q9dmzYDBco+LLVWdORFTjRyk0RX8qhmZ1m+Kgfeyr04=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
python310Packages,
|
python3Packages,
|
||||||
testers,
|
testers,
|
||||||
stig,
|
stig,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
python310Packages.buildPythonApplication rec {
|
python3Packages.buildPythonApplication rec {
|
||||||
pname = "stig";
|
pname = "stig";
|
||||||
# This project has a different concept for pre release / alpha,
|
# This project has a different concept for pre release / alpha,
|
||||||
# Read the project's README for details: https://github.com/rndusr/stig#stig
|
# Read the project's README for details: https://github.com/rndusr/stig#stig
|
||||||
version = "0.12.10a0";
|
version = "0.12.10a0";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "rndusr";
|
owner = "rndusr";
|
||||||
@@ -19,7 +20,11 @@ python310Packages.buildPythonApplication rec {
|
|||||||
sha256 = "sha256-lSFI4/DxWl17KFgLXZ7c5nW/e5IUGN7s8Gm6wTM5ZWg=";
|
sha256 = "sha256-lSFI4/DxWl17KFgLXZ7c5nW/e5IUGN7s8Gm6wTM5ZWg=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with python310Packages; [
|
build-system = with python3Packages; [
|
||||||
|
setuptools
|
||||||
|
];
|
||||||
|
|
||||||
|
dependencies = with python3Packages; [
|
||||||
urwid
|
urwid
|
||||||
urwidtrees
|
urwidtrees
|
||||||
aiohttp
|
aiohttp
|
||||||
@@ -30,27 +35,11 @@ python310Packages.buildPythonApplication rec {
|
|||||||
setproctitle
|
setproctitle
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeCheckInputs = with python310Packages; [
|
# According to the upstream author,
|
||||||
asynctest
|
# stig no longer has working tests
|
||||||
pytestCheckHook
|
# since asynctest (former test dependency) got abandoned.
|
||||||
];
|
# See https://github.com/rndusr/stig/issues/206#issuecomment-2669636320
|
||||||
|
doCheck = false;
|
||||||
dontUseSetuptoolsCheck = true;
|
|
||||||
|
|
||||||
preCheck = ''
|
|
||||||
export LC_ALL=C
|
|
||||||
'';
|
|
||||||
|
|
||||||
disabledTestPaths = [
|
|
||||||
# Almost all tests fail in this file, it is reported upstream in:
|
|
||||||
# https://github.com/rndusr/stig/issues/214 , and upstream fails to
|
|
||||||
# reproduce the issue unfortunately.
|
|
||||||
"tests/client_test/aiotransmission_test/api_settings_test.py"
|
|
||||||
];
|
|
||||||
disabledTests = [
|
|
||||||
# Another failure with similar circumstances to the above
|
|
||||||
"test_candidates_are_sorted_case_insensitively"
|
|
||||||
];
|
|
||||||
|
|
||||||
passthru.tests = testers.testVersion {
|
passthru.tests = testers.testVersion {
|
||||||
package = stig;
|
package = stig;
|
||||||
@@ -58,9 +47,6 @@ python310Packages.buildPythonApplication rec {
|
|||||||
version = "stig version ${version}";
|
version = "stig version ${version}";
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://github.com/rndusr/stig/issues/214#issuecomment-1995651219
|
|
||||||
dontUsePytestCheck = true;
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "TUI and CLI for the BitTorrent client Transmission";
|
description = "TUI and CLI for the BitTorrent client Transmission";
|
||||||
homepage = "https://github.com/rndusr/stig";
|
homepage = "https://github.com/rndusr/stig";
|
||||||
|
|||||||
@@ -72,10 +72,14 @@ let
|
|||||||
pkg-config
|
pkg-config
|
||||||
wayland-scanner
|
wayland-scanner
|
||||||
glslang
|
glslang
|
||||||
|
hwdata
|
||||||
] ++ extraNativeBuildInputs;
|
] ++ extraNativeBuildInputs;
|
||||||
|
|
||||||
buildInputs =
|
buildInputs =
|
||||||
[
|
[
|
||||||
|
ffmpeg
|
||||||
|
libliftoff
|
||||||
|
libdisplay-info
|
||||||
libGL
|
libGL
|
||||||
libcap
|
libcap
|
||||||
libinput
|
libinput
|
||||||
@@ -149,26 +153,12 @@ rec {
|
|||||||
wlroots_0_17 = generic {
|
wlroots_0_17 = generic {
|
||||||
version = "0.17.4";
|
version = "0.17.4";
|
||||||
hash = "sha256-AzmXf+HMX/6VAr0LpfHwfmDB9dRrrLQHt7l35K98MVo=";
|
hash = "sha256-AzmXf+HMX/6VAr0LpfHwfmDB9dRrrLQHt7l35K98MVo=";
|
||||||
extraNativeBuildInputs = [
|
|
||||||
hwdata
|
|
||||||
];
|
|
||||||
extraBuildInputs = [
|
|
||||||
ffmpeg
|
|
||||||
libliftoff
|
|
||||||
libdisplay-info
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
wlroots_0_18 = generic {
|
wlroots_0_18 = generic {
|
||||||
version = "0.18.2";
|
version = "0.18.2";
|
||||||
hash = "sha256-vKvMWRPPJ4PRKWVjmKKCdNSiqsQm+uQBoBnBUFElLNA=";
|
hash = "sha256-vKvMWRPPJ4PRKWVjmKKCdNSiqsQm+uQBoBnBUFElLNA=";
|
||||||
extraNativeBuildInputs = [
|
|
||||||
hwdata
|
|
||||||
];
|
|
||||||
extraBuildInputs = [
|
extraBuildInputs = [
|
||||||
ffmpeg
|
|
||||||
libliftoff
|
|
||||||
libdisplay-info
|
|
||||||
lcms2
|
lcms2
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
{deployAndroidPackage, lib, package, os, autoPatchelfHook, makeWrapper, pkgs, pkgsi686Linux, postInstall}:
|
{deployAndroidPackage, lib, stdenv, package, os, autoPatchelfHook, makeWrapper, pkgs, pkgsi686Linux, postInstall}:
|
||||||
|
|
||||||
deployAndroidPackage {
|
deployAndroidPackage {
|
||||||
inherit package os;
|
inherit package;
|
||||||
nativeBuildInputs = [ makeWrapper ]
|
nativeBuildInputs = [ makeWrapper ]
|
||||||
++ lib.optionals (os == "linux") [ autoPatchelfHook ];
|
++ lib.optionals (os == "linux") [ autoPatchelfHook ];
|
||||||
buildInputs = lib.optionals (os == "linux") [ pkgs.glibc pkgs.zlib pkgs.ncurses5 pkgsi686Linux.glibc pkgsi686Linux.zlib pkgsi686Linux.ncurses5 pkgs.libcxx ];
|
buildInputs = lib.optionals (os == "linux") [ pkgs.glibc pkgs.zlib pkgs.ncurses5 pkgs.libcxx ]
|
||||||
|
++ lib.optionals (os == "linux" && stdenv.isx86_64) (with pkgsi686Linux; [ glibc zlib ncurses5 ]);
|
||||||
patchInstructions = ''
|
patchInstructions = ''
|
||||||
${lib.optionalString (os == "linux") ''
|
${lib.optionalString (os == "linux") ''
|
||||||
addAutoPatchelfSearchPath $packageBaseDir/lib
|
addAutoPatchelfSearchPath $packageBaseDir/lib
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{deployAndroidPackage, lib, package, os, autoPatchelfHook, pkgs, stdenv}:
|
{deployAndroidPackage, lib, package, os, autoPatchelfHook, pkgs, stdenv}:
|
||||||
|
|
||||||
deployAndroidPackage {
|
deployAndroidPackage {
|
||||||
inherit package os;
|
inherit package;
|
||||||
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
|
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
|
||||||
buildInputs = lib.optionals (os == "linux") [ pkgs.stdenv.cc.libc pkgs.stdenv.cc.cc pkgs.ncurses5 ];
|
buildInputs = lib.optionals (os == "linux") [ pkgs.stdenv.cc.libc pkgs.stdenv.cc.cc pkgs.ncurses5 ];
|
||||||
patchInstructions = lib.optionalString (os == "linux") ''
|
patchInstructions = lib.optionalString (os == "linux") ''
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
, platformToolsVersion ? "35.0.2"
|
, platformToolsVersion ? "35.0.2"
|
||||||
, buildToolsVersions ? [ "35.0.0" ]
|
, buildToolsVersions ? [ "35.0.0" ]
|
||||||
, includeEmulator ? false
|
, includeEmulator ? false
|
||||||
, emulatorVersion ? "35.3.10"
|
, emulatorVersion ? "35.5.2"
|
||||||
, platformVersions ? []
|
, platformVersions ? []
|
||||||
, includeSources ? false
|
, includeSources ? false
|
||||||
, includeSystemImages ? false
|
, includeSystemImages ? false
|
||||||
@@ -27,9 +27,20 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
# Determine the Android os identifier from Nix's system identifier
|
# Determine the Android os identifier from Nix's system identifier
|
||||||
os = if stdenv.hostPlatform.isLinux then "linux"
|
os = {
|
||||||
else if stdenv.hostPlatform.isDarwin then "macosx"
|
x86_64-linux = "linux";
|
||||||
else throw "No Android SDK tarballs are available for system architecture: ${stdenv.system}";
|
x86_64-darwin = "macosx";
|
||||||
|
aarch64-linux = "linux";
|
||||||
|
aarch64-darwin = "macosx";
|
||||||
|
}.${stdenv.hostPlatform.system} or "all";
|
||||||
|
|
||||||
|
# Determine the Android arch identifier from Nix's system identifier
|
||||||
|
arch = {
|
||||||
|
x86_64-linux = "x64";
|
||||||
|
x86_64-darwin = "x64";
|
||||||
|
aarch64-linux = "aarch64";
|
||||||
|
aarch64-darwin = "aarch64";
|
||||||
|
}.${stdenv.hostPlatform.system} or "all";
|
||||||
|
|
||||||
# Uses mkrepo.rb to create a repo spec.
|
# Uses mkrepo.rb to create a repo spec.
|
||||||
mkRepoJson = { packages ? [], images ? [], addons ? [] }: let
|
mkRepoJson = { packages ? [], images ? [], addons ? [] }: let
|
||||||
@@ -71,9 +82,23 @@ let
|
|||||||
lib.attrsets.mapAttrsRecursive
|
lib.attrsets.mapAttrsRecursive
|
||||||
(path: value:
|
(path: value:
|
||||||
if (builtins.elemAt path ((builtins.length path) - 1)) == "archives" then
|
if (builtins.elemAt path ((builtins.length path) - 1)) == "archives" then
|
||||||
(builtins.listToAttrs
|
let
|
||||||
(builtins.map
|
validArchives = builtins.filter (archive:
|
||||||
(archive: lib.attrsets.nameValuePair archive.os (fetchurl { inherit (archive) url sha1; })) value))
|
let
|
||||||
|
isTargetOs = if builtins.hasAttr "os" archive then
|
||||||
|
archive.os == os || archive.os == "all" else true;
|
||||||
|
isTargetArc = if builtins.hasAttr "arch" archive then
|
||||||
|
archive.arch == arch || archive.arch == "all" else true;
|
||||||
|
in
|
||||||
|
isTargetOs && isTargetArc
|
||||||
|
) value;
|
||||||
|
in
|
||||||
|
lib.warnIf (builtins.length validArchives == 0)
|
||||||
|
"No valid archives for ${lib.concatMapStringsSep "." (x: ''"${x}"'') path} for os=${os}, arch=${arch}"
|
||||||
|
(lib.optionals (builtins.length validArchives > 0)
|
||||||
|
(lib.last (map (archive:
|
||||||
|
(fetchurl { inherit (archive) url sha1; })
|
||||||
|
) validArchives)))
|
||||||
else value
|
else value
|
||||||
)
|
)
|
||||||
attrSet;
|
attrSet;
|
||||||
@@ -117,12 +142,12 @@ rec {
|
|||||||
inherit stdenv lib mkLicenses;
|
inherit stdenv lib mkLicenses;
|
||||||
};
|
};
|
||||||
|
|
||||||
deployAndroidPackage = ({package, os ? null, buildInputs ? [], patchInstructions ? "", meta ? {}, ...}@args:
|
deployAndroidPackage = ({package, buildInputs ? [], patchInstructions ? "", meta ? {}, ...}@args:
|
||||||
let
|
let
|
||||||
extraParams = removeAttrs args [ "package" "os" "buildInputs" "patchInstructions" ];
|
extraParams = removeAttrs args [ "package" "os" "buildInputs" "patchInstructions" ];
|
||||||
in
|
in
|
||||||
deployAndroidPackages ({
|
deployAndroidPackages ({
|
||||||
inherit os buildInputs meta;
|
inherit buildInputs;
|
||||||
packages = [ package ];
|
packages = [ package ];
|
||||||
patchesInstructions = { "${package.name}" = patchInstructions; };
|
patchesInstructions = { "${package.name}" = patchInstructions; };
|
||||||
} // extraParams
|
} // extraParams
|
||||||
@@ -139,8 +164,7 @@ rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
platform-tools = callPackage ./platform-tools.nix {
|
platform-tools = callPackage ./platform-tools.nix {
|
||||||
inherit deployAndroidPackage;
|
inherit deployAndroidPackage os;
|
||||||
os = if stdenv.system == "aarch64-darwin" then "macosx" else os; # "macosx" is a universal binary here
|
|
||||||
package = check-version packages "platform-tools" platformToolsVersion;
|
package = check-version packages "platform-tools" platformToolsVersion;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -176,14 +200,12 @@ rec {
|
|||||||
|
|
||||||
platforms = map (version:
|
platforms = map (version:
|
||||||
deployAndroidPackage {
|
deployAndroidPackage {
|
||||||
inherit os;
|
|
||||||
package = check-version packages "platforms" version;
|
package = check-version packages "platforms" version;
|
||||||
}
|
}
|
||||||
) platformVersions;
|
) platformVersions;
|
||||||
|
|
||||||
sources = map (version:
|
sources = map (version:
|
||||||
deployAndroidPackage {
|
deployAndroidPackage {
|
||||||
inherit os;
|
|
||||||
package = check-version packages "sources" version;
|
package = check-version packages "sources" version;
|
||||||
}
|
}
|
||||||
) platformVersions;
|
) platformVersions;
|
||||||
@@ -218,7 +240,6 @@ rec {
|
|||||||
in
|
in
|
||||||
lib.optionals (availablePackages != [])
|
lib.optionals (availablePackages != [])
|
||||||
(deployAndroidPackages {
|
(deployAndroidPackages {
|
||||||
inherit os;
|
|
||||||
packages = availablePackages;
|
packages = availablePackages;
|
||||||
patchesInstructions = instructions;
|
patchesInstructions = instructions;
|
||||||
})
|
})
|
||||||
@@ -247,14 +268,12 @@ rec {
|
|||||||
|
|
||||||
google-apis = map (version:
|
google-apis = map (version:
|
||||||
deployAndroidPackage {
|
deployAndroidPackage {
|
||||||
inherit os;
|
|
||||||
package = (check-version addons "addons" version).google_apis;
|
package = (check-version addons "addons" version).google_apis;
|
||||||
}
|
}
|
||||||
) (builtins.filter (platformVersion: platformVersion < "26") platformVersions); # API level 26 and higher include Google APIs by default
|
) (builtins.filter (platformVersion: platformVersion < "26") platformVersions); # API level 26 and higher include Google APIs by default
|
||||||
|
|
||||||
google-tv-addons = map (version:
|
google-tv-addons = map (version:
|
||||||
deployAndroidPackage {
|
deployAndroidPackage {
|
||||||
inherit os;
|
|
||||||
package = (check-version addons "addons" version).google_tv_addon;
|
package = (check-version addons "addons" version).google_tv_addon;
|
||||||
}
|
}
|
||||||
) platformVersions;
|
) platformVersions;
|
||||||
|
|||||||
@@ -29,9 +29,15 @@ rec {
|
|||||||
"34"
|
"34"
|
||||||
"35"
|
"35"
|
||||||
];
|
];
|
||||||
includeEmulator = true;
|
includeEmulator =
|
||||||
includeSystemImages = true;
|
with pkgs.stdenv.hostPlatform;
|
||||||
includeNDK = true;
|
system == "x86_64-linux" || system == "x86_64-darwin" || system == "aarch64-darwin";
|
||||||
|
includeSystemImages =
|
||||||
|
with pkgs.stdenv.hostPlatform;
|
||||||
|
system == "x86_64-linux" || system == "x86_64-darwin" || system == "aarch64-darwin";
|
||||||
|
includeNDK =
|
||||||
|
with pkgs.stdenv.hostPlatform;
|
||||||
|
system == "x86_64-linux" || system == "x86_64-darwin" || system == "aarch64-darwin";
|
||||||
};
|
};
|
||||||
|
|
||||||
test-suite = pkgs.callPackage ./test-suite.nix { };
|
test-suite = pkgs.callPackage ./test-suite.nix { };
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{stdenv, lib, unzip, mkLicenses}:
|
{stdenv, lib, unzip, mkLicenses}:
|
||||||
{packages, os ? null, nativeBuildInputs ? [], buildInputs ? [], patchesInstructions ? {}, meta ? {}, ...}@args:
|
{packages, nativeBuildInputs ? [], buildInputs ? [], patchesInstructions ? {}, meta ? {}, ...}@args:
|
||||||
|
|
||||||
let
|
let
|
||||||
extraParams = removeAttrs args [ "packages" "os" "buildInputs" "nativeBuildInputs" "patchesInstructions" ];
|
extraParams = removeAttrs args [ "packages" "os" "buildInputs" "nativeBuildInputs" "patchesInstructions" ];
|
||||||
@@ -62,9 +62,7 @@ stdenv.mkDerivation ({
|
|||||||
inherit buildInputs;
|
inherit buildInputs;
|
||||||
pname = "android-sdk-${lib.concatMapStringsSep "-" (package: package.name) sortedPackages}";
|
pname = "android-sdk-${lib.concatMapStringsSep "-" (package: package.name) sortedPackages}";
|
||||||
version = lib.concatMapStringsSep "-" (package: package.revision) sortedPackages;
|
version = lib.concatMapStringsSep "-" (package: package.revision) sortedPackages;
|
||||||
src = map (package:
|
src = map (package: package.archives) packages;
|
||||||
if os != null && builtins.hasAttr os package.archives then package.archives.${os} else package.archives.all
|
|
||||||
) packages;
|
|
||||||
nativeBuildInputs = [ unzip ] ++ nativeBuildInputs;
|
nativeBuildInputs = [ unzip ] ++ nativeBuildInputs;
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ deployAndroidPackage, lib, package, os, autoPatchelfHook, makeWrapper, pkgs, pkgsi686Linux, postInstall }:
|
{ deployAndroidPackage, lib, stdenv, package, os, autoPatchelfHook, makeWrapper, pkgs, pkgsi686Linux, postInstall }:
|
||||||
|
|
||||||
deployAndroidPackage {
|
deployAndroidPackage {
|
||||||
inherit package os;
|
inherit package;
|
||||||
nativeBuildInputs = [ makeWrapper ]
|
nativeBuildInputs = [ makeWrapper ]
|
||||||
++ lib.optionals (os == "linux") [ autoPatchelfHook ];
|
++ lib.optionals (os == "linux") [ autoPatchelfHook ];
|
||||||
buildInputs = lib.optionals (os == "linux") (with pkgs; [
|
buildInputs = lib.optionals (os == "linux") (with pkgs; [
|
||||||
@@ -16,7 +16,6 @@ deployAndroidPackage {
|
|||||||
ncurses5
|
ncurses5
|
||||||
libdrm
|
libdrm
|
||||||
stdenv.cc.cc
|
stdenv.cc.cc
|
||||||
pkgsi686Linux.glibc
|
|
||||||
expat
|
expat
|
||||||
freetype
|
freetype
|
||||||
nss
|
nss
|
||||||
@@ -36,7 +35,7 @@ deployAndroidPackage {
|
|||||||
libICE
|
libICE
|
||||||
libSM
|
libSM
|
||||||
libxkbfile
|
libxkbfile
|
||||||
]);
|
]) ++ lib.optional (os == "linux" && stdenv.isx86_64) pkgsi686Linux.glibc;
|
||||||
patchInstructions = lib.optionalString (os == "linux") ''
|
patchInstructions = lib.optionalString (os == "linux") ''
|
||||||
addAutoPatchelfSearchPath $packageBaseDir/lib
|
addAutoPatchelfSearchPath $packageBaseDir/lib
|
||||||
addAutoPatchelfSearchPath $packageBaseDir/lib64
|
addAutoPatchelfSearchPath $packageBaseDir/lib64
|
||||||
|
|||||||
@@ -20,6 +20,9 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
config ? pkgs.config,
|
config ? pkgs.config,
|
||||||
|
# You probably need to set it to true to express consent.
|
||||||
|
licenseAccepted ?
|
||||||
|
config.android_sdk.accept_license or (builtins.getEnv "NIXPKGS_ACCEPT_ANDROID_SDK_LICENSE" == "1"),
|
||||||
}:
|
}:
|
||||||
|
|
||||||
# Copy this file to your Android project.
|
# Copy this file to your Android project.
|
||||||
@@ -48,9 +51,7 @@ let
|
|||||||
|
|
||||||
# Otherwise, just use the in-tree androidenv:
|
# Otherwise, just use the in-tree androidenv:
|
||||||
androidEnv = pkgs.callPackage ./.. {
|
androidEnv = pkgs.callPackage ./.. {
|
||||||
inherit config pkgs;
|
inherit config pkgs licenseAccepted;
|
||||||
# You probably need to uncomment below line to express consent.
|
|
||||||
# licenseAccepted = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sdkArgs = {
|
sdkArgs = {
|
||||||
@@ -97,7 +98,6 @@ pkgs.mkShell rec {
|
|||||||
platformTools
|
platformTools
|
||||||
androidEmulator
|
androidEmulator
|
||||||
jdk
|
jdk
|
||||||
pkgs.android-studio
|
|
||||||
];
|
];
|
||||||
|
|
||||||
LANG = "C.UTF-8";
|
LANG = "C.UTF-8";
|
||||||
@@ -196,6 +196,9 @@ pkgs.mkShell rec {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
''
|
''
|
||||||
|
export ANDROID_USER_HOME=$PWD/.android
|
||||||
|
mkdir -p $ANDROID_USER_HOME
|
||||||
|
|
||||||
avdmanager delete avd -n testAVD || true
|
avdmanager delete avd -n testAVD || true
|
||||||
echo "" | avdmanager create avd --force --name testAVD --package 'system-images;android-35;google_apis;x86_64'
|
echo "" | avdmanager create avd --force --name testAVD --package 'system-images;android-35;google_apis;x86_64'
|
||||||
result=$(avdmanager list avd)
|
result=$(avdmanager list avd)
|
||||||
|
|||||||
@@ -19,6 +19,9 @@
|
|||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
},
|
},
|
||||||
config ? pkgs.config,
|
config ? pkgs.config,
|
||||||
|
# You probably need to set it to true to express consent.
|
||||||
|
licenseAccepted ?
|
||||||
|
config.android_sdk.accept_license or (builtins.getEnv "NIXPKGS_ACCEPT_ANDROID_SDK_LICENSE" == "1"),
|
||||||
}:
|
}:
|
||||||
|
|
||||||
# Copy this file to your Android project.
|
# Copy this file to your Android project.
|
||||||
@@ -50,9 +53,7 @@ let
|
|||||||
|
|
||||||
# Otherwise, just use the in-tree androidenv:
|
# Otherwise, just use the in-tree androidenv:
|
||||||
androidEnv = pkgs.callPackage ./.. {
|
androidEnv = pkgs.callPackage ./.. {
|
||||||
inherit config pkgs;
|
inherit config pkgs licenseAccepted;
|
||||||
# You probably need to uncomment below line to express consent.
|
|
||||||
# licenseAccepted = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
sdkArgs = {
|
sdkArgs = {
|
||||||
@@ -92,7 +93,6 @@ pkgs.mkShell rec {
|
|||||||
androidSdk
|
androidSdk
|
||||||
platformTools
|
platformTools
|
||||||
jdk
|
jdk
|
||||||
pkgs.android-studio
|
|
||||||
];
|
];
|
||||||
|
|
||||||
LANG = "C.UTF-8";
|
LANG = "C.UTF-8";
|
||||||
|
|||||||
@@ -16,7 +16,10 @@
|
|||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
config ? pkgs.config
|
config ? pkgs.config,
|
||||||
|
# You probably need to set it to true to express consent.
|
||||||
|
licenseAccepted ?
|
||||||
|
config.android_sdk.accept_license or (builtins.getEnv "NIXPKGS_ACCEPT_ANDROID_SDK_LICENSE" == "1"),
|
||||||
}:
|
}:
|
||||||
|
|
||||||
# Copy this file to your Android project.
|
# Copy this file to your Android project.
|
||||||
@@ -57,9 +60,7 @@ let
|
|||||||
|
|
||||||
# Otherwise, just use the in-tree androidenv:
|
# Otherwise, just use the in-tree androidenv:
|
||||||
androidEnv = pkgs.callPackage ./.. {
|
androidEnv = pkgs.callPackage ./.. {
|
||||||
inherit config pkgs;
|
inherit config pkgs licenseAccepted;
|
||||||
# You probably need to uncomment below line to express consent.
|
|
||||||
# licenseAccepted = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
androidComposition = androidEnv.composeAndroidPackages {
|
androidComposition = androidEnv.composeAndroidPackages {
|
||||||
@@ -121,7 +122,7 @@ let
|
|||||||
in
|
in
|
||||||
pkgs.mkShell rec {
|
pkgs.mkShell rec {
|
||||||
name = "androidenv-demo";
|
name = "androidenv-demo";
|
||||||
packages = [ androidSdk platformTools jdk pkgs.android-studio ];
|
packages = [ androidSdk platformTools jdk ];
|
||||||
|
|
||||||
LANG = "C.UTF-8";
|
LANG = "C.UTF-8";
|
||||||
LC_ALL = "C.UTF-8";
|
LC_ALL = "C.UTF-8";
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ pushd "$(dirname "$0")" &>/dev/null || exit 1
|
|||||||
|
|
||||||
mkdir -p xml
|
mkdir -p xml
|
||||||
|
|
||||||
fetch repository2-1.xml xml/repository2-1.xml
|
fetch repository2-3.xml xml/repository2-3.xml
|
||||||
for img in android android-tv android-wear android-wear-cn android-automotive google_apis google_apis_playstore
|
for img in android android-tv android-wear android-wear-cn android-automotive google_apis google_apis_playstore
|
||||||
do
|
do
|
||||||
fetch sys-img/$img/sys-img2-1.xml xml/$img-sys-img2-1.xml
|
fetch sys-img/$img/sys-img2-3.xml xml/$img-sys-img2-3.xml
|
||||||
done
|
done
|
||||||
fetch addon2-1.xml xml/addon2-1.xml
|
fetch addon2-3.xml xml/addon2-3.xml
|
||||||
|
|
||||||
popd &>/dev/null
|
popd &>/dev/null
|
||||||
|
|||||||
@@ -157,8 +157,12 @@ def package_archives package
|
|||||||
archives = {}
|
archives = {}
|
||||||
package.css('> archives > archive').each do |archive|
|
package.css('> archives > archive').each do |archive|
|
||||||
host_os = text archive.at_css('> host-os')
|
host_os = text archive.at_css('> host-os')
|
||||||
|
host_arch = text archive.at_css('> host-arch')
|
||||||
host_os = 'all' if empty?(host_os)
|
host_os = 'all' if empty?(host_os)
|
||||||
archives[host_os] = {
|
host_arch = 'all' if empty?(host_arch)
|
||||||
|
archives[host_os + host_arch] = {
|
||||||
|
'os' => host_os,
|
||||||
|
'arch' => host_arch,
|
||||||
'size' => Integer(text(archive.at_css('> complete > size'))),
|
'size' => Integer(text(archive.at_css('> complete > size'))),
|
||||||
'sha1' => text(archive.at_css('> complete > checksum')),
|
'sha1' => text(archive.at_css('> complete > checksum')),
|
||||||
'url' => yield(text(archive.at_css('> complete > url')))
|
'url' => yield(text(archive.at_css('> complete > url')))
|
||||||
@@ -184,7 +188,7 @@ def fixup value
|
|||||||
Hash[value.map do |k, v|
|
Hash[value.map do |k, v|
|
||||||
if k == 'archives' && v.is_a?(Hash)
|
if k == 'archives' && v.is_a?(Hash)
|
||||||
[k, v.map do |os, archive|
|
[k, v.map do |os, archive|
|
||||||
fixup({'os' => os}.merge(archive))
|
fixup(archive)
|
||||||
end]
|
end]
|
||||||
elsif v.is_a?(Hash)
|
elsif v.is_a?(Hash)
|
||||||
[k, fixup(v)]
|
[k, fixup(v)]
|
||||||
|
|||||||
@@ -7,15 +7,15 @@ pushd "$(dirname "$0")" &>/dev/null || exit 1
|
|||||||
|
|
||||||
echo "Writing repo.json" >&2
|
echo "Writing repo.json" >&2
|
||||||
cat ./repo.json | ruby mkrepo.rb \
|
cat ./repo.json | ruby mkrepo.rb \
|
||||||
--packages ./xml/repository2-1.xml \
|
--packages ./xml/repository2-3.xml \
|
||||||
--images ./xml/android-sys-img2-1.xml \
|
--images ./xml/android-sys-img2-3.xml \
|
||||||
--images ./xml/android-tv-sys-img2-1.xml \
|
--images ./xml/android-tv-sys-img2-3.xml \
|
||||||
--images ./xml/android-wear-cn-sys-img2-1.xml \
|
--images ./xml/android-wear-cn-sys-img2-3.xml \
|
||||||
--images ./xml/android-wear-sys-img2-1.xml \
|
--images ./xml/android-wear-sys-img2-3.xml \
|
||||||
--images ./xml/android-automotive-sys-img2-1.xml \
|
--images ./xml/android-automotive-sys-img2-3.xml \
|
||||||
--images ./xml/google_apis-sys-img2-1.xml \
|
--images ./xml/google_apis-sys-img2-3.xml \
|
||||||
--images ./xml/google_apis_playstore-sys-img2-1.xml \
|
--images ./xml/google_apis_playstore-sys-img2-3.xml \
|
||||||
--addons ./xml/addon2-1.xml \
|
--addons ./xml/addon2-3.xml \
|
||||||
| sponge repo.json
|
| sponge repo.json
|
||||||
|
|
||||||
popd &>/dev/null
|
popd &>/dev/null
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ let
|
|||||||
]) + ":${platform-tools}/platform-tools";
|
]) + ":${platform-tools}/platform-tools";
|
||||||
in
|
in
|
||||||
deployAndroidPackage rec {
|
deployAndroidPackage rec {
|
||||||
inherit package os;
|
inherit package;
|
||||||
nativeBuildInputs = [ makeWrapper ]
|
nativeBuildInputs = [ makeWrapper ]
|
||||||
++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
|
++ lib.optionals stdenv.hostPlatform.isLinux [ autoPatchelfHook ];
|
||||||
autoPatchelfIgnoreMissingDeps = [ "*" ];
|
autoPatchelfIgnoreMissingDeps = [ "*" ];
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{deployAndroidPackage, lib, package, os, autoPatchelfHook, pkgs}:
|
{deployAndroidPackage, lib, package, os, autoPatchelfHook, pkgs}:
|
||||||
|
|
||||||
deployAndroidPackage {
|
deployAndroidPackage {
|
||||||
inherit package os;
|
inherit package;
|
||||||
nativeBuildInputs = lib.optionals (os == "linux") [ autoPatchelfHook ];
|
nativeBuildInputs = lib.optionals (os == "linux") [ autoPatchelfHook ];
|
||||||
buildInputs = lib.optionals (os == "linux") [ pkgs.glibc (lib.getLib pkgs.stdenv.cc.cc) pkgs.zlib pkgs.ncurses5 ];
|
buildInputs = lib.optionals (os == "linux") [ pkgs.glibc (lib.getLib pkgs.stdenv.cc.cc) pkgs.zlib pkgs.ncurses5 ];
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -4,16 +4,20 @@
|
|||||||
stdenv,
|
stdenv,
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
examples-shell = callPackage ./examples/shell.nix { };
|
examples-shell = callPackage ./examples/shell.nix { licenseAccepted = true; };
|
||||||
examples-shell-with-emulator = callPackage ./examples/shell-with-emulator.nix { };
|
examples-shell-with-emulator = callPackage ./examples/shell-with-emulator.nix {
|
||||||
examples-shell-without-emulator = callPackage ./examples/shell-without-emulator.nix { };
|
licenseAccepted = true;
|
||||||
|
};
|
||||||
|
examples-shell-without-emulator = callPackage ./examples/shell-without-emulator.nix {
|
||||||
|
licenseAccepted = true;
|
||||||
|
};
|
||||||
all-tests =
|
all-tests =
|
||||||
examples-shell.passthru.tests
|
examples-shell.passthru.tests
|
||||||
// (examples-shell-with-emulator.passthru.tests // examples-shell-without-emulator.passthru.tests);
|
// (examples-shell-with-emulator.passthru.tests // examples-shell-without-emulator.passthru.tests);
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "androidenv-test-suite";
|
name = "androidenv-test-suite";
|
||||||
buidInputs = lib.mapAttrsToList (name: value: value) all-tests;
|
buildInputs = lib.mapAttrsToList (name: value: value) all-tests;
|
||||||
|
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
touch $out
|
touch $out
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{deployAndroidPackage, lib, package, autoPatchelfHook, makeWrapper, os, pkgs, pkgsi686Linux, postInstall}:
|
{deployAndroidPackage, lib, stdenv, package, autoPatchelfHook, makeWrapper, os, pkgs, pkgsi686Linux, postInstall}:
|
||||||
|
|
||||||
deployAndroidPackage {
|
deployAndroidPackage {
|
||||||
name = "androidsdk-tools";
|
name = "androidsdk-tools";
|
||||||
inherit os package;
|
inherit package;
|
||||||
nativeBuildInputs = [ makeWrapper ]
|
nativeBuildInputs = [ makeWrapper ]
|
||||||
++ lib.optionals (os == "linux") [ autoPatchelfHook ];
|
++ lib.optionals (os == "linux") [ autoPatchelfHook ];
|
||||||
buildInputs = lib.optional (os == "linux") (
|
buildInputs = lib.optional (os == "linux") (
|
||||||
@@ -10,7 +10,7 @@ deployAndroidPackage {
|
|||||||
stdenv.cc.cc.libgcc or null # fix for https://github.com/NixOS/nixpkgs/issues/226357
|
stdenv.cc.cc.libgcc or null # fix for https://github.com/NixOS/nixpkgs/issues/226357
|
||||||
])
|
])
|
||||||
++ (with pkgs.xorg; [ libX11 libXrender libXext ])
|
++ (with pkgs.xorg; [ libX11 libXrender libXext ])
|
||||||
++ (with pkgsi686Linux; [ glibc xorg.libX11 xorg.libXrender xorg.libXext fontconfig.lib freetype zlib ])
|
++ lib.optionals (os == "linux" && stdenv.isx86_64) (with pkgsi686Linux; [ glibc xorg.libX11 xorg.libXrender xorg.libXext fontconfig.lib freetype zlib ])
|
||||||
);
|
);
|
||||||
|
|
||||||
patchInstructions = ''
|
patchInstructions = ''
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "aioesphomeapi";
|
pname = "aioesphomeapi";
|
||||||
version = "29.1.0";
|
version = "29.1.1";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
disabled = pythonOlder "3.9";
|
disabled = pythonOlder "3.9";
|
||||||
@@ -35,7 +35,7 @@ buildPythonPackage rec {
|
|||||||
owner = "esphome";
|
owner = "esphome";
|
||||||
repo = "aioesphomeapi";
|
repo = "aioesphomeapi";
|
||||||
tag = "v${version}";
|
tag = "v${version}";
|
||||||
hash = "sha256-/4/FNb6lGlitsAzO0OadWqP02Wx+mnlrA6yzXFm72sg=";
|
hash = "sha256-umCjsBn0lS94SArvXXGuOfJ1oXmcVLOlrC35Crik9pA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
build-system = [
|
build-system = [
|
||||||
@@ -61,16 +61,13 @@ buildPythonPackage rec {
|
|||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
];
|
];
|
||||||
|
|
||||||
disabledTests = [
|
|
||||||
# https://github.com/esphome/aioesphomeapi/pull/1081
|
|
||||||
"test_request_while_handshaking"
|
|
||||||
];
|
|
||||||
|
|
||||||
disabledTestPaths = [
|
disabledTestPaths = [
|
||||||
# benchmarking requires pytest-codespeed
|
# benchmarking requires pytest-codespeed
|
||||||
"tests/benchmarks"
|
"tests/benchmarks"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
__darwinAllowLocalNetworking = true;
|
||||||
|
|
||||||
pythonImportsCheck = [ "aioesphomeapi" ];
|
pythonImportsCheck = [ "aioesphomeapi" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|||||||
@@ -7,14 +7,14 @@
|
|||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "esphome-glyphsets";
|
pname = "esphome-glyphsets";
|
||||||
version = "0.1.0";
|
version = "0.2.0";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "esphome";
|
owner = "esphome";
|
||||||
repo = "esphome-glyphsets";
|
repo = "esphome-glyphsets";
|
||||||
tag = "v${version}";
|
tag = "v${version}";
|
||||||
hash = "sha256-kST2AsZRWZrVmInUNN153+FOXa/t9vbHN3hAReKQJaU=";
|
hash = "sha256-nM8omtLIWwIY6AGVqVR2/4twmMlOj21+9cSuyXzAAXY=";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pyfritzhome";
|
pname = "pyfritzhome";
|
||||||
version = "0.6.14";
|
version = "0.6.15";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.7";
|
||||||
@@ -20,7 +20,7 @@ buildPythonPackage rec {
|
|||||||
owner = "hthiery";
|
owner = "hthiery";
|
||||||
repo = "python-fritzhome";
|
repo = "python-fritzhome";
|
||||||
tag = version;
|
tag = version;
|
||||||
hash = "sha256-49Ap4SSeEMlqOnzd1/oyQ1wKwFVxsC+apx+FVCWqNVI=";
|
hash = "sha256-UVn+RJRLlLPhhnuJpWv5b15TtY0EkwccE3aj4f/fP6Q=";
|
||||||
};
|
};
|
||||||
|
|
||||||
build-system = [ setuptools ];
|
build-system = [ setuptools ];
|
||||||
|
|||||||
@@ -13,19 +13,19 @@
|
|||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "esphome-dashboard";
|
pname = "esphome-dashboard";
|
||||||
version = "20241217.1";
|
version = "20250212.0";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "esphome";
|
owner = "esphome";
|
||||||
repo = "dashboard";
|
repo = "dashboard";
|
||||||
rev = "refs/tags/${version}";
|
rev = "refs/tags/${version}";
|
||||||
hash = "sha256-Mirihvts8G2D4e5Jn7S0dWEJ+sOHZ+fvzsNaLpAOyMA=";
|
hash = "sha256-9yXG9jwB284xTM6L3HWQCRD9Ki1F8yHaEl1vDNDxogw=";
|
||||||
};
|
};
|
||||||
|
|
||||||
npmDeps = fetchNpmDeps {
|
npmDeps = fetchNpmDeps {
|
||||||
inherit src;
|
inherit src;
|
||||||
hash = "sha256-fWQvDMeuRjyToHhhZH1KtLWuhgAvq900cCja2dvLQyU=";
|
hash = "sha256-B0Lx4aH+7NVSMY9qUUOiVeLgIL5wI3JolC9eLzjbRRA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
build-system = [ setuptools ];
|
build-system = [ setuptools ];
|
||||||
|
|||||||
@@ -22,14 +22,14 @@ let
|
|||||||
in
|
in
|
||||||
python.pkgs.buildPythonApplication rec {
|
python.pkgs.buildPythonApplication rec {
|
||||||
pname = "esphome";
|
pname = "esphome";
|
||||||
version = "2024.12.4";
|
version = "2025.2.0";
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = pname;
|
owner = pname;
|
||||||
repo = pname;
|
repo = pname;
|
||||||
tag = version;
|
tag = version;
|
||||||
hash = "sha256-Ff3NuLHKRLoBbjqb92vvDcSbSJnjCwm5FmSDwnEI0p4=";
|
hash = "sha256-V9nDDgRgMOko271lQ3D3BQIMtZmFnUhAuFavyPFufEM=";
|
||||||
};
|
};
|
||||||
|
|
||||||
build-systems = with python.pkgs; [
|
build-systems = with python.pkgs; [
|
||||||
@@ -72,9 +72,9 @@ python.pkgs.buildPythonApplication rec {
|
|||||||
colorama
|
colorama
|
||||||
cryptography
|
cryptography
|
||||||
esphome-dashboard
|
esphome-dashboard
|
||||||
|
esphome-glyphsets
|
||||||
freetype-py
|
freetype-py
|
||||||
icmplib
|
icmplib
|
||||||
glyphsets
|
|
||||||
kconfiglib
|
kconfiglib
|
||||||
packaging
|
packaging
|
||||||
paho-mqtt
|
paho-mqtt
|
||||||
@@ -125,6 +125,12 @@ python.pkgs.buildPythonApplication rec {
|
|||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
];
|
];
|
||||||
|
|
||||||
|
disabledTests = [
|
||||||
|
# race condition, also visible in upstream tests
|
||||||
|
# tests/dashboard/test_web_server.py:78: IndexError
|
||||||
|
"test_devices_page"
|
||||||
|
];
|
||||||
|
|
||||||
postCheck = ''
|
postCheck = ''
|
||||||
$out/bin/esphome --help > /dev/null
|
$out/bin/esphome --help > /dev/null
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in New Issue
Block a user