nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchurl, fetchpatch
2, pkg-config
3, bison, flex
4, makeWrapper }:
5
6with lib;
7stdenv.mkDerivation rec {
8
9 pname = "intercal";
10 version = "0.31";
11
12 src = fetchurl {
13 url = "http://catb.org/esr/intercal/${pname}-${version}.tar.gz";
14 sha256 = "1z2gpa5rbqb7jscqlf258k0b0jc7d2zkyipb5csjpj6d3sw45n4k";
15 };
16
17 patches = [
18 # Pull patch pending upstream inclusion for -fno-common toolchains:
19 # https://gitlab.com/esr/intercal/-/issues/4
20 (fetchpatch {
21 name = "fno-common.patch";
22 url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/dev-lang/c-intercal/files/c-intercal-31.0-no-common.patch?id=a110a98b4de6f280d770ba3cc92a4612326205a3";
23 sha256 = "03523fc40042r2ryq5val27prlim8pld4950qqpawpism4w3y1p2";
24 })
25 ];
26
27 buildInputs =
28 [ pkg-config bison flex makeWrapper ];
29
30 # Intercal invokes gcc, so we need an explicit PATH
31 postInstall = ''
32 wrapProgram $out/bin/ick --suffix PATH ':' ${stdenv.cc}/bin
33 '';
34
35 meta = {
36 description = "The original esoteric programming language";
37 longDescription = ''
38 INTERCAL, an abbreviation for "Compiler Language With No
39 Pronounceable Acronym", is a famously esoterical programming
40 language. It was created in 1972, by Donald R. Woods and James
41 M. Lyon, with the unusual goal of creating a language with no
42 similarities whatsoever to any existing programming
43 languages. The language largely succeeds in this goal, apart
44 from its use of an assignment statement.
45 '';
46 homepage = "http://www.catb.org/~esr/intercal/";
47 license = licenses.gpl2Plus;
48 maintainers = [ maintainers.AndersonTorres ];
49 platforms = platforms.linux;
50 };
51}
52# TODO: investigate if LD_LIBRARY_PATH needs to be set