mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 21:13:40 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
34 lines
1.0 KiB
Nix
34 lines
1.0 KiB
Nix
{ lib, stdenv, fetchurl }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libx86";
|
|
version = "1.1";
|
|
src = fetchurl {
|
|
url = "https://www.codon.org.uk/~mjg59/libx86/downloads/${pname}-${version}.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)"
|
|
] ++ lib.optional (!stdenv.hostPlatform.isi686) "BACKEND=x86emu";
|
|
|
|
preBuild = ''
|
|
sed -i lrmi.c -e 's@defined(__i386__)@(defined(__i386__) || defined(__x86_64__))@'
|
|
sed -e s@/usr@@ -i Makefile
|
|
'';
|
|
|
|
env = lib.optionalAttrs stdenv.cc.isGNU {
|
|
NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Real-mode x86 code emulator";
|
|
maintainers = with maintainers; [ raskin ];
|
|
platforms = [ "x86_64-linux" "i686-linux" ];
|
|
license = licenses.mit;
|
|
};
|
|
}
|