Compare commits
2 Commits
threema-de
...
theema-des
| Author | SHA1 | Date | |
|---|---|---|---|
|
18d93c0aca
|
|||
|
a218c94f0a
|
@@ -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;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,17 +1,22 @@
|
|||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
buildNpmPackage,
|
stdenv,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
rustPlatform,
|
rustPlatform,
|
||||||
|
nodejs,
|
||||||
|
python3,
|
||||||
|
cargo,
|
||||||
|
rustc,
|
||||||
binaryen,
|
binaryen,
|
||||||
pkg-config,
|
pkg-config,
|
||||||
openssl,
|
openssl,
|
||||||
wasm-bindgen-cli,
|
wasm-bindgen-cli,
|
||||||
protobuf,
|
protobuf,
|
||||||
lld,
|
lld,
|
||||||
|
typescript,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildNpmPackage rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "threema-desktop";
|
pname = "threema-desktop";
|
||||||
version = "2.0-beta56";
|
version = "2.0-beta56";
|
||||||
|
|
||||||
@@ -22,12 +27,6 @@ buildNpmPackage rec {
|
|||||||
hash = "sha256-wMIQ7piFPOBp0IleSnDSrZjaqXNBDyeELjx+938pmVk=";
|
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 {
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||||
inherit src;
|
inherit src;
|
||||||
sourceRoot = "${src.name}/libs/libthreema";
|
sourceRoot = "${src.name}/libs/libthreema";
|
||||||
@@ -35,12 +34,17 @@ buildNpmPackage rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
rustPlatform.bindgenHook
|
nodejs
|
||||||
|
python3
|
||||||
|
cargo
|
||||||
|
rustc
|
||||||
wasm-bindgen-cli
|
wasm-bindgen-cli
|
||||||
binaryen
|
binaryen
|
||||||
pkg-config
|
pkg-config
|
||||||
protobuf
|
protobuf
|
||||||
|
rustPlatform.bindgenHook
|
||||||
lld
|
lld
|
||||||
|
typescript
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
@@ -50,19 +54,56 @@ buildNpmPackage rec {
|
|||||||
postPatch = ''
|
postPatch = ''
|
||||||
patchShebangs --build ./tools
|
patchShebangs --build ./tools
|
||||||
patchShebangs --build ./libs/libthreema/tools
|
patchShebangs --build ./libs/libthreema/tools
|
||||||
|
|
||||||
|
# Remove strict engine requirements from package.json to allow close versions
|
||||||
sed -i '/"engines":/,/},/d' package.json
|
sed -i '/"engines":/,/},/d' package.json
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
preBuild = ''
|
||||||
|
# Set npm home to a writable location
|
||||||
|
export NPM_CONFIG_CACHE=$TMPDIR/npm-cache
|
||||||
|
export NPM_CONFIG_USERCONFIG=$TMPDIR/.npmrc
|
||||||
|
|
||||||
|
# Disable engine strict checking via environment variable
|
||||||
|
export NPM_CONFIG_ENGINE_STRICT=false
|
||||||
|
|
||||||
|
# Set up Cargo environment in writable locations
|
||||||
|
export CARGO_HOME=$TMPDIR/cargo
|
||||||
|
mkdir -p $CARGO_HOME
|
||||||
|
|
||||||
|
# Configure Cargo to work offline using the vendored dependencies
|
||||||
|
cat > $CARGO_HOME/config.toml << EOF
|
||||||
|
[source.crates-io]
|
||||||
|
replace-with = "vendored-sources"
|
||||||
|
|
||||||
|
[source.vendored-sources]
|
||||||
|
directory = "${cargoDeps}"
|
||||||
|
EOF
|
||||||
|
|
||||||
|
'';
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
|
|
||||||
|
# Build libthreema WASM
|
||||||
npm run libthreema:build
|
npm run libthreema:build
|
||||||
|
|
||||||
|
# Package as binary
|
||||||
npm run package binary consumer-live
|
npm run package binary consumer-live
|
||||||
|
|
||||||
runHook postBuild
|
runHook postBuild
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/opt/threema-desktop
|
mkdir -p $out/opt/threema-desktop
|
||||||
cp -r build/out/* $out/opt/threema-desktop
|
cp -r build/out/* $out/opt/threema-desktop/
|
||||||
|
|
||||||
|
# Create a wrapper script
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cat > $out/bin/threema-desktop << EOF
|
||||||
|
#!/bin/sh
|
||||||
|
exec $out/opt/threema-desktop/Threema "\$@"
|
||||||
|
EOF
|
||||||
|
chmod +x $out/bin/threema-desktop
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|||||||
@@ -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