From f1e8640c5482f39b90864eadedab20c3f4b075c6 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 21 Nov 2021 11:43:19 +0100 Subject: [PATCH] libisl: Make derivations generic, add 0.24 (#146693) * libisl: Make derivation generic Signed-off-by: Matthias Beyer * libisl: add 0.24 Signed-off-by: Matthias Beyer * isl: remove unused args * isl: remove dead homepages * isl: fix configureFlags * isl: fix nested callPackage use import to remove callPackage-inside-callPackage, which breaks overriding * isl: pname/version -> name pname/version is preferred, but causes rebuilds here. let's do the cleanup separately from the mass rebuild, to use the 0-rebuild-count as a 'nothing up my sleeve' gesture * isl_0_24: fix sha256 * isl_0_11: add missing patch Co-authored-by: Ryan Burns --- pkgs/development/libraries/isl/0.11.1.nix | 26 ++++-------------- pkgs/development/libraries/isl/0.14.1.nix | 30 +++++--------------- pkgs/development/libraries/isl/0.17.1.nix | 30 +++++--------------- pkgs/development/libraries/isl/0.20.0.nix | 32 +++++----------------- pkgs/development/libraries/isl/0.24.0.nix | 11 ++++++++ pkgs/development/libraries/isl/generic.nix | 32 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 7 files changed, 71 insertions(+), 91 deletions(-) create mode 100644 pkgs/development/libraries/isl/0.24.0.nix create mode 100644 pkgs/development/libraries/isl/generic.nix diff --git a/pkgs/development/libraries/isl/0.11.1.nix b/pkgs/development/libraries/isl/0.11.1.nix index 5beffd1f0d2e..a11d9eca6a6e 100644 --- a/pkgs/development/libraries/isl/0.11.1.nix +++ b/pkgs/development/libraries/isl/0.11.1.nix @@ -1,22 +1,8 @@ -{ lib, stdenv, fetchurl, gmp }: - -stdenv.mkDerivation { - name = "isl-0.11.1"; # CLooG 0.16.3 fails to build with ISL 0.08. - - src = fetchurl { - url = "https://src.fedoraproject.org/repo/pkgs/gcc/isl-0.11.1.tar.bz2/bce1586384d8635a76d2f017fb067cd2/isl-0.11.1.tar.bz2"; - sha256 = "13d9cqa5rzhbjq0xf0b2dyxag7pqa72xj9dhsa03m8ccr1a4npq9"; - }; - - buildInputs = [ gmp ]; +import ./generic.nix { + version = "0.11.1"; + urls = [ + "https://src.fedoraproject.org/repo/pkgs/gcc/isl-0.11.1.tar.bz2/bce1586384d8635a76d2f017fb067cd2/isl-0.11.1.tar.bz2" + ]; + sha256 = "13d9cqa5rzhbjq0xf0b2dyxag7pqa72xj9dhsa03m8ccr1a4npq9"; patches = [ ./fix-gcc-build.diff ]; - - enableParallelBuilding = true; - - meta = { - homepage = "https://www.kotnet.org/~skimo/isl/"; - license = lib.licenses.lgpl21; - description = "A library for manipulating sets and relations of integer points bounded by linear constraints"; - platforms = lib.platforms.all; - }; } diff --git a/pkgs/development/libraries/isl/0.14.1.nix b/pkgs/development/libraries/isl/0.14.1.nix index 87243def1796..1a368d2523e0 100644 --- a/pkgs/development/libraries/isl/0.14.1.nix +++ b/pkgs/development/libraries/isl/0.14.1.nix @@ -1,24 +1,8 @@ -{ lib, stdenv, fetchurl, gmp }: - -stdenv.mkDerivation rec { - name = "isl-0.14.1"; - - src = fetchurl { - urls = [ - "mirror://sourceforge/libisl/${name}.tar.xz" - "https://libisl.sourceforge.io/${name}.tar.xz" - ]; - sha256 = "0xa6xagah5rywkywn19rzvbvhfvkmylhcxr6z9z7bz29cpiwk0l8"; - }; - - buildInputs = [ gmp ]; - - enableParallelBuilding = true; - - meta = { - homepage = "https://www.kotnet.org/~skimo/isl/"; - license = lib.licenses.lgpl21; - description = "A library for manipulating sets and relations of integer points bounded by linear constraints"; - platforms = lib.platforms.all; - }; +import ./generic.nix rec { + version = "0.14.1"; + urls = [ + "mirror://sourceforge/libisl/isl-${version}.tar.xz" + "https://libisl.sourceforge.io/isl-${version}.tar.xz" + ]; + sha256 = "0xa6xagah5rywkywn19rzvbvhfvkmylhcxr6z9z7bz29cpiwk0l8"; } diff --git a/pkgs/development/libraries/isl/0.17.1.nix b/pkgs/development/libraries/isl/0.17.1.nix index a066655d4a05..2e0110df786e 100644 --- a/pkgs/development/libraries/isl/0.17.1.nix +++ b/pkgs/development/libraries/isl/0.17.1.nix @@ -1,24 +1,8 @@ -{ lib, stdenv, fetchurl, gmp }: - -stdenv.mkDerivation rec { - name = "isl-0.17.1"; - - src = fetchurl { - urls = [ - "mirror://sourceforge/libisl/${name}.tar.xz" - "https://libisl.sourceforge.io/${name}.tar.xz" - ]; - sha256 = "be152e5c816b477594f4c6194b5666d8129f3a27702756ae9ff60346a8731647"; - }; - - buildInputs = [ gmp ]; - - enableParallelBuilding = true; - - meta = { - homepage = "https://www.kotnet.org/~skimo/isl/"; - license = lib.licenses.lgpl21; - description = "A library for manipulating sets and relations of integer points bounded by linear constraints"; - platforms = lib.platforms.all; - }; +import ./generic.nix rec { + version = "0.17.1"; + urls = [ + "mirror://sourceforge/libisl/isl-${version}.tar.xz" + "https://libisl.sourceforge.io/isl-${version}.tar.xz" + ]; + sha256 = "be152e5c816b477594f4c6194b5666d8129f3a27702756ae9ff60346a8731647"; } diff --git a/pkgs/development/libraries/isl/0.20.0.nix b/pkgs/development/libraries/isl/0.20.0.nix index d68637ddbcde..d7567bebf298 100644 --- a/pkgs/development/libraries/isl/0.20.0.nix +++ b/pkgs/development/libraries/isl/0.20.0.nix @@ -1,29 +1,11 @@ -{ lib, stdenv, fetchurl, gmp }: - -stdenv.mkDerivation rec { - name = "isl-0.20"; - - src = fetchurl { - urls = [ - "mirror://sourceforge/libisl/${name}.tar.xz" - "https://libisl.sourceforge.io/${name}.tar.xz" - ]; - - sha256 = "1akpgq0rbqbah5517blg2zlnfvjxfcl9cjrfc75nbcx5p2gnlnd5"; - }; - - buildInputs = [ gmp ]; - +import ./generic.nix rec { + version = "0.20"; + urls = [ + "mirror://sourceforge/libisl/isl-${version}.tar.xz" + "https://libisl.sourceforge.io/isl-${version}.tar.xz" + ]; + sha256 = "1akpgq0rbqbah5517blg2zlnfvjxfcl9cjrfc75nbcx5p2gnlnd5"; configureFlags = [ "--with-gcc-arch=generic" # don't guess -march=/mtune= ]; - - enableParallelBuilding = true; - - meta = { - homepage = "http://isl.gforge.inria.fr/"; - license = lib.licenses.lgpl21; - description = "A library for manipulating sets and relations of integer points bounded by linear constraints"; - platforms = lib.platforms.all; - }; } diff --git a/pkgs/development/libraries/isl/0.24.0.nix b/pkgs/development/libraries/isl/0.24.0.nix new file mode 100644 index 000000000000..90eb5ec0fac2 --- /dev/null +++ b/pkgs/development/libraries/isl/0.24.0.nix @@ -0,0 +1,11 @@ +import ./generic.nix rec { + version = "0.24"; + urls = [ + "mirror://sourceforge/libisl/isl-${version}.tar.xz" + "https://libisl.sourceforge.io/isl-${version}.tar.xz" + ]; + sha256 = "1bgbk6n93qqn7w8v21kxf4x6dc3z0ypqrzvgfd46nhagak60ac84"; + configureFlags = [ + "--with-gcc-arch=generic" # don't guess -march=/mtune= + ]; +} diff --git a/pkgs/development/libraries/isl/generic.nix b/pkgs/development/libraries/isl/generic.nix new file mode 100644 index 000000000000..eb6fe5f9cd69 --- /dev/null +++ b/pkgs/development/libraries/isl/generic.nix @@ -0,0 +1,32 @@ +{ version +, urls +, sha256 +, configureFlags ? [] +, patches ? [] +}: + +{ lib, stdenv, fetchurl, gmp +}: + +stdenv.mkDerivation { + name = "isl-${version}"; + + src = fetchurl { + inherit urls sha256; + }; + + inherit patches; + + buildInputs = [ gmp ]; + + inherit configureFlags; + + enableParallelBuilding = true; + + meta = { + homepage = "https://libisl.sourceforge.io/"; + license = lib.licenses.lgpl21; + description = "A library for manipulating sets and relations of integer points bounded by linear constraints"; + platforms = lib.platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 662bf9ae6ac6..abd35594b162 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6535,6 +6535,7 @@ with pkgs; isl_0_14 = callPackage ../development/libraries/isl/0.14.1.nix { }; isl_0_17 = callPackage ../development/libraries/isl/0.17.1.nix { }; isl_0_20 = callPackage ../development/libraries/isl/0.20.0.nix { }; + isl_0_24 = callPackage ../development/libraries/isl/0.24.0.nix { }; ispike = callPackage ../development/libraries/science/robotics/ispike { };