python-cosmopolitan: init at 3.6.14

This commit is contained in:
Louis Bettens 2022-03-29 18:00:16 +02:00
parent f760f24de3
commit bd84351def
4 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,39 @@
{ lib, stdenv, cosmopolitan, unzip, bintools-unwrapped }:
stdenv.mkDerivation rec {
pname = "python-cosmopolitan";
version = "3.6.14";
src = cosmopolitan.dist;
patches = [
./ioctl.patch # required /dev/tty
];
nativeBuildInputs = [ bintools-unwrapped unzip ];
# slashes are significant because upstream uses o/$(MODE)/foo.o
buildFlags = "o//third_party/python";
checkTarget = "o//third_party/python/test";
enableParallelBuilding = true;
doCheck = true;
dontConfigure = true;
dontFixup = true;
installPhase = ''
runHook preInstall
install o/third_party/python/*.com -Dt $out/bin
runHook postInstall
'';
meta = with lib; {
homepage = "https://justine.lol/cosmopolitan/";
description = "Actually Portable Python using Cosmopolitan";
platforms = platforms.x86_64;
badPlatforms = platforms.darwin;
license = licenses.isc;
maintainers = with maintainers; [ lourkeur tomberek ];
mainProgram = "python.com";
};
}

View file

@ -0,0 +1,12 @@
diff --git a/third_party/python/python.mk b/third_party/python/python.mk
index f18c15060..b17455bca 100644
--- a/third_party/python/python.mk
+++ b/third_party/python/python.mk
@@ -1818,7 +1818,6 @@ THIRD_PARTY_PYTHON_PYTEST_PYMAINS = \
third_party/python/Lib/test/test_int_literal.py \
third_party/python/Lib/test/test_bisect.py \
third_party/python/Lib/test/test_pyexpat.py \
- third_party/python/Lib/test/test_ioctl.py \
third_party/python/Lib/test/test_getopt.py \
third_party/python/Lib/test/test_sort.py \
third_party/python/Lib/test/test_slice.py \

View file

@ -13,6 +13,8 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ bintools-unwrapped unzip ];
outputs = [ "out" "dist" ];
# slashes are significant because upstream uses o/$(MODE)/foo.o
buildFlags = "o/cosmopolitan.h o//cosmopolitan.a o//libc/crt/crt.o o//ape/ape.o o//ape/ape.lds";
checkTarget = "o//test";
@ -27,6 +29,8 @@ stdenv.mkDerivation rec {
mkdir -p $out/{include,lib}
install o/cosmopolitan.h $out/include
install o/cosmopolitan.a o/libc/crt/crt.o o/ape/ape.{o,lds} $out/lib
cp -RT . "$dist"
runHook postInstall
'';

View file

@ -16520,6 +16520,8 @@ with pkgs;
cosmopolitan = callPackage ../development/libraries/cosmopolitan { };
python-cosmopolitan = callPackage ../development/interpreters/python-cosmopolitan { };
ctl = callPackage ../development/libraries/ctl { };
ctpp2 = callPackage ../development/libraries/ctpp2 { };