about summary refs log tree commit diff
path: root/pkgs/tools/security/lastpass-cli
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-05-21 11:28:13 +0100
committerSergei Trofimovich <slyich@gmail.com>2022-05-21 11:29:05 +0100
commit6f7f5bc8235a37214d92fb817a95d31af5f1e052 (patch)
tree7e5f1bceb6e009e04332154345ec74013459752a /pkgs/tools/security/lastpass-cli
parent25e4e7af034950c2d0f408b4b12b362968572ac2 (diff)
downloadnixlib-6f7f5bc8235a37214d92fb817a95d31af5f1e052.tar
nixlib-6f7f5bc8235a37214d92fb817a95d31af5f1e052.tar.gz
nixlib-6f7f5bc8235a37214d92fb817a95d31af5f1e052.tar.bz2
nixlib-6f7f5bc8235a37214d92fb817a95d31af5f1e052.tar.lz
nixlib-6f7f5bc8235a37214d92fb817a95d31af5f1e052.tar.xz
nixlib-6f7f5bc8235a37214d92fb817a95d31af5f1e052.tar.zst
nixlib-6f7f5bc8235a37214d92fb817a95d31af5f1e052.zip
lastpass-cli: fix build for -fno-common toolchains
Without the change build fails on upstream gcc-10:

    ld: CMakeFiles/lpass.dir/util.c.o:(.bss+0x8): multiple definition of
      `ARGC'; CMakeFiles/lpass.dir/agent.c.o:(.bss+0x8): first defined here
Diffstat (limited to 'pkgs/tools/security/lastpass-cli')
-rw-r--r--pkgs/tools/security/lastpass-cli/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/tools/security/lastpass-cli/default.nix b/pkgs/tools/security/lastpass-cli/default.nix
index 3da3342e3794..14a6ef750e3a 100644
--- a/pkgs/tools/security/lastpass-cli/default.nix
+++ b/pkgs/tools/security/lastpass-cli/default.nix
@@ -1,6 +1,7 @@
 { stdenv
 , lib
 , fetchFromGitHub
+, fetchpatch
 , asciidoc
 , cmake
 , docbook_xsl
@@ -23,6 +24,16 @@ stdenv.mkDerivation rec {
     sha256 = "168jg8kjbylfgalhicn0llbykd7kdc9id2989gg0nxlgmnvzl58a";
   };
 
+  patches = [
+    # Pull fix pending upstream inclusion for -fno-common toolchains:
+    #   https://github.com/lastpass/lastpass-cli/pull/576
+    (fetchpatch {
+      name = "fno-common.patch";
+      url = "https://github.com/lastpass/lastpass-cli/commit/e3311cebdb29a3267843cf656a32f01c5062897e.patch";
+      sha256 = "1yjx2p98nb3n8ywc9lhf2zal5fswawb5i6lgnicdin23zngff5l8";
+    })
+  ];
+
   nativeBuildInputs = [ asciidoc cmake docbook_xsl pkg-config ];
 
   buildInputs = [