Skip to content

Instantly share code, notes, and snippets.

@lucasew
Created May 5, 2023 03:55
Show Gist options
  • Save lucasew/8fb23e98655396a8f914ecb7c1553c25 to your computer and use it in GitHub Desktop.
Save lucasew/8fb23e98655396a8f914ecb7c1553c25 to your computer and use it in GitHub Desktop.
epsxe wip package in nix
{ stdenvNoCC
, fetchzip
, autoPatchelfHook
, unzip
, libstdcxx5
, SDL
, SDL_ttf
, gtk3
, gdk-pixbuf
, robo3t # só ele fornece libcrypto.so.1.0.0
, curl
, ncurses5
, ...
}:

let
  inherit (builtins) replaceStrings;
in
stdenvNoCC.mkDerivation rec {
  pname = "epsxe";
  version = "2.0.5";

  src = fetchzip {
    url = "http://www.epsxe.com/files/ePSXe${replaceStrings ["."] [""] version}linux_x64.zip";
    stripRoot = false;
    hash = "sha256-Sn45ArrhqZ7dBZc0TCGgq2TABgEqG8vmZ20iwM4loNM=";
  };

  nativeBuildInputs = [ autoPatchelfHook ];

  buildInputs = [ SDL SDL_ttf gtk3 gdk-pixbuf robo3t curl ncurses5 ];

  installPhase = ''
    mkdir $out/bin $out/lib -p
    ln -s ${robo3t}/lib/robo3t/lib/libcrypto.so.1.0.0 $out/lib
    install -m 755 *_x64 $out/bin/epsxe
  '';
}

Gives error

lucasew@riverwood ~/.dotfiles 0$ ./result/bin/epsxe
./result/bin/epsxe: /nix/store/jn3v1qn45ycv7jq9q76dvmg5r39dzpjv-ncurses-abi5-compat-6.4/lib/libncurses.so.5: version `NCURSES_5.0.19991023' not found (required by ./result/bin/epsxe)
./result/bin/epsxe: /nix/store/jra54hsq61cg2m9nyssm4ikijiw4w2qd-curl-8.0.1/lib/libcurl.so.4: no version information available (required by ./result/bin/epsxe)
./result/bin/epsxe: /nix/store/cx6z0mrg7k1v2777xyvdpc70j88vcs2j-robo3t-1.4.3/lib/robo3t/lib/libcrypto.so.1.0.0: no version information available (required by ./result/bin/epsxe)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment