2024-12-11 18:23:05 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
#test -n "$ARCH" || ARCH=i686-embedded
|
|
|
|
test -n "$ARCH" || ARCH=musl32
|
|
|
|
test -n "$CHANNEL" || CHANNEL=nixos-24.05
|
2025-02-18 16:09:27 +01:00
|
|
|
test -n "$1" || { echo "usage: [ARCH=...] [CHANNEL=...] build_nixpkg.sh <packagename> [outfile]"; exit 0; }
|
|
|
|
set -xe
|
2024-12-11 18:23:05 +01:00
|
|
|
nix-build '<nixpkgs>' --pure -I nixpkgs=channel:$CHANNEL -A pkgsCross.$ARCH.pkgsStatic.$1
|
2025-02-18 16:09:27 +01:00
|
|
|
test -n "$2" && cp result/bin/$1 $2
|