Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

headphones-toolbox: 0.0.5 -> 0.0.7 (#393404)

authored by Peder Bergebakken Sundt and committed by GitHub 580fa9dd a369fdd2

+42 -32
+42 -32
pkgs/by-name/he/headphones-toolbox/package.nix
··· 1 1 { 2 + cargo-tauri, 3 + fetchFromGitHub, 4 + fetchYarnDeps, 2 5 lib, 3 - stdenv, 4 - dpkg, 5 - fetchurl, 6 - autoPatchelfHook, 7 - webkitgtk_4_0, 6 + nix-update-script, 7 + nodejs, 8 + pkg-config, 9 + rustPlatform, 10 + webkitgtk_4_1, 11 + wrapGAppsHook3, 12 + yarnConfigHook, 8 13 }: 9 14 10 - stdenv.mkDerivation (finalAttrs: { 11 - name = "headphones-toolbox"; 12 - version = "0.0.5"; 15 + rustPlatform.buildRustPackage (rec { 16 + pname = "headphones-toolbox"; 17 + version = "0.0.7"; 18 + tag = "test-tauri-v2-2"; 13 19 14 - src = fetchurl { 15 - url = "https://github.com/ploopyco/headphones-toolbox/releases/download/app-v${finalAttrs.version}/ploopy-headphones-toolbox_${finalAttrs.version}_amd64.deb"; 16 - hash = "sha256-lWjmpybGcL3sbBng8zCTUtwYhlrQ6cCrKkhiu+g9MsE="; 20 + src = fetchFromGitHub { 21 + owner = "george-norton"; 22 + repo = "headphones-toolbox"; 23 + rev = "${tag}"; 24 + hash = "sha256-X2HTEPxvBzbhfN1vqQVk81Qk1Z+EV+7/SpjZrDHv+fM="; 17 25 }; 18 26 19 - nativeBuildInputs = [ 20 - dpkg 21 - autoPatchelfHook 22 - ]; 27 + offlineCache = fetchYarnDeps { 28 + yarnLock = "${src}/yarn.lock"; 29 + hash = "sha256-Ln5U0KKsKm6ZLViZIWfBiBjm/mQNEIxaj4nTR55PcRg="; 30 + }; 23 31 24 - buildInputs = [ 25 - webkitgtk_4_0 32 + useFetchCargoVendor = true; 33 + cargoHash = "sha256-VgCxYYNBV45sTzouS5NE7nOUViPj0gJO7DSKlJSAT4U="; 34 + cargoRoot = "src-tauri"; 35 + buildAndTestSubdir = cargoRoot; 36 + 37 + nativeBuildInputs = [ 38 + cargo-tauri.hook 39 + nodejs 40 + pkg-config 41 + wrapGAppsHook3 42 + yarnConfigHook 26 43 ]; 27 44 28 - installPhase = '' 29 - runHook preInstall 45 + buildInputs = [ webkitgtk_4_1 ]; 30 46 31 - mkdir -p $out/bin 32 - mv usr/bin $out 33 - mv usr/lib $out 34 - mv usr/share $out 47 + passthru.updateScript = nix-update-script { }; 35 48 36 - runHook postInstall 37 - ''; 38 - 39 - meta = with lib; { 49 + meta = { 40 50 description = "UI for configuring Ploopy Headphones"; 41 51 homepage = "https://github.com/ploopyco/headphones-toolbox/"; 42 - maintainers = with maintainers; [ 52 + license = lib.licenses.gpl3Only; 53 + mainProgram = "headphones-toolbox"; 54 + maintainers = with lib.maintainers; [ 55 + flacks 43 56 knarkzel 44 57 nyabinary 45 58 ]; 46 - license = licenses.gpl3Only; 47 - sourceProvenance = with sourceTypes; [ binaryNativeCode ]; 48 - platforms = [ "x86_64-linux" ]; 49 - mainProgram = "headphones-toolbox"; 59 + platforms = lib.platforms.linux; 50 60 }; 51 61 })