From 9f7e0ed031ba8cd3f4bdbb3cb41587ec763d21d4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isma=C3=ABl=20Bouya?= Date: Fri, 21 Dec 2018 00:52:11 +0100 Subject: [PATCH] Add tiv program --- default.nix | 20 ++++++++++++++++++++ hooks/tiv_builder.sh | 8 ++++++++ 2 files changed, 28 insertions(+) create mode 100644 hooks/tiv_builder.sh diff --git a/default.nix b/default.nix index b464031..28767a9 100644 --- a/default.nix +++ b/default.nix @@ -146,11 +146,30 @@ let }; }; + tiv = buildPerlPackage rec { + name = "tiv-${version}"; + version = "2015"; + src = fetchurl { + url = "http://xyne.archlinux.ca/projects/tiv/src/tiv-${version}.tar.xz"; + sha256 = "1vq073v7z7vmcd57lhs4rf4jasji69cpjgkz4dykp94a77p1qq90"; + }; + outputs = ["out"]; + buildInputs = [ perlPackages.PerlMagick ]; + perlPreHookScript = ./hooks/tiv_builder.sh; + perlPreHook = '' + source ${perlPreHookScript} + ''; + installPhase = '' + install -Dm755 tiv "$out/bin/tiv" + ''; + }; + # https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh # https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks in { inherit nix-prefetch-scripts; + inherit nix-generate-from-cpan; inherit ledger; inherit taskwarrior vit timewarrior; inherit weboob; @@ -173,5 +192,6 @@ in inherit weechat; inherit note terminal_velocity; inherit mtop; + inherit tiv; #inherit nixos; } 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 @@ +orig=$(declare -f preConfigure) +new_name="preConfigure2 ${orig#preConfigure}" +eval "$new_name" + +preConfigure() { + preConfigure2 || true +} + -- 2.41.0