···1-################################################################################
2-# Build all of the platforms manually since the `all_platforms' target
3-# doesn't preserve all of the build outputs and overrides CFLAGS.
4-set -e
5-set -u
6-7-################################################################################
8-# Prevent a warning from shellcheck:
9-out=${out:-/tmp}
10-11-################################################################################
12-export MAKEFLAGS="\
13- ${enableParallelBuilding:+-j${NIX_BUILD_CORES}}"
14-15-################################################################################
16-PRODUCTS="blackmagic.bin blackmagic.hex blackmagic_dfu.bin blackmagic_dfu.hex"
17-18-################################################################################
19-make_platform() {
20- echo "Building for hardware platform $1"
21-22- make clean
23- make PROBE_HOST="$1"
24-25- if [ "$1" = "hosted" ]; then
26- install -m 0555 blackmagic "$out/bin"
27- fi
28-29- for f in $PRODUCTS; do
30- if [ -r "$f" ]; then
31- mkdir -p "$out/firmware/$1"
32- install -m 0444 "$f" "$out/firmware/$1"
33- fi
34- done
35-36-}
37-38-################################################################################
39-# Start by building libopencm3:
40-make -C libopencm3
41-42-################################################################################
43-# And now all of the platforms:
44-cd src
45-46-mkdir -p "$out/bin"
47-48-for platform in platforms/*/Makefile.inc; do
49- probe=$(basename "$(dirname "$platform")")
50- make_platform "$probe"
51-done
···1213stdenvNoCC.mkDerivation (finalAttrs: {
14 pname = "signal-cli";
15- version = "0.13.16";
1617 # Building from source would be preferred, but is much more involved.
18 src = fetchurl {
19 url = "https://github.com/AsamK/signal-cli/releases/download/v${finalAttrs.version}/signal-cli-${finalAttrs.version}.tar.gz";
20- hash = "sha256-L2c2UyJCNITDEvtAfPjRzjskoA3v06oI8LNw9CW4mT8=";
21 };
2223 buildInputs = lib.optionals stdenvNoCC.hostPlatform.isLinux [
···1213stdenvNoCC.mkDerivation (finalAttrs: {
14 pname = "signal-cli";
15+ version = "0.13.18";
1617 # Building from source would be preferred, but is much more involved.
18 src = fetchurl {
19 url = "https://github.com/AsamK/signal-cli/releases/download/v${finalAttrs.version}/signal-cli-${finalAttrs.version}.tar.gz";
20+ hash = "sha256-Dnhr/+dKSNCiM7NB8+v5OxfaGhpyHWXVIWC2pZqaoa8=";
21 };
2223 buildInputs = lib.optionals stdenvNoCC.hostPlatform.isLinux [