Compare commits
2 Commits
main
...
threema-de
| Author | SHA1 | Date | |
|---|---|---|---|
|
c8b6c3f766
|
|||
|
8e59f537c3
|
@@ -1,45 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
pytestCheckHook,
|
||||
httpx,
|
||||
loguru,
|
||||
xsdata-pydantic,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "entsoe-apy";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "berrij";
|
||||
repo = "entsoe-apy";
|
||||
rev = "cb4ebd4ed401268e605b5267347e0e934d048883";
|
||||
hash = "sha256-M0W0r7ApJKG0wMczC0kp/jNOa+PcgVGadvEOSQ2hRkU=";
|
||||
};
|
||||
|
||||
pyproject = true;
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
httpx
|
||||
loguru
|
||||
xsdata-pydantic
|
||||
];
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"entsoe"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Python Package to Query the ENTSO-E API";
|
||||
homepage = "https://github.com/berrij/entsoe-apy";
|
||||
license = lib.licenses.gpl3Only;
|
||||
maintainers = with lib.maintainers; [ berrij ];
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
6
flake.lock
generated
6
flake.lock
generated
@@ -2,11 +2,11 @@
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1759632233,
|
||||
"narHash": "sha256-krgZxGAIIIKFJS+UB0l8do3sYUDWJc75M72tepmVMzE=",
|
||||
"lastModified": 1761594641,
|
||||
"narHash": "sha256-sImk6SJQASDLQo8l+0zWWaBgg7TueLS6lTvdH5pBZpo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "d7f52a7a640bc54c7bb414cca603835bf8dd4b10",
|
||||
"rev": "1666250dbe4141e4ca8aaf89b40a3a51c2e36144",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
11
flake.nix
11
flake.nix
@@ -4,7 +4,10 @@
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs }:
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
}:
|
||||
let
|
||||
system = "x86_64-linux"; # Adjust if necessary
|
||||
pkgs = import nixpkgs {
|
||||
@@ -14,9 +17,9 @@
|
||||
in
|
||||
{
|
||||
packages.${system} = {
|
||||
xsdata-pydantic = pkgs.python313Packages.callPackage ./xsdata-pydantic.nix { };
|
||||
entsoe-apy = pkgs.python313Packages.callPackage ./entsoe-apy.nix {
|
||||
xsdata-pydantic = self.packages.${system}.xsdata-pydantic;
|
||||
wasm-bindgen-cli_0_2_101 = pkgs.callPackage ./wasm-bindgen-cli.nix { };
|
||||
threema-desktop = pkgs.callPackage ./threema-desktop.nix {
|
||||
wasm-bindgen-cli = self.packages.${system}.wasm-bindgen-cli_0_2_101;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
76
threema-desktop.nix
Normal file
76
threema-desktop.nix
Normal file
@@ -0,0 +1,76 @@
|
||||
{
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
rustPlatform,
|
||||
binaryen,
|
||||
pkg-config,
|
||||
openssl,
|
||||
wasm-bindgen-cli,
|
||||
protobuf,
|
||||
lld,
|
||||
}:
|
||||
|
||||
buildNpmPackage rec {
|
||||
pname = "threema-desktop";
|
||||
version = "2.0-beta56";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "threema-ch";
|
||||
repo = "threema-desktop";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-wMIQ7piFPOBp0IleSnDSrZjaqXNBDyeELjx+938pmVk=";
|
||||
};
|
||||
|
||||
forceGitDeps = true;
|
||||
|
||||
npmDepsHash = "sha256-9pyBbA+MARxWPZzyvjyKCuofgt+X3DrDCa81S6/S5qg="; # replace after first build
|
||||
npmFlags = [ "--legacy-peer-deps" ];
|
||||
makeCacheWritable = true;
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit src;
|
||||
sourceRoot = "${src.name}/libs/libthreema";
|
||||
hash = "sha256-SQ33LcCYlJ3W69TmpH1AkOKaREZ0p3KotJPuKZtc6yI=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
rustPlatform.bindgenHook
|
||||
wasm-bindgen-cli
|
||||
binaryen
|
||||
pkg-config
|
||||
protobuf
|
||||
lld
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
openssl
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs --build ./tools
|
||||
patchShebangs --build ./libs/libthreema/tools
|
||||
sed -i '/"engines":/,/},/d' package.json
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
npm run libthreema:build
|
||||
npm run package binary consumer-live
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/opt/threema-desktop
|
||||
cp -r build/out/* $out/opt/threema-desktop
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Threema App for Desktop (Windows/macOS/Linux)";
|
||||
longDescription = "A standalone Threema client for the desktop with end-to-end encryption";
|
||||
homepage = "https://threema.ch/";
|
||||
license = licenses.agpl3Plus;
|
||||
maintainers = [ ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
19
wasm-bindgen-cli.nix
Normal file
19
wasm-bindgen-cli.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
buildWasmBindgenCli,
|
||||
fetchCrate,
|
||||
rustPlatform,
|
||||
}:
|
||||
|
||||
buildWasmBindgenCli rec {
|
||||
src = fetchCrate {
|
||||
pname = "wasm-bindgen-cli";
|
||||
version = "0.2.101";
|
||||
hash = "sha256-txpbTzlrPSEktyT9kSpw4RXQoiSZHm9t3VxeRn//9JI=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit src;
|
||||
inherit (src) pname version;
|
||||
hash = "sha256-J+F9SqTpH3T0MbvlNKVyKnMachgn8UXeoTF0Pk3Xtnc=";
|
||||
};
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
xsdata,
|
||||
pydantic,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "xsdata-pydantic";
|
||||
version = "24.5";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tefra";
|
||||
repo = "xsdata-pydantic";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-ExgAXQRNfGQRSZdMuWc8ldJPqz+3c4Imgu75KXLXHNk=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
xsdata
|
||||
pydantic
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"xsdata_pydantic"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Naive XML & JSON Bindings for python pydantic classes!";
|
||||
homepage = "https://github.com/tefra/xsdata-pydantic";
|
||||
maintainers = with lib.maintainers; [ berrij ];
|
||||
license = lib.licenses.mit;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user