From ed965e408a33633df351edbc6e1f4f23909d214b Mon Sep 17 00:00:00 2001 From: Simon Bruder Date: Sat, 15 May 2021 14:05:10 +0200 Subject: [PATCH] mpvScripts.pitchcontrol: init at 0.2.0 --- flake.nix | 13 ++++++++++-- mpv-scripts/pitchcontrol/default.nix | 31 ++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 mpv-scripts/pitchcontrol/default.nix diff --git a/flake.nix b/flake.nix index cd9eb97..bd05152 100644 --- a/flake.nix +++ b/flake.nix @@ -28,6 +28,10 @@ deemix = callPythonPackage ./deemix { }; + mpvScripts = prev.mpvScripts // { + pitchcontrol = callPackage ./mpv-scripts/pitchcontrol { }; + }; + textidote = callPackage ./textidote { }; unxwb = callPackage ./unxwb { }; @@ -55,14 +59,19 @@ packages = lib.filterAttrs (n: v: lib.elem system v.meta.platforms) - { + (flake-utils.lib.flattenTree { inherit (pkgs) cyanrip deemix textidote unxwb VisiCut; - }; + + mpvScripts = lib.recurseIntoAttrs { + inherit (pkgs.mpvScripts) + pitchcontrol; + }; + }); # My hydra only has x86_64-linux builders hydraJobs = diff --git a/mpv-scripts/pitchcontrol/default.nix b/mpv-scripts/pitchcontrol/default.nix new file mode 100644 index 0000000..c7b200f --- /dev/null +++ b/mpv-scripts/pitchcontrol/default.nix @@ -0,0 +1,31 @@ +{ lib, stdenv, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "pitchcontrol"; + version = "0.2.0"; + + src = fetchFromGitHub { + owner = "FichteFoll"; + repo = "mpv-scripts"; + rev = "784dbafcd26455dde22175a5668c621defc14cab"; + sha256 = "057vslm6ybf0b0a5s39m049pcvb204hqf6jx1640ya2r6sm335g8"; + }; + + dontBuild = true; + + installPhase = '' + runHook preInstall + install -D ${passthru.scriptName} $out/share/mpv/scripts/${passthru.scriptName} + runHook postInstall + ''; + + passthru.scriptName = "${pname}.lua"; + + meta = with lib; { + description = "An mpv script to change the pitch of audio with keybindings"; + homepage = "https://github.com/FichteFoll/mpv-scripts"; + license = licenses.isc; + platforms = platforms.all; + maintainers = with maintainers; [ sbruder ]; + }; +}