mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-29 09:04:17 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
71 lines
1.4 KiB
Nix
71 lines
1.4 KiB
Nix
{ lib
|
|
, fetchPypi
|
|
, fetchpatch
|
|
, python3
|
|
}:
|
|
|
|
let
|
|
python = python3.override {
|
|
self = python;
|
|
packageOverrides = self: super: {
|
|
pychromecast = super.pychromecast.overridePythonAttrs (_: rec {
|
|
version = "13.1.0";
|
|
|
|
src = fetchPypi {
|
|
pname = "PyChromecast";
|
|
inherit version;
|
|
hash = "sha256-COYai1S9IRnTyasewBNtPYVjqpfgo7V4QViLm+YMJnY=";
|
|
};
|
|
|
|
postPatch = "";
|
|
});
|
|
};
|
|
};
|
|
in
|
|
|
|
python.pkgs.buildPythonApplication rec {
|
|
pname = "catt";
|
|
version = "0.12.11";
|
|
format = "pyproject";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-0bqYYfWwF7yYoAbjZPhi/f4CLcL89imWGYaMi5Bwhtc=";
|
|
};
|
|
|
|
patches = [
|
|
(fetchpatch {
|
|
# set explicit build-system
|
|
url = "https://github.com/skorokithakis/catt/commit/08e7870a239e85badd30982556adc2aa8a8e4fc1.patch";
|
|
hash = "sha256-QH5uN3zQNVPP6Th2LHdDBF53WxwMhoyhhQUAZOeHh4k=";
|
|
})
|
|
];
|
|
|
|
nativeBuildInputs = with python.pkgs; [
|
|
poetry-core
|
|
];
|
|
|
|
propagatedBuildInputs = with python.pkgs; [
|
|
click
|
|
ifaddr
|
|
pychromecast
|
|
protobuf
|
|
requests
|
|
yt-dlp
|
|
];
|
|
|
|
doCheck = false; # attempts to access various URLs
|
|
|
|
pythonImportsCheck = [
|
|
"catt"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Tool to send media from online sources to Chromecast devices";
|
|
homepage = "https://github.com/skorokithakis/catt";
|
|
license = licenses.bsd2;
|
|
maintainers = [ ];
|
|
mainProgram = "catt";
|
|
};
|
|
}
|