From 8c9f272219be1a3c15a3929ca526675e0b323996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 19 Aug 2023 13:31:31 -0700 Subject: [PATCH] dl-librescore: init at 0.34.47 --- pkgs/tools/audio/dl-librescore/default.nix | 44 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 46 insertions(+) create mode 100644 pkgs/tools/audio/dl-librescore/default.nix diff --git a/pkgs/tools/audio/dl-librescore/default.nix b/pkgs/tools/audio/dl-librescore/default.nix new file mode 100644 index 000000000000..5e8306f21228 --- /dev/null +++ b/pkgs/tools/audio/dl-librescore/default.nix @@ -0,0 +1,44 @@ +{ lib +, stdenv +, buildNpmPackage +, fetchFromGitHub +, python3 +, darwin +}: + +buildNpmPackage rec { + pname = "dl-librescore"; + version = "0.34.47"; + + src = fetchFromGitHub { + owner = "LibreScore"; + repo = "dl-librescore"; + rev = "v${version}"; + hash = "sha256-yXreyQiIKmZEw2HcpnCW4TxCTHzdq+KuPSlFPFZy2oU="; + }; + + npmDepsHash = "sha256-qKu7xViApKg/4EubS4tsZEtNoW62rpC4e6xmBugSkek="; + + # see https://github.com/LibreScore/dl-librescore/pull/32 + # TODO can be removed with next update + postPatch = '' + substituteInPlace package-lock.json \ + --replace 50c7a1508cd9358757c30794e14ba777e6faa8aa b4cb32eb1734a2f73ba2d92743647b1a91c0e2a8 + ''; + + makeCacheWritable = true; + + nativeBuildInputs = [ + python3 + ] ++ lib.optionals stdenv.isDarwin [ + darwin.cctools + ]; + + meta = { + description = "Download sheet music"; + homepage = "https://github.com/LibreScore/dl-librescore"; + license = lib.licenses.mit; + mainProgram = "dl-librescore"; + maintainers = with lib.maintainers; [ ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4faf66e946a4..0d4b7eb99363 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3670,6 +3670,8 @@ with pkgs; dkimpy = with python3Packages; toPythonApplication dkimpy; + dl-librescore = callPackage ../tools/audio/dl-librescore { }; + dontgo403 = callPackage ../tools/security/dontgo403 { }; dpt-rp1-py = callPackage ../tools/misc/dpt-rp1-py { };