2021-01-23 12:26:19 +00:00
|
|
|
{ lib, stdenv, fetchurl, unzip }:
|
2015-02-08 05:12:16 +00:00
|
|
|
|
2016-06-27 02:57:45 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "objconv";
|
2020-08-29 15:06:34 +01:00
|
|
|
version = "2.52";
|
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.
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "https://archive.org/download/objconv/${pname}-${version}.zip";
|
2020-08-29 15:06:34 +01:00
|
|
|
sha256 = "0r117r7yvqvvdgwgwxpkyzi6p5nm0xb6p67wvkmvggm9fdyl3z8v";
|
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
|
|
|
|
2021-01-23 12:26:19 +00:00
|
|
|
meta = with lib; {
|
2017-03-12 21:45:40 +00:00
|
|
|
description = "Object and executable file converter, modifier and disassembler";
|
2020-04-01 02:11:51 +01:00
|
|
|
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
|
|
|
}
|