nixpkgs/pkgs/tools/system/hardlink/default.nix

30 lines
771 B
Nix
Raw Normal View History

2012-09-25 15:35:54 +02:00
{ fetchurl, stdenv, unzip }:
let
2012-09-25 15:35:54 +02:00
rev = "3ec908d539";
in
stdenv.mkDerivation {
2012-09-25 15:35:54 +02:00
name = "hardlink-2012.9.${rev}";
2012-09-25 15:35:54 +02:00
src = fetchurl {
2013-01-14 18:26:46 +01:00
url = "http://pkgs.fedoraproject.org/cgit/hardlink.git/snapshot/hardlink-${rev}.zip";
2012-09-25 15:35:54 +02:00
sha256 = "fea1803170b538d5fecf6a8d312ded1d25d516e9386a3797441a247487551647";
name = "hardlink-${rev}.zip";
};
2012-09-25 15:35:54 +02:00
installPhase = ''
mkdir -p $out/bin $out/share/man/man1
2016-08-12 05:20:19 +02:00
cc -O2 hardlink.c -o $out/bin/hardlink
2012-09-25 15:35:54 +02:00
mv hardlink.1 $out/share/man/man1/hardlink.1
'';
2012-09-25 15:35:54 +02:00
buildInputs = [ unzip ];
meta = {
2012-09-25 15:35:54 +02:00
homepage = "http://pkgs.fedoraproject.org/cgit/hardlink.git/";
description = "Consolidate duplicate files via hardlinks";
license = stdenv.lib.licenses.gpl2Plus;
platforms = stdenv.lib.platforms.unix;
};
}