Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8b2b0f741375
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 50022e9de864
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on May 31, 2019

  1. xv: 0.1.0 -> 0.1.1

    lilyball committed May 31, 2019
    Copy the full SHA
    aaa1af8 View commit details

Commits on Jun 1, 2019

  1. Merge pull request #62138 from lilyball/xv

    xv: 0.1.0 -> 0.1.1
    marsam authored Jun 1, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    50022e9 View commit details
Showing with 18 additions and 6 deletions.
  1. +18 −6 pkgs/tools/misc/xv/default.nix
24 changes: 18 additions & 6 deletions pkgs/tools/misc/xv/default.nix
Original file line number Diff line number Diff line change
@@ -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 {
pname = "xv";
version = "0.1.0";
version = "0.1.1";

src = fetchFromGitHub {
owner = "chrisvest";
repo = pname;
rev = "${version}";
sha256 = "1cghg3ypxx6afllvwzc6j4z4h7mylapapipqghpdndrfizk7rsxi";
sha256 = "0x2yd21sr4wik3z22rknkx1fgb64j119ynjls919za8gd83zk81g";
};

cargoSha256 = "0iwx9cxnxlif135s2v2hji8xil38xk5a1h147ryb54v6nabaxvjw";
cargoSha256 = "0m69pcmnx3c3q7lgvbhxc8dl6lavv5ch4r6wg2bhdmapcmb4p7jq";

buildInputs = lib.optionals useNcurses [ ncurses ]
++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security ])
;

buildInputs = [ ncurses ];
# 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 stdenv.lib; {
meta = with lib; {
description = "A visual hex viewer for the terminal";
longDescription = ''
XV is a terminal hex viewer with a text user interface, written in 100% safe Rust.