about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2015-04-02 15:36:19 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2015-11-24 14:45:15 +0100
commit79a827c7fbca6d818314b5b455d96eddec1fce2e (patch)
tree253ab5d3257826b6171fb355321746a0d8c17e0a
parent342cf232eaaa5b476713edecc1197c20e01bfb50 (diff)
downloadnixlib-79a827c7fbca6d818314b5b455d96eddec1fce2e.tar
nixlib-79a827c7fbca6d818314b5b455d96eddec1fce2e.tar.gz
nixlib-79a827c7fbca6d818314b5b455d96eddec1fce2e.tar.bz2
nixlib-79a827c7fbca6d818314b5b455d96eddec1fce2e.tar.lz
nixlib-79a827c7fbca6d818314b5b455d96eddec1fce2e.tar.xz
nixlib-79a827c7fbca6d818314b5b455d96eddec1fce2e.tar.zst
nixlib-79a827c7fbca6d818314b5b455d96eddec1fce2e.zip
eql: reimplement using mkDerivation
-rw-r--r--pkgs/development/compilers/eql/default.nix90
1 files changed, 30 insertions, 60 deletions
diff --git a/pkgs/development/compilers/eql/default.nix b/pkgs/development/compilers/eql/default.nix
index 5bb0a2e5f649..8f1987c55594 100644
--- a/pkgs/development/compilers/eql/default.nix
+++ b/pkgs/development/compilers/eql/default.nix
@@ -1,54 +1,37 @@
-x@{builderDefsPackage
-  , fetchgit, qt4, ecl, xorgserver
-  , xkbcomp, xkeyboard_config
-  , ...}:
-builderDefsPackage
-(a :  
-let 
-  helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++ 
-    ["fetchgit"];
+{ stdenv, fetchgit, qt4, ecl, xorgserver, xkbcomp, xkeyboard_config }:
 
-  buildInputs = map (n: builtins.getAttr n x)
-    (builtins.attrNames (builtins.removeAttrs x helperArgNames));
-  sourceInfo = rec {
-    method = "fetchgit";
+stdenv.mkDerivation rec {
+  version = src.rev;
+  name = "eql-git-${version}";
+  src = fetchgit {
     rev = "9097bf98446ee33c07bb155d800395775ce0d9b2";
-    url = "git://gitorious.org/eql/eql";
-    hash = "1fp88xmmk1sa0iqxahfiv818bp2sbf66vqrd4xq9jb731ybdvsb8";
-    version = rev;
-    name = "eql-git-${version}";
+    url = "https://gitlab.com/eql/eql.git";
+    sha256 = "1fp88xmmk1sa0iqxahfiv818bp2sbf66vqrd4xq9jb731ybdvsb8";
   };
-in
-rec {
-  srcDrv = a.fetchgit {
-    url = sourceInfo.url;
-    sha256 = sourceInfo.hash;
-    rev = sourceInfo.rev;
-  };
-  src = srcDrv + "/";
-
-  inherit (sourceInfo) name version;
-  inherit buildInputs;
 
-  phaseNames = ["setVars" "fixPaths" "doQMake" "doMake" "doDeploy"];
+  buildInputs = [ ecl qt4 xorgserver xkbcomp xkeyboard_config ];
 
-  setVars = a.fullDepEntry (''
-    export NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -fPIC"
-  '') [];
+  NIX_CFLAGS_COMPILE = "-fPIC";
 
-  fixPaths = a.fullDepEntry (''
+  postPatch = ''
     sed -re 's@[(]in-home "gui/.command-history"[)]@(concatenate '"'"'string (ext:getenv "HOME") "/.eql-gui-command-history")@' -i gui/gui.lisp
-  '') ["minInit" "doUnpack"];
+  '';
+
+  buildPhase = ''
+    cd src
+    ecl -shell make-eql-lib.lisp
+    qmake eql_lib.pro
+    make
+    cd ..
 
-  doQMake = a.fullDepEntry (''
     cd src
     qmake eql_exe.pro
     make
     cd ..
     cd src
-  '') ["addInputs" "doUnpack" "buildEQLLib"];
+  '';
 
-  doDeploy = a.fullDepEntry (''
+  installPhase = ''
     cd ..
     mkdir -p $out/bin $out/lib/eql/ $out/include $out/include/gen $out/lib
     cp -r . $out/lib/eql/build-dir
@@ -56,35 +39,22 @@ rec {
     ln -s $out/lib/eql/build-dir/src/*.h $out/include
     ln -s $out/lib/eql/build-dir/src/gen/*.h $out/include/gen
     ln -s $out/lib/eql/build-dir/libeql*.so* $out/lib
-  '') ["minInit"];
+  '';
 
-  buildEQLLib = a.fullDepEntry (''
-    cd src
-    ecl -shell make-eql-lib.lisp
-    qmake eql_lib.pro
-    make
-    cd ..
-  '') ["doUnpack" "addInputs"];
-
-
-  meta = {
+  meta = with stdenv.lib; {
     description = "Embedded Qt Lisp (ECL+Qt)";
-    maintainers = with a.lib.maintainers;
-    [
-      raskin
-    ];
-    platforms = with a.lib.platforms;
-      linux;
+    maintainers = with maintainers; [ raskin ];
+    platforms = with platforms; linux;
+    license = licenses.mit;
   };
+
   passthru = {
     updateInfo = {
       downloadPage = "http://password-taxi.at/EQL";
       method = "fetchgit";
-      rev = "370b7968fd73d5babc81e35913a37111a788487f";
-      url = "git://gitorious.org/eql/eql";
-      hash = "2370e111d86330d178f3ec95e8fed13607e51fed8859c6e95840df2a35381636";
+      rev = src.rev;
+      url = src.url;
+      hash = src.sha256;
     };
-    inherit srcDrv;
   };
-}) x
-
+}