Merge pull request #149748 from prusnak/rustpython

rustpython: init at unstable-2021-12-09

authored by Pavol Rusnak and committed by GitHub fc58c376 dcf4fb51

+49 -1
+4
pkgs/development/interpreters/python/default.nix
··· 285 285 inherit passthruFun; 286 286 }; 287 287 288 + rustpython = callPackage ./rustpython/default.nix { 289 + inherit (darwin.apple_sdk.frameworks) SystemConfiguration; 290 + }; 291 + 288 292 })
+44
pkgs/development/interpreters/python/rustpython/default.nix
··· 1 + { lib 2 + , stdenv 3 + , rustPlatform 4 + , fetchFromGitHub 5 + , SystemConfiguration 6 + , python3 7 + }: 8 + 9 + rustPlatform.buildRustPackage rec { 10 + pname = "rustpython"; 11 + version = "unstable-2021-12-09"; 12 + 13 + src = fetchFromGitHub { 14 + owner = "RustPython"; 15 + repo = "RustPython"; 16 + rev = "db3b3127df34ff5dd569301aa36ed71ae5624e4e"; 17 + sha256 = "sha256-YwGfXs3A5L/18mHnnWubPU3Y8EI9uU3keJ2HJnnTwv0="; 18 + }; 19 + 20 + cargoHash = "sha256-T85kiPG80oZ4mwpb8Ag40wDHKx2Aens+gM7NGXan5lM="; 21 + 22 + # freeze the stdlib into the rustpython binary 23 + cargoBuildFlags = "--features=freeze-stdlib"; 24 + 25 + buildInputs = lib.optionals stdenv.isDarwin [ SystemConfiguration ]; 26 + 27 + checkInputs = [ python3 ]; 28 + 29 + meta = with lib; { 30 + description = "Python 3 interpreter in written Rust"; 31 + homepage = "https://rustpython.github.io"; 32 + license = licenses.mit; 33 + maintainers = with maintainers; [ prusnak ]; 34 + 35 + # TODO: Remove once nixpkgs uses newer SDKs that supports '*at' functions. 36 + # Probably macOS SDK 10.13 or later. Check the current version in 37 + # .../os-specific/darwin/apple-sdk/default.nix 38 + # 39 + # From the build logs: 40 + # 41 + # > Undefined symbols for architecture x86_64: "_utimensat" 42 + broken = stdenv.isDarwin && stdenv.isx86_64; 43 + }; 44 + }
+1 -1
pkgs/top-level/all-packages.nix
··· 13604 13604 python3Packages = python3.pkgs; 13605 13605 13606 13606 pythonInterpreters = callPackage ./../development/interpreters/python { }; 13607 - inherit (pythonInterpreters) python27 python37 python38 python39 python310 python3Minimal pypy27 pypy38; 13607 + inherit (pythonInterpreters) python27 python37 python38 python39 python310 python3Minimal pypy27 pypy38 rustpython; 13608 13608 13609 13609 # Python package sets. 13610 13610 python27Packages = python27.pkgs;