nixpkgs/pkgs/tools/system/thinkfan/default.nix
Tobias Geerinckx-Rice d6e4c1b750
thinkfan: install manual, README and examples
READMEs usually just waste those precious kilobytes, but both the
manual page and --help output refer to this one quite a bit.
2016-05-04 00:39:51 +02:00

36 lines
876 B
Nix

{ stdenv, fetchurl, cmake }:
stdenv.mkDerivation rec {
name = "thinkfan-${version}";
version = "0.9.2";
src = fetchurl {
url = "mirror://sourceforge/thinkfan/thinkfan-${version}.tar.gz";
sha256 = "0ydgabk2758f6j64g1r9vdsd221nqsv5rwnphm81s7i2vgra1nlh";
};
nativeBuildInputs = [ cmake ];
unpackPhase = ''
sourceRoot="$PWD/${name}";
mkdir $sourceRoot;
tar xzvf "$src" -C $sourceRoot;
'';
installPhase = ''
install -Dm755 {.,$out/bin}/thinkfan
cd $sourceRoot
install -Dm644 {.,$out/share/doc/thinkfan}/README
cp -R examples $out/share/doc/thinkfan
install -Dm644 {.,$out/share/man/man1}/thinkfan.1
'';
meta = {
license = stdenv.lib.licenses.gpl3;
homepage = http://thinkfan.sourceforge.net/;
maintainers = with stdenv.lib.maintainers; [ iElectric ];
platforms = stdenv.lib.platforms.linux;
};
}