From 9483359887f815aa7441176be5af2d4e9ae6f5b2 Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Sun, 19 Feb 2017 16:33:31 +0200 Subject: linuxPackages.tp_smapi: Use common-updater/update-source-version script This way we have the benefit of the usual Nixpkgs style, and gain a slight reduction in amount of code in the updater. Also use callPackage to reduce duplication of the dependencies of the update script and use makeBinPath to make things neater. --- pkgs/os-specific/linux/tp_smapi/default.nix | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'pkgs/os-specific/linux/tp_smapi/default.nix') diff --git a/pkgs/os-specific/linux/tp_smapi/default.nix b/pkgs/os-specific/linux/tp_smapi/default.nix index cb5c539a94ee..765305d0fdaf 100644 --- a/pkgs/os-specific/linux/tp_smapi/default.nix +++ b/pkgs/os-specific/linux/tp_smapi/default.nix @@ -1,14 +1,16 @@ -{ stdenv, fetchurl, kernel, writeScript, coreutils, gnugrep, jq, curl +{ stdenv, lib, fetchFromGitHub, kernel, writeScript, coreutils, gnugrep, jq, curl, common-updater-scripts }: stdenv.mkDerivation rec { name = "tp_smapi-${version}-${kernel.version}"; - version = "0.42"; - src = fetchurl { - url = "https://github.com/evgeni/tp_smapi/archive/tp-smapi/${version}.tar.gz"; - sha256 = "cd28bf6ee21b2c27b88d947cb0bfcb19648c7daa5d350115403dbcad05849381"; + src = fetchFromGitHub { + owner = "evgeni"; + repo = "tp_smapi"; + rev = "tp-smapi/${version}"; + sha256 = "12lnig90lrmkmqwl386q7ssqs9p0jikqhwl2wsmcmii1gn92hzfy"; + name = "tp-smapi-${version}"; }; hardeningDisable = [ "pic" ]; @@ -28,7 +30,7 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; passthru.updateScript = import ./update.nix { - inherit writeScript coreutils gnugrep jq curl; + inherit lib writeScript coreutils gnugrep jq curl common-updater-scripts; }; meta = { -- cgit 1.4.1