diff options
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/tinycc/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/compilers/tinycc/default.nix | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/nixpkgs/pkgs/development/compilers/tinycc/default.nix b/nixpkgs/pkgs/development/compilers/tinycc/default.nix index 338ba931249..03e8be7053a 100644 --- a/nixpkgs/pkgs/development/compilers/tinycc/default.nix +++ b/nixpkgs/pkgs/development/compilers/tinycc/default.nix @@ -1,13 +1,14 @@ -{ stdenv, fetchFromRepoOrCz, perl, texinfo }: -with stdenv.lib; +{ stdenv, lib, fetchFromRepoOrCz, perl, texinfo }: +with lib; stdenv.mkDerivation rec { pname = "tcc"; version = "0.9.27"; + upstreamVersion = "release_${concatStringsSep "_" (builtins.splitVersion version)}"; src = fetchFromRepoOrCz { repo = "tinycc"; - rev = "release_0_9_27"; + rev = upstreamVersion; sha256 = "12mm1lqywz0akr2yb2axjfbw8lwv57nh395vzsk534riz03ml977"; }; @@ -15,6 +16,8 @@ stdenv.mkDerivation rec { hardeningDisable = [ "fortify" ]; + enableParallelBuilding = true; + postPatch = '' substituteInPlace "texi2pod.pl" \ --replace "/usr/bin/perl" "${perl}/bin/perl" @@ -30,6 +33,17 @@ stdenv.mkDerivation rec { configureFlagsArray+=("--libpaths=${getLib stdenv.cc.libc}/lib") ''; + postFixup = '' + cat >libtcc.pc <<EOF + Name: libtcc + Description: Tiny C compiler backend + Version: ${version} + Libs: -L$out/lib -Wl,--rpath $out/lib -ltcc -ldl + Cflags: -I$out/include + EOF + install -Dt $out/lib/pkgconfig libtcc.pc -m 444 + ''; + doCheck = true; checkTarget = "test"; @@ -60,7 +74,7 @@ stdenv.mkDerivation rec { generation. ''; - homepage = http://www.tinycc.org/; + homepage = "http://www.tinycc.org/"; license = licenses.mit; platforms = [ "x86_64-linux" ]; |