Skip to content

Commit e70432c

Browse files
committed
Attempt a testing xmonad config
1 parent b1578ed commit e70432c

File tree

4 files changed

+69
-20
lines changed

4 files changed

+69
-20
lines changed

.config/xmonad/stack.yaml

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22
#
33
# Some commonly used options have been documented as comments in this file.
44
# For advanced use and comprehensive documentation of the format, please see:
5-
# https://docs.haskellstack.org/en/stable/yaml_configuration/
5+
# https://docs.haskellstack.org/en/stable/configure/yaml/
66

7-
# Resolver to choose a 'specific' stackage snapshot or a compiler version.
7+
# A 'specific' Stackage snapshot or a compiler version.
88
# A snapshot resolver dictates the compiler version and the set of packages
99
# to be used for project dependencies. For example:
1010
#
11-
# resolver: lts-3.5
12-
# resolver: nightly-2015-09-21
13-
# resolver: ghc-7.10.2
11+
# snapshot: lts-23.0
12+
# snapshot: nightly-2024-12-13
13+
# snapshot: ghc-9.8.4
1414
#
1515
# The location of a snapshot can be provided as a file or url. Stack assumes
1616
# a snapshot provided as a file might change, whereas a url resource does not.
1717
#
18-
# resolver: ./custom-snapshot.yaml
19-
# resolver: https://example.com/snapshots/2018-01-01.yaml
20-
resolver:
21-
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/18/9.yaml
18+
# snapshot: ./custom-snapshot.yaml
19+
# snapshot: https://example.com/snapshots/2024-01-01.yaml
20+
snapshot:
21+
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/24/4.yaml
2222

2323
# User packages to be built.
2424
# Various formats can be used as shown in the example below.
@@ -32,7 +32,7 @@ resolver:
3232
packages:
3333
- xmonad
3434
- xmonad-contrib
35-
# Dependency packages to be pulled from upstream that are not in the resolver.
35+
# Dependency packages to be pulled from upstream that are not in the snapshot.
3636
# These entries can reference officially published versions as well as
3737
# forks / in-progress versions pinned to a git hash. For example:
3838
#
@@ -42,10 +42,11 @@ packages:
4242
# commit: e7b331f14bcffb8367cd58fbfc8b40ec7642100a
4343
#
4444
# extra-deps: []
45+
#
4546
dependencies:
46-
- split-0.2.3.5
47+
- split-0.2.5
4748

48-
# Override default flag values for local packages and extra-deps
49+
# Override default flag values for project packages and extra-deps
4950
# flags: {}
5051

5152
# Extra package databases containing global packages
@@ -54,15 +55,15 @@ dependencies:
5455
# Control whether we use the GHC we find on the path
5556
# system-ghc: true
5657
#
57-
# Require a specific version of stack, using version ranges
58+
# Require a specific version of Stack, using version ranges
5859
# require-stack-version: -any # Default
59-
# require-stack-version: ">=2.5"
60+
# require-stack-version: ">=3.3"
6061
#
61-
# Override the architecture used by stack, especially useful on Windows
62+
# Override the architecture used by Stack, especially useful on Windows
6263
# arch: i386
6364
# arch: x86_64
6465
#
65-
# Extra directories used by stack for building
66+
# Extra directories used by Stack for building
6667
# extra-include-dirs: [/path/to/dir]
6768
# extra-lib-dirs: [/path/to/dir]
6869
#

.github/workflows/ci.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: CI
2+
3+
on: [push]
4+
5+
jobs:
6+
xmonad:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Install dependencies
12+
run: |
13+
sudo apt install -y libx11-dev libxft-dev libxinerama-dev libxrandr-dev libxss-dev haskell-stack
14+
15+
- name: Fetch xmonad and xmonad-contrib
16+
run: |
17+
cd .config/xmonad
18+
git clone --branch v0.18.0 https://github.com/xmonad/xmonad
19+
git clone --branch v0.18.1 https://github.com/xmonad/xmonad-contrib
20+
21+
- name: Build xmonad
22+
run: |
23+
cd .config/xmonad
24+
stack install --allow-newer
25+
26+
- name: Build xmonad.hs
27+
run: |
28+
cd .config/xmonad
29+
stack ghc -- \
30+
--make xmonad.hs \
31+
-i \
32+
-ilib \
33+
-fforce-recomp \
34+
-main-is main \
35+
-v0 \
36+
-o "$1"

Containerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ RUN apt-get install -y \
2424
sudo \
2525
zsh
2626

27+
# Install xmonad dependencies
28+
RUN sudo apt-get install -y \
29+
git \
30+
haskell-stack \
31+
libx11-dev libxft-dev libxinerama-dev libxrandr-dev libxss-dev
32+
2733
# Add don't require password for test in sudoers
2834
RUN echo "test ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
2935

@@ -34,7 +40,7 @@ RUN echo 'export ZDOTDIR=$HOME/.config/zsh' >> /etc/zsh/zshenv
3440
RUN curl -sS https://starship.rs/install.sh | sh -s -- --yes
3541

3642
# Install nvim stable
37-
RUN curl -L https://github.com/neovim/neovim/releases/download/stable/nvim-linux64.deb -o nvim.deb
43+
RUN curl -L https://github.com/neovim/neovim-releases/releases/download/v0.11.3/nvim-linux-x86_64.deb -o nvim.deb
3844
RUN dpkg -i nvim.deb
3945
RUN rm -fr nvim.deb
4046

Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
FROM ubuntu:rolling
22

3-
ENV DEBIAN_FRONTEND noninteractive
4-
ENV USER test
3+
ENV DEBIAN_FRONTEND=noninteractive
4+
ENV USER=test
55

66
RUN useradd test
77
RUN usermod -aG sudo test
@@ -24,6 +24,12 @@ RUN apt-get install -y \
2424
sudo \
2525
zsh
2626

27+
# Install xmonad dependencies
28+
RUN sudo apt-get install -y \
29+
git \
30+
haskell-stack \
31+
libx11-dev libxft-dev libxinerama-dev libxrandr-dev libxss-dev
32+
2733
# Add don't require password for test in sudoers
2834
RUN echo "test ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
2935

@@ -34,7 +40,7 @@ RUN echo 'export ZDOTDIR=$HOME/.config/zsh' >> /etc/zsh/zshenv
3440
RUN curl -sS https://starship.rs/install.sh | sh -s -- --yes
3541

3642
# Install nvim stable
37-
RUN curl -L https://github.com/neovim/neovim/releases/download/stable/nvim-linux64.deb -o nvim.deb
43+
RUN curl -L https://github.com/neovim/neovim-releases/releases/download/v0.11.3/nvim-linux-x86_64.deb -o nvim.deb
3844
RUN dpkg -i nvim.deb
3945
RUN rm -fr nvim.deb
4046

0 commit comments

Comments
 (0)