Read the Haddock documentation and use Main.hs as a template.
Install blucontrol with the nix package manager.
nix-env --install blucontrol-with-packages
Watch out: haskellPackages.blucontrol
is just the library, but doesn't add GHC to the PATH
.
You need blucontrol-with-packages
to be able to compile your configuration.
You can also install it from the cloned repository.
git clone https://github.com/jumper149/blucontrol.git
cd blucontrol
nix-env --install --file default.nix
Build blucontrol with makepkg and install with pacman. You might need to install some dependencies from the AUR.
git clone https://aur.archlinux.org/blucontrol.git
cd blucontrol
makepkg --syncdeps --install
Make sure to install dependencies that are not managed by cabal.
- libx11-dev
- libxrandr-dev
If you want to actually use blucontrol without installing I recommend editing Main.hs
in the source tree instead of using $XDG_CONFIG_HOME/blucontrol/blucontrol.hs
.
This way you avoid problems with finding libraries, since blucontrol invokes GHC to compile the configuration at $XDG_CONFIG_HOME/blucontrol/blucontrol.hs
.
git clone https://github.com/jumper149/blucontrol.git
cd blucontrol
$EDITOR Main.hs
cabal run blucontrol -- --ignore-config
Enter the nix-shell for development.
git clone https://github.com/jumper149/blucontrol.git
cd blucontrol
nix-shell
In nix-shell use cabal to build, run tests and execute blucontrol.
cabal build
cabal run test
cabal run blucontrol -- --ignore-config
Build blucontrol with nix-build.
nix-build