nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 buildNpmPackage,
5 fetchFromGitHub,
6 python3,
7 cctools,
8}:
9
10buildNpmPackage rec {
11 pname = "dl-librescore";
12 version = "0.35.29";
13
14 src = fetchFromGitHub {
15 owner = "LibreScore";
16 repo = "dl-librescore";
17 rev = "v${version}";
18 hash = "sha256-DwDlGTFdqAAsEWrhnieuaeYQ0N8COB/7b49xPJackJQ=";
19 };
20
21 npmDepsHash = "sha256-5Uc83VdqMwQaTSmzwpBh7x4IKoVPd9MYDXkDvR1fz6Q=";
22
23 # see https://github.com/LibreScore/dl-librescore/pull/32
24 # TODO can be removed with next update
25 postPatch = ''
26 substituteInPlace package-lock.json \
27 --replace 50c7a1508cd9358757c30794e14ba777e6faa8aa b4cb32eb1734a2f73ba2d92743647b1a91c0e2a8
28 '';
29
30 makeCacheWritable = true;
31
32 nativeBuildInputs = [
33 python3
34 ]
35 ++ lib.optionals stdenv.hostPlatform.isDarwin [
36 cctools
37 ];
38
39 meta = {
40 description = "Download sheet music";
41 homepage = "https://github.com/LibreScore/dl-librescore";
42 license = lib.licenses.mit;
43 mainProgram = "dl-librescore";
44 maintainers = [ ];
45 };
46}