Merge pull request #44209 from samueldr/feature/nix-top

nix-top: init at 0.1.0 -> 0.2.0
This commit is contained in:
Jörg Thalheim 2018-07-30 10:05:29 +01:00 committed by GitHub
commit a42311a9f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,54 @@
{ stdenv
, lib
, fetchFromGitHub
, ruby
, makeWrapper
, getent # /etc/passwd
, ncurses # tput
, procps # ps
, binutils-unwrapped # strings
, coreutils
, findutils
}:
# No gems used, so mkDerivation is fine.
let
additionalPath = lib.makeBinPath [ getent ncurses binutils-unwrapped coreutils findutils ];
in
stdenv.mkDerivation rec {
name = "nix-top-${version}";
version = "0.2.0";
src = fetchFromGitHub {
owner = "samueldr";
repo = "nix-top";
rev = "v${version}";
sha256 = "0560a9g8n4p764r3va1nn95iv4bg71g8h0wws1af2p5g553j4zps";
};
nativeBuildInputs = [
makeWrapper
];
buildInputs = [
ruby
];
installPhase = ''
mkdir -p $out/libexec/nix-top
install -D -m755 ./nix-top $out/bin/nix-top
wrapProgram $out/bin/nix-top \
--prefix PATH : "$out/libexec/nix-top:${additionalPath}"
'' + stdenv.lib.optionalString stdenv.isDarwin ''
ln -s /bin/stty $out/libexec/nix-top
'';
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 ++ platforms.darwin;
inherit version;
};
}

View File

@ -21367,6 +21367,8 @@ with pkgs;
nix-template-rpm = callPackage ../build-support/templaterpm { inherit (pythonPackages) python toposort; }; 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-repl = callPackage ../tools/package-management/nix-repl { nix = nix1; };
nix-review = callPackage ../tools/package-management/nix-review { }; nix-review = callPackage ../tools/package-management/nix-review { };