Loading pkgs/applications/editors/vim/plugins/utils/updater.nix +2 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ buildPythonApplication, makeWrapper, nix, nix-prefetch-github, nix-prefetch-git, nurl, python3Packages, Loading Loading @@ -37,6 +38,7 @@ buildPythonApplication { makeWrapperArgs+=( --prefix PATH : "${ lib.makeBinPath [ nix nix-prefetch-github nix-prefetch-git neovim-unwrapped nurl Loading pkgs/development/python-modules/nixpkgs-plugin-update/nixpkgs-plugin-update/src/nixpkgs_plugin_update/__init__.py +5 −5 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ import sys import time import traceback import urllib.error import urllib.parse import urllib.request import xml.etree.ElementTree as ET from dataclasses import asdict, dataclass Loading @@ -26,7 +25,7 @@ from multiprocessing.dummy import Pool from pathlib import Path from tempfile import NamedTemporaryFile from typing import Any, Callable from urllib.parse import urljoin, urlparse from urllib.parse import urljoin, urlparse, urlsplit import git from packaging.version import InvalidVersion, parse as parse_version Loading Loading @@ -407,7 +406,7 @@ class RepoGitHub(Repo): response_url = req.geturl() if url != response_url: new_owner, new_name = ( urllib.parse.urlsplit(response_url).path.strip("/").split("/")[:2] urlsplit(response_url).path.strip("/").split("/")[:2] ) new_repo = RepoGitHub(owner=new_owner, repo=new_name, branch=self.branch) Loading @@ -421,10 +420,11 @@ class RepoGitHub(Repo): return sha256 def prefetch_github(self, ref: str) -> str: cmd = ["nix-prefetch-url", "--unpack", self.url(f"archive/{ref}.tar.gz")] cmd = ["nix-prefetch-github", self.owner, self.repo, "--rev", ref, "--json"] log.debug("Running %s", cmd) data = subprocess.check_output(cmd) return data.strip().decode("utf-8") loaded = json.loads(data) return loaded["hash"] def as_nix(self, plugin: "Plugin") -> str: if plugin.has_submodules: Loading Loading
pkgs/applications/editors/vim/plugins/utils/updater.nix +2 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ buildPythonApplication, makeWrapper, nix, nix-prefetch-github, nix-prefetch-git, nurl, python3Packages, Loading Loading @@ -37,6 +38,7 @@ buildPythonApplication { makeWrapperArgs+=( --prefix PATH : "${ lib.makeBinPath [ nix nix-prefetch-github nix-prefetch-git neovim-unwrapped nurl Loading
pkgs/development/python-modules/nixpkgs-plugin-update/nixpkgs-plugin-update/src/nixpkgs_plugin_update/__init__.py +5 −5 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ import sys import time import traceback import urllib.error import urllib.parse import urllib.request import xml.etree.ElementTree as ET from dataclasses import asdict, dataclass Loading @@ -26,7 +25,7 @@ from multiprocessing.dummy import Pool from pathlib import Path from tempfile import NamedTemporaryFile from typing import Any, Callable from urllib.parse import urljoin, urlparse from urllib.parse import urljoin, urlparse, urlsplit import git from packaging.version import InvalidVersion, parse as parse_version Loading Loading @@ -407,7 +406,7 @@ class RepoGitHub(Repo): response_url = req.geturl() if url != response_url: new_owner, new_name = ( urllib.parse.urlsplit(response_url).path.strip("/").split("/")[:2] urlsplit(response_url).path.strip("/").split("/")[:2] ) new_repo = RepoGitHub(owner=new_owner, repo=new_name, branch=self.branch) Loading @@ -421,10 +420,11 @@ class RepoGitHub(Repo): return sha256 def prefetch_github(self, ref: str) -> str: cmd = ["nix-prefetch-url", "--unpack", self.url(f"archive/{ref}.tar.gz")] cmd = ["nix-prefetch-github", self.owner, self.repo, "--rev", ref, "--json"] log.debug("Running %s", cmd) data = subprocess.check_output(cmd) return data.strip().decode("utf-8") loaded = json.loads(data) return loaded["hash"] def as_nix(self, plugin: "Plugin") -> str: if plugin.has_submodules: Loading