nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 43 lines 930 B view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 motif, 6 libXpm, 7 libXt, 8}: 9 10stdenv.mkDerivation rec { 11 pname = "nedit"; 12 version = "5.7"; 13 14 src = fetchurl { 15 url = "mirror://sourceforge/nedit/nedit-source/${pname}-${version}-src.tar.gz"; 16 sha256 = "0ym1zhjx9976rf2z5nr7dj4mjkxcicimhs686snjhdcpzxwsrndd"; 17 }; 18 19 hardeningDisable = [ "format" ]; 20 21 buildInputs = [ 22 motif 23 libXpm 24 libXt 25 ]; 26 27 # the linux config works fine on darwin too! 28 buildFlags = lib.optional (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin) "linux"; 29 30 env.NIX_CFLAGS_COMPILE = "-DBUILD_UNTESTED_NEDIT -L${motif}/lib"; 31 32 installPhase = '' 33 mkdir -p $out/bin 34 cp -p source/nedit source/nc $out/bin 35 ''; 36 37 meta = with lib; { 38 homepage = "https://sourceforge.net/projects/nedit"; 39 description = "Fast, compact Motif/X11 plain text editor"; 40 platforms = with platforms; linux ++ darwin; 41 license = licenses.gpl2; 42 }; 43}