From 87125d6d085aa5810e31f3bc6a35626818861f36 Mon Sep 17 00:00:00 2001 From: Symphorien Gibol Date: Mon, 21 May 2018 22:42:35 +0200 Subject: [PATCH] nix-du: init at 0.1.1 --- .../package-management/nix-du/default.nix | 30 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/tools/package-management/nix-du/default.nix diff --git a/pkgs/tools/package-management/nix-du/default.nix b/pkgs/tools/package-management/nix-du/default.nix new file mode 100644 index 000000000000..2e68666b7fa3 --- /dev/null +++ b/pkgs/tools/package-management/nix-du/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchFromGitHub, rustPlatform, nix, boost, graphviz }: +rustPlatform.buildRustPackage rec { + name = "nix-du-${version}"; + version = "0.1.1"; + + src = fetchFromGitHub { + owner = "symphorien"; + repo = "nix-du"; + rev = "v${version}"; + sha256 = "0kxacn5qw21pp4zl6wr9wyb2mm2nlnp6mla3m5p9dm7vrm1fd1x9"; + }; + cargoSha256 = "04c48lzi7hny3nq4ffdpvsr4dxbi32faka163fp1yc9953zdw9az"; + + doCheck = !stdenv.isDarwin; + checkInputs = [ graphviz ]; + nativeBuildInputs = [] ++ stdenv.lib.optionals doCheck checkInputs; + + buildInputs = [ + boost + nix + ]; + + meta = with stdenv.lib; { + description = "A tool to determine which gc-roots take space in your nix store"; + homepage = https://github.com/symphorien/nix-du; + license = licenses.lgpl3; + maintainers = [ maintainers.symphorien ]; + platforms = platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b20cf36a05fb..f8b704d03913 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20729,6 +20729,8 @@ with pkgs; nix-deploy = haskell.lib.justStaticExecutables haskellPackages.nix-deploy; nix-diff = haskell.lib.justStaticExecutables haskellPackages.nix-diff; + nix-du = callPackage ../tools/package-management/nix-du { }; + nix-info = callPackage ../tools/nix/info { }; nix-info-tested = callPackage ../tools/nix/info { doCheck = true; };