-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.nix
46 lines (36 loc) · 1.06 KB
/
package.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{ pkgs ? import <nixpkgs> {}
, libmicrovmi
, memprocfs
}:
with pkgs;
stdenv.mkDerivation rec {
pname = "leechcore-plugin-ft601-driver-linux";
version = "2.16.4"; # current latest version is 2.16.8, but it contains no changes to this plugin
src = fetchFromGitHub {
owner = "ufrisk";
repo = "LeechCore-plugins";
rev = "1267e6d74681e338147c03f878b15ba5f32c7fde";
hash = "sha256-9WgF8qox+IOc+Wr6zugqI1raQlFQ9BOumuO9TC/rRw8=";
};
nativeBuildInputs = [
pkg-config
libusb
libmicrovmi
];
makeFlags = [ "-C leechcore_ft601_driver_linux" ];
patches = [ ./fix-buffer-overflow.patch ];
installPhase = ''
cp ${memprocfs}/lib/leechcore.so ./files/
cp ${memprocfs}/lib/vmm.so ./files/
cd leechcore_ft601_driver_linux
make leechcore_ft601_driver_linux
mkdir -p $out/lib/
cp ../files/leechcore_ft601_driver_linux.so $out/lib/
'';
meta = with lib; {
description = "leechcore_ft601_driver_linux";
homepage = "https://github.com/ufrisk/LeechCore-plugins";
license = licenses.gpl3;
maintainers = [];
};
}