From 04f02145ad43c18af3578741dd812f05a730e5b1 Mon Sep 17 00:00:00 2001 From: Nathaniel Griswold Date: Sun, 6 Feb 2022 01:37:24 -0600 Subject: [PATCH 1/2] irssi: switch from tarball to git tag I've just switched irssi to build from the 1.2.3 tag in the git tree, as the build was failing on apple silicon when linking libirc_proxy.la in dir `src/irc/proxy` I kinda just switched it and it built. I did not dig very deep on the reasons behind why this fixed things. I am hoping that Linux still builds, as i have not tested it. Some notes: - The sys_lib_search_path done by fixLibtool in the configure phase now no longer seems to update with the NIX_LDFLAGS. It appears that this is because the newer libtool script does not start the line with 'eval', so the sed does not match. - My system still builds, despite the previous item. I noticed that on this new build, my system defines `allow_undefined_flag` in the libtool script to something nonempty. I guess that may be the reason everything still builds and works at runtime. --- .../networking/irc/irssi/default.nix | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/networking/irc/irssi/default.nix b/pkgs/applications/networking/irc/irssi/default.nix index 7a4fc703dd77..1ee2446460d3 100644 --- a/pkgs/applications/networking/irc/irssi/default.nix +++ b/pkgs/applications/networking/irc/irssi/default.nix @@ -1,17 +1,25 @@ -{ lib, stdenv, fetchurl, pkg-config, ncurses, glib, openssl, perl, libintl, libgcrypt, libotr }: +{ lib, stdenv, fetchFromGitHub, autoconf, automake, libtool, pkg-config, ncurses, glib, openssl, perl, libintl, libgcrypt, libotr, git }: stdenv.mkDerivation rec { pname = "irssi"; version = "1.2.3"; - src = fetchurl { - url = "https://github.com/irssi/irssi/releases/download/${version}/${pname}-${version}.tar.gz"; - sha256 = "09cwz5ff1i5lp35qhhmw6kbw5dwcn9pl16gpzkc92xg5sx3bgjr9"; + + src = fetchFromGitHub { + "owner" = "irssi"; + "repo" = "irssi"; + "rev" = "91dc3e4dfa1a9558c5a7fe0ea982cb9df0e2de65"; + "sha256" = "efnE4vuDd7TnOBxMPduiV0/nez1jVhTjbJ0vzN4ZMcg="; + "leaveDotGit" = true; }; - nativeBuildInputs = [ pkg-config ]; + nativeBuildInputs = [ pkg-config autoconf automake libtool git ]; buildInputs = [ ncurses glib openssl perl libintl libgcrypt libotr ]; + preConfigure = '' + NOCONFIGURE=1 ./autogen.sh + ''; + configureFlags = [ "--with-proxy" "--with-bot" From 51d95fc72a4d73f0864f1db1dcbdea1a1ecfbfd0 Mon Sep 17 00:00:00 2001 From: Nathaniel Griswold Date: Sun, 6 Feb 2022 03:40:01 -0600 Subject: [PATCH 2/2] irssi_fish: update for changes made to irssi src --- pkgs/applications/networking/irc/irssi/fish/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/networking/irc/irssi/fish/default.nix b/pkgs/applications/networking/irc/irssi/fish/default.nix index df59ddec6a90..a3ee4e4ab9c7 100644 --- a/pkgs/applications/networking/irc/irssi/fish/default.nix +++ b/pkgs/applications/networking/irc/irssi/fish/default.nix @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { }; preConfigure = '' - tar xf ${irssi.src} + cp -a "${irssi.src}" "./${irssi.name}" configureFlags="$configureFlags --with-irssi-source=`pwd`/${irssi.name}" ./regen.sh