Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 60 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitLab, 5 autoreconfHook, 6 pkg-config, 7 utilmacros, 8 libX11, 9 libXaw, 10 libXmu, 11 libXt, 12}: 13 14stdenv.mkDerivation rec { 15 pname = "xedit"; 16 version = "1.2.4"; 17 18 src = fetchFromGitLab { 19 domain = "gitlab.freedesktop.org"; 20 owner = "xorg/app"; 21 repo = "xedit"; 22 rev = "${pname}-${version}"; 23 sha256 = "sha256-0vP+aR8QBXAqbULOLEs7QXsehk18BJ405qoelrcepwE="; 24 }; 25 26 # ./lisp/mathimp.c:493:10: error: implicitly declaring library function 'finite' with type 'int (double)' 27 postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' 28 for i in $(find . -type f -name "*.c"); do 29 substituteInPlace $i --replace "finite" "isfinite" 30 done 31 ''; 32 33 nativeBuildInputs = [ 34 autoreconfHook 35 pkg-config 36 utilmacros 37 ]; 38 buildInputs = [ 39 libX11 40 libXaw 41 libXmu 42 libXt 43 ]; 44 45 configureFlags = [ 46 "--with-lispdir=$out/share/X11/xedit/lisp" 47 "--with-appdefaultdir=$out/share/X11/app-defaults" 48 ]; 49 50 meta = with lib; { 51 description = "Simple graphical text editor using Athena Widgets (Xaw)"; 52 homepage = "https://gitlab.freedesktop.org/xorg/app/xedit"; 53 license = with licenses; [ mit ]; 54 maintainers = with maintainers; [ shamilton ]; 55 platforms = platforms.unix; 56 # never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs 57 broken = stdenv.hostPlatform.isDarwin; 58 mainProgram = "xedit"; 59 }; 60}