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. svn path=/nixpkgs/trunk/; revision=31934
This commit is contained in:
parent
f1e16ea3c9
commit
c5ecd1752c
37
pkgs/tools/system/hardlink/default.nix
Normal file
37
pkgs/tools/system/hardlink/default.nix
Normal file
@ -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 ];
|
||||||
|
};
|
||||||
|
}
|
@ -830,6 +830,8 @@ let
|
|||||||
|
|
||||||
pigz = callPackage ../tools/compression/pigz { };
|
pigz = callPackage ../tools/compression/pigz { };
|
||||||
|
|
||||||
|
hardlink = callPackage ../tools/system/hardlink { };
|
||||||
|
|
||||||
halibut = callPackage ../tools/typesetting/halibut { };
|
halibut = callPackage ../tools/typesetting/halibut { };
|
||||||
|
|
||||||
hddtemp = callPackage ../tools/misc/hddtemp { };
|
hddtemp = callPackage ../tools/misc/hddtemp { };
|
||||||
|
Loading…
Reference in New Issue
Block a user