rustpython: move to by-name; improve derivation (#369498)
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
{
|
||||
lib,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
python3,
|
||||
versionCheckHook,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "rustpython";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "RustPython";
|
||||
repo = "RustPython";
|
||||
tag = version;
|
||||
hash = "sha256-BYYqvPJu/eFJ9lt07A0p7pd8pGFccUe/okFqGEObhY4=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-LuxET01n5drYmPXXhCl0Cs9yoCQKwWah8FWfmKmLdsg=";
|
||||
|
||||
# freeze the stdlib into the rustpython binary
|
||||
cargoBuildFlags = [ "--features=freeze-stdlib" ];
|
||||
|
||||
nativeCheckInputs = [ python3 ];
|
||||
|
||||
nativeInstallCheckInputs = [
|
||||
versionCheckHook
|
||||
];
|
||||
versionCheckProgramArg = [ "--version" ];
|
||||
doInstallCheck = true;
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script { };
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "Python 3 interpreter in written Rust";
|
||||
homepage = "https://rustpython.github.io";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ prusnak ];
|
||||
mainProgram = "rustpython";
|
||||
};
|
||||
}
|
||||
@@ -206,9 +206,4 @@ in {
|
||||
pythonVersion = "3.9";
|
||||
inherit passthruFun;
|
||||
};
|
||||
|
||||
rustpython = darwin.apple_sdk_11_0.callPackage ./rustpython/default.nix {
|
||||
inherit (darwin.apple_sdk_11_0.frameworks) SystemConfiguration;
|
||||
};
|
||||
|
||||
})
|
||||
|
||||
-3523
File diff suppressed because it is too large
Load Diff
@@ -1,46 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
rustPlatform,
|
||||
fetchFromGitHub,
|
||||
SystemConfiguration,
|
||||
python3,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "rustpython";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "RustPython";
|
||||
repo = "RustPython";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-BYYqvPJu/eFJ9lt07A0p7pd8pGFccUe/okFqGEObhY4=";
|
||||
};
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"rustpython-doc-0.3.0" = "sha256-34ERuLFKzUD9Xmf1zlafe42GLWZfUlw17ejf/NN6yH4=";
|
||||
};
|
||||
};
|
||||
|
||||
# freeze the stdlib into the rustpython binary
|
||||
cargoBuildFlags = [ "--features=freeze-stdlib" ];
|
||||
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ SystemConfiguration ];
|
||||
|
||||
nativeCheckInputs = [ python3 ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python 3 interpreter in written Rust";
|
||||
homepage = "https://rustpython.github.io";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ prusnak ];
|
||||
# = note: Undefined symbols for architecture x86_64:
|
||||
# "_utimensat", referenced from:
|
||||
# rustpython_vm::function::builtin::IntoPyNativeFn::into_func::... in
|
||||
# rustpython-10386d81555652a7.rustpython_vm-f0b5bedfcf056d0b.rustpython_vm.7926b68e665728ca-cgu.08.rcgu.o.rcgu.o
|
||||
broken = stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64;
|
||||
};
|
||||
}
|
||||
@@ -7398,7 +7398,7 @@ with pkgs;
|
||||
};
|
||||
|
||||
pythonInterpreters = callPackage ./../development/interpreters/python { };
|
||||
inherit (pythonInterpreters) python27 python39 python310 python311 python312 python313 python314 python3Minimal pypy27 pypy310 pypy39 rustpython;
|
||||
inherit (pythonInterpreters) python27 python39 python310 python311 python312 python313 python314 python3Minimal pypy27 pypy310 pypy39;
|
||||
|
||||
# List of extensions with overrides to apply to all Python package sets.
|
||||
pythonPackagesExtensions = [ ];
|
||||
|
||||
Reference in New Issue
Block a user