about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/libx86emu/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libx86emu/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/libx86emu/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libx86emu/default.nix b/nixpkgs/pkgs/development/libraries/libx86emu/default.nix
new file mode 100644
index 000000000000..591a3e451ab3
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/libx86emu/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub, perl }:
+
+stdenv.mkDerivation rec {
+  name = "libx86emu-${version}";
+  version = "2.1";
+
+  src = fetchFromGitHub {
+    owner = "wfeldt";
+    repo = "libx86emu";
+    rev = version;
+    sha256 = "16k16xcw2w2c69sn04jfdy9fd7cxs463d2rwb948xchyvfla958j";
+  };
+
+  nativeBuildInputs = [ perl ];
+
+  postUnpack = "rm $sourceRoot/git2log";
+  patchPhase = ''
+    # VERSION is usually generated using Git
+    echo "${version}" > VERSION
+    substituteInPlace Makefile --replace "/usr" "/"
+  '';
+
+  buildFlags = [ "shared" ];
+  enableParallelBuilding = true;
+
+  installFlags = [ "DESTDIR=$(out)" "LIBDIR=/lib" ];
+
+  meta = with stdenv.lib; {
+    description = "x86 emulation library";
+    license = licenses.bsd2;
+    homepage = https://github.com/wfeldt/libx86emu;
+    maintainers = with maintainers; [ bobvanderlinden ];
+    platforms = platforms.linux;
+  };
+}