Author: simons
Date: Mon Jan 30 11:40:20 2012
New Revision: 31934
URL: https://nixos.org/websvn/nix/?rev=31934&sc=1
Log:
hardlink: initial version
Hardlink consolidates duplicate files in a directory hierarchy with hardlinks,
similar to "nix-store --optimise".
IHMO, this program should be run by the default builder after $out has been set
up, to remove redundancy in the generated closures.
Added:
nixpkgs/trunk/pkgs/tools/system/hardlink/
nixpkgs/trunk/pkgs/tools/system/hardlink/default.nix
Modified:
nixpkgs/trunk/pkgs/top-level/all-packages.nix
Added: nixpkgs/trunk/pkgs/tools/system/hardlink/default.nix
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ nixpkgs/trunk/pkgs/tools/system/hardlink/default.nix Mon Jan 30
11:40:20 2012 (r31934)
@@ -0,0 +1,37 @@
+{ fetchurl, stdenv }:
+
+let
+ rev = "269cc6";
+
+ src = fetchurl {
+ url =
"http://pkgs.fedoraproject.org/gitweb/?p=hardlink.git;a=blob_plain;f=hardlink.c;hb=${rev}";
+ sha256 =
"721c54e653772e11bf0d30fb02aa21b96b147a1b68c0acb4f05cb87e7718bc12";
+ name = "hardlink.c";
+ };
+
+ man = fetchurl {
+ url =
"pkgs.fedoraproject.org/gitweb/?p=hardlink.git;a=blob_plain;f=hardlink.1;hb=${rev}";
+ sha256 =
"2f7e18a0259a2ceae316592e8b18bee525eb7e83fe3bb6b881e5dafa24747f2d";
+ name = "hardlink.1";
+ };
+in
+stdenv.mkDerivation {
+ name = "hardlink-2010.1.${rev}";
+
+ phases = ["buildPhase"];
+
+ buildPhase = ''
+ mkdir -p $out/bin $out/share/man/man1
+ gcc -O2 ${src} -o $out/bin/hardlink
+ install -m 444 ${man} $out/share/man/man1/hardlink.1
+ '';
+
+ meta = {
+ homepage =
"http://pkgs.fedoraproject.org/gitweb/?p=hardlink.git;a=summary";
+ description = "consolidate duplicate files via hardlinks";
+ license = stdenv.lib.licenses.gpl2Plus;
+
+ platforms = stdenv.lib.platforms.unix;
+ maintainers = [ stdenv.lib.maintainers.simons ];
+ };
+}
Modified: nixpkgs/trunk/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/trunk/pkgs/top-level/all-packages.nix Mon Jan 30 11:40:16
2012 (r31933)
+++ nixpkgs/trunk/pkgs/top-level/all-packages.nix Mon Jan 30 11:40:20
2012 (r31934)
@@ -830,6 +830,8 @@
pigz = callPackage ../tools/compression/pigz { };
+ hardlink = callPackage ../tools/system/hardlink { };
+
halibut = callPackage ../tools/typesetting/halibut { };
hddtemp = callPackage ../tools/misc/hddtemp { };
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits