1{ lib, stdenv, fetchurl }:
2
3let
4 rev = "6faca61810d335c7837f320733fe8e15a1431fc2";
5
6 # Don't use fetchgit as this is needed during Aarch64 bootstrapping
7 configGuess = fetchurl {
8 url = "https://git.savannah.gnu.org/cgit/config.git/plain/config.guess?id=${rev}";
9 sha256 = "06wkkhpbx9slmknr2g7mcd8x3zsdhnmmay25l31h3rkdp1wkq7kx";
10 };
11 configSub = fetchurl {
12 url = "https://git.savannah.gnu.org/cgit/config.git/plain/config.sub?id=${rev}";
13 sha256 = "1qkph8cqanmgy3s4a18bm1a4vk62i8pf8cy5pc1hkpqwn4g6l0di";
14 };
15in stdenv.mkDerivation {
16 pname = "gnu-config";
17 version = "2021-01-25";
18
19 buildCommand = ''
20 mkdir -p $out
21 cp ${configGuess} $out/config.guess
22 cp ${configSub} $out/config.sub
23
24 chmod +x $out/config.*
25 '';
26
27 meta = with lib; {
28 description = "Attempt to guess a canonical system name";
29 homepage = "https://savannah.gnu.org/projects/config";
30 license = licenses.gpl3;
31 # In addition to GPLv3:
32 # As a special exception to the GNU General Public License, if you
33 # distribute this file as part of a program that contains a
34 # configuration script generated by Autoconf, you may include it under
35 # the same distribution terms that you use for the rest of that
36 # program.
37 maintainers = [ maintainers.dezgeg ];
38 platforms = platforms.all;
39 };
40}