From 442f1ec54d730e82b9bb0720749cd42f1010ad2c Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Mon, 4 Jan 2021 15:51:51 +0200 Subject: [PATCH] sundials: reorder attributes Per https://github.com/jtojnar/nixpkgs-hammering/blob/master/explanations/attribute-ordering.md --- .../libraries/sundials/default.nix | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/pkgs/development/libraries/sundials/default.nix b/pkgs/development/libraries/sundials/default.nix index 86c556ae532..a17b300d6be 100644 --- a/pkgs/development/libraries/sundials/default.nix +++ b/pkgs/development/libraries/sundials/default.nix @@ -15,6 +15,24 @@ stdenv.mkDerivation rec { pname = "sundials"; version = "5.6.1"; + outputs = [ "out" "examples" ]; + + src = fetchurl { + url = "https://computation.llnl.gov/projects/${pname}/download/${pname}-${version}.tar.gz"; + sha256 = "Frd5mex+fyFXqh0Eyh3kojccqBUOBW0klR0MWJZvKoM="; + }; + + patches = [ + # Fixing an upstream regression in treating cmake prefix directories: + # https://github.com/LLNL/sundials/pull/58 + (fetchpatch { + url = "https://github.com/LLNL/sundials/commit/dd32ff9baa05618f36e44aadb420bbae4236ea1e.patch"; + sha256 = "kToAuma+2iHFyL1v/l29F3+nug4AdK5cPG6IcXv2afc="; + }) + ]; + + nativeBuildInputs = [ cmake ]; + buildInputs = [ python ] @@ -31,22 +49,6 @@ stdenv.mkDerivation rec { ++ stdenv.lib.optionals (kluSupport) [ suitesparse ]; - outputs = [ "out" "examples" ]; - - nativeBuildInputs = [ cmake ]; - - src = fetchurl { - url = "https://computation.llnl.gov/projects/${pname}/download/${pname}-${version}.tar.gz"; - sha256 = "Frd5mex+fyFXqh0Eyh3kojccqBUOBW0klR0MWJZvKoM="; - }; - patches = [ - # Fixing an upstream regression in treating cmake prefix directories: - # https://github.com/LLNL/sundials/pull/58 - (fetchpatch { - url = "https://github.com/LLNL/sundials/commit/dd32ff9baa05618f36e44aadb420bbae4236ea1e.patch"; - sha256 = "kToAuma+2iHFyL1v/l29F3+nug4AdK5cPG6IcXv2afc="; - }) - ]; cmakeFlags = [ "-DEXAMPLES_INSTALL_PATH=${placeholder "examples"}/share/examples"