Skip to content

Commit 42a9fb9

Browse files
committed
ci: fix builds
1 parent 069d5d8 commit 42a9fb9

File tree

6 files changed

+79
-21
lines changed

6 files changed

+79
-21
lines changed

Cargo.lock

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ repository = "https://github.com/pimalaya/cardamum"
1515
rustdoc-args = ["--cfg", "docsrs"]
1616

1717
[features]
18-
default = ["carddav", "command", "rustls-ring"]
18+
default = ["carddav", "vdir", "command", "rustls-ring"]
1919

2020
# CardDAV support without TLS (blocking)
2121
#
22-
carddav = ["dep:io-stream", "dep:http", "dep:secrecy", "io-addressbook/carddav", "vdir"]
22+
carddav = ["dep:io-stream", "dep:http", "dep:secrecy", "io-addressbook/carddav"]
2323

2424
# TLS
2525
#

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
description = "CLI to manage contacts";
33

44
inputs = {
5-
nixpkgs.url = "github:nixos/nixpkgs/staging-next";
5+
nixpkgs = {
6+
url = "github:nixos/nixpkgs/staging-next";
7+
};
68
fenix = {
79
url = "github:nix-community/fenix/monthly";
810
inputs.nixpkgs.follows = "nixpkgs";
911
};
1012
pimalaya = {
11-
flake = false;
1213
url = "github:pimalaya/nix";
13-
inputs.nixpkgs.follows = "nixpkgs";
14+
flake = false;
1415
};
1516
};
1617

install.sh

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
#!/bin/sh
2+
3+
set -eu
4+
5+
die() {
6+
printf '%s\n' "$1" >&2
7+
exit "${2-1}"
8+
}
9+
10+
DESTDIR="${DESTDIR:-}"
11+
PREFIX="${PREFIX:-"$DESTDIR/usr/local"}"
12+
RELEASES_URL="https://github.com/pimalaya/cardamum/releases"
13+
14+
binary=cardamum
15+
system=$(uname -s | tr [:upper:] [:lower:])
16+
machine=$(uname -m | tr [:upper:] [:lower:])
17+
18+
case $system in
19+
msys*|mingw*|cygwin*|win*)
20+
target=x86_64-windows
21+
binary=cardamum.exe;;
22+
23+
linux|freebsd)
24+
case $machine in
25+
x86_64) target=x86_64-linux;;
26+
x86|i386|i686) target=i686-linux;;
27+
arm64|aarch64) target=aarch64-linux;;
28+
armv6l) target=armv6l-linux;;
29+
armv7l) target=armv7l-linux;;
30+
*) die "Unsupported machine $machine for system $system";;
31+
esac;;
32+
33+
darwin)
34+
case $machine in
35+
x86_64) target=x86_64-darwin;;
36+
arm64|aarch64) target=aarch64-darwin;;
37+
*) die "Unsupported machine $machine for system $system";;
38+
esac;;
39+
40+
*)
41+
die "Unsupported system $system";;
42+
esac
43+
44+
tmpdir=$(mktemp -d) || die "Cannot create temporary directory"
45+
trap "rm -rf $tmpdir" EXIT
46+
47+
echo "Downloading latest $system release…"
48+
curl -sLo "$tmpdir/cardamum.tgz" \
49+
"$RELEASES_URL/latest/download/cardamum.$target.tgz"
50+
51+
echo "Installing binary…"
52+
tar -xzf "$tmpdir/cardamum.tgz" -C "$tmpdir"
53+
54+
mkdir -p "$PREFIX/bin"
55+
cp -f -- "$tmpdir/$binary" "$PREFIX/bin/$binary"
56+
57+
die "$("$PREFIX/bin/$binary" --version) installed!" 0

shell.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
pimalaya ? import (fetchTarball "https://github.com/pimalaya/nix/archive/master.tar.gz"),
3-
extraBuildInputs ? "",
3+
...
44
}:
55

66
pimalaya.mkShell {
7-
inherit extraBuildInputs;
7+
extraBuildInputs = "dbus,openssl";
88
}

0 commit comments

Comments
 (0)