From 42e179667e4f00d696bcb400e211d59178cc2e4d Mon Sep 17 00:00:00 2001 From: Volth Date: Tue, 2 May 2017 10:18:04 +0000 Subject: [PATCH 1/3] far2l: add .desktop file --- pkgs/applications/misc/far2l/default.nix | 30 +++++++++++++++--------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/pkgs/applications/misc/far2l/default.nix b/pkgs/applications/misc/far2l/default.nix index de22e08c705e..0e6d6f49b955 100644 --- a/pkgs/applications/misc/far2l/default.nix +++ b/pkgs/applications/misc/far2l/default.nix @@ -1,19 +1,19 @@ { stdenv, fetchFromGitHub, makeWrapper, cmake, pkgconfig, wxGTK30, glib, pcre, m4, bash, - xdg_utils, xterm, gvfs, zip, unzip, gzip, bzip2, gnutar, p7zip, xz }: + xdg_utils, xterm, gvfs, zip, unzip, gzip, bzip2, gnutar, p7zip, xz, imagemagick }: stdenv.mkDerivation rec { - rev = "c2f2b89db31b1c3cb9bed53267873f4cd7bc996d"; - build = "2017-03-18-${builtins.substring 0 10 rev}"; + rev = "94b09a84db803a2e7071094e7fa776948c6a64f2"; + build = "2017-04-05-${builtins.substring 0 10 rev}"; name = "far2l-2.1.${build}"; src = fetchFromGitHub { owner = "elfmz"; repo = "far2l"; rev = rev; - sha256 = "1172ajg4n8g4ag14b6nb9lclwh2r6v7ccndmvhnj066w35ixnqgb"; + sha256 = "05yaynwn88m1vv15ww50rasjwhcrfgkha4z51qmm2v06638kbxhl"; }; - nativeBuildInputs = [ cmake pkgconfig m4 makeWrapper ]; + nativeBuildInputs = [ cmake pkgconfig m4 makeWrapper imagemagick ]; buildInputs = [ wxGTK30 glib pcre ]; @@ -41,12 +41,20 @@ stdenv.mkDerivation rec { ''; installPhase = '' - mkdir -p $out/{bin,share} - rm install/{far2l_askpass,far2l_sudoapp} - mv install/far2l $out/bin/far2l - mv install $out/share/far2l - ln -s -r $out/bin/far2l $out/share/far2l/far2l_askpass - ln -s -r $out/bin/far2l $out/share/far2l/far2l_sudoapp + mkdir -p $out/bin $out/share/applications $out/share/icons/hicolor/scalable/apps + cp -dpR install $out/share/far2l + mv $out/share/far2l/far2l $out/bin/ + ln -s -r --force $out/bin/far2l $out/share/far2l/far2l_askpass + ln -s -r --force $out/bin/far2l $out/share/far2l/far2l_sudoapp + + sed "s,/usr/bin/,$out/bin/," ../far2l/DE/far2l.desktop > $out/share/applications/far2l.desktop + + cp ../far2l/DE/icons/hicolor/1024x1024/apps/far2l.svg $out/share/icons/hicolor/scalable/apps/ + convert -size 128x128 ../far2l/DE/icons/far2l.svg $out/share/icons/far2l.png + for size in 16x16 24x24 32x32 48x48 64x64 72x72 96x96 128x128 192x192 256x256 512x512 1024x1024; do + mkdir -p $out/share/icons/hicolor/$size/apps + convert -size $size ../far2l/DE/icons/hicolor/$size/apps/far2l.svg $out/share/icons/hicolor/$size/apps/far2l.png + done ''; stripDebugList = "bin share"; From c780d1a157ac885d07d1cc27c3de69a051328630 Mon Sep 17 00:00:00 2001 From: Volth Date: Thu, 4 May 2017 22:34:11 +0000 Subject: [PATCH 2/3] far2l: no need to fix xterm's path, it is used only when xterm is on $PATH --- pkgs/applications/misc/far2l/default.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/far2l/default.nix b/pkgs/applications/misc/far2l/default.nix index 0e6d6f49b955..105f3448600a 100644 --- a/pkgs/applications/misc/far2l/default.nix +++ b/pkgs/applications/misc/far2l/default.nix @@ -1,5 +1,5 @@ { stdenv, fetchFromGitHub, makeWrapper, cmake, pkgconfig, wxGTK30, glib, pcre, m4, bash, - xdg_utils, xterm, gvfs, zip, unzip, gzip, bzip2, gnutar, p7zip, xz, imagemagick }: + xdg_utils, gvfs, zip, unzip, gzip, bzip2, gnutar, p7zip, xz, imagemagick }: stdenv.mkDerivation rec { rev = "94b09a84db803a2e7071094e7fa776948c6a64f2"; @@ -23,8 +23,7 @@ stdenv.mkDerivation rec { substituteInPlace far2l/bootstrap/open.sh \ --replace 'gvfs-trash' '${gvfs}/bin/gvfs-trash' substituteInPlace far2l/bootstrap/open.sh \ - --replace 'xdg-open' '${xdg_utils}/bin/xdg-open' \ - --replace 'xterm' '${xterm}/bin/xterm' + --replace 'xdg-open' '${xdg_utils}/bin/xdg-open' substituteInPlace far2l/vtcompletor.cpp \ --replace '"/bin/bash"' '"${bash}/bin/bash"' substituteInPlace multiarc/src/formats/zip/zip.cpp \ From e905cf95bbe7d627f7292bfc4de2dc6a4a5aa626 Mon Sep 17 00:00:00 2001 From: Volth Date: Tue, 9 May 2017 15:20:54 +0000 Subject: [PATCH 3/3] far2l: VT: support 'keypad' switching (fix https://github.com/elfmz/far2l/issues/273) --- pkgs/applications/misc/far2l/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/far2l/default.nix b/pkgs/applications/misc/far2l/default.nix index 105f3448600a..87709ec102bf 100644 --- a/pkgs/applications/misc/far2l/default.nix +++ b/pkgs/applications/misc/far2l/default.nix @@ -2,15 +2,15 @@ xdg_utils, gvfs, zip, unzip, gzip, bzip2, gnutar, p7zip, xz, imagemagick }: stdenv.mkDerivation rec { - rev = "94b09a84db803a2e7071094e7fa776948c6a64f2"; - build = "2017-04-05-${builtins.substring 0 10 rev}"; + rev = "ab240373f69824c56e9255d452b689cff3b1ecfb"; + build = "2017-05-09-${builtins.substring 0 10 rev}"; name = "far2l-2.1.${build}"; src = fetchFromGitHub { owner = "elfmz"; repo = "far2l"; rev = rev; - sha256 = "05yaynwn88m1vv15ww50rasjwhcrfgkha4z51qmm2v06638kbxhl"; + sha256 = "1b6w6xhja3xkfzhrdy8a8qpbhxws75khm1zhwz8sc8la9ykd541q"; }; nativeBuildInputs = [ cmake pkgconfig m4 makeWrapper imagemagick ];