nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 python3,
5}:
6
7python3.pkgs.buildPythonApplication rec {
8 pname = "circup";
9 version = "2.3.0";
10 pyproject = true;
11
12 src = fetchFromGitHub {
13 owner = "adafruit";
14 repo = "circup";
15 tag = version;
16 hash = "sha256-o42gzdv69+BO5kTconZaMQBv89GzuFprf/UoZjF29oI=";
17 };
18
19 pythonRelaxDeps = [ "semver" ];
20
21 build-system = with python3.pkgs; [ setuptools-scm ];
22
23 dependencies = with python3.pkgs; [
24 appdirs
25 click
26 findimports
27 requests
28 semver
29 setuptools
30 toml
31 update-checker
32 ];
33
34 nativeCheckInputs = with python3.pkgs; [ pytestCheckHook ];
35
36 postBuild = ''
37 export HOME=$(mktemp -d);
38 '';
39
40 pythonImportsCheck = [ "circup" ];
41
42 disabledTests = [
43 # Test requires network access
44 "test_libraries_from_imports_bad"
45 "test_install_auto_file_bad"
46 ];
47
48 meta = {
49 description = "CircuitPython library updater";
50 homepage = "https://github.com/adafruit/circup";
51 changelog = "https://github.com/adafruit/circup/releases/tag/${src.tag}";
52 license = with lib.licenses; [ mit ];
53 maintainers = with lib.maintainers; [ fab ];
54 mainProgram = "circup";
55 };
56}