diff options
author | Louis Bettens <louis@bettens.info> | 2022-03-29 18:00:16 +0200 |
---|---|---|
committer | Louis Bettens <louis@bettens.info> | 2022-03-30 10:33:17 +0200 |
commit | bd84351def15c0fe7a8a387347a6f10b4805f6ca (patch) | |
tree | 3af6c4dbf5b0bc04ab933096382d7d04d33d91b6 /pkgs/development/interpreters/python-cosmopolitan | |
parent | f760f24de31ba7f01d3eecc017b499e738eefaec (diff) | |
download | nixlib-bd84351def15c0fe7a8a387347a6f10b4805f6ca.tar nixlib-bd84351def15c0fe7a8a387347a6f10b4805f6ca.tar.gz nixlib-bd84351def15c0fe7a8a387347a6f10b4805f6ca.tar.bz2 nixlib-bd84351def15c0fe7a8a387347a6f10b4805f6ca.tar.lz nixlib-bd84351def15c0fe7a8a387347a6f10b4805f6ca.tar.xz nixlib-bd84351def15c0fe7a8a387347a6f10b4805f6ca.tar.zst nixlib-bd84351def15c0fe7a8a387347a6f10b4805f6ca.zip |
python-cosmopolitan: init at 3.6.14
Diffstat (limited to 'pkgs/development/interpreters/python-cosmopolitan')
-rw-r--r-- | pkgs/development/interpreters/python-cosmopolitan/default.nix | 39 | ||||
-rw-r--r-- | pkgs/development/interpreters/python-cosmopolitan/ioctl.patch | 12 |
2 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/development/interpreters/python-cosmopolitan/default.nix b/pkgs/development/interpreters/python-cosmopolitan/default.nix new file mode 100644 index 000000000000..07de40356d21 --- /dev/null +++ b/pkgs/development/interpreters/python-cosmopolitan/default.nix @@ -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"; + }; +} diff --git a/pkgs/development/interpreters/python-cosmopolitan/ioctl.patch b/pkgs/development/interpreters/python-cosmopolitan/ioctl.patch new file mode 100644 index 000000000000..e6e7eb4fc7b0 --- /dev/null +++ b/pkgs/development/interpreters/python-cosmopolitan/ioctl.patch @@ -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 \ |