diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-01-20 12:31:50 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-01-20 12:32:25 +0100 |
commit | b7baf40e099b4215181fe7b0c63083b12ef2c7fb (patch) | |
tree | a6efabd31d05b6d0a36624729e80377bbbfb0149 /nixpkgs/pkgs/development/libraries/readline | |
parent | 710028664e26e85cb831a869b3da9f6993902255 (diff) | |
parent | 0799f514b1cd74878174939df79ac60ca5036673 (diff) | |
download | nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.gz nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.bz2 nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.lz nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.xz nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.zst nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/readline')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/readline/8.2.nix | 49 |
1 files changed, 41 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/development/libraries/readline/8.2.nix b/nixpkgs/pkgs/development/libraries/readline/8.2.nix index 1c53da3cdfa4..72e3370576e7 100644 --- a/nixpkgs/pkgs/development/libraries/readline/8.2.nix +++ b/nixpkgs/pkgs/development/libraries/readline/8.2.nix @@ -1,4 +1,10 @@ -{ fetchurl, stdenv, lib, ncurses +{ lib, stdenv +, fetchpatch, fetchurl +, ncurses, termcap +, curses-library ? + if stdenv.hostPlatform.isWindows + then termcap + else ncurses }: stdenv.mkDerivation rec { @@ -13,7 +19,7 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" "man" "doc" "info" ]; strictDeps = true; - propagatedBuildInputs = [ ncurses ]; + propagatedBuildInputs = [ curses-library ]; patchFlags = [ "-p0" ]; @@ -27,11 +33,38 @@ stdenv.mkDerivation rec { in import ./readline-8.2-patches.nix patch); - patches = - [ ./link-against-ncurses.patch - ./no-arch_only-8.2.patch - ] - ++ upstreamPatches; + patches = lib.optionals (curses-library.pname == "ncurses") [ + ./link-against-ncurses.patch + ] ++ [ + ./no-arch_only-8.2.patch + ] + ++ upstreamPatches + ++ lib.optionals stdenv.hostPlatform.isWindows [ + (fetchpatch { + name = "0001-sigwinch.patch"; + url = "https://github.com/msys2/MINGW-packages/raw/90e7536e3b9c3af55c336d929cfcc32468b2f135/mingw-w64-readline/0001-sigwinch.patch"; + stripLen = 1; + hash = "sha256-sFK6EJrSNl0KLWqFv5zBXaQRuiQoYIZVoZfa8BZqfKA="; + }) + (fetchpatch { + name = "0002-event-hook.patch"; + url = "https://github.com/msys2/MINGW-packages/raw/3476319d2751a676b911f3de9e1ec675081c03b8/mingw-w64-readline/0002-event-hook.patch"; + stripLen = 1; + hash = "sha256-F8ytYuIjBtH83ZCJdf622qjwSw+wZEVyu53E/mPsoAo="; + }) + (fetchpatch { + name = "0003-fd_set.patch"; + url = "https://github.com/msys2/MINGW-packages/raw/35830ab27e5ed35c2a8d486961ab607109f5af50/mingw-w64-readline/0003-fd_set.patch"; + stripLen = 1; + hash = "sha256-UiaXZRPjKecpSaflBMCphI2kqOlcz1JkymlCrtpMng4="; + }) + (fetchpatch { + name = "0004-locale.patch"; + url = "https://github.com/msys2/MINGW-packages/raw/f768c4b74708bb397a77e3374cc1e9e6ef647f20/mingw-w64-readline/0004-locale.patch"; + stripLen = 1; + hash = "sha256-dk4343KP4EWXdRRCs8GRQlBgJFgu1rd79RfjwFD/nJc="; + }) + ]; meta = with lib; { description = "Library for interactive line editing"; @@ -57,7 +90,7 @@ stdenv.mkDerivation rec { maintainers = with maintainers; [ dtzWill ]; - platforms = platforms.unix; + platforms = platforms.unix ++ platforms.windows; branch = "8.2"; }; } |