xv: 0.1.0 -> 0.1.1
This commit is contained in:
parent
b0a6cca3f5
commit
aaa1af8dfd
@ -1,21 +1,33 @@
|
|||||||
{ stdenv, fetchFromGitHub, rustPlatform, ncurses }:
|
{ stdenv, lib, fetchFromGitHub, rustPlatform
|
||||||
|
, ncurses ? null
|
||||||
|
, darwin ? null }:
|
||||||
|
|
||||||
|
let useNcurses = !stdenv.hostPlatform.isWindows; in
|
||||||
|
|
||||||
|
assert useNcurses -> ncurses != null;
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "xv";
|
pname = "xv";
|
||||||
version = "0.1.0";
|
version = "0.1.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "chrisvest";
|
owner = "chrisvest";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "${version}";
|
rev = "${version}";
|
||||||
sha256 = "1cghg3ypxx6afllvwzc6j4z4h7mylapapipqghpdndrfizk7rsxi";
|
sha256 = "0x2yd21sr4wik3z22rknkx1fgb64j119ynjls919za8gd83zk81g";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoSha256 = "0iwx9cxnxlif135s2v2hji8xil38xk5a1h147ryb54v6nabaxvjw";
|
cargoSha256 = "0m69pcmnx3c3q7lgvbhxc8dl6lavv5ch4r6wg2bhdmapcmb4p7jq";
|
||||||
|
|
||||||
buildInputs = [ ncurses ];
|
buildInputs = lib.optionals useNcurses [ ncurses ]
|
||||||
|
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security ])
|
||||||
|
;
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
# I'm picking pancurses for Windows simply because that's the example given in Cursive's
|
||||||
|
# documentation for picking an alternative backend. We could just as easily pick crossterm.
|
||||||
|
cargoBuildFlags = lib.optionals (!useNcurses) [ "--no-default-features" "--features pancurses-backend" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
description = "A visual hex viewer for the terminal";
|
description = "A visual hex viewer for the terminal";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
XV is a terminal hex viewer with a text user interface, written in 100% safe Rust.
|
XV is a terminal hex viewer with a text user interface, written in 100% safe Rust.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user