diff options
-rw-r--r-- | default.nix | 38 | ||||
-rw-r--r-- | fetched/flrn.json | 15 |
2 files changed, 53 insertions, 0 deletions
diff --git a/default.nix b/default.nix index e5fc5f4..abf6237 100644 --- a/default.nix +++ b/default.nix | |||
@@ -617,6 +617,44 @@ let | |||
617 | ''; | 617 | ''; |
618 | }); | 618 | }); |
619 | 619 | ||
620 | mypkgs.flrn = let | ||
621 | slang = stdenv.mkDerivation rec { | ||
622 | name = "slang-debian-patched-${version}"; | ||
623 | version = "1.4.9"; | ||
624 | src = fetchurl { | ||
625 | url = "ftp://space.mit.edu/pub/davis/slang/v1.4/slang-1.4.9.tar.gz"; | ||
626 | sha256 = "1y2mg0whqh4b3acd0k17i4biz55bimxg8aaxhmwd165cvspxns9r"; | ||
627 | }; | ||
628 | debianPatches = fetchurl { | ||
629 | url = "http://archive.debian.org/debian-archive/debian-amd64/pool/main/s/slang/slang_1.4.9dbs-8.diff.gz"; | ||
630 | sha256 = "0xdq14k5ynqfwpmis1rcggs7m4n921i3bs27icbmbhfg5gb2hap2"; | ||
631 | }; | ||
632 | preConfigure = '' | ||
633 | cp $debianPatches ./slang.diff.gz | ||
634 | gunzip slang.diff.gz | ||
635 | patch -p1 < slang.diff | ||
636 | for i in debian/patches/*; do | ||
637 | patch -p1 < $i | ||
638 | done | ||
639 | makeFlagsArray=(CFLAGS=" -g -O2 -fno-strength-reduce -DUTF8 -D_REENTRANT -D_XOPEN_SOURCE=500") | ||
640 | ''; | ||
641 | postBuild = '' | ||
642 | sed -i "1i#ifndef UTF8\n#define UTF8\n#endif" src/slang.h | ||
643 | ''; | ||
644 | }; | ||
645 | in | ||
646 | stdenv.mkDerivation (fetchedGithub ./fetched/flrn.json // rec { | ||
647 | buildInputs = [ libetpan openssl autoconf groff slang yacc ]; | ||
648 | preConfigure = '' | ||
649 | sed -i -e "s/test -e configure/false/" configure.in | ||
650 | autoconf | ||
651 | sed -i -e '/define CHECK_MAIL/d' src/flrn_config.h | ||
652 | sed -i -e '/DEFAULT_DIR_FILE/s@".flrn"@".config/flrn"@' src/flrn_config.h | ||
653 | sed -i -e '/DEFAULT_CONFIG_FILE/s@".flrnrc"@"flrnrc"@' src/flrn_config.h | ||
654 | sed -i -e '/DEFAULT_FLNEWS_FILE/s@".flnewsrc"@"flnewsrc"@' src/flrn_config.h | ||
655 | sed -i -e '/flrn_char chaine/s@18@20@' src/flrn_command.c | ||
656 | ''; | ||
657 | }); | ||
620 | # https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh | 658 | # https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh |
621 | # https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks | 659 | # https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks |
622 | in | 660 | in |
diff --git a/fetched/flrn.json b/fetched/flrn.json new file mode 100644 index 0000000..3d7a944 --- /dev/null +++ b/fetched/flrn.json | |||
@@ -0,0 +1,15 @@ | |||
1 | { | ||
2 | "tag": "860d642-master", | ||
3 | "meta": { | ||
4 | "name": "flrn", | ||
5 | "url": "https://github.com/Cigaes/flrn", | ||
6 | "branch": "master" | ||
7 | }, | ||
8 | "github": { | ||
9 | "owner": "Cigaes", | ||
10 | "repo": "flrn", | ||
11 | "rev": "860d642bd6389a209c8b697bd044f78d23406509", | ||
12 | "sha256": "0sqlxxpy1xg7cb2hbxcr0al46nyr6jjnns4b5i8w04z5sypa9r5c", | ||
13 | "fetchSubmodules": true | ||
14 | } | ||
15 | } | ||