sourcehut.srht: 0.69.0 -> 0.69.15

Signed-off-by: Christoph Heiss <christoph@c8h4.io>

+30 -88
+29 -45
pkgs/applications/version-management/sourcehut/core.nix
··· 1 1 { lib 2 2 , fetchFromSourcehut 3 - , fetchNodeModules 4 3 , buildPythonPackage 5 - , pgpy 6 4 , flask 7 - , bleach 8 - , misaka 9 5 , humanize 10 - , html5lib 6 + , sqlalchemy 7 + , sqlalchemy-utils 8 + , psycopg2 11 9 , markdown 12 - , psycopg2 10 + , mistletoe 11 + , bleach 12 + , requests 13 + , beautifulsoup4 13 14 , pygments 14 - , requests 15 - , sqlalchemy 16 15 , cryptography 17 - , beautifulsoup4 18 - , sqlalchemy-utils 19 16 , prometheus-client 17 + , alembic 18 + , redis 20 19 , celery 21 - , alembic 20 + , html5lib 22 21 , importlib-metadata 23 - , mistletoe 24 - , minio 22 + , tinycss2 25 23 , sassc 26 - , nodejs 27 - , redis 24 + , minify 28 25 }: 29 26 30 27 buildPythonPackage rec { 31 28 pname = "srht"; 32 - version = "0.69.0"; 29 + version = "0.69.15"; 33 30 34 31 src = fetchFromSourcehut { 35 32 owner = "~sircmpwn"; 36 33 repo = "core.sr.ht"; 37 34 rev = version; 38 - sha256 = "sha256-s/I0wxtPggjTkkTZnhm77PxdQjiT0Vq2MIk7JMvdupc="; 35 + sha256 = "sha256-T9yewweqnWL3IW5PHGyAcsIWCGn1ayK2rwrHVukYpgE="; 39 36 fetchSubmodules = true; 40 - }; 41 - 42 - node_modules = fetchNodeModules { 43 - src = "${src}/srht"; 44 - nodejs = nodejs; 45 - sha256 = "sha256-IWKahdWv3qJ5DNyb1GB9JWYkZxghn6wzZe68clYXij8="; 46 37 }; 47 38 48 39 patches = [ 49 - # Disable check for npm 50 - ./disable-npm-install.patch 51 40 # Fix Unix socket support in RedisQueueCollector 52 41 patches/redis-socket/core/0001-Fix-Unix-socket-support-in-RedisQueueCollector.patch 53 42 ]; 54 43 55 44 propagatedNativeBuildInputs = [ 56 45 sassc 57 - nodejs 46 + minify 58 47 ]; 59 48 60 49 propagatedBuildInputs = [ 61 - pgpy 62 50 flask 63 - bleach 64 - misaka 65 51 humanize 66 - html5lib 52 + sqlalchemy 53 + sqlalchemy-utils 54 + psycopg2 67 55 markdown 68 - psycopg2 56 + mistletoe 57 + bleach 58 + requests 59 + beautifulsoup4 69 60 pygments 70 - requests 71 - mistletoe 72 - sqlalchemy 73 61 cryptography 74 - beautifulsoup4 75 - sqlalchemy-utils 76 62 prometheus-client 77 - 78 - # Unofficial runtime dependencies? 79 - celery 80 63 alembic 81 - importlib-metadata 82 - minio 83 64 redis 65 + celery 66 + # Used transitively through beautifulsoup4 67 + html5lib 68 + # Used transitively trough bleach.css_sanitizer 69 + tinycss2 70 + # Used by srht.debug 71 + importlib-metadata 84 72 ]; 85 73 86 74 PKGVER = version; 87 - 88 - preBuild = '' 89 - cp -r ${node_modules} srht/node_modules 90 - ''; 91 75 92 76 dontUseSetuptoolsCheck = true; 93 77 pythonImportsCheck = [ "srht" ];
+1 -3
pkgs/applications/version-management/sourcehut/default.nix
··· 9 9 # Then we expose them through all-packages.nix as an application through `toPythonApplication` 10 10 # https://github.com/NixOS/nixpkgs/pull/54425#discussion_r250688781 11 11 let 12 - fetchNodeModules = callPackage ./fetchNodeModules.nix { }; 13 - 14 12 python = python3.override { 15 13 packageOverrides = self: super: { 16 - srht = self.callPackage ./core.nix { inherit fetchNodeModules; }; 14 + srht = self.callPackage ./core.nix { }; 17 15 18 16 buildsrht = self.callPackage ./builds.nix { }; 19 17 gitsrht = self.callPackage ./git.nix { };
-14
pkgs/applications/version-management/sourcehut/disable-npm-install.patch
··· 1 - diff --git a/setup.py b/setup.py 2 - index d63bac8..e1d0c35 100755 3 - --- a/setup.py 4 - +++ b/setup.py 5 - @@ -5,9 +5,6 @@ import glob 6 - import os 7 - import sys 8 - 9 - -if subprocess.call(["npm", "i"], cwd="srht") != 0: 10 - - sys.exit(1) 11 - - 12 - ver = os.environ.get("PKGVER") or subprocess.run(['git', 'describe', '--tags'], 13 - stdout=subprocess.PIPE).stdout.decode().strip() 14 -
-26
pkgs/applications/version-management/sourcehut/fetchNodeModules.nix
··· 1 - { lib, stdenv, jq }: { src, nodejs, sha256 }: 2 - 3 - # Only npm >= 5.4.2 is deterministic, see: 4 - # https://github.com/npm/npm/issues/17979#issuecomment-332701215 5 - assert lib.versionAtLeast nodejs.version "8.9.0"; 6 - 7 - stdenv.mkDerivation { 8 - name = "node_modules"; 9 - 10 - outputHashAlgo = "sha256"; 11 - outputHash = sha256; 12 - outputHashMode = "recursive"; 13 - 14 - nativeBuildInputs = [ jq nodejs ]; 15 - 16 - buildCommand = '' 17 - cp -r ${src}/* . 18 - HOME=. npm install --force --ignore-scripts --only=production 19 - for f in $(find node_modules -name package.json); do 20 - # https://github.com/npm/npm/issues/10393 21 - jq -S 'delpaths(keys | map(select(startswith("_")) | [.]))' $f > $f.tmp 22 - mv $f.tmp $f 23 - done 24 - mv node_modules $out 25 - ''; 26 - }