Unverified Commit 7afbfd38 authored by Nick Cao's avatar Nick Cao
Browse files

fbvnc: cleanup, fix cross compilation

parent cc0257d0
Loading
Loading
Loading
Loading
+17 −9
Original line number Diff line number Diff line
{lib, stdenv, fetchFromGitHub}:
{ lib
, stdenv
, fetchFromGitHub
}:

stdenv.mkDerivation rec {
  name = "${pname}-${version}";
  pname = "fbvnc";
  version = "1.0.2";

  src = fetchFromGitHub {
    owner = "zohead";
    repo = pname;
    sha256 = "0lkr4j1wsa05av2g9w99rr9w4j4k7a21vp36x0a3h50y8bmgwgm1";
    rev = "783204ff6c92afec33d6d36f7e74f1fcf2b1b601";
    hash = "sha256-oT7+6kIeFDgU6GbcHYQ6k0jCU84p8fTEVgUozYMkeVI=";
  };

  buildInputs = [];
  makeFlags = [
    "CC:=$(CC)"
  ];

  installPhase = ''
    mkdir -p "$out/bin"
    cp fbvnc "$out/bin"
    mkdir -p "$out/share/doc/${pname}"
    cp README* "$out/share/doc/${pname}"
    runHook preInstall

    install -Dm555 fbvnc     -t "$out/bin"
    install -Dm444 README.md -t "$out/share/doc/fbvnc"

    runHook postInstall
  '';

  meta = {
@@ -26,5 +33,6 @@ stdenv.mkDerivation rec {
    maintainers = [ lib.maintainers.raskin ];
    platforms = lib.platforms.linux;
    homepage = "https://github.com/zohead/fbvnc/";
    mainProgram = "fbvnc";
  };
}