mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-12 08:43:06 +00:00
ff1a94e523
The nixpkgs-unstable channel's programs.sqlite was used to identify packages producing exactly one binary, and these automatically added to their package definitions wherever possible.
41 lines
1000 B
Nix
41 lines
1000 B
Nix
{ lib, stdenv, fetchurl, unzip }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "objconv";
|
|
version = "2.54";
|
|
|
|
src = fetchurl {
|
|
# Versioned archive of objconv sources maintained by orivej.
|
|
url = "https://archive.org/download/objconv/${pname}-${version}.zip";
|
|
sha256 = "sha256-SDwnpPHc2NyctxKROrhjCDXs36WGj8js5blaQkUibWE=";
|
|
};
|
|
|
|
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 lib; {
|
|
description = "Object and executable file converter, modifier and disassembler";
|
|
mainProgram = "objconv";
|
|
homepage = "https://www.agner.org/optimize/";
|
|
license = licenses.gpl2;
|
|
maintainers = with maintainers; [ orivej vrthra ];
|
|
platforms = platforms.unix;
|
|
};
|
|
}
|