Skip to content

Commit

Permalink
Pin nixpkgs in extra-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ipetkov committed Aug 29, 2024
1 parent 60ac1e1 commit 657f3cf
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion extra-tests/alt-store/flake.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
crane.url = "github:ipetkov/crane";
nixpkgs.follows = "crane/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};

Expand Down
5 changes: 4 additions & 1 deletion extra-tests/alt-store/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ set -eu
scriptDir=$(dirname "$0")
cd "${scriptDir}"

nixpkgsOverride="$(../../ci/ref-from-lock.sh ../../test#nixpkgs)"
craneOverride="--override-input crane ../.. --override-input nixpkgs ${nixpkgsOverride}"

case "$(nix --version)" in
"nix (Nix) 2.21.0" | "nix (Nix) 2.21.1")
echo 'skipping test: https://github.com/NixOS/nix/issues/10267'
;;

*) nix build .#default --override-input crane ../.. --store $(pwd)/alt-store
*) nix build .#default ${craneOverride} --store $(pwd)/alt-store
;;
esac
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
crane.url = "github:ipetkov/crane";
nixpkgs.follows = "crane/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ set -eu
scriptDir=$(dirname "$0")
cd "${scriptDir}"

craneOverride="--override-input crane ../.."
nixpkgsOverride="$(../../ci/ref-from-lock.sh ../../test#nixpkgs)"
craneOverride="--override-input crane ../.. --override-input nixpkgs ${nixpkgsOverride}"
flakeSrc=$(nix flake metadata ${craneOverride} --json 2>/dev/null | jq -r '.path')

# Get information about the default derivation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
crane.url = "github:ipetkov/crane";
nixpkgs.follows = "crane/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ set -eu
scriptDir=$(dirname "$0")
cd "${scriptDir}"

craneOverride="--override-input crane ../.."
nixpkgsOverride="$(../../ci/ref-from-lock.sh ../../test#nixpkgs)"
craneOverride="--override-input crane ../.. --override-input nixpkgs ${nixpkgsOverride}"
flakeSrc=$(nix flake metadata ${craneOverride} --json 2>/dev/null | jq -r '.path')

# Get information about the default derivation
Expand Down
2 changes: 1 addition & 1 deletion extra-tests/fetch-cargo-git/flake.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
crane.url = "github:ipetkov/crane";
nixpkgs.follows = "crane/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};

Expand Down
3 changes: 2 additions & 1 deletion extra-tests/fetch-cargo-git/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ set -eu
scriptDir=$(dirname "$0")
cd "${scriptDir}"

craneOverride="--override-input crane ../.."
nixpkgsOverride="$(../../ci/ref-from-lock.sh ../../test#nixpkgs)"
craneOverride="--override-input crane ../.. --override-input nixpkgs ${nixpkgsOverride}"

# Try fetching the git verision of cargo
nix build ${craneOverride} .#cargo-git

0 comments on commit 657f3cf

Please sign in to comment.