diff options
Diffstat (limited to 'users/edef/refscan/testdata')
-rw-r--r-- | users/edef/refscan/testdata/.gitignore | 6 | ||||
-rwxr-xr-x | users/edef/refscan/testdata/generate.sh | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/users/edef/refscan/testdata/.gitignore b/users/edef/refscan/testdata/.gitignore new file mode 100644 index 000000000000..1d278bd6ce97 --- /dev/null +++ b/users/edef/refscan/testdata/.gitignore @@ -0,0 +1,6 @@ +# SPDX-FileCopyrightText: edef <edef@edef.eu> +# SPDX-License-Identifier: CC0-1.0 + +/maxrefs +/nar +/result diff --git a/users/edef/refscan/testdata/generate.sh b/users/edef/refscan/testdata/generate.sh new file mode 100755 index 000000000000..9f416024c181 --- /dev/null +++ b/users/edef/refscan/testdata/generate.sh @@ -0,0 +1,8 @@ +#! /usr/bin/env bash +# SPDX-FileCopyrightText: edef <edef@edef.eu> +# SPDX-License-Identifier: CC0-1.0 +set -euo pipefail + +drv=$(nix-instantiate '<nixpkgs>' -A ghc) +nix --extra-experimental-features nix-command show-derivation -r "$drv" | jq -r '.[] | .outputs[].path, .inputSrcs[]' | sort -u | cut -d/ -f4 | cut -d- -f1 > maxrefs +nix-store --dump "$(nix-build "$drv")" > nar |