tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
libx86: reimplement using mkDerivation
Joachim Fasting
10 years ago
a799e1df
4fb29f8d
+19
-28
2 changed files
expand all
collapse all
unified
split
pkgs
development
libraries
libx86
default.nix
top-level
all-packages.nix
+18
-27
pkgs/development/libraries/libx86/default.nix
···
1
1
-
a :
2
2
-
let
3
3
-
s = import ./src-for-default.nix;
4
4
-
buildInputs = with a; [
5
5
-
6
6
-
];
7
7
-
in
8
8
-
rec {
9
9
-
src = a.fetchUrlFromSrcInfo s;
1
1
+
{ stdenv, fetchurl }:
10
2
11
11
-
inherit (s) name;
12
12
-
inherit buildInputs;
13
13
-
14
14
-
phaseNames = ["doPatch" "fixX86Def" "killUsr" "doMakeInstall"];
15
15
-
patches = [./constants.patch ./non-x86.patch];
3
3
+
stdenv.mkDerivation rec {
4
4
+
name = "libx86-${version}";
5
5
+
version = "1.1";
6
6
+
src = fetchurl {
7
7
+
url = "http://www.codon.org.uk/~mjg59/libx86/downloads/${name}.tar.gz";
8
8
+
sha256 = "0j6h6bc02c6qi0q7c1ncraz4d1hkm5936r35rfsp4x1jrc233wav";
9
9
+
};
10
10
+
patches = [./constants.patch ./non-x86.patch ];
16
11
17
12
# using BACKEND=x86emu on 64bit systems fixes:
18
13
# http://www.mail-archive.com/suspend-devel@lists.sourceforge.net/msg02355.html
19
14
makeFlags = [
20
20
-
"DESTDIR=$out"
21
21
-
] ++ a.stdenv.lib.optionals ( a.stdenv.isx86_64 || a.stdenv.isArm ) [ "BACKEND=x86emu" ];
15
15
+
"DESTDIR=$(out)"
16
16
+
] ++ stdenv.lib.optional (stdenv.isx86_64 || stdenv.isArm) "BACKEND=x86emu";
22
17
23
23
-
fixX86Def = a.fullDepEntry (''
18
18
+
preBuild = ''
24
19
sed -i lrmi.c -e 's@defined(__i386__)@(defined(__i386__) || defined(__x86_64__))@'
25
25
-
'') ["doUnpack" "minInit"];
26
26
-
killUsr = a.fullDepEntry (''
27
20
sed -e s@/usr@@ -i Makefile
28
28
-
'') ["doUnpack" "minInit"];
29
29
-
30
30
-
meta = {
21
21
+
'';
22
22
+
23
23
+
meta = with stdenv.lib; {
31
24
description = "Real-mode x86 code emulator";
32
32
-
maintainers = [
33
33
-
a.lib.maintainers.raskin
34
34
-
];
35
35
-
platforms = with a.lib.platforms;
36
36
-
linux ++ freebsd ++ netbsd;
25
25
+
maintainers = with maintainers; [ raskin ];
26
26
+
platforms = with platforms; linux ++ freebsd ++ netbsd;
27
27
+
license = licenses.mit;
37
28
};
38
29
}
+1
-1
pkgs/top-level/all-packages.nix
···
7631
7631
7632
7632
libwpg = callPackage ../development/libraries/libwpg { };
7633
7633
7634
7634
-
libx86 = builderDefsPackage ../development/libraries/libx86 {};
7634
7634
+
libx86 = callPackage ../development/libraries/libx86 {};
7635
7635
7636
7636
libxdg_basedir = callPackage ../development/libraries/libxdg-basedir { };
7637
7637