diff options
-rw-r--r-- | default.nix | 20 | ||||
-rw-r--r-- | hooks/tiv_builder.sh | 8 |
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 |
151 | in | 169 | in |
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 @@ | |||
1 | orig=$(declare -f preConfigure) | ||
2 | new_name="preConfigure2 ${orig#preConfigure}" | ||
3 | eval "$new_name" | ||
4 | |||
5 | preConfigure() { | ||
6 | preConfigure2 || true | ||
7 | } | ||
8 | |||