From a3cb3fb64b3035d1b40c05f9d9df6b141ca6ffd9 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Sat, 10 Nov 2018 16:27:47 +0100 Subject: [PATCH] openmpi: refactor version string for auto updates --- pkgs/development/libraries/openmpi/default.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/development/libraries/openmpi/default.nix b/pkgs/development/libraries/openmpi/default.nix index c98249e89c4d..345dffa87f5b 100644 --- a/pkgs/development/libraries/openmpi/default.nix +++ b/pkgs/development/libraries/openmpi/default.nix @@ -9,14 +9,13 @@ }: let - majorVersion = "3.1"; - minorVersion = "3"; + version = "3.1.3"; in stdenv.mkDerivation rec { - name = "openmpi-${majorVersion}.${minorVersion}"; + name = "openmpi-${version}"; - src = fetchurl { - url = "http://www.open-mpi.org/software/ompi/v${majorVersion}/downloads/${name}.tar.bz2"; + src = with stdenv.lib.versions; fetchurl { + url = "http://www.open-mpi.org/software/ompi/v${major version}.${minor version}/downloads/${name}.tar.bz2"; sha256 = "1dks11scivgaskjs5955y9wprsl12wr3gn5r7wfl0l8gq03l7q4b"; };