Compare commits
5 Commits
3b8f90ed3a
...
b5bb0c3e80
Author | SHA1 | Date |
---|---|---|
Simon Bruder | b5bb0c3e80 | |
Simon Bruder | ac29bf917a | |
Simon Bruder | 5f1bdf496a | |
Simon Bruder | edd6c4392d | |
Simon Bruder | 9c024a88f2 |
|
@ -12,6 +12,8 @@ rec {
|
||||||
|
|
||||||
netbox-topology-views = callPythonPackage ./python-modules/netbox-topology-views { };
|
netbox-topology-views = callPythonPackage ./python-modules/netbox-topology-views { };
|
||||||
|
|
||||||
|
nmslib = callPythonPackage ./python-modules/nmslib { };
|
||||||
|
|
||||||
prefixed = callPythonPackage ./python-modules/prefixed { };
|
prefixed = callPythonPackage ./python-modules/prefixed { };
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@ -31,6 +33,8 @@ rec {
|
||||||
|
|
||||||
linuxmotehook2 = callPackage ./linuxmotehook2 { };
|
linuxmotehook2 = callPackage ./linuxmotehook2 { };
|
||||||
|
|
||||||
|
listenbrainz-content-resolver = callPythonPackage ./listenbrainz-content-resolver { };
|
||||||
|
|
||||||
mpvScripts = prev.mpvScripts // {
|
mpvScripts = prev.mpvScripts // {
|
||||||
pitchcontrol = callPackage ./mpv-scripts/pitchcontrol { };
|
pitchcontrol = callPackage ./mpv-scripts/pitchcontrol { };
|
||||||
};
|
};
|
||||||
|
|
|
@ -59,6 +59,7 @@
|
||||||
gust_tools
|
gust_tools
|
||||||
hcloud_exporter
|
hcloud_exporter
|
||||||
linuxmotehook2
|
linuxmotehook2
|
||||||
|
listenbrainz-content-resolver
|
||||||
netstick
|
netstick
|
||||||
nsz
|
nsz
|
||||||
playgsf
|
playgsf
|
||||||
|
|
|
@ -0,0 +1,86 @@
|
||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchFromGitHub
|
||||||
|
, click
|
||||||
|
, mutagen
|
||||||
|
, nmslib
|
||||||
|
, peewee
|
||||||
|
, regex
|
||||||
|
, scikit-learn
|
||||||
|
, unidecode
|
||||||
|
, setuptools-scm
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
lb_matching_tools = buildPythonPackage rec {
|
||||||
|
pname = "listenbrainz-matching-tools";
|
||||||
|
# ensure this matches ListenBrainz-Content-Resolver’s requirements.txt entry
|
||||||
|
version = "2023-07-19.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "metabrainz";
|
||||||
|
repo = pname;
|
||||||
|
rev = "v-${version}";
|
||||||
|
sha256 = "sha256-SOUNw1kmXm8j7iZAROf+pVJao5eFjgNmgrtYMO09upA=";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
regex
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
setuptools-scm
|
||||||
|
];
|
||||||
|
|
||||||
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "ListenBrainz-Content-Resolver";
|
||||||
|
version = "unstable-2023-10-03";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "metabrainz";
|
||||||
|
repo = pname;
|
||||||
|
rev = "6caa43df1d17a974ae27a91f1aaf663952cf0ed9";
|
||||||
|
sha256 = "sha256-m11buP7AhpLXmIPK9z3r3Gtr8L6A5MAt+SyuIT5bK9Q=";
|
||||||
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
# Make model discoverable by setuptools’ find_packages
|
||||||
|
touch lb_content_resolver/model/__init__.py
|
||||||
|
|
||||||
|
# pythonRelaxDepsHook does not work when this packages’ version is set to unstable-YYYY-MM-DD
|
||||||
|
sed -i setup.py -e 's/"\([^=]*\)==[^"]*"/"\1"/g'
|
||||||
|
'';
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
click
|
||||||
|
lb_matching_tools
|
||||||
|
mutagen
|
||||||
|
nmslib
|
||||||
|
peewee
|
||||||
|
regex
|
||||||
|
scikit-learn
|
||||||
|
unidecode
|
||||||
|
];
|
||||||
|
nativeBuildInputs = [
|
||||||
|
setuptools-scm
|
||||||
|
];
|
||||||
|
|
||||||
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||||
|
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp $src/resolve.py $out/bin/lb-content-resolver
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Resolver for ListenBrainz playlists from JSPF to local playlists";
|
||||||
|
homepage = "https://github.com/metabrainz/listenbrainz-content-resolver";
|
||||||
|
license = licenses.gpl2Only;
|
||||||
|
maintainers = with maintainers; [ sbruder ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,41 @@
|
||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, fetchpatch
|
||||||
|
, numpy
|
||||||
|
, psutil
|
||||||
|
, pybind11
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "nmslib";
|
||||||
|
version = "2.1.1";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "sha256-lxKUp3ZvkcaX1jyIyK3aR5epRDRsxTWiFzk/QWehnCA=";
|
||||||
|
};
|
||||||
|
|
||||||
|
patchFlags = [ "-p2" ];
|
||||||
|
patches = [
|
||||||
|
# Fix import on newer versions of pybind11 (https://github.com/nmslib/nmslib/pull/488)
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/nmslib/nmslib/commit/574ecd54c157d13aecc03033311be261c91a45ec.patch";
|
||||||
|
sha256 = "sha256-R/y6BbnZRe7VM5XCbes6Z5A5N66r+8SCA2Hy6K301IM=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
numpy
|
||||||
|
psutil
|
||||||
|
pybind11
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "An efficient similarity search library and a toolkit for evaluation of their methods";
|
||||||
|
homepage = "https://github.com/nmslib/nmslib";
|
||||||
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [ sbruder ];
|
||||||
|
platforms = platforms.all;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue