Skip to content

Commit bc7b7cf

Browse files
committed
Use stack from nixpkgs
This uses a more recent stack version (currently 2.15.7) which fixes a problem updating packages from hackage: ``` Selected mirror https://hackage.haskell.org/ Downloading root <repo>/root.json does not have enough signatures signed with the appropriate keys ``` See haskell/cabal#11111
1 parent c4cd8d0 commit bc7b7cf

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

WORKSPACE

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ rules_haskell_dependencies()
6565
load(
6666
"@rules_nixpkgs_core//:nixpkgs.bzl",
6767
"nixpkgs_local_repository",
68+
"nixpkgs_package",
6869
)
6970
load(
7071
"@rules_nixpkgs_python//:python.bzl",
@@ -78,7 +79,15 @@ nixpkgs_local_repository(
7879

7980
nixpkgs_python_configure(repository = "@nixpkgs")
8081

81-
load("@rules_haskell//haskell:cabal.bzl", "stack_snapshot")
82+
nixpkgs_package(
83+
name = "stack",
84+
attribute_path = "stack",
85+
repository = "@nixpkgs",
86+
)
87+
88+
load("@rules_haskell//haskell:cabal.bzl", "stack_snapshot", "use_stack")
89+
90+
use_stack("@stack//:bin/stack")
8291

8392
######################################
8493
# Haskell dependencies and toolchain

example/WORKSPACE

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ rules_haskell_dependencies()
5353
load(
5454
"@io_tweag_rules_nixpkgs//nixpkgs:nixpkgs.bzl",
5555
"nixpkgs_local_repository",
56+
"nixpkgs_package",
5657
"nixpkgs_python_configure",
5758
)
5859

@@ -63,7 +64,15 @@ nixpkgs_local_repository(
6364

6465
nixpkgs_python_configure(repository = "@nixpkgs")
6566

66-
load("@rules_haskell//haskell:cabal.bzl", "stack_snapshot")
67+
nixpkgs_package(
68+
name = "stack",
69+
attribute_path = "stack",
70+
repository = "@nixpkgs",
71+
)
72+
73+
load("@rules_haskell//haskell:cabal.bzl", "stack_snapshot", "use_stack")
74+
75+
use_stack("@stack//:bin/stack")
6776

6877
######################################
6978
# Haskell dependencies and toolchain

tests/alternative-deps/WORKSPACE

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ rules_haskell_dependencies()
5353
load(
5454
"@io_tweag_rules_nixpkgs//nixpkgs:nixpkgs.bzl",
5555
"nixpkgs_local_repository",
56+
"nixpkgs_package",
5657
"nixpkgs_python_configure",
5758
)
5859

@@ -63,7 +64,15 @@ nixpkgs_local_repository(
6364

6465
nixpkgs_python_configure(repository = "@nixpkgs")
6566

66-
load("@rules_haskell//haskell:cabal.bzl", "stack_snapshot")
67+
nixpkgs_package(
68+
name = "stack",
69+
attribute_path = "stack",
70+
repository = "@nixpkgs",
71+
)
72+
73+
load("@rules_haskell//haskell:cabal.bzl", "stack_snapshot", "use_stack")
74+
75+
use_stack("@stack//:bin/stack")
6776

6877
######################################
6978
# Haskell dependencies and toolchain

0 commit comments

Comments
 (0)