git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #141201 from Artturin/tinyccbump
commitf01fbcadf0d25c140f18adbbd693555fb646c07c authorArtturi <Artturin@artturin.com> dateMon 11 Oct 2021, 19:43 (5 years ago) parent24d90f45ec9a81
1 file changed+19−23
pkgs/development/compilers/tinycc/default.nix+19−23
pkgs/development/compilers/tinycc/default.nix+19−23
@@ -1,36 +1,35 @@
1−{ stdenv, lib, fetchFromRepoOrCz, perl, texinfo }:
2−with lib;
1+{ stdenv, lib, fetchFromRepoOrCz, perl, texinfo, which }:
32
43stdenv.mkDerivation rec {
54 pname = "tcc";
6− version = "0.9.27";
7− upstreamVersion = "release_${concatStringsSep "_" (builtins.splitVersion version)}";
5+ version = "unstable-2021-10-09";
86
97 src = fetchFromRepoOrCz {
108 repo = "tinycc";
11− rev = upstreamVersion;
12− sha256 = "12mm1lqywz0akr2yb2axjfbw8lwv57nh395vzsk534riz03ml977";
9+ rev = "ca11849ebb88ef4ff87beda46bf5687e22949bd6";
10+ sha256 = "sha256-xnUDyTYZxbxUCblACyX73boBhU073VRqSy1SWlWsvIw=";
1311 };
1412
15− nativeBuildInputs = [ perl texinfo ];
13+ nativeBuildInputs = [ perl texinfo which ];
1614
1715 hardeningDisable = [ "fortify" ];
1816
19− enableParallelBuilding = true;
20−
2117 postPatch = ''
22− substituteInPlace "texi2pod.pl" \
23− --replace "/usr/bin/perl" "${perl}/bin/perl"
18+ patchShebangs texi2pod.pl
2419 '';
2520
21+ configureFlags = [
22+ "--cc=cc"
23+ "--crtprefix=${lib.getLib stdenv.cc.libc}/lib"
24+ "--sysincludepaths=${lib.getDev stdenv.cc.libc}/include:{B}/include"
25+ "--libpaths=${lib.getLib stdenv.cc.libc}/lib"
26+ # build cross compilers
27+ "--enable-cross"
28+ ];
29+
2630 preConfigure = ''
2731 echo ${version} > VERSION
28−
29− configureFlagsArray+=("--cc=cc")
3032 configureFlagsArray+=("--elfinterp=$(< $NIX_CC/nix-support/dynamic-linker)")
31− configureFlagsArray+=("--crtprefix=${getLib stdenv.cc.libc}/lib")
32− configureFlagsArray+=("--sysincludepaths=${getDev stdenv.cc.libc}/include:{B}/include")
33− configureFlagsArray+=("--libpaths=${getLib stdenv.cc.libc}/lib")
3433 '';
3534
3635 postFixup = ''
@@ -47,9 +46,8 @@ stdenv.mkDerivation rec {
4746 doCheck = true;
4847 checkTarget = "test";
4948
50− meta = {
49+ meta = with lib; {
5150 description = "Small, fast, and embeddable C compiler and interpreter";
52−
5351 longDescription = ''
5452 TinyCC (aka TCC) is a small but hyper fast C compiler. Unlike
5553 other C compilers, it is meant to be self-sufficient: you do not
@@ -73,11 +71,9 @@ stdenv.mkDerivation rec {
7371 With libtcc, you can use TCC as a backend for dynamic code
7472 generation.
7573 '';
76−
77− homepage = "http://www.tinycc.org/";
78− license = licenses.mit;
79−
80− platforms = [ "x86_64-linux" ];
74+ homepage = "https://repo.or.cz/tinycc.git";
75+ license = licenses.lgpl21Only;
76+ platforms = platforms.linux;
8177 maintainers = [ maintainers.joachifm ];
8278 };
8379}