3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/misc/abduco/default.nix
2018-09-22 14:07:34 +00:00

30 lines
879 B
Nix

{ stdenv, fetchurl, writeText, conf? null}:
with stdenv.lib;
stdenv.mkDerivation rec {
name = "abduco-0.6";
meta = {
homepage = http://brain-dump.org/projects/abduco;
license = licenses.isc;
description = "Allows programs to be run independently from its controlling terminal";
maintainers = with maintainers; [ pSub ];
platforms = platforms.unix;
};
CFLAGS = stdenv.lib.optionalString stdenv.isDarwin "-D_DARWIN_C_SOURCE";
src = fetchurl {
url = "http://www.brain-dump.org/projects/abduco/${name}.tar.gz";
sha256 = "1x1m58ckwsprljgmdy93mvgjyg9x3cqrzdf3mysp0mx97zhhj2f9";
};
configFile = optionalString (conf!=null) (writeText "config.def.h" conf);
preBuild = optionalString (conf!=null) "cp ${configFile} config.def.h";
installPhase = ''
make PREFIX=$out install
'';
}