diff options
author | Andreas Rammhold <andreas@rammhold.de> | 2021-02-08 15:28:12 +0100 |
---|---|---|
committer | Andreas Rammhold <andreas@rammhold.de> | 2021-03-04 12:34:48 +0100 |
commit | e3a4ba005213c1df01330faf9254ac665e64f8c6 (patch) | |
tree | 5b3012e9b0b9e840ba59babb5eb38057016fe467 | |
parent | 61e6aeb6b259c6acda774f958b9acb213cf137a0 (diff) | |
download | nixpkgs-e3a4ba005213c1df01330faf9254ac665e64f8c6.tar nixpkgs-e3a4ba005213c1df01330faf9254ac665e64f8c6.tar.gz nixpkgs-e3a4ba005213c1df01330faf9254ac665e64f8c6.tar.bz2 nixpkgs-e3a4ba005213c1df01330faf9254ac665e64f8c6.tar.lz nixpkgs-e3a4ba005213c1df01330faf9254ac665e64f8c6.tar.xz nixpkgs-e3a4ba005213c1df01330faf9254ac665e64f8c6.tar.zst nixpkgs-e3a4ba005213c1df01330faf9254ac665e64f8c6.zip |
terraform-providers: fix impurity about Nix version used
I wasn't able to figure out for which unstable version of Nix this is supposed to work so I added nix itself to the package list. Nix will now be the same stable version that is also provided in this nixpkgs checkout. To make it work with a stable Nix version I also had to trim the build error output as otherwise it would contain the sha256 prefix & a newline followed by "error:".
-rwxr-xr-x | pkgs/applications/networking/cluster/terraform-providers/update-provider | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkgs/applications/networking/cluster/terraform-providers/update-provider b/pkgs/applications/networking/cluster/terraform-providers/update-provider index e1f1a0ef38a..f97bbce83fa 100755 --- a/pkgs/applications/networking/cluster/terraform-providers/update-provider +++ b/pkgs/applications/networking/cluster/terraform-providers/update-provider @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#! nix-shell -i bash -p coreutils curl jq moreutils +#! nix-shell -I nixpkgs=../../../../.. -i bash -p coreutils curl jq moreutils nix # shellcheck shell=bash # vim: ft=sh # @@ -161,7 +161,8 @@ if [[ -z "$vendorSha256" ]]; then exit 1 fi rm -f vendor_log.txt - vendorSha256=${BASH_REMATCH[1]} + # trim the results in case it they have a sha256: prefix or contain more than one line + vendorSha256=$(echo "${BASH_REMATCH[1]#sha256:}" | head -n 1) # Deal with nix unstable if [[ $vendorSha256 = sha256-* ]]; then vendorSha256=$(nix to-base32 "$vendorSha256") |