bazecor: init at 1.3.6

Co-authored-by: Gabriel Volpe <volpegabriel@gmail.com>

amesgen 4f2eaf6a 038b2922

+62
+4
pkgs/applications/misc/bazecor/10-dygma.rules
··· 1 + SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2201", MODE="0666" 2 + SUBSYSTEMS=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="2200", MODE="0666" 3 + SUBSYSTEMS=="usb", ATTRS{idVendor}=="35ef", MODE="0666" 4 + KERNEL=="hidraw*", ATTRS{idVendor}=="35ef", MODE="0666"
+56
pkgs/applications/misc/bazecor/default.nix
··· 1 + { lib 2 + , appimageTools 3 + , fetchurl 4 + }: 5 + 6 + appimageTools.wrapAppImage rec { 7 + pname = "bazecor"; 8 + version = "1.3.6"; 9 + 10 + src = appimageTools.extract { 11 + inherit pname version; 12 + src = fetchurl { 13 + url = "https://github.com/Dygmalab/Bazecor/releases/download/v.${version}/Bazecor-${version}-x64.AppImage"; 14 + hash = "sha256-Mz7T/AAlyfMzdfy/ZV4AEP3ClTolwr2pPzkSCPL66/w="; 15 + }; 16 + 17 + # Workaround for https://github.com/Dygmalab/Bazecor/issues/370 18 + postExtract = '' 19 + substituteInPlace \ 20 + $out/usr/lib/bazecor/resources/app/.webpack/main/index.js \ 21 + --replace \ 22 + 'checkUdev=()=>{try{if(c.default.existsSync(f))return c.default.readFileSync(f,"utf-8").trim()===l.trim()}catch(e){console.error(e)}return!1}' \ 23 + 'checkUdev=()=>{return 1}' 24 + ''; 25 + }; 26 + 27 + # also make sure to update the udev rules in ./10-dygma.rules; most recently 28 + # taken from 29 + # https://github.com/Dygmalab/Bazecor/blob/v1.3.6/src/main/utils/udev.ts#L6 30 + 31 + extraPkgs = p: (appimageTools.defaultFhsEnvArgs.multiPkgs p) ++ [ 32 + p.glib 33 + ]; 34 + 35 + # Also expose the udev rules here, so it can be used as: 36 + # services.udev.packages = [ pkgs.bazecor ]; 37 + # to allow non-root modifications to the keyboards. 38 + 39 + extraInstallCommands = '' 40 + mv $out/bin/bazecor-* $out/bin/bazecor 41 + 42 + mkdir -p $out/lib/udev/rules.d 43 + ln -s --target-directory=$out/lib/udev/rules.d ${./10-dygma.rules} 44 + ''; 45 + 46 + meta = { 47 + description = "Graphical configurator for Dygma Products"; 48 + homepage = "https://github.com/Dygmalab/Bazecor"; 49 + changelog = "https://github.com/Dygmalab/Bazecor/releases/tag/v${version}"; 50 + sourceProvenance = [ lib.sourceTypes.binaryNativeCode ]; 51 + license = lib.licenses.gpl3Only; 52 + maintainers = with lib.maintainers; [ amesgen ]; 53 + platforms = [ "x86_64-linux" ]; 54 + mainProgram = "bazecor"; 55 + }; 56 + }
+2
pkgs/top-level/all-packages.nix
··· 342 342 343 343 bakelite = callPackage ../tools/backup/bakelite { }; 344 344 345 + bazecor = callPackage ../applications/misc/bazecor { }; 346 + 345 347 bearer = callPackage ../development/tools/bearer { }; 346 348 347 349 benthos = callPackage ../development/tools/benthos { };