about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/misc/resholve/oildev.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2024-05-03 15:14:25 +0200
committerAlyssa Ross <hi@alyssa.is>2024-05-07 11:19:19 +0200
commitd92b2b6a1bbd322dd65a8b6f51019610d350046e (patch)
tree7f7c21927b9cc05676501f297c51eb76b49e326c /nixpkgs/pkgs/development/misc/resholve/oildev.nix
parent93c9e56b40530cc627d921cfc255c05b495d4017 (diff)
parent49050352f602fe87d16ff7b2b6a05b79eb20dc6f (diff)
downloadnixlib-d92b2b6a1bbd322dd65a8b6f51019610d350046e.tar
nixlib-d92b2b6a1bbd322dd65a8b6f51019610d350046e.tar.gz
nixlib-d92b2b6a1bbd322dd65a8b6f51019610d350046e.tar.bz2
nixlib-d92b2b6a1bbd322dd65a8b6f51019610d350046e.tar.lz
nixlib-d92b2b6a1bbd322dd65a8b6f51019610d350046e.tar.xz
nixlib-d92b2b6a1bbd322dd65a8b6f51019610d350046e.tar.zst
nixlib-d92b2b6a1bbd322dd65a8b6f51019610d350046e.zip
Merge remote-tracking branch 'nixpkgs/nixos-unstable-small'
Conflicts:
	nixpkgs/nixos/modules/services/mail/mailman.nix
	nixpkgs/nixos/modules/services/mail/public-inbox.nix
	nixpkgs/pkgs/build-support/go/module.nix
Diffstat (limited to 'nixpkgs/pkgs/development/misc/resholve/oildev.nix')
-rw-r--r--nixpkgs/pkgs/development/misc/resholve/oildev.nix60
1 files changed, 18 insertions, 42 deletions
diff --git a/nixpkgs/pkgs/development/misc/resholve/oildev.nix b/nixpkgs/pkgs/development/misc/resholve/oildev.nix
index 767cedee3913..c770fb894a3b 100644
--- a/nixpkgs/pkgs/development/misc/resholve/oildev.nix
+++ b/nixpkgs/pkgs/development/misc/resholve/oildev.nix
@@ -4,35 +4,15 @@
 , callPackage
 , fetchFromGitHub
 , makeWrapper
-, # py-yajl deps
-  git
-, # oil deps
-  pkgsBuildBuild
 , re2c
+, # oil deps
+  glibcLocales
 , file
 , six
 , typing
 }:
 
 rec {
-  py-yajl = python27.pkgs.buildPythonPackage rec {
-    pname = "oil-pyyajl-unstable";
-    version = "2022-09-01";
-    src = fetchFromGitHub {
-      owner = "oilshell";
-      repo = "py-yajl";
-      rev = "72686b0e2e9d13d3ce5fefe47ecd607c540c90a3";
-      hash = "sha256-H3GKN0Pq1VFD5+SWxm8CXUVO7zAyj/ngKVmDaG/aRT4=";
-      fetchSubmodules = true;
-    };
-    patches = [
-      # Fixes several incompatible function pointer conversions, which are errors in clang 16.
-      ./0014-clang_incompatible_function_pointer_conversions.patch
-    ];
-    # just for submodule IIRC
-    nativeBuildInputs = [ git ];
-  };
-
   /*
     Upstream isn't interested in packaging this as a library
     (or accepting all of the patches we need to do so).
@@ -40,14 +20,14 @@ rec {
   */
   oildev = python27.pkgs.buildPythonPackage rec {
     pname = "oildev-unstable";
-    version = "2021-07-14";
+    version = "2024-02-26";
 
     src = fetchFromGitHub {
       owner = "oilshell";
       repo = "oil";
-      # rev == present HEAD of release/0.14.0
-      rev = "3d0427e222f7e42ae7be90c706d7fde555efca2e";
-      hash = "sha256-XMoNkBEEmD6AwNSu1uSh3OcWLfy4/ADtRckn/Pj2cP4=";
+      # rev == present HEAD of release/0.20.0
+      rev = "f730c79e2dcde4bc08e85a718951cfa42102bd01";
+      hash = "sha256-HBj3Izh1gD63EzbgZ/9If5vihR5L2HhnyCyMah6rMg4=";
 
       /*
         It's not critical to drop most of these; the primary target is
@@ -58,7 +38,7 @@ rec {
         hash on rev updates. Command will fail w/o and not print hash.
       */
       postFetch = ''
-        rm -rf $out/{Python-2.7.13,metrics,py-yajl,rfc,gold,web,testdata,services,demo,devtools}
+        rm -rf $out/{Python-2.7.13,metrics,py-yajl,rfc,gold,web,testdata,services,demo}
       '';
     };
 
@@ -66,13 +46,13 @@ rec {
     patchSrc = fetchFromGitHub {
       owner = "abathur";
       repo = "nix-py-dev-oil";
-      rev = "v0.14.0.1";
-      hash = "sha256-47+986+SohdtoNzTYAgF2vPPWgakyg0VCmR+MgxMzTk=";
+      rev = "v0.20.0.0";
+      hash = "sha256-qoA54rnzAdnFZ3k4kRzQWEdgtEjraCT5+NFw8AWnRDk=";
     };
+
     patches = [
       "${patchSrc}/0001-add_setup_py.patch"
       "${patchSrc}/0002-add_MANIFEST_in.patch"
-      "${patchSrc}/0004-disable-internal-py-yajl-for-nix-built.patch"
       "${patchSrc}/0006-disable_failing_libc_tests.patch"
       "${patchSrc}/0007-namespace_via_init.patch"
       "${patchSrc}/0009-avoid_nix_arch64_darwin_toolchain_bug.patch"
@@ -80,37 +60,32 @@ rec {
       "${patchSrc}/0011-disable-fanos.patch"
       "${patchSrc}/0012-disable-doc-cmark.patch"
       "${patchSrc}/0013-fix-pyverify.patch"
+      "${patchSrc}/0015-fix-compiled-extension-import-paths.patch"
     ];
 
     configureFlags = [
       "--without-readline"
     ];
 
-    depsBuildBuild = [ re2c ];
-
-    nativeBuildInputs = [ file makeWrapper ];
+    nativeBuildInputs = [ re2c file makeWrapper ];
 
-    propagatedBuildInputs = [ six typing py-yajl ];
+    propagatedBuildInputs = [ six typing ];
 
     doCheck = true;
 
     preBuild = ''
-      build/dev.sh all
+      build/py.sh all
     '';
 
     postPatch = ''
-      patchShebangs asdl build core doctools frontend pyext oil_lang
-      substituteInPlace pyext/fastlex.c --replace '_gen/frontend' '../_gen/frontend'
-      substituteInPlace core/main_loop.py --replace 'import fanos' '# import fanos'
+      patchShebangs asdl build core doctools frontend pyext oil_lang ysh
       rm cpp/stdlib.h # keep modules from finding the wrong stdlib?
       # work around hard parse failure documented in oilshell/oil#1468
       substituteInPlace osh/cmd_parse.py --replace 'elif self.c_id == Id.Op_LParen' 'elif False'
-      # disable fragile libc tests
-      substituteInPlace build/py.sh --replace "py-ext-test pyext/libc_test.py" "#py-ext-test pyext/libc_test.py"
     '';
 
     # See earlier note on glibcLocales TODO: verify needed?
-    LOCALE_ARCHIVE = lib.optionalString (stdenv.buildPlatform.libc == "glibc") "${pkgsBuildBuild.glibcLocales}/lib/locale/locale-archive";
+    LOCALE_ARCHIVE = lib.optionalString (stdenv.buildPlatform.libc == "glibc") "${glibcLocales}/lib/locale/locale-archive";
 
     # not exhaustive; sample what resholve uses as a sanity check
     pythonImportsCheck = [
@@ -121,7 +96,8 @@ rec {
       "oil._devbuild"
       "oil._devbuild.gen.id_kind_asdl"
       "oil._devbuild.gen.syntax_asdl"
-      "oil.tools.osh2oil"
+      "oil.osh"
+      "oil.tools.ysh_ify"
     ];
 
     meta = {