Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 7f8b310eb84a
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: c35ebfcb047c
Choose a head ref
  • 5 commits
  • 1 file changed
  • 2 contributors

Commits on Oct 5, 2019

  1. tinycc: minor refactorings

    joachifm committed Oct 5, 2019
    Copy the full SHA
    06b4f4d View commit details
  2. tinycc: parallel building

    joachifm committed Oct 5, 2019
    Copy the full SHA
    8b10004 View commit details
  3. Copy the full SHA
    f73f525 View commit details
  4. Copy the full SHA
    bb75bc9 View commit details

Commits on Oct 6, 2019

  1. Merge pull request #70452 from joachifm/feat/tinycc

    Tinycc packaging improvements
    joachifm authored Oct 6, 2019
    Copy the full SHA
    c35ebfc View commit details
Showing with 18 additions and 4 deletions.
  1. +18 −4 pkgs/development/compilers/tinycc/default.nix
22 changes: 18 additions & 4 deletions pkgs/development/compilers/tinycc/default.nix
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
{ 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";
};

nativeBuildInputs = [ perl texinfo ];

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
'';

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" ];