commit
657501936a
@ -0,0 +1,66 @@ |
||||
{ lib |
||||
, python3 |
||||
, fetchFromGitHub |
||||
, wrapGAppsHook |
||||
, appstream-glib |
||||
, desktop-file-utils |
||||
, gettext |
||||
, gtk3 |
||||
, meson |
||||
, ninja |
||||
, pkg-config |
||||
, gobject-introspection |
||||
, jpegoptim |
||||
, libwebp |
||||
, optipng |
||||
, pngquant |
||||
}: |
||||
|
||||
python3.pkgs.buildPythonApplication rec { |
||||
pname = "curtail"; |
||||
version = "1.3.0"; |
||||
format = "other"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "Huluti"; |
||||
repo = "Curtail"; |
||||
rev = version; |
||||
sha256 = "sha256-tNk+KI+DEMR63zfcBpfPTxAFKzvGWvpa9erK9SAAtPc="; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ |
||||
wrapGAppsHook |
||||
appstream-glib |
||||
desktop-file-utils |
||||
gettext |
||||
gtk3 |
||||
meson |
||||
ninja |
||||
pkg-config |
||||
]; |
||||
|
||||
propagatedBuildInputs = [ |
||||
appstream-glib |
||||
python3.pkgs.pygobject3 |
||||
gobject-introspection |
||||
gettext |
||||
]; |
||||
|
||||
# Currently still required for the gobject-introspection setup hook |
||||
strictDeps = false; |
||||
|
||||
preInstall = '' |
||||
patchShebangs ../build-aux/meson/postinstall.py |
||||
''; |
||||
|
||||
postInstall = '' |
||||
wrapProgram $out/bin/curtail --prefix PATH : ${lib.makeBinPath [ jpegoptim libwebp optipng pngquant ]} |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
description = "Simple & useful image compressor"; |
||||
homepage = "https://github.com/Huluti/Curtail"; |
||||
license = licenses.gpl3Only; |
||||
maintainers = with maintainers; [ anselmschueler ]; |
||||
}; |
||||
} |
@ -1,53 +0,0 @@ |
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 5ed8020c..44ca43e7 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -2,12 +2,20 @@ cmake_minimum_required(VERSION 3.16)
|
||||
project(deltachat LANGUAGES C)
|
||||
include(GNUInstallDirs)
|
||||
|
||||
+if(APPLE)
|
||||
+ set(DYNAMIC_EXT "dylib")
|
||||
+elseif(UNIX)
|
||||
+ set(DYNAMIC_EXT "so")
|
||||
+else()
|
||||
+ set(DYNAMIC_EXT "dll")
|
||||
+endif()
|
||||
+
|
||||
find_program(CARGO cargo)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT
|
||||
"target/release/libdeltachat.a"
|
||||
- "target/release/libdeltachat.so"
|
||||
+ "target/release/libdeltachat.${DYNAMIC_EXT}"
|
||||
"target/release/pkgconfig/deltachat.pc"
|
||||
COMMAND
|
||||
PREFIX=${CMAKE_INSTALL_PREFIX}
|
||||
@@ -32,11 +40,11 @@ add_custom_target(
|
||||
ALL
|
||||
DEPENDS
|
||||
"target/release/libdeltachat.a"
|
||||
- "target/release/libdeltachat.so"
|
||||
+ "target/release/libdeltachat.${DYNAMIC_EXT}"
|
||||
"target/release/pkgconfig/deltachat.pc"
|
||||
)
|
||||
|
||||
install(FILES "deltachat-ffi/deltachat.h" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
install(FILES "target/release/libdeltachat.a" DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
-install(FILES "target/release/libdeltachat.so" DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
+install(FILES "target/release/libdeltachat.${DYNAMIC_EXT}" DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(FILES "target/release/pkgconfig/deltachat.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
diff --git a/python/install_python_bindings.py b/python/install_python_bindings.py
|
||||
index c8ed43e2..714c7e30 100755
|
||||
--- a/python/install_python_bindings.py
|
||||
+++ b/python/install_python_bindings.py
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
print("running:", " ".join(cmd))
|
||||
subprocess.check_call(cmd)
|
||||
- subprocess.check_call("rm -rf build/ src/deltachat/*.so" , shell=True)
|
||||
+ subprocess.check_call("rm -rf build/ src/deltachat/*.so src/deltachat/*.dylib" , shell=True)
|
||||
|
||||
if len(sys.argv) <= 1 or sys.argv[1] != "onlybuild":
|
||||
subprocess.check_call([
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,36 @@ |
||||
#!/usr/bin/env nix-shell |
||||
#!nix-shell -i bash -p bash wget coreutils gnutar nix |
||||
version=$1 |
||||
|
||||
if [[ -z $version ]] |
||||
then |
||||
echo "Pass the version to get hashes for as an argument" |
||||
exit 1 |
||||
fi |
||||
|
||||
allOutput="" |
||||
|
||||
dlDest=$(mktemp) |
||||
exDest=$(mktemp -d) |
||||
|
||||
trap 'rm $dlDest; rm -r $exDest' EXIT |
||||
|
||||
for plat in osx linux; do |
||||
for arch in x64 arm64; do |
||||
|
||||
URL="https://github.com/PowerShell/PowerShell/releases/download/v$version/powershell-$version-$plat-$arch.tar.gz" |
||||
wget $URL -O $dlDest >&2 |
||||
|
||||
tar -xzf $dlDest -C $exDest >&2 |
||||
|
||||
hash=$(nix hash path $exDest) |
||||
|
||||
allOutput+=" |
||||
variant: $plat $arch |
||||
hash: $hash |
||||
" |
||||
|
||||
done |
||||
done |
||||
|
||||
echo "$allOutput" |
@ -1,67 +0,0 @@ |
||||
diff --git a/Cargo.lock b/Cargo.lock
|
||||
index d33b5d6..ddde8ed 100644
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -150,33 +150,6 @@ dependencies = [
|
||||
"winapi 0.3.9",
|
||||
]
|
||||
|
||||
-[[package]]
|
||||
-name = "async-std"
|
||||
-version = "1.10.0"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "f8056f1455169ab86dd47b47391e4ab0cbd25410a70e9fe675544f49bafaf952"
|
||||
-dependencies = [
|
||||
- "async-channel",
|
||||
- "async-global-executor",
|
||||
- "async-io",
|
||||
- "async-lock",
|
||||
- "crossbeam-utils",
|
||||
- "futures-channel",
|
||||
- "futures-core",
|
||||
- "futures-io",
|
||||
- "futures-lite",
|
||||
- "gloo-timers",
|
||||
- "kv-log-macro",
|
||||
- "log",
|
||||
- "memchr",
|
||||
- "num_cpus",
|
||||
- "once_cell",
|
||||
- "pin-project-lite",
|
||||
- "pin-utils",
|
||||
- "slab",
|
||||
- "wasm-bindgen-futures",
|
||||
-]
|
||||
-
|
||||
[[package]]
|
||||
name = "async-std"
|
||||
version = "1.10.0"
|
||||
@@ -230,7 +203,7 @@ version = "0.16.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5682ea0913e5c20780fe5785abacb85a411e7437bf52a1bedb93ddb3972cb8dd"
|
||||
dependencies = [
|
||||
- "async-std 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
+ "async-std",
|
||||
"async-tls",
|
||||
"futures-io",
|
||||
"futures-util",
|
||||
@@ -1154,7 +1127,7 @@ name = "magic-wormhole"
|
||||
version = "0.3.0"
|
||||
dependencies = [
|
||||
"async-io",
|
||||
- "async-std 1.10.0 (git+https://github.com/async-rs/async-std)",
|
||||
+ "async-std",
|
||||
"async-tungstenite",
|
||||
"base64",
|
||||
"bytecodec",
|
||||
diff --git a/Cargo.toml b/Cargo.toml
|
||||
index b4ff2c0..d4094af 100644
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -82,3 +82,6 @@ required-features = ["bin"]
|
||||
|
||||
[profile.release]
|
||||
overflow-checks = true
|
||||
+
|
||||
+[patch.crates-io]
|
||||
+async-std = { version = "1.9.0", features = ["attributes", "unstable"], git = "https://github.com/async-rs/async-std" }
|
Loading…
Reference in new issue