summary refs log tree commit diff
diff options
context:
space:
mode:
authorTravis A. Everett <travis.a.everett@gmail.com>2023-01-26 21:40:13 -0600
committerTravis A. Everett <travis.a.everett@gmail.com>2023-01-26 21:40:13 -0600
commit5eb7be85665f4d0f051510a92c1d6d03b0487063 (patch)
tree1b7ba95fb0b2ebec14050e8ceca971fa3c87b611
parent513a26c7c74c3a7c45bf1e5312fb49d4a18cffd2 (diff)
downloadnixpkgs-5eb7be85665f4d0f051510a92c1d6d03b0487063.tar
nixpkgs-5eb7be85665f4d0f051510a92c1d6d03b0487063.tar.gz
nixpkgs-5eb7be85665f4d0f051510a92c1d6d03b0487063.tar.bz2
nixpkgs-5eb7be85665f4d0f051510a92c1d6d03b0487063.tar.lz
nixpkgs-5eb7be85665f4d0f051510a92c1d6d03b0487063.tar.xz
nixpkgs-5eb7be85665f4d0f051510a92c1d6d03b0487063.tar.zst
nixpkgs-5eb7be85665f4d0f051510a92c1d6d03b0487063.zip
oil: 0.12.9 -> 0.14.0
-rw-r--r--pkgs/shells/oil/default.nix21
1 files changed, 17 insertions, 4 deletions
diff --git a/pkgs/shells/oil/default.nix b/pkgs/shells/oil/default.nix
index bff43f683fa..ec290910918 100644
--- a/pkgs/shells/oil/default.nix
+++ b/pkgs/shells/oil/default.nix
@@ -1,16 +1,24 @@
-{ stdenv, lib, fetchurl, withReadline ? true, readline }:
+{ stdenv, lib, fetchurl, symlinkJoin, withReadline ? true, readline }:
 
+let
+  readline-all = symlinkJoin {
+    name = "readline-all"; paths = [ readline readline.dev ];
+  };
+in
 stdenv.mkDerivation rec {
   pname = "oil";
-  version = "0.12.9";
+  version = "0.14.0";
 
   src = fetchurl {
     url = "https://www.oilshell.org/download/oil-${version}.tar.xz";
-    hash = "sha256-HY/SZiVOfOrA69gGxEp+qdRnuTJ72XveAk9Xp45zcf8=";
+    hash = "sha256-ZrT2vHfbc0S9Q9e9lDiyptfSC3CIiQs8Co9FODil7oY=";
   };
 
   postPatch = ''
     patchShebangs build
+    # TODO: workaround for https://github.com/oilshell/oil/issues/1467
+    #       check for removability on updates :)
+    substituteInPlace configure --replace "echo '#define HAVE_READLINE 1'" "echo '#define HAVE_READLINE 1' && return 0"
   '';
 
   preInstall = ''
@@ -19,7 +27,12 @@ stdenv.mkDerivation rec {
 
   strictDeps = true;
   buildInputs = lib.optional withReadline readline;
-  configureFlags = lib.optional withReadline "--with-readline";
+  configureFlags = [
+    "--datarootdir=${placeholder "out"}"
+  ] ++ lib.optionals withReadline [
+    "--with-readline"
+    "--readline=${readline-all}"
+  ];
 
   # Stripping breaks the bundles by removing the zip file from the end.
   dontStrip = true;