Merge master into staging-next
This commit is contained in:
@@ -9,9 +9,9 @@
|
||||
},
|
||||
"branch": "nixpkgs-unstable",
|
||||
"submodules": false,
|
||||
"revision": "8ca7ec685bbee55d6dcb326abe23945c0806c39e",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/8ca7ec685bbee55d6dcb326abe23945c0806c39e.tar.gz",
|
||||
"hash": "1hkxm871m66mjsc4acdki32qqnpgk3n6vi3zrzns2bwlwp6ivcjx"
|
||||
"revision": "6afe187897bef7933475e6af374c893f4c84a293",
|
||||
"url": "https://github.com/NixOS/nixpkgs/archive/6afe187897bef7933475e6af374c893f4c84a293.tar.gz",
|
||||
"hash": "1x3yas2aingswrw7hpn43d9anlb08bpyk42dqg6v8f3p3yk83p1b"
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"type": "Git",
|
||||
@@ -22,9 +22,9 @@
|
||||
},
|
||||
"branch": "main",
|
||||
"submodules": false,
|
||||
"revision": "1f3f7b784643d488ba4bf315638b2b0a4c5fb007",
|
||||
"url": "https://github.com/numtide/treefmt-nix/archive/1f3f7b784643d488ba4bf315638b2b0a4c5fb007.tar.gz",
|
||||
"hash": "13qisjalw9qvd6lkd9g8225r46j5wdjrp3zw6jrs81q2vxwdz37m"
|
||||
"revision": "a05be418a1af1198ca0f63facb13c985db4cb3c5",
|
||||
"url": "https://github.com/numtide/treefmt-nix/archive/a05be418a1af1198ca0f63facb13c985db4cb3c5.tar.gz",
|
||||
"hash": "1yadm9disc59an4a6c1zidq82530rd7i7idzzsirv6dlwirbqk3q"
|
||||
}
|
||||
},
|
||||
"version": 5
|
||||
|
||||
@@ -34,6 +34,7 @@ in
|
||||
enable = true;
|
||||
settings.DefaultAction = "deny";
|
||||
settings.ProcMonitorMethod = m;
|
||||
settings.LogLevel = 0;
|
||||
};
|
||||
}
|
||||
) monitorMethods
|
||||
@@ -46,6 +47,7 @@ in
|
||||
enable = true;
|
||||
settings.DefaultAction = "deny";
|
||||
settings.ProcMonitorMethod = m;
|
||||
settings.LogLevel = 0;
|
||||
rules = {
|
||||
curl = {
|
||||
name = "curl";
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "ddnet";
|
||||
version = "19.2";
|
||||
version = "19.2.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ddnet";
|
||||
repo = "ddnet";
|
||||
tag = version;
|
||||
hash = "sha256-7moxTdoUTOpAHDT0LNNG6ccHeXKxd6ND+GRcgchWVSI=";
|
||||
hash = "sha256-0G0rVqkrIKjSGW7TF218TqakzJxiCzDipLGDzJvgdRg=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "easyrsa";
|
||||
version = "3.2.2";
|
||||
version = "3.2.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "OpenVPN";
|
||||
repo = "easy-rsa";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-gNuVijMAHVKEHU0Z6INKUZt68qSg5ssxSaXOH/+MU1I=";
|
||||
hash = "sha256-TAJAwvcIkAB4YShK9NItw14UTvuxtNd/OxLDkO8p0d0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
@@ -21,17 +21,22 @@
|
||||
libvorbis,
|
||||
libopus,
|
||||
nlohmann_json,
|
||||
expat,
|
||||
libGL,
|
||||
curl,
|
||||
webkitgtk_4_1,
|
||||
gtk3,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "giada";
|
||||
version = "1.0.0";
|
||||
version = "1.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "monocasual";
|
||||
repo = "giada";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-vTOUS9mI4B3yRNnM2dNCH7jgMuD3ztdhe1FMgXUIt58=";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-t24S8tmx9VFcpEwe5EzoMQ7xhX8dj92Mq43gaWc+C50=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
@@ -51,22 +56,27 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
buildInputs =
|
||||
[
|
||||
rtmidi
|
||||
alsa-lib
|
||||
curl
|
||||
expat
|
||||
flac
|
||||
fltk
|
||||
fmt
|
||||
libmpg123
|
||||
libsndfile
|
||||
libsamplerate
|
||||
nlohmann_json
|
||||
alsa-lib
|
||||
libXpm
|
||||
libpulseaudio
|
||||
gtk3
|
||||
jack2
|
||||
flac
|
||||
libogg
|
||||
libvorbis
|
||||
libopus
|
||||
libGL
|
||||
libXpm
|
||||
libXrandr
|
||||
libogg
|
||||
libopus
|
||||
libpulseaudio
|
||||
libsamplerate
|
||||
libsndfile
|
||||
libvorbis
|
||||
libmpg123
|
||||
nlohmann_json
|
||||
rtmidi
|
||||
webkitgtk_4_1
|
||||
]
|
||||
++ lib.optionals (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isFreeBSD) [
|
||||
fontconfig
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
diff --git a/internal/fileutils/assets.go b/internal/fileutils/assets.go
|
||||
index 83eacd9..0b80e51 100644
|
||||
--- a/internal/fileutils/assets.go
|
||||
+++ b/internal/fileutils/assets.go
|
||||
@@ -1,28 +1,7 @@
|
||||
//go:generate rice embed
|
||||
package fileutils
|
||||
|
||||
-import (
|
||||
- "os"
|
||||
- "sync"
|
||||
-
|
||||
- rice "github.com/GeertJohan/go.rice"
|
||||
- "github.com/go-flutter-desktop/hover/internal/log"
|
||||
-)
|
||||
-
|
||||
-var (
|
||||
- assetsBox *rice.Box
|
||||
- assetsBoxOnce sync.Once
|
||||
-)
|
||||
-
|
||||
// AssetsBox hover's assets box
|
||||
-func AssetsBox() *rice.Box {
|
||||
- assetsBoxOnce.Do(func() {
|
||||
- var err error
|
||||
- assetsBox, err = rice.FindBox("../../assets")
|
||||
- if err != nil {
|
||||
- log.Errorf("Failed to find hover assets: %v", err)
|
||||
- os.Exit(1)
|
||||
- }
|
||||
- })
|
||||
- return assetsBox
|
||||
+func AssetsBox() string {
|
||||
+ return "@assetsFolder@"
|
||||
}
|
||||
diff --git a/internal/fileutils/file.go b/internal/fileutils/file.go
|
||||
index cb75563..3822e80 100644
|
||||
--- a/internal/fileutils/file.go
|
||||
+++ b/internal/fileutils/file.go
|
||||
@@ -11,8 +11,6 @@ import (
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
- rice "github.com/GeertJohan/go.rice"
|
||||
-
|
||||
"github.com/go-flutter-desktop/hover/internal/log"
|
||||
)
|
||||
|
||||
@@ -215,24 +213,24 @@ func ExecuteTemplateFromFile(boxed, to string, templateData interface{}) {
|
||||
}
|
||||
|
||||
// ExecuteTemplateFromAssetsBox create file from a template asset
|
||||
-func ExecuteTemplateFromAssetsBox(boxed, to string, assetsBox *rice.Box, templateData interface{}) {
|
||||
- templateString, err := assetsBox.String(boxed)
|
||||
+func ExecuteTemplateFromAssetsBox(boxed, to string, assetsBox string, templateData interface{}) {
|
||||
+ templateString, err := ioutil.ReadFile(assetsBox + "/" + boxed)
|
||||
if err != nil {
|
||||
log.Errorf("Failed to find template file: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
- executeTemplateFromString(templateString, to, templateData)
|
||||
+ executeTemplateFromString(string(templateString), to, templateData)
|
||||
}
|
||||
|
||||
// CopyAsset copies a file from asset
|
||||
-func CopyAsset(boxed, to string, assetsBox *rice.Box) {
|
||||
+func CopyAsset(boxed string, to string, assetsBox string) {
|
||||
file, err := os.Create(to)
|
||||
if err != nil {
|
||||
log.Errorf("Failed to create %s: %v", to, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
defer file.Close()
|
||||
- boxedFile, err := assetsBox.Open(boxed)
|
||||
+ boxedFile, err := os.OpenFile(assetsBox + "/" + boxed, os.O_RDONLY, 0666)
|
||||
if err != nil {
|
||||
log.Errorf("Failed to find boxed file %s: %v", boxed, err)
|
||||
os.Exit(1)
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
let
|
||||
pname = "hover";
|
||||
version = "0.47.0";
|
||||
version = "0.47.2";
|
||||
|
||||
libs = with xorg; [
|
||||
libX11.dev
|
||||
@@ -36,23 +36,23 @@ let
|
||||
hover = buildGoModule {
|
||||
inherit pname version;
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Build tool to run Flutter applications on desktop";
|
||||
homepage = "https://github.com/go-flutter-desktop/hover";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ ericdallo ];
|
||||
license = [ lib.licenses.bsd3 ];
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = [ lib.maintainers.ericdallo ];
|
||||
};
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
vendorHash = "sha256-GDoX5d2aDfaAx9JsKuS4r8137t3swT6rgcCghmaThSM=";
|
||||
vendorHash = "sha256-LDVF1vt1kTm7G/zqWHcjtGK+BsydgmJUET61+sILiE0=";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
rev = "v${version}";
|
||||
tag = "v${version}";
|
||||
owner = "go-flutter-desktop";
|
||||
repo = pname;
|
||||
sha256 = "sha256-ch59Wx4g72u7x99807ppURI4I+5aJ/W8Zr35q8X68v4=";
|
||||
repo = "hover";
|
||||
sha256 = "sha256-xS4qfsGZAt560dxHpwEnAWdJCd5vuTdX+7fpUGrSqhw=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
@@ -64,19 +64,7 @@ let
|
||||
|
||||
checkRun = false;
|
||||
|
||||
patches = [
|
||||
./fix-assets-path.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed -i 's|@assetsFolder@|'"''${out}/share/assets"'|g' internal/fileutils/assets.go
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
mkdir -p $out/share
|
||||
cp -r assets $out/share/assets
|
||||
chmod -R a+rx $out/share/assets
|
||||
|
||||
wrapProgram "$out/bin/hover" \
|
||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath libs}
|
||||
'';
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "luau";
|
||||
version = "0.677";
|
||||
version = "0.678";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "luau-lang";
|
||||
repo = "luau";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-cX0WoiK1CZBwPrQfYSJAGcQzM91Trn3PGsQigGX8jds=";
|
||||
hash = "sha256-FYh7LTLDdl3eYXRDAn+FDkqBCiWY0JqHrX9lbz5r+gI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
@@ -9,23 +9,25 @@
|
||||
openssl,
|
||||
trousers,
|
||||
libcap,
|
||||
getent,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "opencryptoki";
|
||||
version = "3.23.0";
|
||||
version = "3.24.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "opencryptoki";
|
||||
repo = "opencryptoki";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-5FcvwGTzsL0lYrSYGlbSY89s6OKzg+2TRlwHlJjdzXo=";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-GIcUI5Gjk+whwlD9dBiB2N7q6sPYFnhj5VvyQvc2Z2A=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
bison
|
||||
flex
|
||||
getent
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@@ -37,6 +39,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace configure.ac \
|
||||
--replace-fail "/usr/sbin/" "" \
|
||||
--replace-fail "/bin/" "" \
|
||||
--replace-fail "usermod" "true" \
|
||||
--replace-fail "useradd" "true" \
|
||||
--replace-fail "groupadd" "true" \
|
||||
@@ -53,16 +57,14 @@ stdenv.mkDerivation rec {
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
installFlags = [
|
||||
"DESTDIR=${placeholder "out"}"
|
||||
];
|
||||
installFlags = [ "DESTDIR=${placeholder "out"}" ];
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://github.com/opencryptoki/opencryptoki/blob/${src.rev}/ChangeLog";
|
||||
meta = {
|
||||
changelog = "https://github.com/opencryptoki/opencryptoki/blob/v${finalAttrs.version}/ChangeLog";
|
||||
description = "PKCS#11 implementation for Linux";
|
||||
homepage = "https://github.com/opencryptoki/opencryptoki";
|
||||
license = licenses.cpl10;
|
||||
license = lib.licenses.cpl10;
|
||||
maintainers = [ ];
|
||||
platforms = platforms.unix;
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -41,7 +41,7 @@ python3Packages.buildPythonApplication {
|
||||
make -C ../proto ../ui/opensnitch/ui_pb2.py
|
||||
# sourced from ui/Makefile
|
||||
pyrcc5 -o opensnitch/resources_rc.py opensnitch/res/resources.qrc
|
||||
sed -i 's/^import ui_pb2/from . import ui_pb2/' opensnitch/ui_pb2*
|
||||
sed -i 's/^import ui_pb2/from . import ui_pb2/' opensnitch/proto/ui_pb2*
|
||||
'';
|
||||
|
||||
preCheck = ''
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
buildGoModule,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
protobuf,
|
||||
go-protobuf,
|
||||
pkg-config,
|
||||
@@ -34,15 +35,24 @@ let
|
||||
in
|
||||
buildGoModule (finalAttrs: {
|
||||
pname = "opensnitch";
|
||||
version = "1.6.9";
|
||||
version = "1.7.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "evilsocket";
|
||||
repo = "opensnitch";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-c+VAlm32/NXvUr5i0AY/zuTrFIQLtPxNNeSiQTMoJAY=";
|
||||
hash = "sha256-ZkXqocgxyJGo5uQq4Ct1wmUIQljtx5oPzj4JfWWAuSE=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# https://github.com/evilsocket/opensnitch/issues/1357
|
||||
# remove next release
|
||||
(fetchpatch {
|
||||
url = "https://github.com/dwongdev/opensnitch/commit/376b06ef97ef79e3afa699878af2e59918aa7ef0.patch?full_index=1";
|
||||
hash = "sha256-QBhc4A2Dign5JY4fcQ2c3F02xFj3m3G2VwY9cFuWV3w=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Allow configuring Version at build time
|
||||
substituteInPlace daemon/core/version.go --replace-fail "const " "var "
|
||||
@@ -63,7 +73,7 @@ buildGoModule (finalAttrs: {
|
||||
protoc-gen-go-grpc'
|
||||
];
|
||||
|
||||
vendorHash = "sha256-urRujxcp58ZuhUtTAqCK0etSZ16YYG/6JY/aOUodl9g=";
|
||||
vendorHash = "sha256-IByoQuJsGORmePlv1HzvF8RSu2XhP5Sry1j3NoY2WP8=";
|
||||
|
||||
preBuild = ''
|
||||
make -C ../proto ../daemon/ui/protocol/ui.pb.go
|
||||
|
||||
@@ -10,13 +10,13 @@ let
|
||||
in
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "smplayer";
|
||||
version = "24.5.0";
|
||||
version = "25.6.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "smplayer-dev";
|
||||
repo = "smplayer";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-KblVDlE8EglMMAclGFZm81obipm6/JLUvsn5sLrpKqc=";
|
||||
hash = "sha256-dyUT8PdvsFZsEZQNSsC2TQd90KOrY9FIb9Do+JKdUHs=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -20,13 +20,13 @@
|
||||
}:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "snx-rs";
|
||||
version = "4.4.1";
|
||||
version = "4.4.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ancwrd1";
|
||||
repo = "snx-rs";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-Juv38ALXf1nMeokBH7Z+39oIscXW7S+OxdD/ZSNs49U=";
|
||||
hash = "sha256-dGK+52sOyJs4P3SfTdjPPSbBgSyVGFHcNw45Jed6aVo=";
|
||||
};
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
@@ -60,7 +60,7 @@ rustPlatform.buildRustPackage rec {
|
||||
];
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-NcoTdu/CQRu0RuZjlngP8lTPaomEiPTcfn2hAt+YjwA=";
|
||||
cargoHash = "sha256-9yZ8TSWy+S1sNS4cnJvEi7Ttt8zqF4PkxR5/FzVg4Ds=";
|
||||
|
||||
doInstallCheck = true;
|
||||
versionCheckProgram = "${placeholder "out"}/bin/snx-rs";
|
||||
|
||||
@@ -1,31 +1,33 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchurl,
|
||||
gtk2,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
gtk3,
|
||||
pkg-config,
|
||||
lm_sensors,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "xsensors";
|
||||
version = "0.70";
|
||||
src = fetchurl {
|
||||
url = "http://www.linuxhardware.org/xsensors/xsensors-${version}.tar.gz";
|
||||
sha256 = "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh";
|
||||
version = "0.80";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Mystro256";
|
||||
repo = "xsensors";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-dITnIMvOYL1gmoDP2w4ZlxcBdAqA/+D3ojm5cP+tTFQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [
|
||||
gtk2
|
||||
gtk3
|
||||
lm_sensors
|
||||
];
|
||||
patches = [
|
||||
./remove-unused-variables.patch
|
||||
./replace-deprecated-gtk.patch
|
||||
];
|
||||
meta = with lib; {
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.linux;
|
||||
|
||||
meta = {
|
||||
license = lib.licenses.gpl2Plus;
|
||||
platforms = lib.platforms.linux;
|
||||
maintainers = [ ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
Author: Nanley Chery <nanleychery@gmail.com>
|
||||
From: Jean Delvare <khali@linux-fr.org>
|
||||
Subject: Remove declared, but unused variables
|
||||
Bug-Debian: http://bugs.debian.org/625435
|
||||
---
|
||||
--- a/src/gui.c
|
||||
+++ b/src/gui.c
|
||||
@@ -257,10 +257,9 @@
|
||||
|
||||
/* Start the sensor info update timer. */
|
||||
gint start_timer( GtkWidget *widget, gpointer data ) {
|
||||
- gint timer;
|
||||
|
||||
/* Setup timer for updates. */
|
||||
- timer = g_timeout_add( update_time * 1000,
|
||||
+ g_timeout_add( update_time * 1000,
|
||||
(GtkFunction) update_sensor_data,
|
||||
(gpointer) data );
|
||||
|
||||
@@ -287,7 +286,7 @@
|
||||
|
||||
/* feature data */
|
||||
updates *head = NULL;
|
||||
- updates *current = NULL, *prev = NULL;
|
||||
+ updates *current = NULL;
|
||||
|
||||
const sensors_feature *feature;
|
||||
|
||||
@@ -347,10 +346,8 @@
|
||||
new_node->pbar = featpbar;
|
||||
|
||||
if ( head == NULL ) {
|
||||
- prev = head;
|
||||
head = current = new_node;
|
||||
} else {
|
||||
- prev = current;
|
||||
current = current->next = new_node;
|
||||
}
|
||||
|
||||
@@ -1,168 +0,0 @@
|
||||
Author: Nanley Chery <nanleychery@gmail.com>
|
||||
Subject: Update deprecated gtk casts and replace deprecated function calls with their analogous cairo counterparts.
|
||||
Bug-Debian: http://bugs.debian.org/622005
|
||||
Bug-Debian: http://bugs.debian.org/610321
|
||||
---
|
||||
--- a/src/gui.c
|
||||
+++ b/src/gui.c
|
||||
@@ -27,10 +27,10 @@
|
||||
GtkWidget *mainwindow = NULL;
|
||||
|
||||
GdkColor colorWhite = { 0, 0xFFFF, 0xFFFF, 0xFFFF };
|
||||
-
|
||||
-GdkColormap *cmap = NULL;
|
||||
|
||||
-GdkPixmap *theme = NULL;
|
||||
+GdkPixbuf *theme = NULL;
|
||||
+
|
||||
+cairo_surface_t *surface = NULL;
|
||||
|
||||
/* Destroy the main window. */
|
||||
gint destroy_gui( GtkWidget *widget, gpointer data ) {
|
||||
@@ -76,17 +76,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
-static void draw_digits( GtkWidget *widget, const gchar *digits, int highLow )
|
||||
+static void draw_digits( GtkWidget *widget, cairo_t *cr, const gchar *digits, int highLow )
|
||||
{
|
||||
const gchar *digit = digits;
|
||||
int pos = 0, x = 0, y = 0, w = 0;
|
||||
|
||||
while ( *digit ) {
|
||||
get_pm_location( *digit, &x, &y, &w );
|
||||
- gdk_draw_drawable( widget->window,
|
||||
- widget->style->fg_gc[ GTK_WIDGET_STATE
|
||||
- (widget) ], theme, x, y + highLow,
|
||||
- pos, 0, w, 30 );
|
||||
+ cairo_set_source_surface (cr, surface, pos-x, 0-(y + highLow));
|
||||
+ cairo_rectangle(cr, pos, 0, w, 30);
|
||||
+ cairo_fill(cr);
|
||||
pos += w;
|
||||
digit++;
|
||||
}
|
||||
@@ -102,6 +101,8 @@
|
||||
|
||||
gchar result[7];
|
||||
|
||||
+ cairo_t *cr = gdk_cairo_create(widget->window);
|
||||
+
|
||||
#ifdef DEBUG_XSENSORS
|
||||
printf( "area.width = %d, area.height = %d\n", event->area.width,
|
||||
event->area.height );
|
||||
@@ -117,13 +118,11 @@
|
||||
|
||||
/* Display the digits */
|
||||
if ( g_snprintf( result, 6, "%5.0f", current->curvalue ) >= 0 )
|
||||
- draw_digits( widget, result, highLow );
|
||||
+ draw_digits( widget, cr, result, highLow );
|
||||
|
||||
/* Display RPM */
|
||||
- gdk_draw_drawable( widget->window,
|
||||
- widget->style->fg_gc[ GTK_WIDGET_STATE
|
||||
- (widget) ], theme, 0, 120 + highLow,
|
||||
- 90, 0, 57, 30 );
|
||||
+ cairo_set_source_surface (cr, surface, 90-0, 0-(120 + highLow));
|
||||
+ cairo_rectangle(cr, 90, 0, 57, 30);
|
||||
break;
|
||||
case TEMP:
|
||||
if ( current->curvalue > current->curmax )
|
||||
@@ -134,17 +133,15 @@
|
||||
|
||||
/* Display the digits */
|
||||
if ( g_snprintf( result, 7, "%6.1f", current->curvalue ) >= 0 )
|
||||
- draw_digits( widget, result, highLow );
|
||||
+ draw_digits( widget, cr, result, highLow );
|
||||
|
||||
/* Display degree symbol */
|
||||
if ( tf == FALSE )
|
||||
x = 0;
|
||||
else
|
||||
x = 57;
|
||||
- gdk_draw_drawable( widget->window,
|
||||
- widget->style->fg_gc[ GTK_WIDGET_STATE
|
||||
- (widget) ], theme, x, 60 + highLow,
|
||||
- 96, 0, 57, 30 );
|
||||
+ cairo_set_source_surface (cr, surface, 96-x, 0-(60 + highLow));
|
||||
+ cairo_rectangle(cr, 96, 0, 57, 30);
|
||||
|
||||
break;
|
||||
case VOLT:
|
||||
@@ -154,20 +151,17 @@
|
||||
|
||||
/* Display the digits */
|
||||
if ( g_snprintf( result, 7, "%6.2f", current->curvalue ) >= 0 )
|
||||
- draw_digits( widget, result, highLow );
|
||||
+ draw_digits( widget, cr, result, highLow );
|
||||
|
||||
/* Display V */
|
||||
- gdk_draw_drawable( widget->window,
|
||||
- widget->style->fg_gc[ GTK_WIDGET_STATE
|
||||
- (widget) ], theme, 114, 60 + highLow,
|
||||
- 96, 0, 57, 30 );
|
||||
-
|
||||
-
|
||||
+ cairo_set_source_surface (cr, surface, 96-114, 0-(60 + highLow));
|
||||
+ cairo_rectangle(cr, 96, 0, 57, 30);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
-
|
||||
+ cairo_fill(cr);
|
||||
+ cairo_destroy(cr);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -260,7 +254,7 @@
|
||||
|
||||
/* Setup timer for updates. */
|
||||
g_timeout_add( update_time * 1000,
|
||||
- (GtkFunction) update_sensor_data,
|
||||
+ (GSourceFunc) update_sensor_data,
|
||||
(gpointer) data );
|
||||
|
||||
return SUCCESS;
|
||||
@@ -460,8 +454,6 @@
|
||||
g_signal_connect( G_OBJECT (mainwindow), "delete_event",
|
||||
G_CALLBACK (destroy_gui), NULL );
|
||||
|
||||
- /* Graphics needed for drawing info. */
|
||||
- cmap = gtk_widget_get_colormap( mainwindow );
|
||||
|
||||
/* Set up the image file used for displaying characters. */
|
||||
if ( imagefile == NULL ) {
|
||||
@@ -481,12 +473,10 @@
|
||||
"Image file not found in either location! Exiting!\n" );
|
||||
exit( 1 );
|
||||
} else {
|
||||
- theme = gdk_pixmap_colormap_create_from_xpm( NULL, cmap,
|
||||
- NULL, NULL, "./images/default.xpm" );
|
||||
+ theme = gdk_pixbuf_new_from_file("./images/default.xpm", NULL );
|
||||
}
|
||||
} else {
|
||||
- theme = gdk_pixmap_colormap_create_from_xpm( NULL, cmap,
|
||||
- NULL, NULL, imagefile );
|
||||
+ theme = gdk_pixbuf_new_from_file(imagefile, NULL );
|
||||
}
|
||||
} else {
|
||||
if ( stat( imagefile, &sbuf ) != 0 ) {
|
||||
@@ -495,11 +485,15 @@
|
||||
"Image file not found in specified location! Exiting!\n" );
|
||||
exit( 1 );
|
||||
} else {
|
||||
- theme = gdk_pixmap_colormap_create_from_xpm( NULL, cmap,
|
||||
- NULL, NULL, imagefile );
|
||||
+ theme = gdk_pixbuf_new_from_file(imagefile, NULL );
|
||||
}
|
||||
}
|
||||
-
|
||||
+ surface = cairo_image_surface_create_for_data(gdk_pixbuf_get_pixels(theme),
|
||||
+ CAIRO_FORMAT_RGB24,
|
||||
+ gdk_pixbuf_get_width(theme),
|
||||
+ gdk_pixbuf_get_height(theme),
|
||||
+ gdk_pixbuf_get_rowstride(theme));
|
||||
+
|
||||
/* Create notebook for sensors. */
|
||||
notebook = gtk_notebook_new( );
|
||||
gtk_widget_modify_bg( notebook, GTK_STATE_NORMAL, &colorWhite );
|
||||
@@ -1,240 +0,0 @@
|
||||
From 9c2a6a6349f705017e3c8a34daa4ba1805586498 Mon Sep 17 00:00:00 2001
|
||||
From: OPNA2608 <opna2608@protonmail.com>
|
||||
Date: Thu, 30 Jan 2025 14:53:02 +0100
|
||||
Subject: [PATCH] tests/unit/secret-agent/test-secret-agent: Make sure signal
|
||||
emitted on agent startup doesn't leak into tests
|
||||
|
||||
---
|
||||
tests/unit/secret-agent/test-secret-agent.cpp | 116 ++++++++++--------
|
||||
1 file changed, 67 insertions(+), 49 deletions(-)
|
||||
|
||||
diff --git a/tests/unit/secret-agent/test-secret-agent.cpp b/tests/unit/secret-agent/test-secret-agent.cpp
|
||||
index 1f1cd7e9..9c72e251 100644
|
||||
--- a/tests/unit/secret-agent/test-secret-agent.cpp
|
||||
+++ b/tests/unit/secret-agent/test-secret-agent.cpp
|
||||
@@ -29,6 +29,16 @@
|
||||
#include <lomiri/gmenuharness/MatchUtils.h>
|
||||
#include <lomiri/gmenuharness/MenuMatcher.h>
|
||||
|
||||
+#define WAIT_FOR_SIGNALS(signalSpy, signalsExpected)\
|
||||
+{\
|
||||
+ while (signalSpy.size() < signalsExpected)\
|
||||
+ {\
|
||||
+ ASSERT_TRUE(signalSpy.wait()) << "Waiting for " << signalsExpected << " signals, got " << signalSpy.size();\
|
||||
+ }\
|
||||
+ ASSERT_EQ(signalsExpected, signalSpy.size()) << "Waiting for " << signalsExpected << " signals, got " << signalSpy.size();\
|
||||
+}
|
||||
+
|
||||
+
|
||||
using namespace std;
|
||||
using namespace testing;
|
||||
using namespace QtDBusTest;
|
||||
@@ -49,21 +59,6 @@ protected:
|
||||
dbusMock.registerTemplate(NM_DBUS_SERVICE, NETWORK_MANAGER_TEMPLATE_PATH, {}, QDBusConnection::SystemBus);
|
||||
dbusTestRunner.startServices();
|
||||
|
||||
- QProcessEnvironment env(QProcessEnvironment::systemEnvironment());
|
||||
- env.insert("SECRET_AGENT_DEBUG_PASSWORD", "1");
|
||||
- secretAgent.setProcessEnvironment(env);
|
||||
- secretAgent.setReadChannel(QProcess::StandardOutput);
|
||||
- secretAgent.setProcessChannelMode(QProcess::ForwardedErrorChannel);
|
||||
- secretAgent.start(SECRET_AGENT_BIN, QStringList() << "--print-address");
|
||||
- secretAgent.waitForStarted();
|
||||
- secretAgent.waitForReadyRead();
|
||||
- agentBus = secretAgent.readAll().trimmed();
|
||||
-
|
||||
- agentInterface.reset(
|
||||
- new OrgFreedesktopNetworkManagerSecretAgentInterface(agentBus,
|
||||
- NM_DBUS_PATH_SECRET_AGENT, dbusTestRunner.systemConnection()));
|
||||
-
|
||||
-
|
||||
notificationsInterface.reset(
|
||||
new OrgFreedesktopDBusMockInterface(
|
||||
"org.freedesktop.Notifications",
|
||||
@@ -72,8 +67,11 @@ protected:
|
||||
}
|
||||
|
||||
virtual ~TestSecretAgentCommon() {
|
||||
- secretAgent.terminate();
|
||||
- secretAgent.waitForFinished();
|
||||
+ if (secretAgent.state() != QProcess::NotRunning)
|
||||
+ {
|
||||
+ secretAgent.terminate();
|
||||
+ secretAgent.waitForFinished();
|
||||
+ }
|
||||
}
|
||||
|
||||
QVariantDictMap connection(const QString &keyManagement) {
|
||||
@@ -111,6 +109,32 @@ protected:
|
||||
return connection;
|
||||
}
|
||||
|
||||
+ void setupSecretAgent (void) {
|
||||
+ QSignalSpy notificationSpy(notificationsInterface.data(),
|
||||
+ SIGNAL(MethodCalled(const QString &, const QVariantList &)));
|
||||
+
|
||||
+ QProcessEnvironment env(QProcessEnvironment::systemEnvironment());
|
||||
+ env.insert("SECRET_AGENT_DEBUG_PASSWORD", "1");
|
||||
+ secretAgent.setProcessEnvironment(env);
|
||||
+ secretAgent.setReadChannel(QProcess::StandardOutput);
|
||||
+ secretAgent.setProcessChannelMode(QProcess::ForwardedErrorChannel);
|
||||
+ secretAgent.start(SECRET_AGENT_BIN, QStringList() << "--print-address");
|
||||
+ secretAgent.waitForStarted();
|
||||
+ secretAgent.waitForReadyRead();
|
||||
+
|
||||
+ agentBus = secretAgent.readAll().trimmed();
|
||||
+
|
||||
+ agentInterface.reset(
|
||||
+ new OrgFreedesktopNetworkManagerSecretAgentInterface(agentBus,
|
||||
+ NM_DBUS_PATH_SECRET_AGENT, dbusTestRunner.systemConnection()));
|
||||
+
|
||||
+ WAIT_FOR_SIGNALS(notificationSpy, 1);
|
||||
+ {
|
||||
+ const QVariantList &call(notificationSpy.at(0));
|
||||
+ EXPECT_EQ(call.at(0), "GetServerInformation");
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
DBusTestRunner dbusTestRunner;
|
||||
|
||||
DBusMock dbusMock;
|
||||
@@ -163,22 +187,21 @@ static void transform(QVariantList &list) {
|
||||
}
|
||||
|
||||
TEST_P(TestSecretAgentGetSecrets, ProvidesPasswordForWpaPsk) {
|
||||
+ setupSecretAgent();
|
||||
+
|
||||
+ QSignalSpy notificationSpy(notificationsInterface.data(),
|
||||
+ SIGNAL(MethodCalled(const QString &, const QVariantList &)));
|
||||
+
|
||||
QDBusPendingReply<QVariantDictMap> reply(
|
||||
agentInterface->GetSecrets(connection(GetParam().keyManagement),
|
||||
QDBusObjectPath("/connection/foo"),
|
||||
SecretAgent::NM_WIRELESS_SECURITY_SETTING_NAME, QStringList(),
|
||||
5));
|
||||
|
||||
- QSignalSpy notificationSpy(notificationsInterface.data(),
|
||||
- SIGNAL(MethodCalled(const QString &, const QVariantList &)));
|
||||
- if (notificationSpy.empty())
|
||||
- {
|
||||
- ASSERT_TRUE(notificationSpy.wait());
|
||||
- }
|
||||
+ WAIT_FOR_SIGNALS(notificationSpy, 1);
|
||||
|
||||
- ASSERT_EQ(1, notificationSpy.size());
|
||||
const QVariantList &call(notificationSpy.at(0));
|
||||
- EXPECT_EQ("Notify", call.at(0).toString().toStdString());
|
||||
+ EXPECT_EQ("Notify", call.at(0));
|
||||
|
||||
QVariantList args(call.at(1).toList());
|
||||
transform(args);
|
||||
@@ -254,6 +277,7 @@ class TestSecretAgent: public TestSecretAgentCommon, public Test {
|
||||
};
|
||||
|
||||
TEST_F(TestSecretAgent, GetSecretsWithNone) {
|
||||
+ setupSecretAgent();
|
||||
|
||||
QDBusPendingReply<QVariantDictMap> reply(
|
||||
agentInterface->GetSecrets(
|
||||
@@ -272,6 +296,8 @@ TEST_F(TestSecretAgent, GetSecretsWithNone) {
|
||||
/* Tests that if we request secrets and then cancel the request
|
||||
that we close the notification */
|
||||
TEST_F(TestSecretAgent, CancelGetSecrets) {
|
||||
+ setupSecretAgent();
|
||||
+
|
||||
QSignalSpy notificationSpy(notificationsInterface.data(), SIGNAL(MethodCalled(const QString &, const QVariantList &)));
|
||||
|
||||
agentInterface->GetSecrets(
|
||||
@@ -280,23 +306,19 @@ TEST_F(TestSecretAgent, CancelGetSecrets) {
|
||||
SecretAgent::NM_WIRELESS_SECURITY_SETTING_NAME, QStringList(),
|
||||
5);
|
||||
|
||||
- notificationSpy.wait();
|
||||
-
|
||||
- ASSERT_EQ(1, notificationSpy.size());
|
||||
- const QVariantList &call(notificationSpy.at(0));
|
||||
- EXPECT_EQ("Notify", call.at(0).toString().toStdString());
|
||||
+ WAIT_FOR_SIGNALS(notificationSpy, 1);
|
||||
+ {
|
||||
+ const QVariantList &call(notificationSpy.at(0));
|
||||
+ EXPECT_EQ("Notify", call.at(0));
|
||||
+ }
|
||||
|
||||
notificationSpy.clear();
|
||||
|
||||
agentInterface->CancelGetSecrets(QDBusObjectPath("/connection/foo"),
|
||||
SecretAgent::NM_WIRELESS_SECURITY_SETTING_NAME);
|
||||
|
||||
- if (notificationSpy.empty())
|
||||
- {
|
||||
- ASSERT_TRUE(notificationSpy.wait());
|
||||
- }
|
||||
+ WAIT_FOR_SIGNALS(notificationSpy, 1);
|
||||
|
||||
- ASSERT_EQ(1, notificationSpy.size());
|
||||
const QVariantList &closecall(notificationSpy.at(0));
|
||||
EXPECT_EQ("CloseNotification", closecall.at(0).toString().toStdString());
|
||||
}
|
||||
@@ -304,6 +326,8 @@ TEST_F(TestSecretAgent, CancelGetSecrets) {
|
||||
/* Ensures that if we request secrets twice we close the notification
|
||||
for the first request */
|
||||
TEST_F(TestSecretAgent, MultiSecrets) {
|
||||
+ setupSecretAgent();
|
||||
+
|
||||
QSignalSpy notificationSpy(notificationsInterface.data(), SIGNAL(MethodCalled(const QString &, const QVariantList &)));
|
||||
|
||||
agentInterface->GetSecrets(
|
||||
@@ -312,15 +336,12 @@ TEST_F(TestSecretAgent, MultiSecrets) {
|
||||
SecretAgent::NM_WIRELESS_SECURITY_SETTING_NAME, QStringList(),
|
||||
5);
|
||||
|
||||
- if (notificationSpy.empty())
|
||||
+ WAIT_FOR_SIGNALS(notificationSpy, 1);
|
||||
{
|
||||
- ASSERT_TRUE(notificationSpy.wait());
|
||||
+ const QVariantList &call(notificationSpy.at(0));
|
||||
+ EXPECT_EQ("Notify", call.at(0));
|
||||
}
|
||||
|
||||
- ASSERT_EQ(1, notificationSpy.size());
|
||||
- const QVariantList &call(notificationSpy.at(0));
|
||||
- EXPECT_EQ("Notify", call.at(0).toString().toStdString());
|
||||
-
|
||||
notificationSpy.clear();
|
||||
|
||||
agentInterface->GetSecrets(
|
||||
@@ -329,14 +350,7 @@ TEST_F(TestSecretAgent, MultiSecrets) {
|
||||
SecretAgent::NM_WIRELESS_SECURITY_SETTING_NAME, QStringList(),
|
||||
5);
|
||||
|
||||
- if (notificationSpy.empty())
|
||||
- {
|
||||
- ASSERT_TRUE(notificationSpy.wait());
|
||||
- }
|
||||
- if (notificationSpy.size() == 1)
|
||||
- {
|
||||
- ASSERT_TRUE(notificationSpy.wait());
|
||||
- }
|
||||
+ WAIT_FOR_SIGNALS(notificationSpy, 2);
|
||||
|
||||
ASSERT_EQ(2, notificationSpy.size());
|
||||
const QVariantList &closecall(notificationSpy.at(1));
|
||||
@@ -347,11 +361,15 @@ TEST_F(TestSecretAgent, MultiSecrets) {
|
||||
}
|
||||
|
||||
TEST_F(TestSecretAgent, SaveSecrets) {
|
||||
+ setupSecretAgent();
|
||||
+
|
||||
agentInterface->SaveSecrets(QVariantDictMap(),
|
||||
QDBusObjectPath("/connection/foo")).waitForFinished();
|
||||
}
|
||||
|
||||
TEST_F(TestSecretAgent, DeleteSecrets) {
|
||||
+ setupSecretAgent();
|
||||
+
|
||||
agentInterface->DeleteSecrets(QVariantDictMap(),
|
||||
QDBusObjectPath("/connection/foo")).waitForFinished();
|
||||
}
|
||||
--
|
||||
2.47.1
|
||||
|
||||
@@ -33,13 +33,13 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "lomiri-indicator-network";
|
||||
version = "1.1.0";
|
||||
version = "1.1.1";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "ubports";
|
||||
repo = "development/core/lomiri-indicator-network";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-pN5M5VKRyo6csmI/vrmp/bonnap3oEdPuHAUJ1PjdOs=";
|
||||
hash = "sha256-R5W1MmT+H9i8NXrzOv2xaVu8TKPCRCAAswwM/tflkQ0=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
@@ -48,20 +48,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"doc"
|
||||
];
|
||||
|
||||
patches = [
|
||||
./1001-test-secret-agent-Make-GetServerInformation-not-leak-into-tests.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
# Override original prefixes
|
||||
substituteInPlace data/CMakeLists.txt \
|
||||
--replace-fail 'pkg_get_variable(DBUS_SESSION_BUS_SERVICES_DIR dbus-1 session_bus_services_dir)' 'pkg_get_variable(DBUS_SESSION_BUS_SERVICES_DIR dbus-1 session_bus_services_dir DEFINE_VARIABLES datadir=''${CMAKE_INSTALL_FULL_SYSCONFDIR})' \
|
||||
--replace-fail 'pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir)' 'pkg_get_variable(SYSTEMD_USER_DIR systemd systemduserunitdir DEFINE_VARIABLES prefix=''${CMAKE_INSTALL_PREFIX})'
|
||||
|
||||
# Fix typo
|
||||
# Remove when https://gitlab.com/ubports/development/core/lomiri-indicator-network/-/merge_requests/131 merged & in release
|
||||
substituteInPlace src/indicator/nmofono/wwan/modem.cpp \
|
||||
--replace-fail 'if (m_isManaged = managed)' 'if (m_isManaged == managed)'
|
||||
'';
|
||||
|
||||
strictDeps = true;
|
||||
@@ -134,7 +125,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
meta = {
|
||||
description = "Ayatana indiator exporting the network settings menu through D-Bus";
|
||||
homepage = "https://gitlab.com/ubports/development/core/lomiri-indicator-network";
|
||||
changelog = "https://gitlab.com/ubports/development/core/lomiri-indicator-network/-/blob/${finalAttrs.version}/ChangeLog";
|
||||
changelog = "https://gitlab.com/ubports/development/core/lomiri-indicator-network/-/blob/${
|
||||
if (!builtins.isNull finalAttrs.src.tag) then finalAttrs.src.tag else finalAttrs.src.rev
|
||||
}/ChangeLog";
|
||||
license = lib.licenses.gpl3Only;
|
||||
teams = [ lib.teams.lomiri ];
|
||||
platforms = lib.platforms.linux;
|
||||
|
||||
@@ -24,14 +24,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "awkward";
|
||||
version = "2.8.3";
|
||||
version = "2.8.4";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "scikit-hep";
|
||||
repo = "awkward";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-l7XCgD5UvQTva3lsKZmFSIT0nxReGuslWWuar31+pQQ=";
|
||||
hash = "sha256-btW4y3lSwHRgoM7B7KVzJ2h8CQdZYNUwqSRIYZfK0Hg=";
|
||||
};
|
||||
|
||||
build-system = [
|
||||
@@ -60,11 +60,6 @@ buildPythonPackage rec {
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# pyarrow.lib.ArrowInvalid
|
||||
"test_recordarray"
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# Need to be run on a GPU platform.
|
||||
"tests-cuda"
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
|
||||
# build-system
|
||||
poetry-core,
|
||||
|
||||
# dependencies
|
||||
attrs,
|
||||
e2b,
|
||||
httpx,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "e2b-code-interpreter";
|
||||
inherit (e2b) version;
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "e2b-dev";
|
||||
repo = "code-interpreter";
|
||||
tag = "@e2b/code-interpreter-python@${version}";
|
||||
hash = "sha256-a2rc7BtV+qwtqlB+JtLCs0BKN15yfwmG3XWWO8we2LA=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/python";
|
||||
|
||||
build-system = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
attrs
|
||||
e2b
|
||||
httpx
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "e2b_code_interpreter" ];
|
||||
|
||||
# Tests require an API key
|
||||
# e2b.exceptions.AuthenticationException: API key is required, please visit the Team tab at https://e2b.dev/dashboard to get your API key.
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "E2B Code Interpreter - Stateful code execution";
|
||||
homepage = "https://github.com/e2b-dev/code-interpreter/tree/main/python";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ GaetanLepage ];
|
||||
};
|
||||
}
|
||||
63
pkgs/development/python-modules/e2b/default.nix
Normal file
63
pkgs/development/python-modules/e2b/default.nix
Normal file
@@ -0,0 +1,63 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
|
||||
# build-system
|
||||
poetry-core,
|
||||
|
||||
# dependencies
|
||||
attrs,
|
||||
httpcore,
|
||||
httpx,
|
||||
packaging,
|
||||
protobuf,
|
||||
python-dateutil,
|
||||
typing-extensions,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "e2b";
|
||||
version = "1.5.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "e2b-dev";
|
||||
repo = "E2B";
|
||||
tag = "@e2b/python-sdk@${version}";
|
||||
hash = "sha256-6THRc4rv/mzOWbsN1FpUu56kjvHvVBssK2glNoGdSzI=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/packages/python-sdk";
|
||||
|
||||
build-system = [
|
||||
poetry-core
|
||||
];
|
||||
|
||||
pythonRelaxDeps = [
|
||||
"protobuf"
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
attrs
|
||||
httpcore
|
||||
httpx
|
||||
packaging
|
||||
protobuf
|
||||
python-dateutil
|
||||
typing-extensions
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "e2b" ];
|
||||
|
||||
# Tests require an API key
|
||||
# e2b.exceptions.AuthenticationException: API key is required, please visit the Team tab at https://e2b.dev/dashboard to get your API key.
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "E2B SDK that give agents cloud environments";
|
||||
homepage = "https://github.com/e2b-dev/E2B/blob/main/packages/python-sdk";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ GaetanLepage ];
|
||||
};
|
||||
}
|
||||
@@ -29,14 +29,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "textual";
|
||||
version = "3.3.0";
|
||||
version = "3.4.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Textualize";
|
||||
repo = "textual";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-GsdWWK8Y/9Wg+Ka3YJXovRuQDrvUJUYqtA64wc8Xv9k=";
|
||||
hash = "sha256-oI0W4KjGHmAGsPFBT2yMWDOLolNPkNOBcLv1K/+dqMc=";
|
||||
};
|
||||
|
||||
build-system = [ poetry-core ];
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
let
|
||||
data = stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "path-of-building-data";
|
||||
version = "2.53.0";
|
||||
version = "2.54.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "PathOfBuildingCommunity";
|
||||
repo = "PathOfBuilding";
|
||||
rev = "v${finalAttrs.version}";
|
||||
hash = "sha256-LT8EVO/VkwIVF3DbRZiHab5m6TYqhlHDFGai52TBWqo=";
|
||||
hash = "sha256-NMSr5HJ/YvrqE8uVINzH0b9+U3snQGQYalSJ4bNRh1I=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ unzip ];
|
||||
|
||||
@@ -4389,6 +4389,10 @@ self: super: with self; {
|
||||
|
||||
dynd = callPackage ../development/python-modules/dynd { };
|
||||
|
||||
e2b = callPackage ../development/python-modules/e2b { };
|
||||
|
||||
e2b-code-interpreter = callPackage ../development/python-modules/e2b-code-interpreter { };
|
||||
|
||||
e3-core = callPackage ../development/python-modules/e3-core { };
|
||||
|
||||
e3-testsuite = callPackage ../development/python-modules/e3-testsuite { };
|
||||
|
||||
Reference in New Issue
Block a user