2022-08-29 21:25:50 +00:00
|
|
|
{ stdenv, fetchurl, undmg, cpio, xar, lib }:
|
2009-03-03 13:27:40 +00:00
|
|
|
|
2020-09-03 10:49:11 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "fpc-binary";
|
2022-06-18 10:55:05 +00:00
|
|
|
version = "3.2.2";
|
2007-08-11 20:55:40 +00:00
|
|
|
|
2010-07-28 11:55:54 +00:00
|
|
|
src =
|
2018-08-20 19:11:29 +00:00
|
|
|
if stdenv.hostPlatform.system == "i686-linux" then
|
2010-07-28 11:55:54 +00:00
|
|
|
fetchurl {
|
2020-09-03 10:49:11 +00:00
|
|
|
url = "mirror://sourceforge/project/freepascal/Linux/${version}/fpc-${version}.i386-linux.tar";
|
2022-06-18 10:55:05 +00:00
|
|
|
sha256 = "f62980ac0b2861221f79fdbff67836aa6912a4256d4192cfa4dfa0ac5b419958";
|
2010-07-28 11:55:54 +00:00
|
|
|
}
|
2018-08-20 19:11:29 +00:00
|
|
|
else if stdenv.hostPlatform.system == "x86_64-linux" then
|
2010-07-28 11:55:54 +00:00
|
|
|
fetchurl {
|
2022-06-18 10:55:05 +00:00
|
|
|
url = "mirror://sourceforge/project/freepascal/Linux/${version}/fpc-${version}.x86_64-linux.tar";
|
|
|
|
sha256 = "5adac308a5534b6a76446d8311fc340747cbb7edeaacfe6b651493ff3fe31e83";
|
2010-07-28 11:55:54 +00:00
|
|
|
}
|
2020-09-03 10:51:31 +00:00
|
|
|
else if stdenv.hostPlatform.system == "aarch64-linux" then
|
|
|
|
fetchurl {
|
|
|
|
url = "mirror://sourceforge/project/freepascal/Linux/${version}/fpc-${version}.aarch64-linux.tar";
|
2022-06-18 10:55:05 +00:00
|
|
|
sha256 = "b39470f9b6b5b82f50fc8680a5da37d2834f2129c65c24c5628a80894d565451";
|
2020-09-03 10:51:31 +00:00
|
|
|
}
|
2022-08-29 21:25:50 +00:00
|
|
|
else if stdenv.isDarwin then
|
|
|
|
fetchurl {
|
|
|
|
url = "mirror://sourceforge/project/freepascal/Mac%20OS%20X/${version}/fpc-${version}.intelarm64-macosx.dmg";
|
|
|
|
sha256 = "05d4510c8c887e3c68de20272abf62171aa5b2ef1eba6bce25e4c0bc41ba8b7d";
|
|
|
|
}
|
2018-08-20 19:11:29 +00:00
|
|
|
else throw "Not supported on ${stdenv.hostPlatform.system}.";
|
2007-08-11 20:55:40 +00:00
|
|
|
|
2022-08-29 21:25:50 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
undmg
|
|
|
|
xar
|
|
|
|
cpio
|
|
|
|
];
|
|
|
|
|
|
|
|
builder =
|
|
|
|
if stdenv.hostPlatform.isLinux then
|
|
|
|
./binary-builder.sh
|
|
|
|
else if stdenv.hostPlatform.isDarwin then
|
|
|
|
./binary-builder-darwin.sh
|
|
|
|
else throw "Not supported on ${stdenv.hostPlatform}.";
|
2007-08-11 20:55:40 +00:00
|
|
|
|
|
|
|
meta = {
|
2009-03-03 13:27:40 +00:00
|
|
|
description = "Free Pascal Compiler from a binary distribution";
|
2007-08-11 20:55:40 +00:00
|
|
|
};
|
2020-09-03 10:49:11 +00:00
|
|
|
}
|