2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, unzip }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "objconv";
|
2022-09-22 12:36:57 +00:00
|
|
|
version = "2.54";
|
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";
|
2022-09-22 12:36:57 +00:00
|
|
|
sha256 = "sha256-SDwnpPHc2NyctxKROrhjCDXs36WGj8js5blaQkUibWE=";
|
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
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Object and executable file converter, modifier and disassembler";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "objconv";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.agner.org/optimize/";
|
|
|
|
license = licenses.gpl2;
|
2024-07-27 06:49:29 +00:00
|
|
|
maintainers = with maintainers; [ orivej ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|