aboutsummaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-04-26 13:52:30 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-04-26 13:57:04 +0200
commit676e68e3394eeb07a02745d1cf191db9fee9e610 (patch)
tree973c57072eb9b784adab83fab8748d05a7ffc9c3 /default.nix
parent98de2045a749b25d031b174c940096b4f5406b9d (diff)
downloadNix-676e68e3394eeb07a02745d1cf191db9fee9e610.tar.gz
Nix-676e68e3394eeb07a02745d1cf191db9fee9e610.tar.zst
Nix-676e68e3394eeb07a02745d1cf191db9fee9e610.zip
Use overlays for package overrides
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix228
1 files changed, 54 insertions, 174 deletions
diff --git a/default.nix b/default.nix
index ae3b2b7..1bac63e 100644
--- a/default.nix
+++ b/default.nix
@@ -1,178 +1,59 @@
1with import <nixpkgs> {}; 1with import <nixpkgs> { overlays = builtins.attrValues (import ./overlays); };
2with import ./libs.nix { nixpkgs = import <nixpkgs> {}; }; 2with mylibs;
3let 3 # https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh
4 mypkgs = {}; 4 # https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks
5 5 {
6 mypkgs.taskwarrior = taskwarrior.overrideAttrs (old: rec { 6 boinctui = callPackage ./pkgs/boinctui {};
7 postInstall = ''${old.postInstall} 7 cnagios = callPackage ./pkgs/cnagios { inherit fetchedGithub; };
8 mkdir -p "$out/share/vim/vimfiles/ftdetect" 8 duply = callPackage ./pkgs/duply {};
9 mkdir -p "$out/share/vim/vimfiles/syntax" 9 flrn = callPackage ./pkgs/flrn {
10 ln -s "../../../../share/doc/task/scripts/vim/ftdetect/task.vim" "$out/share/vim/vimfiles/ftdetect/" 10 slang = callPackage ./pkgs/slang_1 {};
11 ln -s "../../../../share/doc/task/scripts/vim/syntax/taskrc.vim" "$out/share/vim/vimfiles/syntax/" 11 inherit fetchedGithub;
12 ln -s "../../../../share/doc/task/scripts/vim/syntax/taskdata.vim" "$out/share/vim/vimfiles/syntax/"
13 ln -s "../../../../share/doc/task/scripts/vim/syntax/taskedit.vim" "$out/share/vim/vimfiles/syntax/"
14 '';
15 });
16
17 mypkgs.vit = (vit.override { taskwarrior = mypkgs.taskwarrior; }).overrideAttrs (old:
18 fetchedGithub ./fetched/vit.json // {
19 buildInputs = old.buildInputs ++ [perlPackages.TryTiny perlPackages.TextCharWidth];
20 }
21 );
22
23 mypkgs.weboob = (pythonPackages.weboob.overridePythonAttrs {
24 setupPyBuildFlags = [ "--no-qt" "--xdg" ];
25 }).overrideAttrs (old: rec {
26 version = "1.5";
27 src = fetchurl {
28 url = "https://git.weboob.org/weboob/weboob/-/archive/${version}/${old.pname}-${version}.tar.gz";
29 sha256 = "0l6q5nm5g0zn6gmf809059kddrbds27wgygxsfkqja9blks5vq7z";
30 };
31 postInstall = ''${old.postInstall or ""}
32 mkdir -p $out/share/bash-completion/completions/
33 cp tools/weboob_bash_completion $out/share/bash-completion/completions/weboob
34 '';
35 });
36
37 mypkgs.slrn = slrn.overrideAttrs (old: rec {
38 version = "1.0.3a";
39 name = "slrn-${version}";
40 src = fetchurl {
41 url = "http://www.jedsoft.org/releases/slrn/slrn-${version}.tar.bz2";
42 sha256 = "1b1d9iikr60w0vq86y9a0l4gjl0jxhdznlrdp3r405i097as9a1v";
43 }; 12 };
44 configureFlags = old.configureFlags ++ [ "--with-slrnpull" ]; 13 genius = callPackage ./pkgs/genius {};
45 }); 14 mtop = callPackage ./pkgs/mtop {};
46 15 muttprint = callPackage ./pkgs/muttprint {};
47 mypkgs.ldapvi = ldapvi.overrideAttrs (old: fetchedGit ./fetched/ldapvi.json); 16 mutt-ics = callPackage ./pkgs/mutt-ics { inherit fetchedGithub; };
48 17 nagios-cli = callPackage ./pkgs/nagios-cli { inherit fetchedGithub; };
49 nixos = import ./nixos_tools.nix {}; 18 #nagnu = callPackage ./pkgs/nagnu { inherit fetchedGithub; };
50 19 note = callPackage ./pkgs/note {};
51 mypkgs.pass = (pass.withExtensions (exts: [ exts.pass-otp ])).overrideAttrs (old: 20 notmuch-python2 = callPackage ./pkgs/notmuch/notmuch-python { pythonPackages = python2Packages; };
52 fetchedGit ./fetched/pass.json // { 21 notmuch-python3 = callPackage ./pkgs/notmuch/notmuch-python { pythonPackages = python3Packages; };
53 patches = old.patches ++ [ ./patches/pass-fix-pass-init.patch ]; 22 notmuch-vim = callPackage ./pkgs/notmuch/notmuch-vim {};
54 } 23 pg_activity = callPackage ./pkgs/pg_activity { inherit fetchedGithub; };
55 ); 24 pgloader = callPackage ./pkgs/pgloader { inherit fetchedGithub; };
56 25 telegram-cli = callPackage ./pkgs/telegram-cli { inherit fetchedGithub; };
57 mypkgs.profanity = (profanity.override { 26 telegram-history-dump = callPackage ./pkgs/telegram-history-dump { inherit fetchedGithub; };
58 notifySupport = true; 27 telegramircd = callPackage ./pkgs/telegramircd {
59 inherit libnotify gpgme gdk_pixbuf; 28 telethon = callPackage ./pkgs/telethon_sync {};
60 python = python3; 29 inherit fetchedGithub;
61 }).overrideAttrs (old: rec {
62 configureFlags = old.configureFlags ++ [ "--enable-plugins" ];
63 });
64
65 mypkgs.weechat = weechat.override {
66 configure = { availablePlugins, ... }: {
67 plugins = with availablePlugins; [
68 # Make sure websocket_client is not 0.55.0, it provokes
69 # regular crashes
70 (python.withPackages (ps: with ps; [websocket_client emoji]))
71 perl
72 ruby
73 ];
74 }; 30 };
75 }; 31 terminal-velocity = callPackage ./pkgs/terminal-velocity {};
76 32 tiv = callPackage ./pkgs/tiv {};
77 mypkgs.boinctui = callPackage ./pkgs/boinctui {}; 33 unicode = callPackage ./pkgs/unicode {};
78 mypkgs.cnagios = callPackage ./pkgs/cnagios { inherit fetchedGithub; }; 34
79 mypkgs.duply = callPackage ./pkgs/duply {}; 35 cardano = callPackage ./pkgs/crypto/cardano { inherit fetchedGithub; };
80 mypkgs.flrn = callPackage ./pkgs/flrn { 36 iota-cli-app = callPackage ./pkgs/crypto/iota-cli-app { inherit fetchedGithub; };
81 slang = callPackage ./pkgs/slang_1 {}; 37 sia = callPackage ./pkgs/crypto/sia {};
82 inherit fetchedGithub; 38 } // { # overlays
83 }; 39 inherit weboob;
84 mypkgs.genius = callPackage ./pkgs/genius {}; 40 inherit taskwarrior;
85 mypkgs.mtop = callPackage ./pkgs/mtop {}; 41 inherit slrn;
86 mypkgs.muttprint = callPackage ./pkgs/muttprint {}; 42 inherit sc-im;
87 mypkgs.mutt-ics = callPackage ./pkgs/mutt-ics { inherit fetchedGithub; }; 43 inherit lesspipe;
88 mypkgs.nagios-cli = callPackage ./pkgs/nagios-cli { inherit fetchedGithub; }; 44 inherit neomutt;
89 #mypkgs.nagnu = callPackage ./pkgs/nagnu { inherit fetchedGithub; }; 45 inherit weechat;
90 mypkgs.note = callPackage ./pkgs/note {}; 46 inherit goaccess;
91 mypkgs.notmuch-python2 = callPackage ./pkgs/notmuch/notmuch-python { pythonPackages = python2Packages; }; 47 inherit profanity;
92 mypkgs.notmuch-python3 = callPackage ./pkgs/notmuch/notmuch-python { pythonPackages = python3Packages; }; 48 inherit nixops;
93 mypkgs.notmuch-vim = callPackage ./pkgs/notmuch/notmuch-vim {}; 49 inherit dwm;
94 mypkgs.pg_activity = callPackage ./pkgs/pg_activity { inherit fetchedGithub; }; 50 inherit vit;
95 mypkgs.pgloader = callPackage ./pkgs/pgloader { inherit fetchedGithub; }; 51 inherit pass;
96 mypkgs.telegram-cli = callPackage ./pkgs/telegram-cli { inherit fetchedGithub; }; 52 inherit elinks;
97 mypkgs.telegram-history-dump = callPackage ./pkgs/telegram-history-dump { inherit fetchedGithub; }; 53 inherit pelican;
98 mypkgs.telegramircd = callPackage ./pkgs/telegramircd { 54 inherit ldapvi;
99 telethon = callPackage ./pkgs/telethon_sync {}; 55 inherit (mylibs.yarn2nixPackage) yarn2nix;
100 inherit fetchedGithub; 56 } // {
101 };
102 mypkgs.terminal-velocity = callPackage ./pkgs/terminal-velocity {};
103 mypkgs.tiv = callPackage ./pkgs/tiv {};
104 mypkgs.unicode = callPackage ./pkgs/unicode {};
105
106 mypkgs.cardano = callPackage ./pkgs/crypto/cardano { inherit fetchedGithub; };
107 mypkgs.iota-cli-app = callPackage ./pkgs/crypto/iota-cli-app { inherit fetchedGithub; };
108 mypkgs.sia = callPackage ./pkgs/crypto/sia {};
109
110 mypkgs.pelican = python3Packages.pelican.overrideAttrs(old: fetchedGithub ./fetched/pelican.json // rec {
111 propagatedBuildInputs = old.propagatedBuildInputs ++ [ python3Packages.pyyaml ];
112 });
113
114 mypkgs.elinks = elinks.overrideAttrs (old:
115 fetchedGithub ./fetched/elinks.json // rec {
116 preConfigure = ''sh autogen.sh'';
117 buildInputs = old.buildInputs ++ [ gettext automake autoconf ];
118 configureFlags = [
119 "--disable-smb" "--without-x" "--enable-cgi"
120 "--enable-leds" "--enable-256-colors"
121 "--enable-html-highlight" "--with-zlib"
122 ];
123 patches = [];
124 }
125 );
126
127 mypkgs.neomutt = neomutt.overrideAttrs (old:
128 rec {
129 buildInputs = old.buildInputs ++ [ gdbm ];
130 configureFlags = old.configureFlags ++ [ "--gdbm" ];
131 }
132 );
133
134 mypkgs.goaccess = goaccess.overrideAttrs(old: rec {
135 name = "goaccess-${version}";
136 version = "1.3";
137 src = fetchurl {
138 url = "https://tar.goaccess.io/${name}.tar.gz";
139 sha256 = "16vv3pj7pbraq173wlxa89jjsd279004j4kgzlrsk1dz4if5qxwc";
140 };
141 configureFlags = old.configureFlags ++ [ "--enable-tcb=btree" ];
142 buildInputs = old.buildInputs ++ [ tokyocabinet bzip2 ];
143 });
144
145 mypkgs.yarn2nix = yarn2nixPackage.yarn2nix;
146
147
148 mypkgs.sc-im = sc-im.overrideAttrs (old: {
149 buildPhase = ''
150 cd src
151 sed -i Makefile -e 's@\...name.info@.local/state/$(name)info@'
152 cd ..
153 '' + old.buildPhase;
154 });
155
156 mypkgs.lesspipe = lesspipe.overrideAttrs(old: {
157 configureFlags = (old.configureFlags or []) ++ [ "--yes" ];
158 });
159
160
161 mypkgs.dwm = dwm.overrideAttrs(old: rec {
162 postPatch = ''
163 cp ${./patches/dwm_config.h} ./config.h
164 '';
165 });
166
167 mypkgs.nixops = nixops.overrideAttrs (old: {
168 preConfigure = (old.preConfigure or "") + ''
169 sed -i -e "/'keyFile'/s/'path'/'string'/" nixops/backends/__init__.py
170 '';
171 });
172# https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh
173# https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks
174in
175 mypkgs // {
176 inherit nix-prefetch-scripts; 57 inherit nix-prefetch-scripts;
177 inherit nix-generate-from-cpan; 58 inherit nix-generate-from-cpan;
178 inherit timewarrior; 59 inherit timewarrior;
@@ -222,7 +103,6 @@ in
222 inherit lzo unzip bzip2 p7zip xz; 103 inherit lzo unzip bzip2 p7zip xz;
223 # unrar is unfree 104 # unrar is unfree
224 inherit tig; 105 inherit tig;
225 #inherit nixos;
226 inherit emacs26-nox; 106 inherit emacs26-nox;
227 inherit highlight sourceHighlight; 107 inherit highlight sourceHighlight;
228 pygmentize = python3Packages.pygments; 108 pygmentize = python3Packages.pygments;