nix-top: 0.1.0 -> 0.2.0

This commit is contained in:
Samuel Dionne-Riel 2018-07-29 22:09:02 -04:00
parent 92eedad50b
commit e1dc63b41b

View File

@ -3,25 +3,27 @@
, fetchFromGitHub , fetchFromGitHub
, ruby , ruby
, makeWrapper , makeWrapper
, procps # ps , getent # /etc/passwd
, ncurses # tput , ncurses # tput
, procps # ps
, binutils-unwrapped # strings , binutils-unwrapped # strings
, coreutils
, findutils , findutils
}: }:
# No gems used, so mkDerivation is fine. # No gems used, so mkDerivation is fine.
let let
additionalPath = lib.makeBinPath [ncurses procps binutils-unwrapped findutils]; additionalPath = lib.makeBinPath [ getent ncurses binutils-unwrapped coreutils findutils ];
in in
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "nix-top-${version}"; name = "nix-top-${version}";
version = "0.1.0"; version = "0.2.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "samueldr"; owner = "samueldr";
repo = "nix-top"; repo = "nix-top";
rev = "v${version}"; rev = "v${version}";
sha256 = "0l50w90hs3kmdk5kb3cwjzkx38104j6n4ssqs6jpnqfc2znagpni"; sha256 = "0560a9g8n4p764r3va1nn95iv4bg71g8h0wws1af2p5g553j4zps";
}; };
nativeBuildInputs = [ nativeBuildInputs = [
@ -33,10 +35,13 @@ stdenv.mkDerivation rec {
]; ];
installPhase = '' installPhase = ''
mkdir -p $out/bin/ mkdir -p $out/bin $out/libexec/nix-top
cp ./nix-top $out/bin/nix-top cp ./nix-top $out/bin/nix-top
chmod +x $out/bin/nix-top
wrapProgram $out/bin/nix-top \ wrapProgram $out/bin/nix-top \
--prefix PATH : "${additionalPath}" --prefix PATH : "$out/libexec/nix-top:${additionalPath}"
'' + stdenv.lib.optionalString stdenv.isDarwin ''
ln -s /bin/stty $out/libexec/nix-top
''; '';
meta = with lib; { meta = with lib; {
@ -44,7 +49,7 @@ stdenv.mkDerivation rec {
homepage = https://github.com/samueldr/nix-top; homepage = https://github.com/samueldr/nix-top;
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ samueldr ]; maintainers = with maintainers; [ samueldr ];
platforms = platforms.linux; platforms = platforms.linux ++ platforms.darwin;
inherit version; inherit version;
}; };
} }