Skip to content

Commit

Permalink
xp-pen-*: refactor, set meta.mainProgram
Browse files Browse the repository at this point in the history
  • Loading branch information
gepbird committed Oct 12, 2024
1 parent cac748f commit d8035bf
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
18 changes: 9 additions & 9 deletions pkgs/by-name/xp/xp-pen-deco-01-v2-driver/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
libusb1,
glibc,
libGL,
xorg,
makeWrapper,
qt5,
autoPatchelfHook,
Expand All @@ -19,14 +18,14 @@
let
dataDir = "var/lib/xppend1v2";
in
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "xp-pen-deco-01-v2-driver";
version = "3.4.9-231023";

src = fetchzip {
url = "https://www.xp-pen.com/download/file/id/1936/pid/440/ext/gz.html#.tar.gz";
name = "xp-pen-deco-01-v2-driver-${version}.tar.gz";
sha256 = "sha256-A/dv6DpelH0NHjlGj32tKv37S+9q3F8cYByiYlMuqLg=";
name = "xp-pen-deco-01-v2-driver-${finalAttrs.version}.tar.gz";
hash = "sha256-A/dv6DpelH0NHjlGj32tKv37S+9q3F8cYByiYlMuqLg=";
};

nativeBuildInputs = [
Expand Down Expand Up @@ -72,12 +71,13 @@ stdenv.mkDerivation rec {
--run 'if [ ! -d /${dataDir} ]; then mkdir -p /${dataDir}; cp -r '$out'/opt/conf /${dataDir}; chmod u+w -R /${dataDir}; fi'
'';

meta = with lib; {
meta = {
homepage = "https://www.xp-pen.com/product/461.html";
description = "Drivers for the XP-PEN Deco 01 v2 drawing tablet";
platforms = [ "x86_64-linux" ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
maintainers = with maintainers; [ virchau13 ];
license = licenses.unfree;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = with lib.maintainers; [ virchau13 ];
license = lib.licenses.unfree;
mainProgram = "xp-pen-deco-01-v2-driver";
};
}
})
19 changes: 12 additions & 7 deletions pkgs/by-name/xp/xp-pen-g430-driver/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
libglvnd,
}:

stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "xp-pen-g430-driver";
version = "1.2.13.1";

src =
fetchzip {
url = "https://download01.xp-pen.com/file/2020/04/Linux_Pentablet_V${version}.tar.gz(20200428).zip";
sha256 = "1r423hcpi26v82pzl59br1zw5vablikclqsy6mcqi0v5p84hfrdd";
url = "https://download01.xp-pen.com/file/2020/04/Linux_Pentablet_V${finalAttrs.version}.tar.gz(20200428).zip";
hash = "sha256-rWUHCbplg4hZNV5jymakS+3Cf8grFfqvQNuIeBkcguQ=";
}
+ /Linux_Pentablet_V1.2.13.1.tar.gz;
+ "/Linux_Pentablet_V1.2.13.1.tar.gz";

nativeBuildInputs = [
autoPatchelfHook
Expand All @@ -36,17 +36,22 @@ stdenv.mkDerivation rec {
];

installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp Pentablet_Driver $out/bin/pentablet-driver
cp config.xml $out/bin/config.xml
runHook postInstall
'';

meta = with lib; {
meta = {
homepage = "https://www.xp-pen.com/download-46.html";
description = "Driver for XP-PEN Pentablet drawing tablets";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
license = lib.licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = [ ];
mainProgram = "pentablet-driver";
};
}
})

0 comments on commit d8035bf

Please sign in to comment.