Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update nix #1699

Merged
merged 2 commits into from
Apr 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
24 changes: 14 additions & 10 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 // {
Expand Down
6 changes: 3 additions & 3 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/<owner>/<repo>/archive/<rev>.tar.gz"
}
}
2 changes: 2 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ haskellPackagesForProject.shellFor {
capstone
tracy

gen-hls-changelogs

haskellPackages.cabal-install
haskellPackages.hlint
haskellPackages.ormolu
Expand Down