Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / keystone / default.nix
blob278385a1fd66e037245b1f1b4e79d2cdb9a9e3d5
1 { lib, stdenv
2 , fetchFromGitHub
3 , pkg-config
4 , cmake
5 , python3
6 , fixDarwinDylibNames
7 }:
9 stdenv.mkDerivation rec {
10   pname = "keystone";
11   version = "0.9.2";
13   src = fetchFromGitHub {
14     owner = "keystone-engine";
15     repo = pname;
16     rev = version;
17     sha256 = "020d1l1aqb82g36l8lyfn2j8c660mm6sh1nl4haiykwgdl9xnxfa";
18   };
20   cmakeFlags = [
21     "-DBUILD_SHARED_LIBS=ON"
22     "-DCMAKE_INSTALL_LIBDIR=lib"
23   ];
25   nativeBuildInputs = [
26     pkg-config
27     cmake
28     python3
29   ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
30     # TODO: could be replaced by setting CMAKE_INSTALL_NAME_DIR?
31     fixDarwinDylibNames
32   ];
34   meta = with lib; {
35     description = "Lightweight multi-platform, multi-architecture assembler framework";
36     homepage = "https://www.keystone-engine.org";
37     license = licenses.gpl2Only;
38     maintainers = with maintainers; [ luc65r ];
39     mainProgram = "kstool";
40     platforms = platforms.unix;
41   };