From 2d4885c9bd2bf93a0c1c72b85b73e759745957c7 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 26 May 2022 21:39:50 +0200 Subject: [PATCH] packages/searxng: convert to pin --- packages/projects.nix | 1 + packages/sources/sources.json | 12 ++++++++++++ packages/web-apps/searxng/default.nix | 11 +++-------- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/packages/projects.nix b/packages/projects.nix index 060527a..82a4031 100644 --- a/packages/projects.nix +++ b/packages/projects.nix @@ -70,6 +70,7 @@ in in pullDownPackages [ "httpcore" "httpx" "httpx-socks" "h2" "python-socks" "socksio" ]); in pkgs.callPackage ./web-apps/searxng rec { python3Packages = scope; + inherit pins; }; sips = pkgs.callPackage ./servers/sips { }; diff --git a/packages/sources/sources.json b/packages/sources/sources.json index cb8dd84..a7ff570 100644 --- a/packages/sources/sources.json +++ b/packages/sources/sources.json @@ -1,5 +1,17 @@ { "pins": { + "searxng": { + "type": "Git", + "repository": { + "type": "GitHub", + "owner": "searxng", + "repo": "searxng" + }, + "branch": "master", + "revision": "fddbc5ed00ded5f28ef3b643686e7c177a3a75ce", + "url": "https://github.com/searxng/searxng/archive/fddbc5ed00ded5f28ef3b643686e7c177a3a75ce.tar.gz", + "hash": "0z17cxsvkgrinrd2rrkvwynnn6m1k2ljgw4nmply6zri48fifypj" + }, "uptime-kuma": { "type": "GitRelease", "repository": { diff --git a/packages/web-apps/searxng/default.nix b/packages/web-apps/searxng/default.nix index b09145f..5920734 100644 --- a/packages/web-apps/searxng/default.nix +++ b/packages/web-apps/searxng/default.nix @@ -1,17 +1,12 @@ -{ lib, nixosTests, python3, python3Packages, fetchFromGitHub, fetchpatch }: +{ lib, nixosTests, python3, python3Packages, fetchFromGitHub, fetchpatch, pins }: with python3Packages; toPythonModule (buildPythonApplication rec { pname = "searxng"; - version = "20220524"; + version = "1.0.0pre_${builtins.substring 0 7 pins.searxng.revision}"; - src = fetchFromGitHub { - owner = "searxng"; - repo = "searxng"; - rev = "fddbc5ed00ded5f28ef3b643686e7c177a3a75ce"; - sha256 = "sha256-8noXHSIxf+PprZbwJ6mYoRprred75ixatjG/uXVnJ3w="; - }; + src = pins.searxng; postPatch = '' sed -i 's/==.*$//' requirements.txt