aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--default.nix20
-rw-r--r--hooks/tiv_builder.sh8
2 files changed, 28 insertions, 0 deletions
diff --git a/default.nix b/default.nix
index b464031..28767a9 100644
--- a/default.nix
+++ b/default.nix
@@ -146,11 +146,30 @@ let
146 }; 146 };
147 }; 147 };
148 148
149 tiv = buildPerlPackage rec {
150 name = "tiv-${version}";
151 version = "2015";
152 src = fetchurl {
153 url = "http://xyne.archlinux.ca/projects/tiv/src/tiv-${version}.tar.xz";
154 sha256 = "1vq073v7z7vmcd57lhs4rf4jasji69cpjgkz4dykp94a77p1qq90";
155 };
156 outputs = ["out"];
157 buildInputs = [ perlPackages.PerlMagick ];
158 perlPreHookScript = ./hooks/tiv_builder.sh;
159 perlPreHook = ''
160 source ${perlPreHookScript}
161 '';
162 installPhase = ''
163 install -Dm755 tiv "$out/bin/tiv"
164 '';
165 };
166
149# https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh 167# https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh
150# https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks 168# https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks
151in 169in
152 { 170 {
153 inherit nix-prefetch-scripts; 171 inherit nix-prefetch-scripts;
172 inherit nix-generate-from-cpan;
154 inherit ledger; 173 inherit ledger;
155 inherit taskwarrior vit timewarrior; 174 inherit taskwarrior vit timewarrior;
156 inherit weboob; 175 inherit weboob;
@@ -173,5 +192,6 @@ in
173 inherit weechat; 192 inherit weechat;
174 inherit note terminal_velocity; 193 inherit note terminal_velocity;
175 inherit mtop; 194 inherit mtop;
195 inherit tiv;
176 #inherit nixos; 196 #inherit nixos;
177 } 197 }
diff --git a/hooks/tiv_builder.sh b/hooks/tiv_builder.sh
new file mode 100644
index 0000000..ea16682
--- /dev/null
+++ b/hooks/tiv_builder.sh
@@ -0,0 +1,8 @@
1orig=$(declare -f preConfigure)
2new_name="preConfigure2 ${orig#preConfigure}"
3eval "$new_name"
4
5preConfigure() {
6 preConfigure2 || true
7}
8