From a61dbb6c5a7812566469a89ccd22074412ca3172 Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Sat, 14 Nov 2020 22:24:02 +0700 Subject: [PATCH 1/2] python-frontmatter: init at 0.5.0 --- .../python-frontmatter/default.nix | 30 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/python-modules/python-frontmatter/default.nix diff --git a/pkgs/development/python-modules/python-frontmatter/default.nix b/pkgs/development/python-modules/python-frontmatter/default.nix new file mode 100644 index 00000000000..8edd8755667 --- /dev/null +++ b/pkgs/development/python-modules/python-frontmatter/default.nix @@ -0,0 +1,30 @@ +{ stdenv, lib, fetchFromGitHub, python3Packages }: + +python3Packages.buildPythonPackage rec { + pname = "python-frontmatter"; + version = "0.5.0"; + + src = fetchFromGitHub { + owner = "eyeseast"; + repo = pname; + rev = "v${version}"; + sha256 = "1iki3rcbg7zs93m3mgqzncybqgdcch25qpwy84iz96qq8pipfs6g"; + }; + + propagatedBuildInputs = with python3Packages; [ + pyyaml + six + ]; + + checkInputs = with python3Packages; [ + pytest + ]; + + meta = with stdenv.lib; { + homepage = "https://github.com/eyeseast/python-frontmatter"; + description = "Parse and manage posts with YAML (or other) frontmatter"; + license = licenses.mit; + maintainers = with maintainers; [ siraben ]; + platforms = lib.platforms.unix; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7ee90734ecb..6f2daeefb75 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5848,6 +5848,8 @@ in { python-forecastio = callPackage ../development/python-modules/python-forecastio { }; + python-frontmatter = callPackage ../development/python-modules/python-frontmatter { }; + python-gitlab = callPackage ../development/python-modules/python-gitlab { }; python-gnupg = callPackage ../development/python-modules/python-gnupg { }; From 53a6805044c9ee961fa147a38e67ec880be72c71 Mon Sep 17 00:00:00 2001 From: Ben Siraphob Date: Sat, 14 Nov 2020 22:24:32 +0700 Subject: [PATCH 2/2] archivy: init at 0.8.5 --- pkgs/applications/misc/archivy/default.nix | 57 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 59 insertions(+) create mode 100644 pkgs/applications/misc/archivy/default.nix diff --git a/pkgs/applications/misc/archivy/default.nix b/pkgs/applications/misc/archivy/default.nix new file mode 100644 index 00000000000..d2fa48cd234 --- /dev/null +++ b/pkgs/applications/misc/archivy/default.nix @@ -0,0 +1,57 @@ +{ stdenv, lib, python3, fetchPypi, appdirs, attrs, requests, +beautifulsoup4, click-plugins, elasticsearch, flask_login, flask_wtf, +pypandoc, python-dotenv, python-frontmatter, tinydb, validators, +watchdog, wtforms }: + +python3.pkgs.buildPythonApplication rec { + pname = "archivy"; + version = "0.8.5"; + + src = fetchPypi { + inherit pname version; + sha256 = "144ckgxjaw29yp5flyxd1rnkm7hlim4zgy6xng7x0a9j54h527iq"; + }; + + # Relax some dependencies + postPatch = '' + substituteInPlace requirements.txt \ + --replace 'validators ==' 'validators >=' \ + --replace 'elasticsearch ==' 'elasticsearch >=' \ + --replace 'python-dotenv ==' 'python-dotenv >=' \ + --replace 'beautifulsoup4 ==' 'beautifulsoup4 >=' \ + --replace 'WTForms ==' 'WTForms >=' \ + --replace 'python_dotenv ==' 'python_dotenv >=' \ + --replace 'attrs == 20.2.0' 'attrs' \ + --replace 'python_frontmatter == 0.5.0' 'python_frontmatter' \ + --replace 'requests ==' 'requests >=' + ''; + + propagatedBuildInputs = [ + appdirs + attrs + beautifulsoup4 + click-plugins + elasticsearch + flask_login + flask_wtf + pypandoc + python-dotenv + python-frontmatter + tinydb + requests + validators + watchdog + wtforms + ]; + + # __init__.py attempts to mkdir in read-only file system + doCheck = false; + + meta = with stdenv.lib; { + description = "Self-hosted knowledge repository"; + homepage = "https://archivy.github.io"; + license = licenses.mit; + maintainers = with maintainers; [ siraben ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 1ea78c5d104..750afc6e02c 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -849,6 +849,8 @@ in archivemount = callPackage ../tools/filesystems/archivemount { }; + archivy = python3Packages.callPackage ../applications/misc/archivy { }; + arandr = callPackage ../tools/X11/arandr { }; inherit (callPackages ../servers/nosql/arangodb {