about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/keystone
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/keystone')
-rw-r--r--nixpkgs/pkgs/development/libraries/keystone/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/keystone/default.nix b/nixpkgs/pkgs/development/libraries/keystone/default.nix
new file mode 100644
index 000000000000..278385a1fd66
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/keystone/default.nix
@@ -0,0 +1,42 @@
+{ lib, stdenv
+, fetchFromGitHub
+, pkg-config
+, cmake
+, python3
+, fixDarwinDylibNames
+}:
+
+stdenv.mkDerivation rec {
+  pname = "keystone";
+  version = "0.9.2";
+
+  src = fetchFromGitHub {
+    owner = "keystone-engine";
+    repo = pname;
+    rev = version;
+    sha256 = "020d1l1aqb82g36l8lyfn2j8c660mm6sh1nl4haiykwgdl9xnxfa";
+  };
+
+  cmakeFlags = [
+    "-DBUILD_SHARED_LIBS=ON"
+    "-DCMAKE_INSTALL_LIBDIR=lib"
+  ];
+
+  nativeBuildInputs = [
+    pkg-config
+    cmake
+    python3
+  ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
+    # TODO: could be replaced by setting CMAKE_INSTALL_NAME_DIR?
+    fixDarwinDylibNames
+  ];
+
+  meta = with lib; {
+    description = "Lightweight multi-platform, multi-architecture assembler framework";
+    homepage = "https://www.keystone-engine.org";
+    license = licenses.gpl2Only;
+    maintainers = with maintainers; [ luc65r ];
+    mainProgram = "kstool";
+    platforms = platforms.unix;
+  };
+}