Development discussion for sr.ht. When contributing patches to sr.ht, please edit the [PATCH] line to include the specific sr.ht project you're contributing to, e.g.

[PATCH lists.sr.ht v2] Add thing to stuff
2 2

WIP: shell.nix

Details
Message ID
<CA+CkF22kst_BgJn7a52n1rFpbhdLvrzTER_f+saRL9rBqZP2fQ@mail.gmail.com>
Sender timestamp
1549516534
DKIM signature
pass
Download raw message
Patch: +79 -0
Looks like nixpkgs is missing a few required python packages.
Needed to add singledispatch as explicit dependency for core.sr.ht.
This fails on setup.py with the "npm i" call.

TODO:
- fix "npm i"
- use proper src
- backport dependencies to nixpkgs
- other python versions?
- meta descriptions


From 7f87eab0aa46f829b785e3efb8c4943c20f4bdf7 Mon Sep 17 00:00:00 2001
From: Tom Bereknyei <tomberek@gmail.com>
Date: Wed, 6 Feb 2019 23:54:54 -0500
Subject: [PATCH] WIP: shell.nix


---
shell.nix | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 79 insertions(+)
create mode 100644 shell.nix


diff --git a/shell.nix b/shell.nix
new file mode 100644
index 0000000..742142d
--- /dev/null
+++ b/shell.nix
@@ -0,0 +1,79 @@
+with import <nixpkgs> {};
+with pkgs;
+( let
+ sqlalchemy-utils = python36.pkgs.buildPythonPackage rec {
+ pname = "SQLAlchemy-Utils";
+ version = "0.33.11";
+
+ src = python36.pkgs.fetchPypi {
+ inherit pname version;
+ sha256 = "10hiqzz4jd95svyi7kgl1cikcfk9mprijjcda3ga0j85rx1ba71z";
+ };
+
+ buildInputs = with python36.pkgs; [
+ six
+ sqlalchemy
+ ];
+ doCheck = false;
+
+ };
+ pgpy = python36.pkgs.buildPythonPackage rec {
+ pname = "PGPy";
+ version = "0.4.3";
+
+ src = python36.pkgs.fetchPypi {
+ inherit pname version;
+ sha256 = "00mrqafwq1lfmkkjb3m6a4c450fl51n35x6ssp2w0al8svfjsh84";
+ };
+
+ buildInputs = with python36.pkgs; [
+ cryptography
+ pyasn1
+ six
+ singledispatch
+ ];
+ doCheck = false;
+
+ };
+ sr_ht = python36.pkgs.buildPythonPackage rec {
+ pname = "sr.ht";
+ version = "0.32.1";
+ buildInputs = [
+ git
+ ];
+
+ src = ./.;
+ src2 = fetchgit {
+ url= "https://git.sr.ht/~sircmpwn/core.sr.ht";
+ rev = "018529ee2929a745251413e4d9aab5f55af18f41";
+ sha256 = "0mganmb3w8qjn1wr3a315pa3fsb2a4m741cd2x5pcf2wpl408rpk";
+ };
+
+ doCheck = false;
+
+ propagatedBuildInputs = with python36.pkgs; [
+ singledispatch
+ flask
+ flask_login
+ humanize
+ sqlalchemy
+ sqlalchemy-utils
+ psycopg2
+ markdown
+ bleach
+ requests
+ beautifulsoup4
+ pgpy
+ misaka
+ pygments
+ ];
+
+
+ meta = {
+ homepage = "https://sr.ht/";
+ description = "TODO";
+ };
+ };
+
+ in python36.withPackages (ps: [sr_ht])
+).env
Details
Message ID
<20190207122959.GC1611@homura.localdomain>
In-Reply-To
<CA+CkF22kst_BgJn7a52n1rFpbhdLvrzTER_f+saRL9rBqZP2fQ@mail.gmail.com> (view parent)
Sender timestamp
1549542599
DKIM signature
pass
Download raw message
What is this patch for? Can you use [PATCH project-name] in the future?
This can be done automatically by git send-email by configuring it for
each repo like so:

	git config format.subjectPrefix 'PATCH some-project'

Also, you still need to use git send-email, not whatever other thing
you're doing.
Details
Message ID
<87imxvr30a.fsf@bsima.me>
In-Reply-To
<CA+CkF22kst_BgJn7a52n1rFpbhdLvrzTER_f+saRL9rBqZP2fQ@mail.gmail.com> (view parent)
Sender timestamp
1549555973
DKIM signature
fail
Download raw message
DKIM signature: fail
Thomas Bereknyei <tomberek@gmail.com> writes:

> TODO:
> - backport dependencies to nixpkgs

Note that work is underway to port sourcehut to NixOS: https://github.com/NixOS/nixpkgs/pull/54425/files