2021-02-05 17:12:51 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
# Note: this package is used for bootstrapping fetchurl, and thus
|
|
|
|
# cannot use fetchpatch! All mutable patches (generated by GitHub or
|
|
|
|
# cgit) that are needed here should be included directly in Nixpkgs as
|
|
|
|
# files.
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
let
|
2023-08-22 20:05:09 +00:00
|
|
|
rev = "d4e37b5868ef910e3e52744c34408084bb13051c";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Don't use fetchgit as this is needed during Aarch64 bootstrapping
|
|
|
|
configGuess = fetchurl {
|
2023-08-22 20:05:09 +00:00
|
|
|
name = "config.guess-${builtins.substring 0 7 rev}";
|
2020-04-24 23:36:52 +00:00
|
|
|
url = "https://git.savannah.gnu.org/cgit/config.git/plain/config.guess?id=${rev}";
|
2023-08-22 20:05:09 +00:00
|
|
|
sha256 = "191czpnbc1nxrygg8fd3839y1f4m9x43rp57vgrsas6p07zzh3c1";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
configSub = fetchurl {
|
2023-08-22 20:05:09 +00:00
|
|
|
name = "config.sub-${builtins.substring 0 7 rev}";
|
2020-04-24 23:36:52 +00:00
|
|
|
url = "https://git.savannah.gnu.org/cgit/config.git/plain/config.sub?id=${rev}";
|
2023-08-22 20:05:09 +00:00
|
|
|
sha256 = "0148p54gw10p6sk2rn3gi9vvqm89rk8kcvl9335ckayhanx31381";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2020-08-20 17:08:02 +00:00
|
|
|
in stdenv.mkDerivation {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "gnu-config";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "2023-07-31";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildCommand = ''
|
2023-08-22 20:05:09 +00:00
|
|
|
install -Dm755 ${configGuess} $out/config.guess
|
|
|
|
install -Dm755 ${configSub} $out/config.sub
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Attempt to guess a canonical system name";
|
|
|
|
homepage = "https://savannah.gnu.org/projects/config";
|
|
|
|
license = licenses.gpl3;
|
|
|
|
# In addition to GPLv3:
|
|
|
|
# As a special exception to the GNU General Public License, if you
|
|
|
|
# distribute this file as part of a program that contains a
|
|
|
|
# configuration script generated by Autoconf, you may include it under
|
|
|
|
# the same distribution terms that you use for the rest of that
|
|
|
|
# program.
|
2023-04-29 16:46:19 +00:00
|
|
|
maintainers = with maintainers; [ dezgeg emilytrau ];
|
2020-04-24 23:36:52 +00:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|