2017-12-21 16:16:19 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, pkgconfig, makeWrapper, newScope
|
|
|
|
, libxkbcommon
|
|
|
|
, wayland, pixman, fontconfig
|
|
|
|
, stConf ? null, stPatches ? []
|
2015-10-24 00:32:20 +01:00
|
|
|
}:
|
|
|
|
|
2017-12-21 16:16:19 +00:00
|
|
|
let
|
|
|
|
callPackage = newScope self;
|
|
|
|
self = {
|
|
|
|
swc = callPackage ./swc.nix {};
|
|
|
|
wld = callPackage ./wld.nix {};
|
|
|
|
dmenu-velox = callPackage ./dmenu.nix {};
|
|
|
|
st-velox = callPackage ./st.nix {
|
|
|
|
conf = stConf;
|
|
|
|
patches = stPatches;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in with self; stdenv.mkDerivation rec {
|
2015-10-24 00:32:20 +01:00
|
|
|
name = "velox-${version}";
|
2017-12-21 16:16:19 +00:00
|
|
|
version = "git-2017-07-04";
|
2015-10-24 00:32:20 +01:00
|
|
|
|
2017-12-21 16:16:19 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "michaelforney";
|
|
|
|
repo = "velox";
|
|
|
|
rev = "0b1d3d62861653d92d0a1056855a84fcef661bc0";
|
|
|
|
sha256 = "0p5ra5p5w21wl696rmv0vdnl7jnri5iwnxfs6nl6miwydhq2dmci";
|
2015-10-24 00:32:20 +01:00
|
|
|
};
|
|
|
|
|
2017-12-21 16:16:19 +00:00
|
|
|
nativeBuildInputs = [ pkgconfig makeWrapper ];
|
2015-10-24 00:32:20 +01:00
|
|
|
|
|
|
|
buildInputs = [ swc libxkbcommon wld wayland pixman fontconfig ];
|
|
|
|
|
2017-12-21 16:16:19 +00:00
|
|
|
propagatedUserEnvPkgs = [ swc ];
|
|
|
|
|
2015-10-24 00:32:20 +01:00
|
|
|
makeFlags = "PREFIX=$(out)";
|
2017-12-21 16:16:19 +00:00
|
|
|
preBuild = ''
|
|
|
|
substituteInPlace config.c \
|
|
|
|
--replace /etc/velox.conf $out/etc/velox.conf
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
PREFIX=$out make install
|
|
|
|
mkdir -p $out/etc
|
|
|
|
cp velox.conf.sample $out/etc/velox.conf
|
|
|
|
'';
|
|
|
|
postFixup = ''
|
|
|
|
wrapProgram $out/bin/velox \
|
|
|
|
--prefix PATH : "${stdenv.lib.makeBinPath [ dmenu-velox st-velox ]}"
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2015-10-24 00:32:20 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "velox window manager";
|
|
|
|
homepage = "https://github.com/michaelforney/velox";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
maintainers = with lib.maintainers; [ ];
|
|
|
|
};
|
|
|
|
}
|