diff options
author | Joachim Fasting <joachifm@fastmail.fm> | 2015-04-25 16:55:47 +0200 |
---|---|---|
committer | Joachim Fasting <joachifm@fastmail.fm> | 2015-11-24 14:45:15 +0100 |
commit | a799e1dff2e5134eb2d0f84fae1d095abf4fc8aa (patch) | |
tree | eda1a1d5b69e8fe8be102373213734b079e43f47 /pkgs/development/libraries/libx86 | |
parent | 4fb29f8d3bfef5b261fe7d2d5f595c30419819d4 (diff) | |
download | nixpkgs-a799e1dff2e5134eb2d0f84fae1d095abf4fc8aa.tar nixpkgs-a799e1dff2e5134eb2d0f84fae1d095abf4fc8aa.tar.gz nixpkgs-a799e1dff2e5134eb2d0f84fae1d095abf4fc8aa.tar.bz2 nixpkgs-a799e1dff2e5134eb2d0f84fae1d095abf4fc8aa.tar.lz nixpkgs-a799e1dff2e5134eb2d0f84fae1d095abf4fc8aa.tar.xz nixpkgs-a799e1dff2e5134eb2d0f84fae1d095abf4fc8aa.tar.zst nixpkgs-a799e1dff2e5134eb2d0f84fae1d095abf4fc8aa.zip |
libx86: reimplement using mkDerivation
Diffstat (limited to 'pkgs/development/libraries/libx86')
-rw-r--r-- | pkgs/development/libraries/libx86/default.nix | 45 |
1 files changed, 18 insertions, 27 deletions
diff --git a/pkgs/development/libraries/libx86/default.nix b/pkgs/development/libraries/libx86/default.nix index 011e936548a..162d284f402 100644 --- a/pkgs/development/libraries/libx86/default.nix +++ b/pkgs/development/libraries/libx86/default.nix @@ -1,38 +1,29 @@ -a : -let - s = import ./src-for-default.nix; - buildInputs = with a; [ - - ]; -in -rec { - src = a.fetchUrlFromSrcInfo s; +{ stdenv, fetchurl }: - inherit (s) name; - inherit buildInputs; - - phaseNames = ["doPatch" "fixX86Def" "killUsr" "doMakeInstall"]; - patches = [./constants.patch ./non-x86.patch]; +stdenv.mkDerivation rec { + name = "libx86-${version}"; + version = "1.1"; + src = fetchurl { + url = "http://www.codon.org.uk/~mjg59/libx86/downloads/${name}.tar.gz"; + sha256 = "0j6h6bc02c6qi0q7c1ncraz4d1hkm5936r35rfsp4x1jrc233wav"; + }; + patches = [./constants.patch ./non-x86.patch ]; # using BACKEND=x86emu on 64bit systems fixes: # http://www.mail-archive.com/suspend-devel@lists.sourceforge.net/msg02355.html makeFlags = [ - "DESTDIR=$out" - ] ++ a.stdenv.lib.optionals ( a.stdenv.isx86_64 || a.stdenv.isArm ) [ "BACKEND=x86emu" ]; + "DESTDIR=$(out)" + ] ++ stdenv.lib.optional (stdenv.isx86_64 || stdenv.isArm) "BACKEND=x86emu"; - fixX86Def = a.fullDepEntry ('' + preBuild = '' sed -i lrmi.c -e 's@defined(__i386__)@(defined(__i386__) || defined(__x86_64__))@' - '') ["doUnpack" "minInit"]; - killUsr = a.fullDepEntry ('' sed -e s@/usr@@ -i Makefile - '') ["doUnpack" "minInit"]; - - meta = { + ''; + + meta = with stdenv.lib; { description = "Real-mode x86 code emulator"; - maintainers = [ - a.lib.maintainers.raskin - ]; - platforms = with a.lib.platforms; - linux ++ freebsd ++ netbsd; + maintainers = with maintainers; [ raskin ]; + platforms = with platforms; linux ++ freebsd ++ netbsd; + license = licenses.mit; }; } |