2020-04-27 20:23:05 +00:00
|
|
|
{ stdenv
|
2020-08-12 18:11:02 +00:00
|
|
|
, lib
|
2019-10-16 19:58:57 +00:00
|
|
|
, fetchurl
|
|
|
|
, libxkbcommon
|
|
|
|
, systemd
|
2020-04-27 20:23:05 +00:00
|
|
|
, xorg
|
2022-01-06 08:14:44 +00:00
|
|
|
, electron_13
|
2020-04-27 20:23:05 +00:00
|
|
|
, makeWrapper
|
2019-10-16 19:58:57 +00:00
|
|
|
, makeDesktopItem
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
desktopItem = makeDesktopItem rec {
|
|
|
|
name = "Obinskit";
|
|
|
|
exec = "obinskit";
|
2020-04-27 20:23:05 +00:00
|
|
|
icon = "obinskit";
|
2019-10-16 19:58:57 +00:00
|
|
|
desktopName = "Obinskit";
|
|
|
|
genericName = "Obinskit keyboard configurator";
|
2022-02-22 14:56:15 +00:00
|
|
|
categories = [ "Utility" ];
|
2019-10-16 19:58:57 +00:00
|
|
|
};
|
2022-01-06 08:14:44 +00:00
|
|
|
electron = electron_13;
|
2020-04-27 20:23:05 +00:00
|
|
|
in
|
|
|
|
stdenv.mkDerivation rec {
|
2019-10-16 19:58:57 +00:00
|
|
|
pname = "obinskit";
|
2022-01-06 08:14:44 +00:00
|
|
|
version = "1.2.11";
|
2019-10-16 19:58:57 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-01-06 08:14:44 +00:00
|
|
|
url = "https://s3.hexcore.xyz/occ/linux/tar/ObinsKit_${version}_x64.tar.gz";
|
|
|
|
sha256 = "1kcn41wmwcx6q70spa9a1qh7wfrj1sk4v4i58lbnf9kc6vasw41a";
|
2019-10-16 19:58:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
unpackPhase = "tar -xzf $src";
|
|
|
|
|
|
|
|
sourceRoot = "ObinsKit_${version}_x64";
|
|
|
|
|
2020-04-27 20:23:05 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2019-10-16 19:58:57 +00:00
|
|
|
|
|
|
|
dontConfigure = true;
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/opt/obinskit
|
2020-04-27 20:23:05 +00:00
|
|
|
|
2019-10-16 19:58:57 +00: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 20:23:05 +00:00
|
|
|
postFixup = ''
|
2020-05-22 16:25:35 +00:00
|
|
|
makeWrapper ${electron}/bin/electron $out/bin/${pname} \
|
2020-04-27 20:23:05 +00:00
|
|
|
--add-flags $out/opt/obinskit/resources/app.asar \
|
2021-08-30 13:04:12 +00:00
|
|
|
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc.lib libxkbcommon (lib.getLib systemd) xorg.libXt xorg.libXtst ]}"
|
2019-10-16 19:58:57 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2019-10-16 19:58:57 +00:00
|
|
|
description = "Graphical configurator for Anne Pro and Anne Pro II keyboards";
|
2021-08-30 13:04:12 +00:00
|
|
|
homepage = "https://www.hexcore.xyz/obinskit";
|
2019-10-16 19:58:57 +00:00
|
|
|
license = licenses.unfree;
|
2020-04-27 20:23:05 +00:00
|
|
|
maintainers = with maintainers; [ shou ];
|
2019-10-16 19:58:57 +00:00
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|