update python packages
This commit is contained in:
parent
102b1602ca
commit
bc2b038da8
5 changed files with 114 additions and 32 deletions
|
@ -51,6 +51,12 @@ steps:
|
|||
USER: nobody
|
||||
depends_on:
|
||||
- Update flake
|
||||
- name: Update pypi
|
||||
image: nixery.dev/shell/curl/jq
|
||||
commands:
|
||||
- (cd python && bash ./update.sh)
|
||||
depends_on:
|
||||
- Update flake
|
||||
- name: Format nix
|
||||
image: nixery.dev/shell/alejandra
|
||||
commands:
|
||||
|
@ -61,6 +67,7 @@ steps:
|
|||
- Update matrix-media-repo
|
||||
- Update mautrix-whatsapp
|
||||
- Update art
|
||||
- Update pypi
|
||||
- name: Push git
|
||||
image: nixery.dev/shell/gitfull/git-lfs/shadow
|
||||
commands:
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
./ci/drone-runner-docker
|
||||
./vim
|
||||
./hydra
|
||||
./python/tarballs.nix
|
||||
]);
|
||||
|
||||
hydraJobs =
|
||||
|
|
|
@ -4,55 +4,50 @@
|
|||
}:
|
||||
with pkgs; let
|
||||
inherit (inputs.nixpkgs-stable.legacyPackages.${system}) pypy3;
|
||||
tarballs = import ../python/tarballs.nix {inherit inputs pkgs;};
|
||||
in rec {
|
||||
plover-plugins-manager = with python3Packages;
|
||||
buildPythonPackage rec {
|
||||
pname = "plover-plugins-manager";
|
||||
version = "0.7.1";
|
||||
src = fetchFromGitHub {
|
||||
owner = "benoit-pierre";
|
||||
repo = "plover_plugins_manager";
|
||||
rev = version;
|
||||
sha256 = "165zvhgdykvml44cv15dwm1w94jsrgll15628gd6v21d4932dml3";
|
||||
};
|
||||
inherit (tarballs.plover-plugins-manager-src.passthru) pname version;
|
||||
src = tarballs.plover-plugins-manager-src;
|
||||
propagatedBuildInputs = [pip pkginfo plover pygments readme_renderer requests requests-cache requests-futures setuptools wheel];
|
||||
installCheckPhase = "true";
|
||||
setuptoolsCheckPhase = "true";
|
||||
};
|
||||
plover-stroke = with python3Packages;
|
||||
buildPythonPackage rec {
|
||||
pname = "plover-stroke";
|
||||
version = "1.1.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "benoit-pierre";
|
||||
repo = "plover_stroke";
|
||||
rev = version;
|
||||
sha256 = "sha256-A75OMzmEn0VmDAvmQCp6/7uptxzwWJTwsih3kWlYioA=";
|
||||
};
|
||||
inherit (tarballs.plover-stroke-src.passthru) pname version;
|
||||
src = tarballs.plover-stroke-src;
|
||||
checkInputs = [pytest];
|
||||
};
|
||||
rtf-tokenize = with python3Packages;
|
||||
buildPythonPackage rec {
|
||||
pname = "rtf-tokenize";
|
||||
version = "1.0.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "benoit-pierre";
|
||||
repo = "rtf_tokenize";
|
||||
rev = version;
|
||||
sha256 = "sha256-zwD2sRYTY1Kmm/Ag2hps9VRdUyQoi4zKtDPR+F52t9A=";
|
||||
};
|
||||
inherit (tarballs.rtf-tokenize-src.passthru) pname version;
|
||||
src = tarballs.rtf-tokenize-src;
|
||||
checkInputs = [pytest];
|
||||
};
|
||||
plover-regenpfeifer = with python3Packages;
|
||||
buildPythonPackage rec {
|
||||
pname = "plover_regenpfeifer";
|
||||
version = "0.0.3";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mkrnr";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-2KzVz8zsrRPU4zjlzyPYfBCWppfy73+nrT5RUKU/670=";
|
||||
};
|
||||
inherit (tarballs.plover-regenpfeifer-src.passthru) pname version;
|
||||
src = tarballs.plover-regenpfeifer-src;
|
||||
propagatedBuildInputs = [plover];
|
||||
};
|
||||
plover-emoji = with python3Packages;
|
||||
buildPythonPackage rec {
|
||||
inherit (tarballs.plover-emoji-src.passthru) pname version;
|
||||
src = tarballs.plover-emoji-src;
|
||||
propagatedBuildInputs = [plover];
|
||||
};
|
||||
plover-tapey-tape = with python3Packages;
|
||||
buildPythonPackage rec {
|
||||
inherit (tarballs.plover-tapey-tape-src.passthru) pname version;
|
||||
src = tarballs.plover-tapey-tape-src;
|
||||
propagatedBuildInputs = [plover];
|
||||
};
|
||||
plover-yaml-dictionary = with python3Packages;
|
||||
buildPythonPackage rec {
|
||||
inherit (tarballs.plover-yaml-dictionary-src.passthru) pname version;
|
||||
src = tarballs.plover-yaml-dictionary-src;
|
||||
propagatedBuildInputs = [plover];
|
||||
};
|
||||
regenpfeifer-env = pypy3.withPackages (ps: [ps.marisa-trie]);
|
||||
|
|
49
python/tarballs.nix
Normal file
49
python/tarballs.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
}: let
|
||||
inherit (pkgs) fetchurl;
|
||||
in rec {
|
||||
plover-plugins-manager-src = fetchurl {
|
||||
url = "https://files.pythonhosted.org/packages/6c/a1/2db1489c868fd9f88ce164c48bdbf9fcf6e13b7fd323ddba24cd0a7e2e94/plover_plugins_manager-0.7.1.tar.gz";
|
||||
sha256 = "fd18966c6c4fb66fb49a10e2d2178455bea204abb2066e883aadb2ae3d7b9fdb";
|
||||
passthru.pname = "plover-plugins-manager";
|
||||
passthru.version = "0.7.1";
|
||||
};
|
||||
plover-stroke-src = fetchurl {
|
||||
url = "https://files.pythonhosted.org/packages/cc/53/92635d8bf00b883bfbc6ab9dd48b6df2ed01c241379fe99f063a41530cab/plover_stroke-1.1.0.tar.gz";
|
||||
sha256 = "de03b23f4aee66b65f69f7d4ecc4233681b43541502d86bf14fde29eaa72d153";
|
||||
passthru.pname = "plover-stroke";
|
||||
passthru.version = "1.1.0";
|
||||
};
|
||||
rtf-tokenize-src = fetchurl {
|
||||
url = "https://files.pythonhosted.org/packages/1b/c3/591998d6a7e19c68933e8c4af3e8f5c0bbc17eb9c50a229c7c6afff349c4/rtf_tokenize-1.0.0.tar.gz";
|
||||
sha256 = "5c3df390d00479bd7637c823bfcd6fdfb21ddd1b96ae815463de7e1ed392d608";
|
||||
passthru.pname = "rtf-tokenize";
|
||||
passthru.version = "1.0.0";
|
||||
};
|
||||
plover-regenpfeifer-src = fetchurl {
|
||||
url = "https://files.pythonhosted.org/packages/ec/2f/08609500b624e74821bfd6b4eef4dffc656b7e044e2e8dd1413d08cde570/plover_regenpfeifer-0.0.3.tar.gz";
|
||||
sha256 = "6bea850c722ec83a2c99b6b715cdda3c104eac79f903533ea8cb421bc95cd07d";
|
||||
passthru.pname = "plover-regenpfeifer";
|
||||
passthru.version = "0.0.3";
|
||||
};
|
||||
plover-emoji-src = fetchurl {
|
||||
url = "https://files.pythonhosted.org/packages/44/b0/1e8e677ee942a5817245731493c3541705aad5424a4a21ae4e3bea6a57b6/plover_emoji-0.0.4.tar.gz";
|
||||
sha256 = "db6611cd2a094859844b63f6ba2037df7929c4719457556586e9f6ab4f0b57ea";
|
||||
passthru.pname = "plover-emoji";
|
||||
passthru.version = "0.0.4";
|
||||
};
|
||||
plover-tapey-tape-src = fetchurl {
|
||||
url = "https://files.pythonhosted.org/packages/cf/62/2bddc190fa18009a5e15d1f4efa642aed4a0e0a523c56223616d82ff05c0/plover_tapey_tape-0.0.5.tar.gz";
|
||||
sha256 = "226334e874fd9033aba58baf5d9d53523de691b2bba6aad597f71be82923a17c";
|
||||
passthru.pname = "plover-tapey-tape";
|
||||
passthru.version = "0.0.5";
|
||||
};
|
||||
plover-yaml-dictionary-src = fetchurl {
|
||||
url = "https://files.pythonhosted.org/packages/07/2d/8b23162c1eee648afde6030f64b67a1e9a923ae88ed68dbe9a9c3aef7d14/plover_yaml_dictionary-0.0.1.tar.gz";
|
||||
sha256 = "12d9aad7ef5e93559ae5b0236a83b0bfb17697acd722f791cff58206e33023d6";
|
||||
passthru.pname = "plover-yaml-dictionary";
|
||||
passthru.version = "0.0.1";
|
||||
};
|
||||
}
|
30
python/update.sh
Executable file
30
python/update.sh
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p curl jq
|
||||
set -e
|
||||
PACKAGES="plover-plugins-manager plover-stroke rtf-tokenize plover-regenpfeifer plover-emoji plover-tapey-tape plover-yaml-dictionary"
|
||||
|
||||
cat > tarballs.nix << EOF
|
||||
{ inputs, pkgs }: let
|
||||
inherit (pkgs) fetchurl;
|
||||
in rec {
|
||||
EOF
|
||||
|
||||
for package in $PACKAGES; do
|
||||
JSON=$(curl "https://pypi.org/pypi/$package/json")
|
||||
FILE_INFO=$(echo -E "$JSON" | jq '.releases[.info.version][] | select (.packagetype == "sdist")')
|
||||
VERSION=$(echo -E "$JSON" | jq -r '.info.version')
|
||||
URL=$(echo "$FILE_INFO" | jq -r '.url')
|
||||
SHA256=$(echo "$FILE_INFO" | jq -r '.digests.sha256')
|
||||
cat >> tarballs.nix << EOF
|
||||
$package-src = fetchurl {
|
||||
url = "$URL";
|
||||
sha256 = "$SHA256";
|
||||
passthru.pname = "$package";
|
||||
passthru.version = "$VERSION";
|
||||
};
|
||||
EOF
|
||||
done
|
||||
|
||||
cat >> tarballs.nix << EOF
|
||||
}
|
||||
EOF
|
Reference in a new issue