diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2021-11-06 21:14:10 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyich@gmail.com> | 2021-11-06 21:15:13 +0000 |
commit | 9af25ef30bb15cca4996943af31909007432f9e7 (patch) | |
tree | f935089e14ff734edfc9782ee030117ee32bbf12 /pkgs/os-specific/linux/smemstat | |
parent | 2606cb0fc24e65f489b7d9fdcbf219756e45db35 (diff) | |
download | nixpkgs-9af25ef30bb15cca4996943af31909007432f9e7.tar nixpkgs-9af25ef30bb15cca4996943af31909007432f9e7.tar.gz nixpkgs-9af25ef30bb15cca4996943af31909007432f9e7.tar.bz2 nixpkgs-9af25ef30bb15cca4996943af31909007432f9e7.tar.lz nixpkgs-9af25ef30bb15cca4996943af31909007432f9e7.tar.xz nixpkgs-9af25ef30bb15cca4996943af31909007432f9e7.tar.zst nixpkgs-9af25ef30bb15cca4996943af31909007432f9e7.zip |
smemstat: pull pending upstream inclusion fix for ncurses-6.3
Without the fix build on ncurses-6.3 fails as: smemstat.c:348:33: error: format not a string literal and no format arguments [-Werror=format-security] 348 | (void)mvprintw(cury, 0, buf); | ^~~
Diffstat (limited to 'pkgs/os-specific/linux/smemstat')
-rw-r--r-- | pkgs/os-specific/linux/smemstat/default.nix | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/pkgs/os-specific/linux/smemstat/default.nix b/pkgs/os-specific/linux/smemstat/default.nix index 1510981c176..f95532ada3c 100644 --- a/pkgs/os-specific/linux/smemstat/default.nix +++ b/pkgs/os-specific/linux/smemstat/default.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, ncurses }: +{ stdenv, lib, fetchurl, fetchpatch, ncurses }: stdenv.mkDerivation rec { pname = "smemstat"; @@ -7,6 +7,15 @@ stdenv.mkDerivation rec { url = "https://kernel.ubuntu.com/~cking/tarballs/smemstat/smemstat-${version}.tar.xz"; sha256 = "sha256-Vrs1jOg5yHdEffVo769aaxSawo4iZtGrFJ65Nu+RhcU="; }; + patches = [ + # Pull patch pending upstream inclusion to support ncurses-6.3: + # https://github.com/ColinIanKing/smemstat/pull/1 + (fetchpatch { + name = "ncurses-6.3.patch"; + url = "https://github.com/ColinIanKing/smemstat/commit/95119558d1679295c9f9f7f618ddbe212674a4bf.patch"; + sha256 = "sha256-Cl3Y0HIy1nXqBux6+AXoPuKJatSv3Z0X/4bD+MNjkAQ="; + }) + ]; buildInputs = [ ncurses ]; installFlags = [ "DESTDIR=$(out)" ]; postInstall = '' @@ -15,7 +24,7 @@ stdenv.mkDerivation rec { ''; meta = with lib; { description = "Memory usage monitoring tool"; - homepage = "https://kernel.ubuntu.com/~cking/smemstat/"; + homepage = "https://github.com/ColinIanKing/smemstat"; license = licenses.gpl2; platforms = platforms.linux; maintainers = with maintainers; [ womfoo ]; |