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