xmonad-tv: convert to writeHaskellBin

This commit is contained in:
tv 2016-05-25 00:31:49 +02:00
parent 2b71d7f728
commit 37ee40759f
6 changed files with 15 additions and 30 deletions

View File

@ -116,12 +116,12 @@ let
settle ${pkgs.xorg.xhost}/bin/xhost +LOCAL:
settle ${pkgs.xorg.xrdb}/bin/xrdb -merge ${import ./Xresources.nix args}
settle ${pkgs.xorg.xsetroot}/bin/xsetroot -solid '#1c1c1c'
exec ${pkgs.xmonad-tv}/bin/xmonad
exec ${pkgs.xmonad-tv}/bin/xmonad-tv
'';
xmonad-stop = pkgs.writeScriptBin "xmonad-stop" ''
#! /bin/sh
exec ${pkgs.xmonad-tv}/bin/xmonad --shutdown
exec ${pkgs.xmonad-tv}/bin/xmonad-tv --shutdown
'';
xserver-environment = {

View File

@ -18,8 +18,6 @@
};
ff = pkgs.callPackage ./ff {};
viljetic-pages = pkgs.callPackage ./viljetic-pages {};
xmonad-tv =
let src = pkgs.writeNixFromCabal "xmonad-tv.nix" ./xmonad-tv; in
pkgs.haskellPackages.callPackage src {};
xmonad-tv = import ./xmonad-tv.nix { inherit pkgs; };
};
}

View File

@ -1,3 +1,14 @@
{ pkgs, ... }:
pkgs.writeHaskellBin "xmonad-tv" {
depends = [
"containers"
"unix"
"X11"
"xmonad"
"xmonad-contrib"
"xmonad-stockholm"
];
} ''
{-# LANGUAGE DeriveDataTypeable #-} -- for XS
{-# LANGUAGE FlexibleContexts #-} -- for xmonad'
{-# LANGUAGE LambdaCase #-}
@ -278,3 +289,4 @@ wGSConfig = def
allWorkspaceNames :: W.StackSet i l a sid sd -> X [i]
allWorkspaceNames ws =
return $ map W.tag (W.hidden ws) ++ [W.tag $ W.workspace $ W.current ws]
''

View File

@ -1 +0,0 @@
/shell.nix

View File

@ -1,6 +0,0 @@
.PHONY: ghci
ghci: shell.nix
nix-shell --command 'exec ghci -Wall'
shell.nix: xmonad.cabal
cabal2nix --shell . > $@

View File

@ -1,18 +0,0 @@
Author: tv
Build-Type: Simple
Cabal-Version: >= 1.2
License: MIT
Name: xmonad-tv
Version: 0
Executable xmonad
Build-Depends:
base,
containers,
unix,
X11,
xmonad,
xmonad-contrib,
xmonad-stockholm
GHC-Options: -Wall -O3 -threaded -rtsopts
Main-Is: Main.hs