0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 14:10:33 +03:00

tandoor-recipes: fix build, 1.5.19 -> 1.5.25, add jvanbruegge as maintainer (#369173)

This commit is contained in:
misuzu 2024-12-31 16:14:26 +02:00 committed by GitHub
commit 30d229263d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 43 additions and 78 deletions

View file

@ -31,7 +31,7 @@ let
'';
in
{
meta.maintainers = with lib.maintainers; [ ];
meta.maintainers = with lib.maintainers; [ jvanbruegge ];
options.services.tandoor-recipes = {
enable = lib.mkOption {

View file

@ -1,19 +1,19 @@
{ lib, fetchFromGitHub }:
rec {
version = "1.5.19";
version = "1.5.25";
src = fetchFromGitHub {
owner = "TandoorRecipes";
repo = "recipes";
rev = version;
hash = "sha256-HsBy2HzxBpnwh2RqFQJG0HYReWI0a7E7KsJ5TD+GokY=";
hash = "sha256-Yw68wxLqoyPRQmP/krSaxByv24CKh7Y7O07NU+dL5mo=";
};
yarnHash = "sha256-BnOw9QRXRRoM+CW6OGbjWhLo4h6JX3ZR1kJd8Z/w02M=";
yarnHash = "sha256-lU8QrTkI32XOHefIkj/0fa2UKhuZpQIT1wyweQnzXmQ=";
meta = with lib; {
homepage = "https://tandoor.dev/";
license = licenses.agpl3Only;
maintainers = with maintainers; [ ];
maintainers = with maintainers; [ jvanbruegge ];
};
}

View file

@ -1,52 +1,15 @@
{ callPackage
, nixosTests
, python311
, fetchFromGitHub
, python3
}:
let
# python-ldap-3.4.4 does not work with python3(12)
python = python311.override {
self = python;
packageOverrides = self: super: {
validators = super.validators.overridePythonAttrs (_: rec {
version = "0.20.0";
src = fetchFromGitHub {
owner = "python-validators";
repo = "validators";
rev = version;
hash = "sha256-ZnLyTHlsrXthGnaPzlV2ga/UTm5SSEHLTwC/tobiPak=";
};
propagatedBuildInputs = [ super.decorator super.six ];
});
djangorestframework = super.djangorestframework.overridePythonAttrs (oldAttrs: rec {
version = "3.14.0";
src = oldAttrs.src.override {
rev = version;
hash = "sha256-Fnj0n3NS3SetOlwSmGkLE979vNJnYE6i6xwVBslpNz4=";
};
nativeCheckInputs = with super; [
pytest7CheckHook
pytest-django
];
});
# python3.11-extruct-0.16.0 doesn't work with lxml-5.2.2
lxml = super.lxml.overridePythonAttrs (oldAttrs: rec {
version = "5.1.0";
src = oldAttrs.src.override {
rev = version;
hash = "sha256-eWLYzZWatYDmhuBTZynsdytlNFKKmtWQ1XIyzVD8sDY=";
};
});
};
};
python = python3;
common = callPackage ./common.nix { };
frontend = callPackage ./frontend.nix { };
in
python.pkgs.pythonPackages.buildPythonPackage rec {
python.pkgs.pythonPackages.buildPythonPackage {
pname = "tandoor-recipes";
inherit (common) version src;
@ -62,50 +25,51 @@ python.pkgs.pythonPackages.buildPythonPackage rec {
'';
propagatedBuildInputs = with python.pkgs; [
aiohttp
beautifulsoup4
bleach
bleach-allowlist
boto3
cryptography
django
django-allauth
cryptography
django-annoying
django-auth-ldap
django-cleanup
django-cors-headers
django-crispy-forms
django-crispy-bootstrap4
django-hcaptcha
django-js-reverse
django-oauth-toolkit
django-prometheus
django-scopes
django-storages
django-tables2
django-webpack-loader
django-treebeard
djangorestframework
drf-writable-nested
django-oauth-toolkit
bleach
gunicorn
icalendar
jinja2
lxml
markdown
microdata
pillow
psycopg2
pyppeteer
python-dotenv
pytube
pyyaml
recipe-scrapers
requests
six
uritemplate
validators
webdavclient3
whitenoise
icalendar
pyyaml
uritemplate
beautifulsoup4
microdata
jinja2
django-webpack-loader
django-js-reverse
django-allauth
recipe-scrapers
django-scopes
django-treebeard
django-cors-headers
django-storages
boto3
django-prometheus
django-hcaptcha
python-ldap
django-auth-ldap
pyppeteer
pytubefix
aiohttp
inflection
redis
];
configurePhase = ''

View file

@ -3,7 +3,7 @@
fetchYarnDeps,
fixup-yarn-lock,
callPackage,
nodejs,
nodejs_20,
yarn,
}:
let
@ -22,8 +22,8 @@ stdenv.mkDerivation {
nativeBuildInputs = [
fixup-yarn-lock
nodejs
yarn
nodejs_20
(yarn.override { nodejs = nodejs_20; })
];
configurePhase = ''

View file

@ -1,5 +1,5 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=../../../../ -i bash -p nix wget prefetch-yarn-deps nix-prefetch-github jq
#!nix-shell -I nixpkgs=./ -i bash -p nix wget prefetch-yarn-deps nix-prefetch-github jq
# shellcheck shell=bash
@ -36,6 +36,7 @@ popd
# Use friendlier hashes
yarn_hash=$(nix hash to-sri --type sha256 "$yarn_hash")
sed -i -E -e "s#version = \".*\"#version = \"$version\"#" common.nix
sed -i -E -e "s#hash = \".*\"#hash = \"$src_hash\"#" common.nix
sed -i -E -e "s#yarnHash = \".*\"#yarnHash = \"$yarn_hash\"#" common.nix
common="./pkgs/applications/misc/tandoor-recipes/common.nix"
sed -i -E -e "s#version = \".*\"#version = \"$version\"#" $common
sed -i -E -e "s#hash = \".*\"#hash = \"$src_hash\"#" $common
sed -i -E -e "s#yarnHash = \".*\"#yarnHash = \"$yarn_hash\"#" $common