Skip to content

Instantly share code, notes, and snippets.

@jD91mZM2
Created February 13, 2019 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jD91mZM2/86e1024a8996266b9b94da38b7a29491 to your computer and use it in GitHub Desktop.
Save jD91mZM2/86e1024a8996266b9b94da38b7a29491 to your computer and use it in GitHub Desktop.
{ stdenv, autoconf, automake, bash, fetchFromGitHub, libgcc, libjpeg_turbo, libpng, libtool,
libxml2, pkgconfig, which, xorg }:
stdenv.mkDerivation rec {
name = "nx-libs-${version}";
version = "3.5.99.18";
src = fetchFromGitHub {
owner = "ArcticaProject";
repo = "nx-libs";
rev = version;
sha256 = "07559zk9flzfnyr2ngcdr3nzccga4bl30wghalhrvpgpyljivdyv";
};
nativeBuildInputs = [ autoconf automake libtool pkgconfig which
xorg.gccmakedep xorg.imake ];
buildInputs = [ libgcc libjpeg_turbo libpng libxml2 xorg.fontutil
xorg.libXcomposite xorg.libXdamage xorg.libXdmcp xorg.libXext xorg.libXfont2
xorg.libXinerama xorg.libXpm xorg.libXrandr xorg.libXtst xorg.pixman
xorg.xkbcomp xorg.xkeyboardconfig ];
postPatch = ''
find . -type f -executable -exec sed -i 's|^#!/bin/bash$|#!${bash}/bin/bash|g' {} \;
find . -type f -name Makefile -exec sed -i 's|^\(SHELL:=\)/bin/bash$|\1${bash}/bin/bash|g' {} \;
'';
PREFIX = ""; # Don't use $out/usr/local/ as installation dir, just use $out
installPhase = ''
make DESTDIR="$out" install
'';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment