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

40 lines
969 B
Nix
Raw Normal View History

2017-03-12 22:45:40 +01:00
{ stdenv, fetchurl, unzip }:
2015-02-08 06:12:16 +01:00
2016-06-27 03:57:45 +02:00
stdenv.mkDerivation rec {
name = "objconv-${version}";
2017-11-13 16:23:56 +01:00
version = "2.48";
2015-02-08 06:12:16 +01:00
2017-03-12 22:45:40 +01:00
src = fetchurl {
# Versioned archive of objconv sources maintained by orivej.
url = "https://archive.org/download/objconv/${name}.zip";
2017-11-13 16:23:56 +01:00
sha256 = "1y4bmy99dfhyqykkib50fiwsha2a62s9ya1qsv5mwj21w1l0snj7";
2015-02-08 06:12:16 +01:00
};
2017-03-12 22:45:40 +01:00
nativeBuildInputs = [ unzip ];
2015-02-08 06:12:16 +01:00
2017-03-12 22:45:40 +01: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 03:57:45 +02:00
meta = with stdenv.lib; {
2017-03-12 22:45:40 +01:00
description = "Object and executable file converter, modifier and disassembler";
2016-06-27 03:57:45 +02:00
homepage = http://www.agner.org/optimize/;
license = licenses.gpl2;
2017-03-12 22:45:40 +01:00
maintainers = with maintainers; [ orivej vrthra ];
platforms = platforms.unix;
2016-06-27 03:57:45 +02:00
};
2015-02-08 06:12:16 +01:00
}