stashapp & stashapi
This commit is contained in:
parent
9ab256ded7
commit
6aea101721
@ -42,7 +42,13 @@
|
|||||||
packages.x86_64-linux =
|
packages.x86_64-linux =
|
||||||
let
|
let
|
||||||
scriptBin = path: name: pkgs.writeScriptBin name (builtins.readFile path);
|
scriptBin = path: name: pkgs.writeScriptBin name (builtins.readFile path);
|
||||||
pkgsBin = path: _name: pkgs.callPackage path { };
|
pkgsBin = path: _name:
|
||||||
|
let
|
||||||
|
content = builtins.readFile path;
|
||||||
|
in
|
||||||
|
if builtins.match ".*buildPythonPackage.*" content != null
|
||||||
|
then pkgs.python3Packages.callPackage path { }
|
||||||
|
else pkgs.callPackage path { };
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
citra = pkgs.callPackage ./pkgs/citra/default.nix { branch = "nightly"; };
|
citra = pkgs.callPackage ./pkgs/citra/default.nix { branch = "nightly"; };
|
||||||
|
|||||||
43
pkgs_wip/stashapi.nix
Normal file
43
pkgs_wip/stashapi.nix
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
buildPythonPackage,
|
||||||
|
fetchFromGitHub,
|
||||||
|
hatch-vcs,
|
||||||
|
hatchling,
|
||||||
|
requests,
|
||||||
|
typing-extensions,
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "stashapi";
|
||||||
|
version = "0.1.1";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "stg-annon";
|
||||||
|
repo = "stashapi";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-zwDkT8Y6iftq/OxrBzIBvyJ3po4Pfna4xyRKu5KtJco=";
|
||||||
|
};
|
||||||
|
|
||||||
|
build-system = [
|
||||||
|
hatch-vcs
|
||||||
|
hatchling
|
||||||
|
];
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
requests
|
||||||
|
typing-extensions
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"stashapi"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Api wrapper";
|
||||||
|
homepage = "https://github.com/stg-annon/stashapi";
|
||||||
|
license = lib.licenses.mit;
|
||||||
|
maintainers = with lib.maintainers; [ ];
|
||||||
|
};
|
||||||
|
}
|
||||||
47
pkgs_wip/stashapp-tools.nix
Normal file
47
pkgs_wip/stashapp-tools.nix
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
buildPythonPackage,
|
||||||
|
fetchFromGitHub,
|
||||||
|
setuptools,
|
||||||
|
wheel,
|
||||||
|
requests,
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "stashapp-tools";
|
||||||
|
version = "0.2.59";
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "stg-annon";
|
||||||
|
repo = "stashapp-tools";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-1IkFQrdfEAVldr6QHcPkYuKUutc4uvRPTpHyz0gp768=";
|
||||||
|
fetchSubmodules = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
build-system = [
|
||||||
|
setuptools
|
||||||
|
wheel
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace setup.py \
|
||||||
|
--replace 'version="main"' 'version="${version}"'
|
||||||
|
'';
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
requests
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"stashapi"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Tools to interface with stashapps API";
|
||||||
|
homepage = "https://github.com/stg-annon/stashapp-tools";
|
||||||
|
license = lib.licenses.mit;
|
||||||
|
maintainers = with lib.maintainers; [ ];
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user