default.nix (1089B)
1 { 2 lib, 3 stdenv, 4 fetchsvn, 5 }: 6 7 stdenv.mkDerivation { 8 pname = "ocad2mp"; 9 version = "1.14-unstable-2011-01-26"; 10 11 src = fetchsvn { 12 url = "svn://svn.code.sf.net/p/ocad2mp/code/trunk/ocad2mp"; 13 rev = "269"; 14 sha256 = "sha256-w5QV7dwfTAWRJ3ausSIRHbR8ZiUp761lwkc0qd1VAJw="; 15 }; 16 17 postPatch = lib.optionalString stdenv.isDarwin '' 18 substituteInPlace Makefile.gcc \ 19 --replace-fail "CXX=g++" "" \ 20 --replace-fail "LINK=g++" "LINK=$CXX" \ 21 --replace-fail "-lgcc" "" 22 ''; 23 24 NIX_CFLAGS_COMPILE = [ 25 "-std=c++03" 26 "-include stddef.h" 27 ]; 28 29 makeFlags = [ 30 "-f Makefile.gcc" 31 "CFG=Release" 32 "TARGET_ARCH_BITS=64" 33 ]; 34 35 hardeningDisable = [ "format" ]; 36 37 installPhase = '' 38 install -Dm755 Release/ocad2mp -t $out/bin 39 install -Dm644 SYM.TXT $out/share/ocad2mp/sym.txt 40 ''; 41 42 meta = { 43 description = "Converter from OCAD map format to Polish format"; 44 homepage = "https://sourceforge.net/projects/ocad2mp/"; 45 license = lib.licenses.gpl2; 46 maintainers = [ lib.maintainers.sikmir ]; 47 platforms = lib.platforms.unix; 48 }; 49 }