2020-04-24 23:36:52 +00:00
|
|
|
{ stdenv, fetchurl, unzip }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "objconv";
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "2.52";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
# Versioned archive of objconv sources maintained by orivej.
|
|
|
|
url = "https://archive.org/download/objconv/${pname}-${version}.zip";
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "0r117r7yvqvvdgwgwxpkyzi6p5nm0xb6p67wvkmvggm9fdyl3z8v";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Object and executable file converter, modifier and disassembler";
|
|
|
|
homepage = "https://www.agner.org/optimize/";
|
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ orivej vrthra ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|