From 2c5c560b0e66a30b2e7800f6775e250d2d932224 Mon Sep 17 00:00:00 2001 From: Mihai Fufezan Date: Sat, 11 Dec 2021 01:42:26 +0200 Subject: [PATCH 1/2] helvum: 0.3.1 -> 0.3.2 Switch build method to meson. --- pkgs/applications/audio/helvum/default.nix | 64 +++++++++++++++------- 1 file changed, 45 insertions(+), 19 deletions(-) diff --git a/pkgs/applications/audio/helvum/default.nix b/pkgs/applications/audio/helvum/default.nix index 757b83cd4d57..24652f95a389 100644 --- a/pkgs/applications/audio/helvum/default.nix +++ b/pkgs/applications/audio/helvum/default.nix @@ -1,47 +1,73 @@ { lib -, fetchFromGitLab -, makeDesktopItem -, copyDesktopItems -, rustPlatform -, pkg-config , clang -, libclang +, desktop-file-utils +, fetchFromGitLab +, fetchpatch , glib , gtk4 +, libclang +, meson +, ninja , pipewire +, pkg-config +, rustPlatform +, stdenv }: -rustPlatform.buildRustPackage rec { +stdenv.mkDerivation rec { pname = "helvum"; - version = "0.3.1"; + version = "0.3.2"; src = fetchFromGitLab { domain = "gitlab.freedesktop.org"; owner = "ryuukyu"; repo = pname; rev = version; - sha256 = "sha256-f6+6Qicg5J6oWcafG4DF0HovTmF4r6yfw6p/3dJHmB4="; + sha256 = "sha256-Kt6gnMRTOVXqjAjEZKlylcGhzl52ZzPNVbJhwzLhzkM="; }; - cargoSha256 = "sha256-zGa6nAmOOrpiMr865J06Ez3L6lPL0j18/lW8lw1jPyU="; + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + name = "${pname}-${version}"; + hash = "sha256-kxJRY9GSPwnb431iYCfJdGcl5HjpFr2KkWrFDpGajp8="; + }; - nativeBuildInputs = [ clang copyDesktopItems pkg-config ]; - buildInputs = [ glib gtk4 pipewire ]; + nativeBuildInputs = [ + clang + meson + ninja + pkg-config + rustPlatform.cargoSetupHook + rustPlatform.rust.cargo + rustPlatform.rust.rustc + ]; + + buildInputs = [ + desktop-file-utils + glib + gtk4 + pipewire + ]; LIBCLANG_PATH = "${libclang.lib}/lib"; - desktopItems = makeDesktopItem { - name = "Helvum"; - exec = pname; - desktopName = "Helvum"; - genericName = "Helvum"; - categories = "AudioVideo;"; - }; + patches = [ + # enables us to use gtk4-update-icon-cache instead of gtk3 one + (fetchpatch { + url = "https://gitlab.freedesktop.org/ryuukyu/helvum/-/merge_requests/24.patch"; + sha256 = "sha256-WmI6taBL/6t587j06n0mwByQ8x0eUA5ECvGNjg2/vtk="; + }) + ]; + + prePatch = '' + patchShebangs build-aux/cargo.sh + ''; meta = with lib; { description = "A GTK patchbay for pipewire"; homepage = "https://gitlab.freedesktop.org/ryuukyu/helvum"; license = licenses.gpl3Only; maintainers = with maintainers; [ fufexan ]; + platforms = lib.platforms.linux; }; } From e81875ded2af9753de4ebee9933f787803ef6249 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Fri, 24 Dec 2021 14:06:21 +0800 Subject: [PATCH 2/2] helvum: prePatch -> postPatch --- pkgs/applications/audio/helvum/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/audio/helvum/default.nix b/pkgs/applications/audio/helvum/default.nix index 24652f95a389..30dc359731f5 100644 --- a/pkgs/applications/audio/helvum/default.nix +++ b/pkgs/applications/audio/helvum/default.nix @@ -59,7 +59,7 @@ stdenv.mkDerivation rec { }) ]; - prePatch = '' + postPatch = '' patchShebangs build-aux/cargo.sh ''; @@ -68,6 +68,6 @@ stdenv.mkDerivation rec { homepage = "https://gitlab.freedesktop.org/ryuukyu/helvum"; license = licenses.gpl3Only; maintainers = with maintainers; [ fufexan ]; - platforms = lib.platforms.linux; + platforms = platforms.linux; }; }