diff --git a/pkgs/additional/sofacoustics/default.nix b/pkgs/additional/sofacoustics/default.nix index d8f1d8f16..e83212184 100644 --- a/pkgs/additional/sofacoustics/default.nix +++ b/pkgs/additional/sofacoustics/default.nix @@ -20,10 +20,10 @@ lib.makeScope newScope (self: with self; { # ''; # passthru.updateScript = nix-update-script { }; # }; - downloadSofacoustics = database: name: hash: stdenv.mkDerivation { + downloadSofacoustics = prefix: database: name: hash: stdenv.mkDerivation { name = "${database}-${name}"; src = fetchurl { - url = "https://sofacoustics.org/data/database/${database}/${name}.sofa"; + url = "${prefix}${name}.sofa"; name = "${database}-${name}"; inherit hash; }; @@ -42,7 +42,84 @@ lib.makeScope newScope (self: with self; { }; }; - widespread = lib.recurseIntoAttrs (lib.mapAttrs (downloadSofacoustics "widespread") { + listen = lib.recurseIntoAttrs (lib.mapAttrs (downloadSofacoustics "https://sofacoustics.org/data/database_sofa_0.6/listen/" "listen") { + # physical measurements made in an anechoic room, on real subjects. + # morphology of each subject can be seen on pages like: + # maybe measure your head size, and choose the closest subject? + # + # also available here, but doesn't seem to work with mpv (?) + # - + # - + # - + # + # created by: + # (python) for i in range(1002, 1060): print(f'irc_{i} = "sha256-irc_{i}";') + # (sh) ./scripts/update sofacoustics.listen + irc_1002 = "sha256-w+qp4F6fsg5ZGrR3nG+GWKa8tvDK/Rp9Ke8CTN4yJkY="; + irc_1003 = "sha256-BjjOPHTud5pkv9Q1wPS4Ns2mVeul1Ub54BwHxfa+5/U="; + irc_1004 = "sha256-wJ5udlnACbDvz3+KP2UP+hta+2b9p/NxSfihnq97EMA="; + irc_1005 = "sha256-jC/LZ6Y0WvQ0nkn3z8jJHou/Rs/VMnf/zz/DcH6Clec="; + irc_1006 = "sha256-fUxZ7uvhO8QHK/WfIGV3xb/jyvKfOFqH3HkvkXZMxRo="; + irc_1007 = "sha256-IKI0MyBL8nUupAk5Q35NTqfFqRRRIZKQ5ajoltbzuDY="; + irc_1008 = "sha256-x7/6Hlg22XKGxYbadNd4j1Bw+eiNnqQmbpOOjRO8X2c="; + irc_1009 = "sha256-IVOZLSqjc2CTCfrRRPXu42i548gjq/CEGG9nyn7SD6Q="; + # irc_1010 = null; + # irc_1011 = null; + irc_1012 = "sha256-HeoGvM2jckK3FZ/litroM6zx4d4yrXrhcnj+cguEzpc="; + irc_1013 = "sha256-HKr9cJWS9Axl8wMKdpeVeKofmlfOBX3bExAtV2INEsM="; + irc_1014 = "sha256-mu78XozpAxXbBElldEJM6yr5EMP7RmdlHTi7Jp8m1tE="; + irc_1015 = "sha256-hBx8kFHUEDunSMBtMgdLbbUtFnA3svF6x+0nmXN0ml4="; + irc_1016 = "sha256-YHYAYGQ22u73VlaJqTup5VLN8bx86b4G9zbh5Jc8ZxU="; + irc_1017 = "sha256-IE6xpwOQEp3EFSDG23SyhVPAZgc7gQvmi3A+r3QFMG4="; + irc_1018 = "sha256-3sGBTH8ekf4yxSqj4c/XPibTkcAfS48tZvxJGMAFV4c="; + # irc_1019 = null; + irc_1020 = "sha256-KWQb77gzqbdfduEyylByQmQYNqE6m/gv7i0zn/JTfUA="; + irc_1021 = "sha256-EoXQQm2doMEU3+DHSayYLmMuF9RzD7gP4lTeab0pH44="; + irc_1022 = "sha256-Tb07b9L3CW499aqpUAgruwbRkmE1r95sVgWFfnzYts0="; + irc_1023 = "sha256-BklsYScyKMhtW0c8xh3obBSu9XPBJFBj6T+JgLVz/M8="; + # irc_1024 = null; + irc_1025 = "sha256-plHH4qtkPyuMPVwS3tDblE0/A1ZkCufKpGSyYIuFGGs="; + irc_1026 = "sha256-3EhfzfWocPzlMX3x5W9/l1OxpNnmL4/xyTLnOluY66A="; + # irc_1027 = null; + irc_1028 = "sha256-ftbAOVC3V+o53so5SQHLLax3zJR3d3nWe48DEQKVJ2I="; + irc_1029 = "sha256-nVJMGceMHmPpwbj1x08lhA8bzujKv6LNQcwvuTqRFy0="; + irc_1030 = "sha256-OdwN1IeM8dOT8cEkZrTw2N47cyGDYkFXb1VHqN1j3+g="; + irc_1031 = "sha256-pq7k/2e05jmJfRZJgPPH43PIXNAMLV8Nwpa0AnwZqac="; + irc_1032 = "sha256-SIK7wkYShqNNaky7P4a1LS5Yket7e/Ol8pLvy/V5eiI="; + irc_1033 = "sha256-50z8ZFCZO2VwcAypjH8vwRLSaNUQZ797DWgNNwm1mCk="; + irc_1034 = "sha256-rnGKR4MT4nx7uMp5HoP/mtAaZhT2itT0aP37zm2WF28="; + # irc_1035 = null; + # irc_1036 = null; + irc_1037 = "sha256-sDsHxnGYznPR/PBf+GmIed0ky8i35uwWnsUiPO0684k="; + irc_1038 = "sha256-0SbkgDoMmaPpcpQaNkA1ENKv12Eg1NacuT1o2UAFx90="; + irc_1039 = "sha256-2+qDbvJ32ad87xCcvRKFsOLeSwUB3okOJGz97CIrRSQ="; + irc_1040 = "sha256-BMwbChgHfOT98HMsz1lWeoGTr1QKYC2FpU4S7YfyFtI="; + irc_1041 = "sha256-elJ/nA7dTe2yeLLUShrbL/rnZISWibEx+gl4sRHrc/E="; + irc_1042 = "sha256-6pbce7QjD5N1GR5Ng8OdaoFodb46oNDDmqeKmVLl2BQ="; + irc_1043 = "sha256-LXoj8g+05lIIj5scN9CvHqX+mtDA5S1w4eyyRJyoD70="; + irc_1044 = "sha256-V+sAEnBh3K8Lfhsbwqt5vcL3llaUuI4Tzz3DwI+IzzU="; + irc_1045 = "sha256-h8P76GMPURYX7AgCSnBkHgvjObhGDmgBNwwnnGfy1ro="; + irc_1046 = "sha256-GbKVYVkDiZWw1/MBjPgVE6EzD5hhsNAE5rd+lm7/4es="; + irc_1047 = "sha256-OX6lK4ix5hJNdopNJDY6gVzbbHXOpZ3hA/4WInOY03Q="; + irc_1048 = "sha256-3OimKncJlZBL31wIALjsKzC6PI31q8zuddYSViGfNsw="; + irc_1049 = "sha256-nBfZAZUBtm2unZp4oFIEE+lhqAttigrd9gCYLOaQwYg="; + irc_1050 = "sha256-9gzgGHXQqTLsLz2hIUTMJeVEinYP14f93FcTL4VZ1G4="; + irc_1051 = "sha256-aEOLWBRYh0t06gb4Gzukg3FfeYEwOwNigORUGmueIlw="; + irc_1052 = "sha256-bX0mvLeaSwhLjD8CzLBpgq6a4g47mmgEv9Dsc8VbRxk="; + irc_1053 = "sha256-WRJRA+oLb+jmI2G5AToWx6kFS+1viU0Lw72RLMIkda8="; + irc_1054 = "sha256-w9oclSPfHvptDImCE9xQ5yDCWF6yHynWTA4mLYqVAGo="; + irc_1055 = "sha256-E4O2p7NKUbPmCbgL4I51giKLaTPLKbMI4798VwWIThg="; + irc_1056 = "sha256-9X+v3ZEXxak5oCZVtJ+tGP2Pgg6B389LBPBbOaE2BqU="; + irc_1057 = "sha256-+fTjw+GBxv7QLAItQ4TDM0YLS6wjT1lCYoGWQ0+imsw="; + irc_1058 = "sha256-XTwWEGfIrz6qXZRCogB0YavmUZy7Kia1Z4YVtGQF+rE="; + irc_1059 = "sha256-tXjp1eeuuzCGJbsT9pLvzHPWzXk0z/s1GUFv7gkmhew="; + }); + listen-all = symlinkJoin { + name = "listen-all"; + paths = builtins.attrValues (lib.removeAttrs listen [ "recurseForDerivations" ]); + }; + + widespread = lib.recurseIntoAttrs (lib.mapAttrs (downloadSofacoustics "https://sofacoustics.org/data/database/widespread/" "widespread") { # WiDESPREaD: "A Wide Dataset of Ear Shapes and Pinna-Related Transfer Functions Generated by Random Ear Drawings" # - # -