nix-top: init at 0.1.0

This commit is contained in:
Samuel Dionne-Riel 2018-07-29 15:57:38 -04:00
parent dae9cf6106
commit 92eedad50b
2 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,50 @@
{ stdenv
, lib
, fetchFromGitHub
, ruby
, makeWrapper
, procps # ps
, ncurses # tput
, binutils-unwrapped # strings
, findutils
}:
# No gems used, so mkDerivation is fine.
let
additionalPath = lib.makeBinPath [ncurses procps binutils-unwrapped findutils];
in
stdenv.mkDerivation rec {
name = "nix-top-${version}";
version = "0.1.0";
src = fetchFromGitHub {
owner = "samueldr";
repo = "nix-top";
rev = "v${version}";
sha256 = "0l50w90hs3kmdk5kb3cwjzkx38104j6n4ssqs6jpnqfc2znagpni";
};
nativeBuildInputs = [
makeWrapper
];
buildInputs = [
ruby
];
installPhase = ''
mkdir -p $out/bin/
cp ./nix-top $out/bin/nix-top
wrapProgram $out/bin/nix-top \
--prefix PATH : "${additionalPath}"
'';
meta = with lib; {
description = "Tracks what nix is building";
homepage = https://github.com/samueldr/nix-top;
license = licenses.mit;
maintainers = with maintainers; [ samueldr ];
platforms = platforms.linux;
inherit version;
};
}

View File

@ -21301,6 +21301,8 @@ with pkgs;
nix-template-rpm = callPackage ../build-support/templaterpm { inherit (pythonPackages) python toposort; };
nix-top = callPackage ../tools/package-management/nix-top { };
nix-repl = callPackage ../tools/package-management/nix-repl { nix = nix1; };
nix-review = callPackage ../tools/package-management/nix-review { };