aboutsummaryrefslogtreecommitdiff
path: root/flakes/mypackages/pkgs/slang_1/default.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2023-10-04 01:35:06 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2023-10-04 02:11:48 +0200
commit1a64deeb894dc95e2645a75771732c6cc53a79ad (patch)
tree1b9df4838f894577a09b9b260151756272efeb53 /flakes/mypackages/pkgs/slang_1/default.nix
parentfa25ffd4583cc362075cd5e1b4130f33306103f0 (diff)
downloadNix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.gz
Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.tar.zst
Nix-1a64deeb894dc95e2645a75771732c6cc53a79ad.zip
Squash changes containing private information
There were a lot of changes since the previous commit, but a lot of them contained personnal information about users. All thos changes got stashed into a single commit (history is kept in a different place) and private information was moved in a separate private repository
Diffstat (limited to 'flakes/mypackages/pkgs/slang_1/default.nix')
-rw-r--r--flakes/mypackages/pkgs/slang_1/default.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/flakes/mypackages/pkgs/slang_1/default.nix b/flakes/mypackages/pkgs/slang_1/default.nix
new file mode 100644
index 0000000..cd626e0
--- /dev/null
+++ b/flakes/mypackages/pkgs/slang_1/default.nix
@@ -0,0 +1,25 @@
1{ stdenv, fetchpatch, fetchurl }:
2stdenv.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 debian_patches = fetchurl {
10 url = "http://archive.debian.org/debian-archive/debian-amd64/pool/main/s/slang/slang_1.4.9dbs-8.diff.gz";
11 sha256 = "0xdq14k5ynqfwpmis1rcggs7m4n921i3bs27icbmbhfg5gb2hap2";
12 };
13 patchPhase = ''
14 gunzip -c ${debian_patches} | patch -p1
15 for i in debian/patches/*; do
16 patch -p1 < $i
17 done
18 '';
19 preConfigure = ''
20 makeFlagsArray=(CFLAGS=" -g -O2 -fno-strength-reduce -DUTF8 -D_REENTRANT -D_XOPEN_SOURCE=500")
21 '';
22 postBuild = ''
23 sed -i "1i#ifndef UTF8\n#define UTF8\n#endif" src/slang.h
24 '';
25}