Loading pkgs/development/python-modules/anki-mac-helper/default.nix 0 → 100644 +46 −0 Original line number Diff line number Diff line { lib, buildPythonPackage, stdenv, anki, hatchling, swift, }: buildPythonPackage (finalAttrs: { pname = "anki-mac-helper"; inherit (anki) version src; pyproject = true; sourceRoot = "${finalAttrs.src.name}/qt/mac"; build-system = [ hatchling ]; nativeBuildInputs = [ swift ]; # This is intended to emulate github:ankitects/anki/qt/mac/helper_build.py, # but targets the platform directly instead of universal binary + lipo. preBuild = '' swiftc \ -target ${stdenv.hostPlatform.darwinArch}-apple-macos11 \ -emit-library \ -module-name ankihelper \ -O \ *.swift \ -o anki_mac_helper/libankihelper.dylib ''; pythonImportsCheck = [ "anki_mac_helper" ]; meta = { description = "Small support library for Anki on Macs"; homepage = "https://github.com/ankitects/anki"; sourceProvenance = with lib.sourceTypes; [ fromSource ]; platforms = lib.platforms.darwin; license = lib.licenses.agpl3Plus; maintainers = with lib.maintainers; [ euank junestepp oxij ]; }; }) pkgs/top-level/python-packages.nix +4 −0 Original line number Diff line number Diff line Loading @@ -760,6 +760,10 @@ self: super: with self; { anki-audio = callPackage ../development/python-modules/anki-audio { }; anki-mac-helper = callPackage ../development/python-modules/anki-mac-helper { inherit (pkgs) swift; }; anndata = callPackage ../development/python-modules/anndata { }; annexremote = callPackage ../development/python-modules/annexremote { }; Loading Loading
pkgs/development/python-modules/anki-mac-helper/default.nix 0 → 100644 +46 −0 Original line number Diff line number Diff line { lib, buildPythonPackage, stdenv, anki, hatchling, swift, }: buildPythonPackage (finalAttrs: { pname = "anki-mac-helper"; inherit (anki) version src; pyproject = true; sourceRoot = "${finalAttrs.src.name}/qt/mac"; build-system = [ hatchling ]; nativeBuildInputs = [ swift ]; # This is intended to emulate github:ankitects/anki/qt/mac/helper_build.py, # but targets the platform directly instead of universal binary + lipo. preBuild = '' swiftc \ -target ${stdenv.hostPlatform.darwinArch}-apple-macos11 \ -emit-library \ -module-name ankihelper \ -O \ *.swift \ -o anki_mac_helper/libankihelper.dylib ''; pythonImportsCheck = [ "anki_mac_helper" ]; meta = { description = "Small support library for Anki on Macs"; homepage = "https://github.com/ankitects/anki"; sourceProvenance = with lib.sourceTypes; [ fromSource ]; platforms = lib.platforms.darwin; license = lib.licenses.agpl3Plus; maintainers = with lib.maintainers; [ euank junestepp oxij ]; }; })
pkgs/top-level/python-packages.nix +4 −0 Original line number Diff line number Diff line Loading @@ -760,6 +760,10 @@ self: super: with self; { anki-audio = callPackage ../development/python-modules/anki-audio { }; anki-mac-helper = callPackage ../development/python-modules/anki-mac-helper { inherit (pkgs) swift; }; anndata = callPackage ../development/python-modules/anndata { }; annexremote = callPackage ../development/python-modules/annexremote { }; Loading