git.iko.soy/typeable/nixpkgs
on master help sign in
tinycc: 0.9.27pre-20160328 -> 0.9.27pre-20160525

Also do various refactorings: - Use `fetchFromRepoOrCz` - Use `isGlibc` to check for glibc stdenv - Multiple outputs - Apply PaX marking Also adopt the package.

commitab9acc27f9bd3a2def9d66be5c90290e3facaab9 authorJoachim Fasting <joachifm@fastmail.fm> dateFri 3 Jun 2016, 18:59 (10 years ago) parent5191294
1 file changed+44−34
pkgs/development/compilers/tinycc/default.nix+44−34
pkgs/development/compilers/tinycc/default.nix+44−34
@@ -1,21 +1,27 @@
1−{ stdenv, fetchurl, fetchgit, perl, texinfo }:
1+{ stdenv, fetchFromRepoOrCz, perl, texinfo }:
22
3−assert stdenv ? glibc;
3+assert (stdenv.isGlibc);
4+
5+with stdenv.lib;
6+
7+let
8+ date = "20160525";
9+ version = "0.9.27pre-${date}";
10+ rev = "1ca685f887310b5cbdc415cdfc3a578dbc8d82d8";
11+ sha256 = "149s847jkg2zdmk09h0cp0q69m8kxxci441zyw8b08fy9b87ayd8";
12+in
413
514stdenv.mkDerivation rec {
6− #name = "tcc-0.9.26";
7− name = "tcc-git-0.9.27pre-20160328";
8−
9− #src = fetchurl {
10− # url = "mirror://savannah/tinycc/${name}.tar.bz2";
11− # sha256 = "0wbdbdq6090ayw8bxnbikiv989kykff3m5rzbia05hrnwhd707jj";
12− #};
13− src = fetchgit {
14− url = "git://repo.or.cz/tinycc.git";
15− rev = "80343ab7d829c21c65f8f9a14dd20158d028549f";
16− sha256 = "0l2qhlvwya2djjbwxgwvhfa11bscqcw1x8w5dzy7klzns773pv7d";
15+ name = "tcc-${version}";
16+
17+ src = fetchFromRepoOrCz {
18+ repo = "tinycc";
19+ inherit rev;
20+ inherit sha256;
1721 };
1822
23+ outputs = [ "dev" "out" "bin" ];
24+
1925 nativeBuildInputs = [ perl texinfo ];
2026
2127 postPatch = ''
@@ -33,37 +39,41 @@ stdenv.mkDerivation rec {
3339 doCheck = true;
3440 checkTarget = "test";
3541
42+ postFixup = ''
43+ paxmark m $out/bin/tcc
44+ '';
45+
3646 meta = {
3747 description = "Small, fast, and embeddable C compiler and interpreter";
3848
39− longDescription =
40− '' TinyCC (aka TCC) is a small but hyper fast C compiler. Unlike
41− other C compilers, it is meant to be self-sufficient: you do not
42− need an external assembler or linker because TCC does that for
43− you.
49+ longDescription = ''
50+ TinyCC (aka TCC) is a small but hyper fast C compiler. Unlike
51+ other C compilers, it is meant to be self-sufficient: you do not
52+ need an external assembler or linker because TCC does that for
53+ you.
4454
45− TCC compiles so fast that even for big projects Makefiles may not
46− be necessary.
55+ TCC compiles so fast that even for big projects Makefiles may not
56+ be necessary.
4757
48− TCC not only supports ANSI C, but also most of the new ISO C99
49− standard and many GNU C extensions.
58+ TCC not only supports ANSI C, but also most of the new ISO C99
59+ standard and many GNU C extensions.
5060
51− TCC can also be used to make C scripts, i.e. pieces of C source
52− that you run as a Perl or Python script. Compilation is so fast
53− that your script will be as fast as if it was an executable.
61+ TCC can also be used to make C scripts, i.e. pieces of C source
62+ that you run as a Perl or Python script. Compilation is so fast
63+ that your script will be as fast as if it was an executable.
5464
55− TCC can also automatically generate memory and bound checks while
56− allowing all C pointers operations. TCC can do these checks even
57− if non patched libraries are used.
65+ TCC can also automatically generate memory and bound checks while
66+ allowing all C pointers operations. TCC can do these checks even
67+ if non patched libraries are used.
5868
59− With libtcc, you can use TCC as a backend for dynamic code
60− generation.
61− '';
69+ With libtcc, you can use TCC as a backend for dynamic code
70+ generation.
71+ '';
6272
6373 homepage = http://www.tinycc.org/;
64− license = stdenv.lib.licenses.lgpl2Plus;
74+ license = licenses.lgpl2Plus;
6575
66− platforms = stdenv.lib.platforms.unix;
67− maintainers = [ ];
76+ platforms = platforms.unix;
77+ maintainers = [ maintainers.joachifm ];
6878 };
6979}