Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 26 lines 676 B view raw
1{ stdenv, lib, fetchurl, cmake }: 2 3stdenv.mkDerivation rec { 4 pname = "astyle"; 5 version = "3.1"; 6 7 src = fetchurl { 8 url = "mirror://sourceforge/${pname}/${pname}_${version}_linux.tar.gz"; 9 sha256 = "1ms54wcs7hg1bsywqwf2lhdfizgbk7qxc9ghasxk8i99jvwlrk6b"; 10 }; 11 12 # lots of hardcoded references to /usr 13 postPatch = '' 14 substituteInPlace CMakeLists.txt \ 15 --replace ' /usr/' " $out/" 16 ''; 17 18 nativeBuildInputs = [ cmake ]; 19 20 meta = with lib; { 21 description = "Source code indenter, formatter, and beautifier for C, C++, C# and Java"; 22 homepage = "https://astyle.sourceforge.net/"; 23 license = licenses.lgpl3; 24 platforms = platforms.unix; 25 }; 26}