From ff444175b3a48994e280e4516c2b32a5f7cbe5fc Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 1 Oct 2018 23:12:46 +0200 Subject: [PATCH 1/2] pythonPackages.peewee: init at 3.7.1 --- .../python-modules/peewee/default.nix | 46 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/peewee/default.nix diff --git a/pkgs/development/python-modules/peewee/default.nix b/pkgs/development/python-modules/peewee/default.nix new file mode 100644 index 000000000000..09ee7dc92eaa --- /dev/null +++ b/pkgs/development/python-modules/peewee/default.nix @@ -0,0 +1,46 @@ +{ stdenv, lib, buildPythonPackage, fetchFromGitHub +, sqlite +, cython +, apsw +, flask +, withPostgres ? false, psycopg2 +, withMysql ? false, mysql-connector +}: + +buildPythonPackage rec { + + pname = "peewee"; + version = "3.7.1"; + + # pypi release does not provide tests + src = fetchFromGitHub { + owner = "coleifer"; + repo = pname; + rev = version; + sha256 = "0chn8mknzvkmcmysy2291hanf0vg3sfzqgfc5hqx1nnrd6qkiq8r"; + }; + + + checkInputs = [ flask ]; + + checkPhase = '' + rm -r playhouse # avoid using the folder in the cwd + python runtests.py + ''; + + buildInputs = [ + sqlite + cython # compile speedups + ]; + + propagatedBuildInputs = [ + apsw # sqlite performance improvement + ] ++ (lib.optional withPostgres psycopg2) + ++ (lib.optional withMysql mysql-connector); + + meta = with stdenv.lib;{ + description = "a small, expressive orm"; + homepage = http://peewee-orm.com; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2da2892f9beb..ee1bee109a3f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3666,6 +3666,8 @@ in { }; }; + peewee = callPackage ../development/python-modules/peewee { }; + peppercorn = buildPythonPackage rec { name = "peppercorn-0.5"; From f20899dd41f8fac6028a6a811da068e2b3a1460e Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 2 Oct 2018 00:17:42 +0200 Subject: [PATCH 2/2] cozy: init at 0.6.3 --- .../audio/cozy-audiobooks/default.nix | 85 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 87 insertions(+) create mode 100644 pkgs/applications/audio/cozy-audiobooks/default.nix diff --git a/pkgs/applications/audio/cozy-audiobooks/default.nix b/pkgs/applications/audio/cozy-audiobooks/default.nix new file mode 100644 index 000000000000..f0a7280b038d --- /dev/null +++ b/pkgs/applications/audio/cozy-audiobooks/default.nix @@ -0,0 +1,85 @@ +{ stdenv, fetchFromGitHub +, ninja +, boost +, meson +, pkgconfig +, wrapGAppsHook +, appstream-glib +, desktop-file-utils +, gtk3 +, gst_all_1 +, gobjectIntrospection +, python3Packages +, file +, cairo +, sqlite +, gettext +, gnome3 +}: + +python3Packages.buildPythonApplication rec { + + format = "other"; # no setup.py + + name = "cozy-${version}"; + version = "0.6.3"; + + src = fetchFromGitHub { + owner = "geigi"; + repo = "cozy"; + rev = version; + sha256 = "0xs6vzvmx0nvybpjqlrngggv2x8b2ky073slh760iirs1p0dclbc"; + }; + + nativeBuildInputs = [ + meson ninja pkgconfig + wrapGAppsHook + appstream-glib + desktop-file-utils + gobjectIntrospection + ]; + + buildInputs = [ + gtk3 + cairo + gettext + gnome3.defaultIconTheme + ] ++ (with gst_all_1; [ + gstreamer + gst-plugins-good + gst-plugins-ugly + gst-plugins-base + ]); + + propagatedBuildInputs = with python3Packages; [ + gst-python + pygobject3 + dbus-python + mutagen + peewee + magic + ]; + + postPatch = '' + chmod +x data/meson_post_install.py + patchShebangs data/meson_post_install.py + substituteInPlace cozy/magic/magic.py --replace "ctypes.util.find_library('magic')" "'${file}/lib/libmagic${stdenv.hostPlatform.extensions.sharedLibrary}'" + ''; + + checkPhase = '' + ninja test + ''; + + postInstall = '' + ln -s $out/bin/com.github.geigi.cozy $out/bin/cozy + ''; + + meta = with stdenv.lib; { + description = '' + A modern audio book player for Linux using GTK+ 3 + ''; + homepage = https://cozy.geigi.de/; + maintainers = [ maintainers.makefu ]; + license = licenses.gpl3; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 23b2b7ac91b0..2c118561c8b7 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -653,6 +653,8 @@ with pkgs; chkcrontab = callPackage ../tools/admin/chkcrontab { }; + cozy = callPackage ../applications/audio/cozy-audiobooks { }; + djmount = callPackage ../tools/filesystems/djmount { }; dgsh = callPackage ../shells/dgsh { };