New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
timg: init at 2020-04-09, tiv: init at 2020-04-09 #85697
Conversation
Ping? |
|
Done. |
@@ -0,0 +1,34 @@ | |||
{ stdenv, pkgs, fetchFromGitHub }: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
although this is possible, its preferred to explicitly import the packages and not the whole pkgs set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not use pkgs as an input.
nativeBuildInputs = with pkgs; [gnumake]; | ||
buildInputs = with pkgs; [libwebp graphicsmagick]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the with pkgs;
will be unnecessary if they are imported explicitly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the version numbers in your commits and PR title to the ones in the package definitions.
@@ -0,0 +1,34 @@ | |||
{ stdenv, pkgs, fetchFromGitHub }: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not use pkgs as an input.
@@ -0,0 +1,34 @@ | |||
{ stdenv, pkgs, fetchFromGitHub }: | |||
|
|||
with stdenv.lib; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do not use with ove rthe entire package.
sha256 = "0vx4i1ibgc0rmjdb607qbdbwxz9m89vam3hgzz2kvji1zl4b90ns"; | ||
}; | ||
|
||
nativeBuildInputs = with pkgs; [gnumake]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nativeBuildInputs = with pkgs; [gnumake]; | |
nativeBuildInputs =[ gnumake ]; |
nativeBuildInputs = with pkgs; [gnumake]; | ||
buildInputs = with pkgs; [libwebp graphicsmagick]; | ||
|
||
phases = [ "unpackPhase" "buildPhase" "installPhase" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not overwrite phases.
with stdenv.lib; | ||
|
||
stdenv.mkDerivation rec { | ||
name = "timg-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name = "timg-${version}"; | |
pname = "timg"; |
with stdenv.lib; | ||
|
||
stdenv.mkDerivation rec { | ||
name = "tiv-${version}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name = "tiv-${version}"; | |
pname = "tiv"; |
@@ -0,0 +1,32 @@ | |||
{ stdenv, pkgs, fetchFromGitHub }: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically all feedback from timg allpies here, too.
nativeBuildInputs = with pkgs; [gnumake gcc]; | ||
buildInputs = with pkgs; [imagemagick]; | ||
phases = ["unpackPhase" "buildPhase" "installPhase"]; | ||
buildPhase = ''make -C src/main/cpp''; | ||
installPhase = '' | ||
mkdir -p "$out/bin/" | ||
cp -a src/main/cpp/tiv "$out/bin/" | ||
''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nativeBuildInputs = with pkgs; [gnumake gcc]; | |
buildInputs = with pkgs; [imagemagick]; | |
phases = ["unpackPhase" "buildPhase" "installPhase"]; | |
buildPhase = ''make -C src/main/cpp''; | |
installPhase = '' | |
mkdir -p "$out/bin/" | |
cp -a src/main/cpp/tiv "$out/bin/" | |
''; | |
nativeBuildInputs = [ gcc gnumake ]; | |
buildInputs = [ imagemagick ]; | |
buildPhase = '' | |
make -C src/main/cpp | |
''; | |
installPhase = '' | |
mkdir -p "$out/bin/" | |
cp -a src/main/cpp/tiv "$out/bin/" | |
''; |
meta = { | ||
license = licenses.asl20; | ||
homepage = "https://github.com/stefanhaustein/TerminalImageViewer"; | ||
description = "Small C++ program to display images in a (modern) terminal using RGB ANSI codes and unicode 4x8 block graphic characters."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description = "Small C++ program to display images in a (modern) terminal using RGB ANSI codes and unicode 4x8 block graphic characters."; | |
description = "Displays images in a (modern) terminal using RGB ANSI codes and unicode 4x8 block graphic characters"; |
meta = { | ||
license = licenses.gpl2; | ||
homepage = "https://github.com/hzeller/timg"; | ||
description = "A viewer that uses 24-Bit color capabilities and 1x2 unicode character blocks to display images in the terminal."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description = "A viewer that uses 24-Bit color capabilities and 1x2 unicode character blocks to display images in the terminal."; | |
description = "Viewer that uses 24-Bit color capabilities and 1x2 unicode character blocks to display images in the terminal"; |
I marked this as stale due to inactivity. → More info |
It has been A Year and I haven't had the bandwidth to go back and deal with my PRs, but I really should do that over the long weekend or something, Sorry. |
Looks like timg and tiv have both been added to nixpkgs by other people since, so I'm dropping this. |
Motivation for this change
These are simple image viewers for the tty, similar to
catimg
but with different feature sets --timg
has better scaling options, andtiv
uses 8x4 block drawing characters to achieve higher resolution.Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)