From 211b645d47d18a3bd307c6057a16490381fb4657 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Thu, 30 Nov 2023 10:58:45 -0300 Subject: [PATCH] libsForQt5.libopenshot-audio: refactor - finalAttrs design pattern - strictDeps --- .../0001-undef-fpret-on-aarch64-darwin.patch} | 0 .../default.nix} | 22 ++++++++++--------- pkgs/top-level/qt5-packages.nix | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) rename pkgs/applications/video/openshot-qt/{undef-fpret-on-aarch64-darwin.patch => libopenshot-audio/0001-undef-fpret-on-aarch64-darwin.patch} (100%) rename pkgs/applications/video/openshot-qt/{libopenshot-audio.nix => libopenshot-audio/default.nix} (73%) diff --git a/pkgs/applications/video/openshot-qt/undef-fpret-on-aarch64-darwin.patch b/pkgs/applications/video/openshot-qt/libopenshot-audio/0001-undef-fpret-on-aarch64-darwin.patch similarity index 100% rename from pkgs/applications/video/openshot-qt/undef-fpret-on-aarch64-darwin.patch rename to pkgs/applications/video/openshot-qt/libopenshot-audio/0001-undef-fpret-on-aarch64-darwin.patch diff --git a/pkgs/applications/video/openshot-qt/libopenshot-audio.nix b/pkgs/applications/video/openshot-qt/libopenshot-audio/default.nix similarity index 73% rename from pkgs/applications/video/openshot-qt/libopenshot-audio.nix rename to pkgs/applications/video/openshot-qt/libopenshot-audio/default.nix index 5526c8b41735..e546dc7a5786 100644 --- a/pkgs/applications/video/openshot-qt/libopenshot-audio.nix +++ b/pkgs/applications/video/openshot-qt/libopenshot-audio/default.nix @@ -19,20 +19,20 @@ , Foundation }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "libopenshot-audio"; version = "0.3.2"; src = fetchFromGitHub { owner = "OpenShot"; repo = "libopenshot-audio"; - rev = "v${version}"; - sha256 = "sha256-PLpB9sy9xehipN5S9okCHm1mPm5MaZMVaFqCBvFUiTw="; + rev = "v${finalAttrs.version}"; + hash = "sha256-PLpB9sy9xehipN5S9okCHm1mPm5MaZMVaFqCBvFUiTw="; }; patches = [ # https://forum.juce.com/t/juce-and-macos-11-arm/40285/24 - ./undef-fpret-on-aarch64-darwin.patch + ./0001-undef-fpret-on-aarch64-darwin.patch ]; nativeBuildInputs = [ @@ -58,9 +58,11 @@ stdenv.mkDerivation rec { libXrandr ]); - doCheck = false; + strictDeps = true; - meta = with lib; { + doCheck = true; + + meta = { homepage = "http://openshot.org/"; description = "High-quality sound editing library"; longDescription = '' @@ -68,8 +70,8 @@ stdenv.mkDerivation rec { high-quality editing and playback of audio, and is based on the amazing JUCE library. ''; - license = with licenses; gpl3Plus; - maintainers = with maintainers; [ AndersonTorres ]; - platforms = with platforms; unix; + license = with lib.licenses; [ gpl3Plus ]; + maintainers = with lib.maintainers; [ AndersonTorres ]; + platforms = lib.platforms.unix; }; -} +}) diff --git a/pkgs/top-level/qt5-packages.nix b/pkgs/top-level/qt5-packages.nix index b1fb263e0bb8..597ab338149f 100644 --- a/pkgs/top-level/qt5-packages.nix +++ b/pkgs/top-level/qt5-packages.nix @@ -146,7 +146,7 @@ in (noExtraAttrs (kdeFrameworks // plasmaMobileGear // plasma5 // plasma5.thirdP packagekit-qt = callPackage ../tools/package-management/packagekit/qt.nix { }; - libopenshot-audio = callPackage ../applications/video/openshot-qt/libopenshot-audio.nix { + libopenshot-audio = callPackage ../applications/video/openshot-qt/libopenshot-audio { inherit (pkgs.darwin.apple_sdk.frameworks) Accelerate AGL Cocoa Foundation; };