2020-04-27 21:23:05 +01:00
|
|
|
{ stdenv
|
2020-08-12 19:11:02 +01:00
|
|
|
, lib
|
2019-10-16 20:58:57 +01:00
|
|
|
, fetchurl
|
|
|
|
, libxkbcommon
|
|
|
|
, systemd
|
2020-04-27 21:23:05 +01:00
|
|
|
, xorg
|
2019-10-16 20:58:57 +01:00
|
|
|
, electron_3
|
2020-04-27 21:23:05 +01:00
|
|
|
, makeWrapper
|
2019-10-16 20:58:57 +01:00
|
|
|
, makeDesktopItem
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
desktopItem = makeDesktopItem rec {
|
|
|
|
name = "Obinskit";
|
|
|
|
exec = "obinskit";
|
2020-04-27 21:23:05 +01:00
|
|
|
icon = "obinskit";
|
2019-10-16 20:58:57 +01:00
|
|
|
desktopName = "Obinskit";
|
|
|
|
genericName = "Obinskit keyboard configurator";
|
|
|
|
categories = "Utility";
|
|
|
|
};
|
2020-05-22 17:25:35 +01:00
|
|
|
electron = electron_3;
|
2020-04-27 21:23:05 +01:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2019-10-16 20:58:57 +01:00
|
|
|
pname = "obinskit";
|
2020-04-06 07:52:30 +01:00
|
|
|
version = "1.1.4";
|
2019-10-16 20:58:57 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://releases.obins.net/occ/linux/tar/ObinsKit_${version}_x64.tar.gz";
|
2020-04-06 07:52:30 +01:00
|
|
|
sha256 = "0q422rmfn4k4ww1qlgrwdmxz4l10dxkd6piynbcw5cr4i5icnh2l";
|
2019-10-16 20:58:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
unpackPhase = "tar -xzf $src";
|
|
|
|
|
|
|
|
sourceRoot = "ObinsKit_${version}_x64";
|
|
|
|
|
2020-04-27 21:23:05 +01:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2019-10-16 20:58:57 +01:00
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/opt/obinskit
|
2020-04-27 21:23:05 +01:00
|
|
|
|
2019-10-16 20:58:57 +01:00
|
|
|
cp -r resources $out/opt/obinskit/
|
|
|
|
cp -r locales $out/opt/obinskit/
|
|
|
|
|
|
|
|
mkdir -p $out/share/{applications,pixmaps}
|
|
|
|
install resources/icons/tray-darwin@2x.png $out/share/pixmaps/obinskit.png
|
|
|
|
ln -s ${desktopItem}/share/applications/* $out/share/applications
|
|
|
|
'';
|
|
|
|
|
2020-04-27 21:23:05 +01:00
|
|
|
postFixup = ''
|
2020-05-22 17:25:35 +01:00
|
|
|
makeWrapper ${electron}/bin/electron $out/bin/${pname} \
|
2020-04-27 21:23:05 +01:00
|
|
|
--add-flags $out/opt/obinskit/resources/app.asar \
|
2021-01-15 05:42:41 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc.lib libxkbcommon (lib.getLib systemd) xorg.libXt ]}"
|
2019-10-16 20:58:57 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-10-16 20:58:57 +01:00
|
|
|
description = "Graphical configurator for Anne Pro and Anne Pro II keyboards";
|
2020-04-27 21:23:05 +01:00
|
|
|
homepage = "http://en.obins.net/obinskit/"; # https is broken
|
2019-10-16 20:58:57 +01:00
|
|
|
license = licenses.unfree;
|
2020-04-27 21:23:05 +01:00
|
|
|
maintainers = with maintainers; [ shou ];
|
2019-10-16 20:58:57 +01:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|