Skip to content

Commit

Permalink
Update nix flake (#2065)
Browse files Browse the repository at this point in the history
* Update nix flake

* Fix missing ghc-api-compat in hiedb

* unrelated: Update paths_ignore for #2063

Co-authored-by: Junyoung "Clare" Jang <jjc9310@gmail.com>
  • Loading branch information
berberman and Ailrun committed Aug 5, 2021
1 parent 2857eee commit 8d5e347
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: fkirc/skip-duplicate-actions@v3.4.0
with:
cancel_others: true
paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**", "**.nix", "**/test/**", "flake.lock"]'
paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**", "**.nix", "**/test/**", "flake.lock", "**/README.md", "FUNDING.yml"]'

bench-init:
needs: pre_job
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: true
paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**"]'
paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**", "**/README.md", "FUNDING.yml"]'
- id: skip_check_no_nix
uses: fkirc/skip-duplicate-actions@master
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: fkirc/skip-duplicate-actions@v3.4.0
with:
cancel_others: true
paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**", "**.nix", "flake.lock"]'
paths_ignore: '["**/docs/**", "**.md", "**/LICENSE", ".circleci/**", "install/**", "**.nix", "flake.lock", "**/README.md", "FUNDING.yml"]'
# If we only change ghcide downstream packages we have not test ghcide itself
- id: skip_ghcide_check
uses: fkirc/skip-duplicate-actions@v3.4.0
Expand Down
24 changes: 5 additions & 19 deletions configuration-ghc-901.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,18 @@ let
hpkgsOverride = hself: hsuper:
with pkgs.haskell.lib;
let
lsp-src = pkgs.fetchFromGitHub {
owner = "anka-213";
repo = "lsp";
rev = "tag-ghc-9.0.1-without-pr-326";
sha256 = "lW/EdBnvKPLE2+CGE/grIekOu+U/Wh6zMCN4xhJDtPY=";
};

dependent-sum-src = pkgs.fetchFromGitHub {
owner = "anka-213";
repo = "dependent-sum";
rev = "8cf4c7fbc3bfa2be475a17bb7c94a1e1e9a830b5";
sha256 = "WtxTB6ufTZC6SxOtGSfhlO4mY0y9eWejMSa0yUJ7dHQ=";
};
in {

# we need add ghc-api-compat to build depends,
# since its condition tree is not evaluated under ghc 9
hiedb = addBuildDepend hsuper.hiedb hself.ghc-api-compat;

blaze-textual = hself.callCabal2nix "blaze-textual"
(pkgs.fetchFromGitHub {
owner = "jwaldmann";
Expand All @@ -52,25 +50,13 @@ let
sha256 = "8ct7t3xIxIAoC+f8VO5e5+QKrd5L5Zu1eButSaE+1Uk=";
}) { };

ghc-api-compat = hself.callCabal2nix "ghc-api-compat"
(pkgs.fetchFromGitHub {
owner = "hsyl20";
repo = "ghc-api-compat";
rev = "8fee87eac97a538dbe81ff1ab18cff10f2f9fa15";
sha256 = "byehvdxQxhNk5ZQUXeFHjAZpAze4Ct9261ro4c5acZk=";
}) { };

th-extras = hself.callCabal2nix "th-extras" (pkgs.fetchFromGitHub {
owner = "anka-213";
repo = "th-extras";
rev = "57a97b4df128eb7b360e8ab9c5759392de8d1659";
sha256 = "Qtha1ge/C0L+uFcV2dZ5xpG59DCxQT7LuK/OYfiM4Pk=";
}) { };

lsp = hself.callCabal2nix "lsp" "${lsp-src}/lsp" { };
lsp-types = hself.callCabal2nix "lsp-types" "${lsp-src}/lsp-types" { };
lsp-test = hself.callCabal2nix "lsp-test" "${lsp-src}/lsp-test" { };

dependent-sum =
hself.callCabal2nix "dependent-sum" "${dependent-sum-src}/dependent-sum"
{ };
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 17 additions & 24 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -71,36 +71,30 @@
tweaks = hself: hsuper:
with haskell.lib; {

hiedb = hself.callCabal2nix "hiedb"
(builtins.fetchTarball {
url =
"https://hackage.haskell.org/package/hiedb-0.4.0.0/hiedb-0.4.0.0.tar.gz";
sha256 =
"13jz8c46zfpf54ya2wsv4akhn0wcfc6qjazqsjfir5gpvsi7v8xr";
ghc-api-compat = hself.callCabal2nix "ghc-api-compat"
(pkgs.fetchFromGitHub {
owner = "hsyl20";
repo = "ghc-api-compat";
rev = "8fee87eac97a538dbe81ff1ab18cff10f2f9fa15";
sha256 = "byehvdxQxhNk5ZQUXeFHjAZpAze4Ct9261ro4c5acZk=";
}) { };

implicit-hie = hself.callCabal2nix "implicit-hie"
lsp = hself.callCabal2nix "lsp"
(builtins.fetchTarball {
url =
"https://hackage.haskell.org/package/implicit-hie-0.1.2.6/implicit-hie-0.1.2.6.tar.gz";
sha256 =
"067bmw5b9qg55ggklbfyf93jgpkbzmprmgv906jscfzvv1h8266c";
url = "https://hackage.haskell.org/package/lsp-1.2.0.1/lsp-1.2.0.1.tar.gz";
sha256 = "1lhzsraiw11ldxvxn8ax11hswpyzsvw2da2qmp3p6fc9rfpz4pj5";
}) { };

implicit-hie-cradle = hself.callCabal2nix "implicit-hie-cradle"
lsp-types = hself.callCabal2nix "lsp-types"
(builtins.fetchTarball {
url =
"https://hackage.haskell.org/package/implicit-hie-cradle-0.3.0.5/implicit-hie-cradle-0.3.0.5.tar.gz";
sha256 =
"15a7g9x6cjk2b92hb2wilxx4550msxp1pmk5a2shiva821qaxnfq";
url = "https://hackage.haskell.org/package/lsp-types-1.3.0.0/lsp-types-1.3.0.0.tar.gz";
sha256 = "0qajyyj2d51daa4y0pqaa87n4nny0i920ivvzfnrk9gq9386iac7";
}) { };

ghc-source-gen = hself.callCabal2nix "ghc-source-gen"
lsp-test = hself.callCabal2nix "lsp-test"
(builtins.fetchTarball {
url =
"https://hackage.haskell.org/package/ghc-source-gen-0.4.1.0/ghc-source-gen-0.4.1.0.tar.gz";
sha256 =
"0kk599vk54ckikpxkzwrbx7z5x0xr20hr179rldmnlb34bf9mpnk";
url = "https://hackage.haskell.org/package/lsp-test-0.14.0.1/lsp-test-0.14.0.1.tar.gz";
sha256 = "10lnyg7nlbd3ymgvjjlrkfndyy7ay9cwnsk684p08k2gzlric4yq";
}) { };
};

Expand Down Expand Up @@ -184,7 +178,6 @@
pkgs.haskellPackages.ghc.version);
ghc884 = pkgs.hlsHpkgs "ghc884";
ghc8104 = pkgs.hlsHpkgs "ghc8104";
ghc8105 = pkgs.hlsHpkgs "ghc8105";
ghc901 = ghc901Config.tweakHpkgs (pkgs.hlsHpkgs "ghc901");

# Create a development shell of hls project
Expand Down Expand Up @@ -238,14 +231,14 @@
haskell-language-server-dev = mkDevShell ghcDefault;
haskell-language-server-884-dev = mkDevShell ghc884;
haskell-language-server-8104-dev = mkDevShell ghc8104;
haskell-language-server-8105-dev = mkDevShell ghc8105;
haskell-language-server-8105-dev = builtins.throw "GHC 8.10.5 is not available in nixpkgs";
haskell-language-server-901-dev = mkDevShell ghc901;

# hls package
haskell-language-server = mkExe ghcDefault;
haskell-language-server-884 = mkExe ghc884;
haskell-language-server-8104 = mkExe ghc8104;
haskell-language-server-8105 = mkExe ghc8105;
haskell-language-server-8105 = builtins.throw "GHC 8.10.5 is not available in nixpkgs";
haskell-language-server-901 = mkExe ghc901;
};

Expand Down

0 comments on commit 8d5e347

Please sign in to comment.