Skip to content

Commit 3f8d33c

Browse files
authored
Update nix (haskell#1699)
* Update nix * genChangelogs -> gen-hls-changelogs
1 parent 0c5a317 commit 3f8d33c

File tree

4 files changed

+20
-13
lines changed

4 files changed

+20
-13
lines changed

docs/releases.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ when added to the path.
1111
## Minimal checklist
1212

1313
* [ ] 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.
14+
Nix users should run command `gen-hls-changelogs` (a wrapper of the script) in nix-shell instead.
1415
* [ ] add that list to the actual [Changelog](https://github.com/haskell/haskell-language-server/blob/master/ChangeLog.md) with a description of the release.
1516
* [ ] 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).
1617
* [ ] create the tag and make an initial prerelease to trigger the ci workflow (see details below)

nix/default.nix

+14-10
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,20 @@ let
4848
inherit gitignoreSource;
4949
inherit ourSources;
5050

51-
# tracy-0.7.6 is broken on macOS
52-
tracy = pkgs.tracy.overrideAttrs (_old: rec {
53-
version = "0.7.5";
54-
src = pkgs.fetchFromGitHub {
55-
owner = "wolfpld";
56-
repo = "tracy";
57-
rev = "v${version}";
58-
sha256 = "0qfb30k6a8vi8vn65vv927wd9nynwwvc9crbmi7a55kp20hzg06r";
59-
};
60-
});
51+
gen-hls-changelogs = with pkgs;
52+
let myGHC = haskellPackages.ghcWithPackages (p: with p; [ github ]);
53+
in runCommand "gen-hls-changelogs" {
54+
passAsFile = [ "text" ];
55+
preferLocalBuild = true;
56+
allowSubstitutes = false;
57+
buildInputs = [ git myGHC ];
58+
} ''
59+
dest=$out/bin/gen-hls-changelogs
60+
mkdir -p $out/bin
61+
echo "#!${runtimeShell}" >> $dest
62+
echo "${myGHC}/bin/runghc ${../GenChangelogs.hs}" >> $dest
63+
chmod +x $dest
64+
'';
6165

6266
ourHaskell = pkgs.haskell // {
6367
packages = pkgs.haskell.packages // {

nix/sources.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
"homepage": "https://github.com/NixOS/nixpkgs",
3030
"owner": "NixOS",
3131
"repo": "nixpkgs",
32-
"rev": "c5147860e23ed75ce9d40298c66b416c00be1167",
33-
"sha256": "104mw4rfbzyrfkxq468dlk38drrjx92dgyvkazgci67a6cx3n6nx",
32+
"rev": "6fc2b7ecc2a167ce6a6902d5417daf1fa5cac777",
33+
"sha256": "0bcf8yr8scgk7kdjhbrvv7l1d1yv8fnb1d7k3vgnd9qrjnl2fbcf",
3434
"type": "tarball",
35-
"url": "https://github.com/NixOS/nixpkgs/archive/c5147860e23ed75ce9d40298c66b416c00be1167.tar.gz",
35+
"url": "https://github.com/NixOS/nixpkgs/archive/6fc2b7ecc2a167ce6a6902d5417daf1fa5cac777.tar.gz",
3636
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
3737
}
3838
}

shell.nix

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ haskellPackagesForProject.shellFor {
3737
capstone
3838
tracy
3939

40+
gen-hls-changelogs
41+
4042
haskellPackages.cabal-install
4143
haskellPackages.hlint
4244
haskellPackages.ormolu

0 commit comments

Comments
 (0)