Skip to content

Commit de85bf4

Browse files
committed
Reduce Nix support
This removes the support for: - Dev shells with pre-built packages - Building binaries These have been almost continually broken, and nobody is really maintaining them. Better to just do the simple thing we can do reliably, which is to provide dev shells. Closes #3800
1 parent 0f9be3e commit de85bf4

File tree

8 files changed

+42
-783
lines changed

8 files changed

+42
-783
lines changed

.github/workflows/nix.yml

+2-59
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ jobs:
1818
runs-on: ubuntu-latest
1919
outputs:
2020
should_skip_develop: ${{ steps.skip_check.outputs.should_skip }}
21-
should_skip_build: ${{ steps.skip_check_no_nix.outputs.should_skip }}
2221
steps:
2322
- id: skip_check
2423
uses: fkirc/[email protected]
@@ -35,11 +34,6 @@ jobs:
3534
, ".gitlab-ci.yaml"
3635
, ".gitlab/**"
3736
]'
38-
- id: skip_check_no_nix
39-
uses: fkirc/[email protected]
40-
with:
41-
cancel_others: false
42-
paths: '[ "**.nix" ]'
4337

4438
# Enter the development shell and run `cabal build`
4539
develop:
@@ -63,66 +57,15 @@ jobs:
6357
- uses: cachix/cachix-action@v12
6458
with:
6559
name: haskell-language-server
66-
# Disable pushing, we will do that in job `build`
67-
skipPush: true
60+
authToken: ${{ secrets.HLS_CACHIX_AUTH_TOKEN }}
6861
- run: |
6962
nix develop --print-build-logs --command cabal update
7063
nix develop --print-build-logs --command cabal build
7164
72-
# Build and then push HLS binaries with developmet shell to cachix
73-
# This job runs when
74-
# 1. PRs are merged to master (runs on master)
75-
# 2. Nix files are changed (runs on PR)
76-
build:
77-
needs: pre_job
78-
runs-on: ${{ matrix.os }}
79-
env:
80-
HAS_TOKEN: ${{ secrets.HLS_CACHIX_AUTH_TOKEN != '' }}
81-
if: (needs.pre_job.outputs.should_skip_build != 'true' && needs.pre_job.outputs.should_skip_pr != 'true') || (github.repository_owner == 'haskell' && github.ref == 'refs/heads/master')
82-
strategy:
83-
fail-fast: false
84-
matrix:
85-
os: [ubuntu-latest, macOS-latest]
86-
87-
steps:
88-
- uses: actions/checkout@v3
89-
90-
- uses: cachix/install-nix-action@v23
91-
with:
92-
extra_nix_config: |
93-
experimental-features = nix-command flakes
94-
nix_path: nixpkgs=channel:nixos-unstable
95-
- uses: cachix/cachix-action@v12
96-
with:
97-
name: haskell-language-server
98-
authToken: ${{ secrets.HLS_CACHIX_AUTH_TOKEN }}
99-
- name: Build development shell
100-
run: nix develop --print-build-logs --profile dev
101-
- name: Build all development shell (without nix dependencies)
102-
run: nix develop --print-build-logs .#all-simple-dev-shells --profile dev
103-
# We only build nix dev shell for current GHC version because some are
104-
# failing with different GHC version on darwin.
105-
- name: Build development shell with nix dependencies for current GHC version
106-
if: matrix.os == 'macOS-latest'
107-
run: nix develop --print-build-logs .#haskell-language-server-dev-nix --profile dev
108-
- name: Build development shells with nix dependencies
109-
if: matrix.os == 'ubuntu-latest'
110-
run: nix develop --print-build-logs .#all-nix-dev-shells --profile dev
111-
- name: Push development shell
112-
if: ${{ env.HAS_TOKEN == 'true' }}
113-
run: cachix push haskell-language-server dev
114-
- name: Build binaries
115-
run: nix build --print-build-logs
116-
- name: Build all binaries
117-
run: nix build --print-build-logs .#all-haskell-language-server
118-
- name: Push binaries
119-
if: ${{ env.HAS_TOKEN == 'true' }}
120-
run: nix path-info --json | jq -r '.[].path' | cachix push haskell-language-server
121-
12265
nix_post_job:
12366
if: always()
12467
runs-on: ubuntu-latest
125-
needs: [pre_job, develop, build]
68+
needs: [pre_job, develop]
12669
steps:
12770
- run: |
12871
echo "jobs info: ${{ toJSON(needs) }}"

configuration-ghc-90.nix

-53
This file was deleted.

configuration-ghc-92.nix

-53
This file was deleted.

configuration-ghc-94.nix

-36
This file was deleted.

configuration-ghc-96.nix

-61
This file was deleted.

docs/contributing/contributing.md

+2-7
Original file line numberDiff line numberDiff line change
@@ -50,16 +50,11 @@ $ cabal build
5050
If you are using nix 2.4 style command (enabled by `experimental-features = nix-command`),
5151
you can use `nix develop` instead of `nix-shell` to enter the development shell. To enter the shell with specific GHC versions:
5252

53-
* `nix develop` or `nix develop .#haskell-language-server-dev` - default GHC version
54-
* `nix develop .#haskell-language-server-901-dev` - GHC 9.0.1 (substitute GHC version as appropriate)
53+
* `nix develop` - default GHC version
54+
* `nix develop .#shell-ghc90` - GHC 9.0.1 (substitute GHC version as appropriate)
5555

5656
If you are looking for a Nix expression to create haskell-language-server binaries, see https://github.com/haskell/haskell-language-server/issues/122
5757

58-
To create binaries:
59-
60-
* `nix build` or `nix build .#haskell-language-server` - default GHC version
61-
* `nix build .#haskell-language-server-901` - GHC 9.0.1 (substitute GHC version as appropriate)
62-
6358
## Testing
6459

6560
The tests make use of the [Tasty](https://github.com/feuerbach/tasty) test framework.

0 commit comments

Comments
 (0)