about summary refs log tree commit diff
path: root/pkgs/development/compilers/fpc
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/compilers/fpc')
-rw-r--r--pkgs/development/compilers/fpc/2.4.0.nix39
-rwxr-xr-xpkgs/development/compilers/fpc/binary-builder.sh1
-rw-r--r--pkgs/development/compilers/fpc/binary.nix10
-rw-r--r--pkgs/development/compilers/fpc/default.nix11
-rw-r--r--pkgs/development/compilers/fpc/default.upstream6
5 files changed, 20 insertions, 47 deletions
diff --git a/pkgs/development/compilers/fpc/2.4.0.nix b/pkgs/development/compilers/fpc/2.4.0.nix
deleted file mode 100644
index 30081c9d8050c..0000000000000
--- a/pkgs/development/compilers/fpc/2.4.0.nix
+++ /dev/null
@@ -1,39 +0,0 @@
-{ stdenv, fetchurl, gawk }:
-
-let startFPC = import ./binary.nix { inherit stdenv fetchurl; }; in
-
-stdenv.mkDerivation rec {
-  version = "2.4.0";
-  name = "fpc-${version}";
-
-  src = fetchurl {
-    url = "http://downloads.sourceforge.net/sourceforge/freepascal/fpcbuild-${version}.tar.gz";
-    sha256 = "1m2g2bafjixbwl5b9lna5h7r56y1rcayfnbp8kyjfd1c1ymbxaxk";
-  };
-
-  buildInputs = [ startFPC gawk ];
-
-  preConfigure =
-    if stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux" then ''
-      sed -e "s@'/lib/ld-linux[^']*'@'''@" -i fpcsrc/compiler/systems/t_linux.pas
-      sed -e "s@'/lib64/ld-linux[^']*'@'''@" -i fpcsrc/compiler/systems/t_linux.pas
-    '' else "";
-
-  makeFlags = "NOGDB=1";
-
-  installFlags = "INSTALL_PREFIX=\${out}";
-  
-  postInstall = ''
-    for i in $out/lib/fpc/*/ppc*; do
-      ln -fs $i $out/bin/$(basename $i)
-    done
-    mkdir -p $out/lib/fpc/etc/
-    $out/lib/fpc/*/samplecfg $out/lib/fpc/${version} $out/lib/fpc/etc/
-  '';
-
-  meta = {
-    description = "Free Pascal Compiler from a source distribution";
-    maintainers = [stdenv.lib.maintainers.raskin];
-    platforms = stdenv.lib.platforms.linux;
-  };
-}
diff --git a/pkgs/development/compilers/fpc/binary-builder.sh b/pkgs/development/compilers/fpc/binary-builder.sh
index 8be36dec73e43..4308c1ed211ae 100755
--- a/pkgs/development/compilers/fpc/binary-builder.sh
+++ b/pkgs/development/compilers/fpc/binary-builder.sh
@@ -1,6 +1,7 @@
 source $stdenv/setup
 
 tar xf $src
+cd */
 tarballdir=$(pwd)
 for i in *.tar; do tar xvf $i; done
 echo "Deploying binaries.."
diff --git a/pkgs/development/compilers/fpc/binary.nix b/pkgs/development/compilers/fpc/binary.nix
index 88f0ab9106724..57e670750db77 100644
--- a/pkgs/development/compilers/fpc/binary.nix
+++ b/pkgs/development/compilers/fpc/binary.nix
@@ -1,18 +1,18 @@
 { stdenv, fetchurl }:
 
 stdenv.mkDerivation {
-  name = "fpc-2.4.0-binary";
+  name = "fpc-2.6.0-binary";
 
   src =
     if stdenv.system == "i686-linux" then
       fetchurl {
-        url = "ftp://ftp.chg.ru/pub/lang/pascal/fpc/dist/2.4.0/i386-linux/fpc-2.4.0.i386-linux.tar";
-        sha256 = "1zas9kp0b36zxqvb9i4idh2l0nb6qpmgah038l77w6las7ghh0dv";
+        url = "http://sourceforge.net/projects/freepascal/files/Linux/2.6.0/fpc-2.6.0.i386-linux.tar";
+        sha256 = "08yklvrfxvk59bxsd4rh1i6s3cjn0q06dzjs94h9fbq3n1qd5zdf";
       }
     else if stdenv.system == "x86_64-linux" then
       fetchurl {
-        url = "ftp://ftp.chg.ru/pub/lang/pascal/fpc/dist/2.4.0/x86_64-linux/fpc-2.4.0.x86_64-linux.tar";
-        sha256 = "111d11g5ra55hjywx64ldwwflpimsy8zryvap68v0309nyd23f0z";
+        url = "http://sourceforge.net/projects/freepascal/files/Linux/2.6.0/fpc-2.6.0.x86_64-linux.tar";
+        sha256 = "0k9vi75k39y735fng4jc2vppdywp82j4qhzn7x4r6qjkad64d8lx";
       }
     else throw "Not supported on ${stdenv.system}.";
 
diff --git a/pkgs/development/compilers/fpc/default.nix b/pkgs/development/compilers/fpc/default.nix
index 6be976783bcd8..b34b5e8a4465e 100644
--- a/pkgs/development/compilers/fpc/default.nix
+++ b/pkgs/development/compilers/fpc/default.nix
@@ -3,12 +3,12 @@
 let startFPC = import ./binary.nix { inherit stdenv fetchurl; }; in
 
 stdenv.mkDerivation rec {
-  version = "2.6.0";
+  version = "2.6.4";
   name = "fpc-${version}";
 
   src = fetchurl {
     url = "mirror://sourceforge/freepascal/fpcbuild-${version}.tar.gz";
-    sha256 = "1vxy2y8pm0ribhpdhqlwwz696ncnz4rk2dafbn1mjgipm97qb26p";
+    sha256 = "1akdlp4n9ai1gnn4yq236i5rx03rs5sjfgk60myb7nb9lk7kp74d";
   };
 
   buildInputs = [ startFPC gawk ];
@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
       sed -e "s@'/lib64/ld-linux[^']*'@'''@" -i fpcsrc/compiler/systems/t_linux.pas
     '' else "";
 
-  makeFlags = "NOGDB=1";
+  makeFlags = "NOGDB=1 FPC=${startFPC}/bin/fpc";
 
   installFlags = "INSTALL_PREFIX=\${out}";
   
@@ -31,9 +31,14 @@ stdenv.mkDerivation rec {
     $out/lib/fpc/*/samplecfg $out/lib/fpc/${version} $out/lib/fpc/etc/
   '';
 
+  passthru = {
+    bootstrap = startFPC;
+  };
+
   meta = {
     description = "Free Pascal Compiler from a source distribution";
     maintainers = [stdenv.lib.maintainers.raskin];
     platforms = stdenv.lib.platforms.linux;
+    inherit version;
   };
 }
diff --git a/pkgs/development/compilers/fpc/default.upstream b/pkgs/development/compilers/fpc/default.upstream
new file mode 100644
index 0000000000000..7c11fb4761e1e
--- /dev/null
+++ b/pkgs/development/compilers/fpc/default.upstream
@@ -0,0 +1,6 @@
+url http://sourceforge.net/projects/freepascal/files/Source/
+SF_version_dir
+version_link 'fpcbuild-[0-9.]+[.]tar[.]gz/download$'
+SF_redirect
+version '.*-([0-9.]+)[.]tar[.]gz' '\1'
+do_overwrite () { do_overwrite_just_version; }