]> git.immae.eu Git - perso/Immae/Config/Nix.git/blob - pkgs/slang_1/default.nix
b3842f7c8e579244b779a534ecd0ee77e2a23aab
[perso/Immae/Config/Nix.git] / pkgs / slang_1 / default.nix
1 { stdenv, fetchpatch, fetchurl }:
2 stdenv.mkDerivation rec {
3 name = "slang-debian-patched-${version}";
4 version = "1.4.9";
5 src = fetchurl {
6 url = "ftp://space.mit.edu/pub/davis/slang/v1.4/slang-1.4.9.tar.gz";
7 sha256 = "1y2mg0whqh4b3acd0k17i4biz55bimxg8aaxhmwd165cvspxns9r";
8 };
9 patches = [
10 (fetchpatch {
11 url = "http://archive.debian.org/debian-archive/debian-amd64/pool/main/s/slang/slang_1.4.9dbs-8.diff.gz";
12 sha256 = "0xdq14k5ynqfwpmis1rcggs7m4n921i3bs27icbmbhfg5gb2hap2";
13 })
14 ];
15 preConfigure = ''
16 for i in debian/patches/*; do
17 patch -p1 < $i
18 done
19 makeFlagsArray=(CFLAGS=" -g -O2 -fno-strength-reduce -DUTF8 -D_REENTRANT -D_XOPEN_SOURCE=500")
20 '';
21 postBuild = ''
22 sed -i "1i#ifndef UTF8\n#define UTF8\n#endif" src/slang.h
23 '';
24 }