16 stdenv.mkDerivation rec {
17 pname = "${name}-unwrapped";
21 url = "http://dl.clonehero.net/${name}-v${lib.removePrefix "0" version}/${name}-linux.tar.gz";
22 sha256 = "0k9jcnd55yhr42gj8cmysd18yldp4k3cpk4z884p2ww03fyfq7mi";
25 outputs = [ "out" "doc" ];
27 nativeBuildInputs = [ autoPatchelfHook ];
30 # Load-time libraries (loaded from DT_NEEDED section in ELF binary)
35 # Run-time libraries (loaded with dlopen)
37 libXrandr # X11 resolution detection
38 libXScrnSaver # X11 screensaver prevention
39 udev # udev input drivers
43 mkdir -p "$out/bin" "$out/share"
44 install -Dm755 ${name} "$out/bin"
45 cp -r clonehero_Data "$out/share"
47 mkdir -p "$doc/share/${name}"
48 cp README.txt "$doc/share/${name}"
51 # Patch required run-time libraries as load-time libraries
53 # Libraries found with:
54 # > strings clonehero | grep '\.so'
56 # > strace clonehero 2>&1 | grep '\.so'
59 --add-needed libasound.so.2 \
60 --add-needed libudev.so.1 \
61 --add-needed libXrandr.so.2 \
62 --add-needed libXss.so.1 \
67 description = "Clone of Guitar Hero and Rockband-style games";
68 homepage = "https://clonehero.net";
69 license = licenses.unfree;
70 maintainers = with maintainers; [ kira-bruneau ];
71 platforms = [ "x86_64-linux" ];