summary refs log tree commit diff
path: root/maintainers/scripts/nixpkgs-lint.nix
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2013-07-25 23:50:14 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2013-07-25 23:52:36 +0200
commit6b495e9251edf626429d143f9fd209884926f44c (patch)
treeb33dd0cc3ee317a8c075df86ddbc47142bfa8ec6 /maintainers/scripts/nixpkgs-lint.nix
parentb0a12396ef8c0b2b57abe64f2dd5ad35b8707a0d (diff)
downloadnixpkgs-6b495e9251edf626429d143f9fd209884926f44c.tar
nixpkgs-6b495e9251edf626429d143f9fd209884926f44c.tar.gz
nixpkgs-6b495e9251edf626429d143f9fd209884926f44c.tar.bz2
nixpkgs-6b495e9251edf626429d143f9fd209884926f44c.tar.lz
nixpkgs-6b495e9251edf626429d143f9fd209884926f44c.tar.xz
nixpkgs-6b495e9251edf626429d143f9fd209884926f44c.tar.zst
nixpkgs-6b495e9251edf626429d143f9fd209884926f44c.zip
Add nixpkgs-lint
This is a simple tool to scan Nixpkgs for violations of the packaging
guidelines, such as multiple packages with the same name, packages
that lack a description or license, and so on.

To use:

$ nix-env -i nixpkgs-lint
$ cd .../nixpkgs
$ nixpkgs-lint

Current statistics:

Number of packages: 8666
Number of missing maintainers: 3711
Number of missing licenses: 6159
Number of missing descriptions: 1337
Number of bad descriptions: 633
Number of name collisions: 277
Diffstat (limited to 'maintainers/scripts/nixpkgs-lint.nix')
-rw-r--r--maintainers/scripts/nixpkgs-lint.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/maintainers/scripts/nixpkgs-lint.nix b/maintainers/scripts/nixpkgs-lint.nix
new file mode 100644
index 00000000000..5eb7649d58d
--- /dev/null
+++ b/maintainers/scripts/nixpkgs-lint.nix
@@ -0,0 +1,22 @@
+{ stdenv, makeWrapper, perl, perlPackages }:
+
+stdenv.mkDerivation {
+  name = "nixpkgs-lint-1";
+
+  buildInputs = [ makeWrapper perl perlPackages.XMLSimple ];
+
+  unpackPhase = "true";
+  buildPhase = "true";
+
+  installPhase =
+    ''
+      mkdir -p $out/bin
+      cp ${./nixpkgs-lint.pl} $out/bin/nixpkgs-lint
+      wrapProgram $out/bin/nixpkgs-lint --set PERL5LIB $PERL5LIB
+    '';
+
+  meta = {
+    maintainers = [ stdenv.lib.maintainers.eelco ];
+    description = "A utility for Nixpkgs contributors to check Nixpkgs for common errors";
+  };
+}