about summary refs log tree commit diff
path: root/pkgs/applications/misc/obinskit
diff options
context:
space:
mode:
authorBenedict Aas <x+g@shou.io>2019-10-16 20:58:57 +0100
committerJon <jonringer@users.noreply.github.com>2020-03-14 15:29:56 -0700
commit51fa3d374ac38b1587407764f9317fe85af4a172 (patch)
tree8b4520e61ff048c3ca68f626756dbe0d62a1b207 /pkgs/applications/misc/obinskit
parente539eb93f8376193083f69a1dcf55b8b8b9a9d61 (diff)
downloadnixlib-51fa3d374ac38b1587407764f9317fe85af4a172.tar
nixlib-51fa3d374ac38b1587407764f9317fe85af4a172.tar.gz
nixlib-51fa3d374ac38b1587407764f9317fe85af4a172.tar.bz2
nixlib-51fa3d374ac38b1587407764f9317fe85af4a172.tar.lz
nixlib-51fa3d374ac38b1587407764f9317fe85af4a172.tar.xz
nixlib-51fa3d374ac38b1587407764f9317fe85af4a172.tar.zst
nixlib-51fa3d374ac38b1587407764f9317fe85af4a172.zip
obinskit: init at 1.1.1
This is the configuration software for the enthusiast Anne Pro mechanical
keyboard, used to update the firmware, change keyboard settings, clear
Bluetooth connections from the device, set up backlighting colours, and so
forth.
Diffstat (limited to 'pkgs/applications/misc/obinskit')
-rw-r--r--pkgs/applications/misc/obinskit/default.nix83
1 files changed, 83 insertions, 0 deletions
diff --git a/pkgs/applications/misc/obinskit/default.nix b/pkgs/applications/misc/obinskit/default.nix
new file mode 100644
index 000000000000..ff09500c43a5
--- /dev/null
+++ b/pkgs/applications/misc/obinskit/default.nix
@@ -0,0 +1,83 @@
+{ lib
+, stdenv
+, fetchurl
+, xorg
+, libxkbcommon
+, systemd
+, gcc-unwrapped
+, electron_3
+, wrapGAppsHook
+, makeDesktopItem
+}:
+
+let
+  libPath = lib.makeLibraryPath [
+    libxkbcommon
+    xorg.libXt
+    systemd.lib
+    stdenv.cc.cc.lib
+  ];
+
+  desktopItem = makeDesktopItem rec {
+    name = "Obinskit";
+    exec = "obinskit";
+    icon = "obinskit.png";
+    desktopName = "Obinskit";
+    genericName = "Obinskit keyboard configurator";
+    categories = "Utility";
+  };
+
+in stdenv.mkDerivation rec {
+  pname = "obinskit";
+  version = "1.1.1";
+
+  src = fetchurl {
+    url = "http://releases.obins.net/occ/linux/tar/ObinsKit_${version}_x64.tar.gz";
+    sha256 = "0052m4msslc4k9g3i5vl933cz5q2n1affxhnm433w4apajr8h28h";
+  };
+
+  unpackPhase = "tar -xzf $src";
+
+  sourceRoot = "ObinsKit_${version}_x64";
+
+  nativeBuildInputs = [ wrapGAppsHook ];
+
+  dontConfigure = true;
+  dontBuild = true;
+
+  installPhase = ''
+    mkdir -p $out/opt/obinskit
+    install icudtl.dat $out/opt/obinskit/
+    install natives_blob.bin $out/opt/obinskit/
+    install v8_context_snapshot.bin $out/opt/obinskit/
+    install blink_image_resources_200_percent.pak $out/opt/obinskit/
+    install content_resources_200_percent.pak $out/opt/obinskit/
+    install content_shell.pak $out/opt/obinskit/
+    install ui_resources_200_percent.pak $out/opt/obinskit/
+    install views_resources_200_percent.pak $out/opt/obinskit/
+    cp -r resources $out/opt/obinskit/
+    cp -r locales $out/opt/obinskit/
+
+    mkdir -p $out/bin
+    ln -s ${electron_3}/bin/electron $out/bin/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
+  '';
+
+  preFixup = ''
+    gappsWrapperArgs+=(
+      --add-flags $out/opt/obinskit/resources/app.asar
+      --prefix LD_LIBRARY_PATH : "${libPath}"
+    )
+  '';
+
+  meta = with lib; {
+    description = "Graphical configurator for Anne Pro and Anne Pro II keyboards";
+    homepage = "http://en.obins.net/obinskit/";
+    license = licenses.unfree;
+    maintainers = [ maintainers.shou ];
+    platforms = [ "x86_64-linux" ];
+  };
+}