diff --git a/pkgs/tools/system/vbetool/default.nix b/pkgs/tools/system/vbetool/default.nix index 402f93ec8fba..a8c27a42b1dd 100644 --- a/pkgs/tools/system/vbetool/default.nix +++ b/pkgs/tools/system/vbetool/default.nix @@ -1,31 +1,26 @@ -a @ {pciutils, libx86, zlib, ...} : -let - s = import ./src-for-default.nix; - buildInputs = with a; [ - libx86 pciutils zlib - ]; -in -rec { - src = a.fetchUrlFromSrcInfo s; +{ stdenv, fetchurl, pciutils, libx86, zlib }: - inherit (s) name; - inherit buildInputs; - configureFlags = []; +stdenv.mkDerivation rec { + name = "vbetool-${version}"; + version = "1.1"; - /* doConfigure should be removed if not needed */ - phaseNames = ["fixPCIref" "doConfigure" "doMakeInstall"]; + src = fetchurl { + url = "http://www.codon.org.uk/~mjg59/vbetool/download/${name}.tar.gz"; + sha256 = "0m7rc9v8nz6w9x4x96maza139kin6lg4hscy6i13fna4672ds9jd"; + }; - fixPCIref = a.fullDepEntry ('' - sed -e 's@$(libdir)/libpci.a@${a.pciutils}/lib/libpci.so@' -i Makefile.in - export NIX_LDFLAGS="$NIX_LDFLAGS -lpci" - '') ["doUnpack" "minInit"]; + buildInputs = [ pciutils libx86 zlib ]; - meta = { + patchPhase = '' + substituteInPlace Makefile.in --replace '$(libdir)/libpci.a' "" + ''; + + configureFlags = [ "LDFLAGS=-lpci" ]; + + meta = with stdenv.lib; { description = "Video BIOS execution tool"; - maintainers = [ - a.lib.maintainers.raskin - ]; - platforms = with a.lib.platforms; - linux; + homepage = http://www.codon.org.uk/~mjg59/vbetool/; + maintainers = [ maintainers.raskin ]; + platforms = platforms.linux; }; } diff --git a/pkgs/tools/system/vbetool/src-for-default.nix b/pkgs/tools/system/vbetool/src-for-default.nix deleted file mode 100644 index 97621fd516b4..000000000000 --- a/pkgs/tools/system/vbetool/src-for-default.nix +++ /dev/null @@ -1,9 +0,0 @@ -rec { - version="1.1"; - name="vbetool-1.1"; - hash="0m7rc9v8nz6w9x4x96maza139kin6lg4hscy6i13fna4672ds9jd"; - url="http://www.codon.org.uk/~mjg59/vbetool/download/vbetool-${version}.tar.gz"; - advertisedUrl="http://www.codon.org.uk/~mjg59/vbetool/download/vbetool-1.1.tar.gz"; - - -} diff --git a/pkgs/tools/system/vbetool/src-info-for-default.nix b/pkgs/tools/system/vbetool/src-info-for-default.nix deleted file mode 100644 index 40c721bc4908..000000000000 --- a/pkgs/tools/system/vbetool/src-info-for-default.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ - downloadPage = "http://www.codon.org.uk/~mjg59/vbetool/download/?C=M;O=D"; - baseName = "vbetool"; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6ec1aff8776c..d383d1652119 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3365,7 +3365,7 @@ let vidalia = callPackage ../tools/security/vidalia { }; - vbetool = builderDefsPackage (callPackage ../tools/system/vbetool) { }; + vbetool = callPackage ../tools/system/vbetool { }; vde2 = callPackage ../tools/networking/vde2 { };