-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-pkg.sh
executable file
·22 lines (17 loc) · 965 Bytes
/
build-pkg.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
# build home configs
set -x
cd "$(dirname "$0")" || exit
# ## fetch the necessary license from store
# nix copy --from https://chezbryan.cachix.org --no-check-sigs \
# /nix/store/xzddkr1n8s5rpbwz0s2n1b2a2wyj010p-license.tar.gz
# flakeref=( .#pulsar )
# flakeref=github:NixOS/nixpkgs#pkgsCross.raspberryPi.git-branchless
# flakeref=( github:bryango/nixpkgs/dev#rust-cbindgen )
flakeref=( github:NixOS/nixpkgs/fd42a02b0d666af09992c65adfbc8a9103657c5a#hydra-check )
# nix build --print-build-logs --impure --expr 'with import (builtins.getFlake "'"$flakeref"'") {}; mkShell { inputsFrom = [ watchman ]; }' "$@"
# nix why-depends --all --precise ./result "$flakeref"#python3.out
### `$*` is a deliberate hack to make the arguments work with `nixpkgs-review`
# shellcheck disable=SC2048,SC2086
nix build --print-build-logs "${flakeref[@]}" $*
# nix run "$flakeref" -- flake metadata github:bryango/cheznix --update-input nixpkgs-config "$@" || true