nixpkgs/pkgs/development/tools/misc/objconv/default.nix

40 lines
974 B
Nix
Raw Normal View History

2017-03-12 21:45:40 +00:00
{ stdenv, fetchurl, unzip }:
2015-02-08 05:12:16 +00:00
2016-06-27 02:57:45 +01:00
stdenv.mkDerivation rec {
pname = "objconv";
2018-11-20 11:48:23 +00:00
version = "2.51";
2015-02-08 05:12:16 +00:00
2017-03-12 21:45:40 +00:00
src = fetchurl {
# Versioned archive of objconv sources maintained by orivej.
url = "https://archive.org/download/objconv/${pname}-${version}.zip";
2018-11-20 11:48:23 +00:00
sha256 = "0wp6ld9vk11f4nnkn56627zmlv9k5vafi99qa3yyn1pgcd61zcfs";
2015-02-08 05:12:16 +00:00
};
2017-03-12 21:45:40 +00:00
nativeBuildInputs = [ unzip ];
2015-02-08 05:12:16 +00:00
2017-03-12 21:45:40 +00:00
outputs = [ "out" "doc" ];
unpackPhase = ''
mkdir -p "$name"
cd "$name"
unpackFile "$src"
unpackFile source.zip
'';
buildPhase = "c++ -o objconv -O2 *.cpp";
installPhase = ''
mkdir -p $out/bin $out/doc/objconv
mv objconv $out/bin
mv objconv-instructions.pdf $out/doc/objconv
'';
2016-06-27 02:57:45 +01:00
meta = with stdenv.lib; {
2017-03-12 21:45:40 +00:00
description = "Object and executable file converter, modifier and disassembler";
homepage = "https://www.agner.org/optimize/";
2016-06-27 02:57:45 +01:00
license = licenses.gpl2;
2017-03-12 21:45:40 +00:00
maintainers = with maintainers; [ orivej vrthra ];
platforms = platforms.unix;
2016-06-27 02:57:45 +01:00
};
2015-02-08 05:12:16 +00:00
}