Compare commits
3 Commits
cosmic-web
...
theema-des
| Author | SHA1 | Date | |
|---|---|---|---|
|
18d93c0aca
|
|||
|
a218c94f0a
|
|||
|
8e59f537c3
|
@@ -1,62 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
fetchFromGitHub,
|
|
||||||
openssl,
|
|
||||||
git,
|
|
||||||
cmake,
|
|
||||||
rustPlatform,
|
|
||||||
libxkbcommon,
|
|
||||||
pkg-config,
|
|
||||||
glib,
|
|
||||||
gtk3,
|
|
||||||
webkitgtk_4_1,
|
|
||||||
wayland,
|
|
||||||
makeBinaryWrapper,
|
|
||||||
}:
|
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
|
||||||
pname = "web-apps";
|
|
||||||
version = "2.0.1";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "cosmic-utils";
|
|
||||||
repo = "web-apps";
|
|
||||||
rev = "2.0.1";
|
|
||||||
hash = "sha256-vWEa6mSK8lhqHRU/Zgi2HUGIs37G7E28AEEWj7TSaPc=";
|
|
||||||
};
|
|
||||||
|
|
||||||
cargoHash = "sha256-bwoG4KMB8JQHE+dc3X2OHDDmg1jWBfXMcR68bbCq/Ag=";
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
wayland
|
|
||||||
glib
|
|
||||||
libxkbcommon
|
|
||||||
pkg-config
|
|
||||||
openssl
|
|
||||||
git
|
|
||||||
gtk3
|
|
||||||
webkitgtk_4_1
|
|
||||||
];
|
|
||||||
nativeBuildInputs = [
|
|
||||||
cmake
|
|
||||||
pkg-config
|
|
||||||
makeBinaryWrapper
|
|
||||||
];
|
|
||||||
|
|
||||||
postInstall = ''
|
|
||||||
wrapProgram $out/bin/dev-heppen-webapps \
|
|
||||||
--prefix LD_LIBRARY_PATH : ${
|
|
||||||
lib.makeLibraryPath [
|
|
||||||
wayland
|
|
||||||
libxkbcommon
|
|
||||||
]
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = " Web applications at your fingertips.";
|
|
||||||
homepage = "https://github.com/cosmic-utils/web-apps";
|
|
||||||
license = lib.licenses.mit;
|
|
||||||
maintainers = with lib.maintainers; [ berrij ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
6
flake.lock
generated
6
flake.lock
generated
@@ -2,11 +2,11 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1759632233,
|
"lastModified": 1761594641,
|
||||||
"narHash": "sha256-krgZxGAIIIKFJS+UB0l8do3sYUDWJc75M72tepmVMzE=",
|
"narHash": "sha256-sImk6SJQASDLQo8l+0zWWaBgg7TueLS6lTvdH5pBZpo=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d7f52a7a640bc54c7bb414cca603835bf8dd4b10",
|
"rev": "1666250dbe4141e4ca8aaf89b40a3a51c2e36144",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
10
flake.nix
10
flake.nix
@@ -4,7 +4,10 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{ self, nixpkgs }:
|
{
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux"; # Adjust if necessary
|
system = "x86_64-linux"; # Adjust if necessary
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
@@ -14,7 +17,10 @@
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages.${system} = {
|
packages.${system} = {
|
||||||
cosmic-web-apps = pkgs.python313Packages.callPackage ./cosmic-web-apps.nix { };
|
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;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells.${system} = {
|
devShells.${system} = {
|
||||||
|
|||||||
117
threema-desktop.nix
Normal file
117
threema-desktop.nix
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
fetchFromGitHub,
|
||||||
|
rustPlatform,
|
||||||
|
nodejs,
|
||||||
|
python3,
|
||||||
|
cargo,
|
||||||
|
rustc,
|
||||||
|
binaryen,
|
||||||
|
pkg-config,
|
||||||
|
openssl,
|
||||||
|
wasm-bindgen-cli,
|
||||||
|
protobuf,
|
||||||
|
lld,
|
||||||
|
typescript,
|
||||||
|
}:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "threema-desktop";
|
||||||
|
version = "2.0-beta56";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "threema-ch";
|
||||||
|
repo = "threema-desktop";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-wMIQ7piFPOBp0IleSnDSrZjaqXNBDyeELjx+938pmVk=";
|
||||||
|
};
|
||||||
|
|
||||||
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||||
|
inherit src;
|
||||||
|
sourceRoot = "${src.name}/libs/libthreema";
|
||||||
|
hash = "sha256-SQ33LcCYlJ3W69TmpH1AkOKaREZ0p3KotJPuKZtc6yI=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
nodejs
|
||||||
|
python3
|
||||||
|
cargo
|
||||||
|
rustc
|
||||||
|
wasm-bindgen-cli
|
||||||
|
binaryen
|
||||||
|
pkg-config
|
||||||
|
protobuf
|
||||||
|
rustPlatform.bindgenHook
|
||||||
|
lld
|
||||||
|
typescript
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
openssl
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
patchShebangs --build ./tools
|
||||||
|
patchShebangs --build ./libs/libthreema/tools
|
||||||
|
|
||||||
|
# Remove strict engine requirements from package.json to allow close versions
|
||||||
|
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 = ''
|
||||||
|
runHook preBuild
|
||||||
|
|
||||||
|
# Build libthreema WASM
|
||||||
|
npm run libthreema:build
|
||||||
|
|
||||||
|
# Package as binary
|
||||||
|
npm run package binary consumer-live
|
||||||
|
|
||||||
|
runHook postBuild
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $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; {
|
||||||
|
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