diff --git a/docs/releases.md b/docs/releases.md index ee8590cef2..5378986d2c 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -11,6 +11,7 @@ when added to the path. ## Minimal checklist * [ ] generate the list of pull requests finished since the last release using the [haskell script](https://github.com/haskell/haskell-language-server/blob/master/GenChangelogs.hs) in the project root. + Nix users should run command `gen-hls-changelogs` (a wrapper of the script) in nix-shell instead. * [ ] add that list to the actual [Changelog](https://github.com/haskell/haskell-language-server/blob/master/ChangeLog.md) with a description of the release. * [ ] bump up versions of changed packages. All are optional but [haskell-language-server itself](https://github.com/haskell/haskell-language-server/blob/master/haskell-language-server.cabal). * [ ] create the tag and make an initial prerelease to trigger the ci workflow (see details below) diff --git a/nix/default.nix b/nix/default.nix index 713cf9607f..251f6efead 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -48,16 +48,20 @@ let inherit gitignoreSource; inherit ourSources; - # tracy-0.7.6 is broken on macOS - tracy = pkgs.tracy.overrideAttrs (_old: rec { - version = "0.7.5"; - src = pkgs.fetchFromGitHub { - owner = "wolfpld"; - repo = "tracy"; - rev = "v${version}"; - sha256 = "0qfb30k6a8vi8vn65vv927wd9nynwwvc9crbmi7a55kp20hzg06r"; - }; - }); + gen-hls-changelogs = with pkgs; + let myGHC = haskellPackages.ghcWithPackages (p: with p; [ github ]); + in runCommand "gen-hls-changelogs" { + passAsFile = [ "text" ]; + preferLocalBuild = true; + allowSubstitutes = false; + buildInputs = [ git myGHC ]; + } '' + dest=$out/bin/gen-hls-changelogs + mkdir -p $out/bin + echo "#!${runtimeShell}" >> $dest + echo "${myGHC}/bin/runghc ${../GenChangelogs.hs}" >> $dest + chmod +x $dest + ''; ourHaskell = pkgs.haskell // { packages = pkgs.haskell.packages // { diff --git a/nix/sources.json b/nix/sources.json index 210fcffde3..710303ae97 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -29,10 +29,10 @@ "homepage": "https://github.com/NixOS/nixpkgs", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c5147860e23ed75ce9d40298c66b416c00be1167", - "sha256": "104mw4rfbzyrfkxq468dlk38drrjx92dgyvkazgci67a6cx3n6nx", + "rev": "6fc2b7ecc2a167ce6a6902d5417daf1fa5cac777", + "sha256": "0bcf8yr8scgk7kdjhbrvv7l1d1yv8fnb1d7k3vgnd9qrjnl2fbcf", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/c5147860e23ed75ce9d40298c66b416c00be1167.tar.gz", + "url": "https://github.com/NixOS/nixpkgs/archive/6fc2b7ecc2a167ce6a6902d5417daf1fa5cac777.tar.gz", "url_template": "https://github.com///archive/.tar.gz" } } diff --git a/shell.nix b/shell.nix index ef8b0a039d..0ef0ad57fa 100644 --- a/shell.nix +++ b/shell.nix @@ -37,6 +37,8 @@ haskellPackagesForProject.shellFor { capstone tracy + gen-hls-changelogs + haskellPackages.cabal-install haskellPackages.hlint haskellPackages.ormolu