55 lines
769 B
Nix
55 lines
769 B
Nix
{ stdenv
|
|
, ruby
|
|
, makeWrapper
|
|
, pkg-config
|
|
, xorg
|
|
, rubyPackages
|
|
, gcc
|
|
, lib
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "kutu";
|
|
version = "0.1.0";
|
|
|
|
src = ./.;
|
|
|
|
nativeBuildInputs = [
|
|
pkg-config
|
|
makeWrapper
|
|
gcc
|
|
];
|
|
|
|
buildInputs = [
|
|
(ruby.withPackages (ps: [
|
|
ps.ffi
|
|
]))
|
|
xorg.libxcb
|
|
xorg.xcbutilwm
|
|
xorg.xrandr
|
|
xorg.xprop
|
|
];
|
|
|
|
buildPhase = ''
|
|
./setup.sh
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/bin
|
|
mkdir -p $out/build
|
|
mkdir -p $out/src
|
|
|
|
cp bin/kutu.rb $out/bin/kutu.rb
|
|
cp bin/kutu-run.rb $out/bin/kutu-run.rb
|
|
|
|
cp build/X-kutu.so $out/build/
|
|
cp -r src $out/src
|
|
|
|
wrapProgram $out/bin/kutu.rb \
|
|
--prefix PATH : ${lib.makeBinPath [
|
|
xorg.xrandr
|
|
xorg.xprop
|
|
]}
|
|
'';
|
|
}
|