diff options
Diffstat (limited to 'pkgs/tiv')
-rw-r--r-- | pkgs/tiv/default.nix | 19 | ||||
-rw-r--r-- | pkgs/tiv/tiv_builder.sh | 8 |
2 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/tiv/default.nix b/pkgs/tiv/default.nix new file mode 100644 index 00000000..c03aabe0 --- /dev/null +++ b/pkgs/tiv/default.nix | |||
@@ -0,0 +1,19 @@ | |||
1 | { buildPerlPackage, fetchurl, perlPackages }: | ||
2 | buildPerlPackage rec { | ||
3 | name = "tiv-${version}"; | ||
4 | version = "2015"; | ||
5 | src = fetchurl { | ||
6 | url = "http://xyne.archlinux.ca/projects/tiv/src/tiv-${version}.tar.xz"; | ||
7 | sha256 = "1vq073v7z7vmcd57lhs4rf4jasji69cpjgkz4dykp94a77p1qq90"; | ||
8 | }; | ||
9 | |||
10 | outputs = ["out"]; | ||
11 | buildInputs = with perlPackages; [ PerlMagick ]; | ||
12 | perlPreHookScript = ./tiv_builder.sh; | ||
13 | perlPreHook = '' | ||
14 | source $perlPreHookScript | ||
15 | ''; | ||
16 | installPhase = '' | ||
17 | install -Dm755 tiv "$out/bin/tiv" | ||
18 | ''; | ||
19 | } | ||
diff --git a/pkgs/tiv/tiv_builder.sh b/pkgs/tiv/tiv_builder.sh new file mode 100644 index 00000000..ea166828 --- /dev/null +++ b/pkgs/tiv/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 | |||