Skip to content

Commit

Permalink
Merge #3906
Browse files Browse the repository at this point in the history
3906: Update Nix infra, update index-state r=amesgen a=amesgen

# Description

 - Update haskell.nix
    - Switch to nixpkgs-unstable pin used by haskell.nix
    - Several Windows-specific workarounds are now unnecessary
 - Update HLS to latest, i.e. [1.7.0.0](https://github.com/haskell/haskell-language-server/releases/tag/1.7.0.0) (HLS needs haskell.nix-specific patches, which are easier to pull in this way). Supersedes #3730.
 - Update `index-state` to `2022-07-01`. This also requires some dependency updates to avoid e.g. `aeson`-related compilation errors. Supersedes #3897.



Co-authored-by: Alexander Esgen <[email protected]>
  • Loading branch information
iohk-bors[bot] and amesgen authored Jul 19, 2022
2 parents 3305447 + c0a02b1 commit faf5344
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 155 deletions.
15 changes: 9 additions & 6 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
index-state: 2022-02-18T00:00:00Z
index-state: 2022-07-01T00:00:00Z

packages: ./ouroboros-network-testing
./monoidal-synchronisation
Expand Down Expand Up @@ -28,6 +28,9 @@ constraints:
, ListLike >= 4.7.3
, witherable >= 0.4

-- Plutus dependency
, algebraic-graphs < 0.7

package Win32-network
tests: True

Expand Down Expand Up @@ -193,7 +196,7 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-prelude
tag: 6ea36cf2247ac0bc33e08c327abec34dfd05bd99
tag: 533aec85c1ca05c7d171da44b89341fb736ecfe5
--sha256: 0z2y3wzppc12bpn9bl48776ms3nszw8j58xfsdxf97nzjgrmd62g
subdir:
cardano-prelude
Expand All @@ -219,8 +222,8 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/cardano-ledger
tag: f49879a79098d9372d63baa13b94a941a56eda34
--sha256: 0i9x66yqkrvx2w79dy6lzlya82yxc8567rgjj828vc2d46d6nvx6
tag: 389b266d6226dedf3d2aec7af640b3ca4984c5ea
--sha256: 0i9zirl5pll9bwfp3l1zy8lhivmfmm8jpaprfx5jdjcnyha3ixrx
subdir:
eras/alonzo/impl
eras/alonzo/test-suite
Expand Down Expand Up @@ -249,8 +252,8 @@ source-repository-package
source-repository-package
type: git
location: https://github.com/input-output-hk/plutus
tag: f680ac6979e069fcc013e4389ee607ff5fa6672f
--sha256: 180jq8hd0jlg48ya7b5yw3bnd2d5czy0b1agy9ng3mgnzpyq747i
tag: 8ab4c3355c5fdf67dcf6acc1f5a14668d5e6f0a9
--sha256: 12d6bndmj0dxl6xlaqmf78326yp5hw093bmybmqfpdkvk4mgz03j
subdir:
plutus-ledger-api
plutus-tx
Expand Down
2 changes: 1 addition & 1 deletion nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let
sources.nixpkgs)
else
(builtins.trace "Using haskell.nix's nixpkgs. Good. Sharing is caring"
haskellNix.sources.nixpkgs-2111);
haskellNix.sources.nixpkgs-unstable);
# for inclusion in pkgs:
overlays =
# Haskell.nix (https://github.com/input-output-hk/haskell.nix)
Expand Down
23 changes: 0 additions & 23 deletions nix/hls.nix

This file was deleted.

72 changes: 0 additions & 72 deletions nix/ouroboros-network.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,41 +47,6 @@ let
# Options specific to the windows cross-compiled build:
({ pkgs, ... }:
lib.mkIf pkgs.stdenv.hostPlatform.isWindows {
# Allow reinstallation of Win32
nonReinstallablePkgs = [
"rts"
"ghc-heap"
"ghc-prim"
"integer-gmp"
"integer-simple"
"base"
"deepseq"
"array"
"ghc-boot-th"
"pretty"
"template-haskell"
# ghcjs custom packages
"ghcjs-prim"
"ghcjs-th"
"ghc-boot"
"ghc"
"array"
"binary"
"bytestring"
"containers"
"filepath"
"ghc-boot"
"ghc-compact"
"ghc-prim"
# "ghci" "haskeline"
"hpc"
"mtl"
"parsec"
"text"
"transformers"
"xhtml"
# "stm" "terminfo"
];
# ruby/perl dependencies cannot be cross-built for cddl tests:
packages.ouroboros-network.flags.cddl = false;

Expand All @@ -94,43 +59,6 @@ let
packages.terminal-size.components.library.build-tools =
lib.mkForce [ ];
packages.network.components.library.build-tools = lib.mkForce [ ];

# Make sure that libsodium DLLs are available for tests
packages.ouroboros-consensus-byron-test.components.tests.test.postInstall =
''
ln -s ${libsodium-vrf}/bin/libsodium-23.dll $out/bin/libsodium-23.dll
ln -s ${pkgs.secp256k1}/bin/libsecp256k1-0.dll $out/bin/libsecp256k1-0.dll
'';
packages.ouroboros-consensus-cardano-test.components.tests.test.postInstall =
''
ln -s ${libsodium-vrf}/bin/libsodium-23.dll $out/bin/libsodium-23.dll
ln -s ${pkgs.secp256k1}/bin/libsecp256k1-0.dll $out/bin/libsecp256k1-0.dll
'';
packages.ouroboros-consensus-mock-test.components.tests.test.postInstall =
''
ln -s ${libsodium-vrf}/bin/libsodium-23.dll $out/bin/libsodium-23.dll
ln -s ${pkgs.secp256k1}/bin/libsecp256k1-0.dll $out/bin/libsecp256k1-0.dll
'';
packages.ouroboros-consensus-shelley-test.components.tests.test.postInstall =
''
ln -s ${libsodium-vrf}/bin/libsodium-23.dll $out/bin/libsodium-23.dll
ln -s ${pkgs.secp256k1}/bin/libsecp256k1-0.dll $out/bin/libsecp256k1-0.dll
'';
packages.ouroboros-consensus-test.components.tests.test-consensus.postInstall =
''
ln -s ${libsodium-vrf}/bin/libsodium-23.dll $out/bin/libsodium-23.dll
ln -s ${pkgs.secp256k1}/bin/libsecp256k1-0.dll $out/bin/libsecp256k1-0.dll
'';
packages.ouroboros-consensus-test.components.tests.test-infra.postInstall =
''
ln -s ${libsodium-vrf}/bin/libsodium-23.dll $out/bin/libsodium-23.dll
ln -s ${pkgs.secp256k1}/bin/libsecp256k1-0.dll $out/bin/libsecp256k1-0.dll
'';
packages.ouroboros-consensus-test.components.tests.test-storage.postInstall =
''
ln -s ${libsodium-vrf}/bin/libsodium-23.dll $out/bin/libsodium-23.dll
ln -s ${pkgs.secp256k1}/bin/libsecp256k1-0.dll $out/bin/libsecp256k1-0.dll
'';
})
# Options for when not compiling to windows:
({ pkgs, ... }:
Expand Down
44 changes: 9 additions & 35 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"homepage": "",
"owner": "input-output-hk",
"repo": "hackage.nix",
"rev": "4cf90b36955597d0151940eabfb1b61a8ec42256",
"sha256": "1gdy89dgv2n5ibb6lc03y6k0y9pcacdrlfgv6ipd9bwrivkhdaa9",
"rev": "f0bd5dc7b74aaaeab7643d016325f32d68d33fc0",
"sha256": "1s8fm3jqikl86ljwn0acijyc76dh1p0dnyjpx6vydgaprxar9i7s",
"type": "tarball",
"url": "https://github.com/input-output-hk/hackage.nix/archive/4cf90b36955597d0151940eabfb1b61a8ec42256.tar.gz",
"url": "https://github.com/input-output-hk/hackage.nix/archive/f0bd5dc7b74aaaeab7643d016325f32d68d33fc0.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz",
"version": "b3c99d7f13df89a9a918c835ecb7114098912962"
},
Expand All @@ -18,50 +18,24 @@
"homepage": "https://input-output-hk.github.io/haskell.nix",
"owner": "input-output-hk",
"repo": "haskell.nix",
"rev": "eb49a3b7213470e36570f4aa1ed7a64e6d6cf160",
"sha256": "03k5qgcczk30vfpczv66b4dhc6xn2z5wcyzafcxgd7731rybf50r",
"rev": "4e01f345439c89bc2a5616ceda08a979a01bc15e",
"sha256": "02n3ag3zcig60x93hh9v2vnhyw6qmzr9qg8dpnr4ac4ym8cyifc9",
"type": "tarball",
"url": "https://github.com/input-output-hk/haskell.nix/archive/eb49a3b7213470e36570f4aa1ed7a64e6d6cf160.tar.gz",
"url": "https://github.com/input-output-hk/haskell.nix/archive/4e01f345439c89bc2a5616ceda08a979a01bc15e.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz",
"version": "962ecfed3a4fb656b5a91d89159291e00ed766bc"
},
"hls-released": {
"branch": "master",
"builtin": false,
"description": "Successor of ghcide & haskell-ide-engine. One IDE to rule them all.",
"homepage": "",
"owner": "haskell",
"repo": "haskell-language-server",
"rev": "1.6.1.1",
"sha256": "1rbdcl89y85cz31k4qk48zg8qdyywrzzjvh28q36bpm215qhgd74",
"type": "tarball",
"url": "https://github.com/haskell/haskell-language-server/archive/1.6.1.1.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"iohk-nix": {
"branch": "master",
"description": "nix scripts shared across projects",
"homepage": null,
"owner": "input-output-hk",
"repo": "iohk-nix",
"rev": "5e667b374153327c7bdfdbfab8ef19b1f27d4aac",
"sha256": "09jrhq48h5vwl6vyf4q8d38vlaqmbd00m550rwxz79k90bxb7q6y",
"rev": "edb2d2df2ebe42bbdf03a0711115cf6213c9d366",
"sha256": "1yjm5bk26vak25j9ws5lv2jw80kjdfn1a7b003kzs1r0zds87xy2",
"type": "tarball",
"url": "https://github.com/input-output-hk/iohk-nix/archive/5e667b374153327c7bdfdbfab8ef19b1f27d4aac.tar.gz",
"url": "https://github.com/input-output-hk/iohk-nix/archive/edb2d2df2ebe42bbdf03a0711115cf6213c9d366.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz",
"version": "60fe72cf807a4ec4409a53883d5c3af77f60f721"
},
"nixpkgs": {
"branch": "nixpkgs-unstable",
"builtin": true,
"description": "Nix Packages collection",
"homepage": "",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1882c6b7368fd284ad01b0a5b5601ef136321292",
"sha256": "0zg7ak2mcmwzi2kg29g4v9fvbvs0viykjsg2pwaphm1fi13s7s0i",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/1882c6b7368fd284ad01b0a5b5601ef136321292.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
19 changes: 1 addition & 18 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,6 @@
, pkgs ? import ./nix { inherit config sourcesOverride; } }:
with pkgs;
let
# Haskell-language-server is pulled in with niv directly from its repositories
# at specific commit because the version we want is not yet in our hackage
# index (dictated by haskell.nix's version). Once it arrives we can pull it in
# specifying a version on the tools attribute set, something like:
#
# > tools = {
# > ...
# > haskell-language-server = "1.5.1.0";
#
# Note that the tools attribute comes from haskell-nix when defining the
# shellFor function. At the same time, the niv depencency will not be needed
# and it can be removed with `niv drop hls-released` (or manually removing the
# relevant entries from `sources.json`).
hls = import ./nix/hls.nix { inherit pkgs; };

# This provides a development environment that can be used with nix-shell or
# lorri. See https://input-output-hk.github.io/haskell.nix/user-guide/development/
shell = ouroborosNetworkHaskellPackages.shellFor {
Expand All @@ -38,15 +23,13 @@ let
pkgconfig
nixfmt
stylish-haskell
hls.hls
hls.hls-wrapper
hls.implicit-hie
];

tools = {
# IDE tools
ghcid = "0.8.7";
hasktags = "0.71.2";
haskell-language-server = "latest";
# Draw graph of module dependencies
graphmod = "1.4.4";
# Profiling tools
Expand Down

0 comments on commit faf5344

Please sign in to comment.